Skip to content
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

Movement glide #55

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
///Speed mod for run intent
#define MOB_RUN_MOVE_MOD 3
///Move mod for going diagonally
#define DIAG_MOVEMENT_ADDED_DELAY_MULTIPLIER 1.6
#define DIAG_MOVEMENT_ADDED_DELAY_MULTIPLIER (sqrt(2))


//Pain or shock reduction for different reagents
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/movement.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//The minimum for glide_size to be clamped to.
//If you want more classic style "delay" movement while still retaining the smoothness improvements at higher framerates, set this to 8
#define MIN_GLIDE_SIZE 3
#define MIN_GLIDE_SIZE 1
//The maximum for glide_size to be clamped to.
//This shouldn't be higher than the icon size, and generally you shouldn't be changing this, but it's here just in case.
#define MAX_GLIDE_SIZE 32
Expand Down
3 changes: 1 addition & 2 deletions code/modules/mob/mob_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@
return O.relaymove(L, direction)

var/add_delay = mob.cached_multiplicative_slowdown + mob.next_move_slowdown
//RUTGMC EDIT ADDITION BEGIN - Preds
//Preds
if(mob.shield_slowdown)
add_delay += mob.shield_slowdown
//RUTGMC EDIT ADDITION END
mob.next_move_slowdown = 0
mob.set_glide_size(DELAY_TO_GLIDE_SIZE(add_delay * ( (NSCOMPONENT(direction) && EWCOMPONENT(direction)) ? DIAG_MOVEMENT_ADDED_DELAY_MULTIPLIER : 1 ) )) // set it now in case of pulled objects
//If the move was recent, count using old_move_delay
Expand Down
Loading