Skip to content

Glide size is now determined by cpu usage. #4146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

dwasint
Copy link
Collaborator

@dwasint dwasint commented Nov 7, 2024

About The Pull Request

Non player facing change so no CL
tgstation/tgstation#85971

Why It's Good For The Game

Makes movement feel smoother

Changelog

🆑
/:cl:

@Absolucy
Copy link
Member

Absolucy commented Nov 7, 2024

imo it is somewhat user facing, if the effect is making movement feel smoother, even if it's a minor one.

var/error = max((last_cpu - 100) / 100 * world.tick_lag, 0)

for(var/atom/movable/trouble as anything in GLOB.gliding_atoms)
if(world.time >= trouble.glide_stopping_time || QDELETED(trouble))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(world.time >= trouble.glide_stopping_time || QDELETED(trouble))
if(world.time >= trouble.glide_stopping_time || QDELING(trouble))

QDELETED(trouble) is just (isnull(trouble) || QDELING(trouble)) - and we'd runtime here anyways if trouble is null.

// cache for sonic speed
cpu_values[cpu_index] = real_cpu
GLOB.avg_cpu_values[cpu_index] = avg_cpu
GLOB.cpu_index = WRAP(cpu_index + 1, 1, CPU_SIZE + 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GLOB.cpu_index = WRAP(cpu_index + 1, 1, CPU_SIZE + 1)
WRAP_UP(GLOB.cpu_index, CPU_SIZE + 1)

double check that it's the same tho, just to be 100% sure

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would need to run a few number tests but I think WRAP_UP would be different

@ThePooba ThePooba merged commit f610110 into Monkestation:master Dec 4, 2024
24 checks passed
@LemonInTheDark
Copy link
Contributor

really shouldn't have merged this as is, it contains a bunch of debug shit that is now cluttering your codebase

@LemonInTheDark
Copy link
Contributor

also idk if active correction is actually a good idea, just ftr

@dwasint
Copy link
Collaborator Author

dwasint commented Jan 11, 2025

also idk if active correction is actually a good idea, just ftr

yea after seeing it in action for multiple runs it works for small deviations but lag spikes fucks with it hrder

dwasint added a commit that referenced this pull request Jan 11, 2025
Absolucy pushed a commit that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants