[ready] Smooth-ish move rising: revengeance (#47817)

* Smooth movement

Squashed commit:

[870d550fff] updates a variable name to not shadow a parent variable

[65131a9a4b] redundant

[7c85f7b87e] override based pulling and pushing

[60a9760c4b] unnecessary when it's done via an override

[0a67dfb3cb] removes a redundant manual override

[7f25104fed] pushing

[2bfd9973eb] eh

[fca7155245] cast properly

[ad4b9ad8ab] compile fix

[c28fde4bfb] some wonkiness with pulling fixed

[0e028d30b3] buckling fix + finer rounding

[8f93df2bbe] dragging + buckling fixes

[1541e1ce78] small optimization

[bda72345dd] smoother movement

fix to dragging being fucky

vehicle fix

orbiter fix

eof newline

cleanup

comment cleanup

stupid hack

bunch of tweaks/hacks + 60 fps default oh god

potential fix for orbiter issues (in a shitty way)

early override for some cases

unset orbit

multiply instead of add offset

no

no more timescale scaling and higher multiplier

meant to include this in last commit

comment

* clamp to 6, 1.25 multiplier

* (poorly) fixed buckles not always propagating

* get rid of some debug prints whoops

* fixes an infinite loop

* syntax + update savefile instead of interpreting 0 different

* uuuh
This commit is contained in:
Rob Bailey
2019-12-05 02:34:46 +00:00
committed by Emmett Gaines
parent 5c4bbdb984
commit 798bbd3d99
13 changed files with 100 additions and 27 deletions
+1 -1
View File
@@ -1465,7 +1465,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
preferred_map = maplist[pickedmap]
if ("clientfps")
var/desiredfps = input(user, "Choose your desired fps. (0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num
var/desiredfps = input(user, "Choose your desired fps. (0 = synced with server tickrate (currently:[world.fps]))", "Character Preference", clientfps) as null|num
if (!isnull(desiredfps))
clientfps = desiredfps
parent.fps = desiredfps
+5 -1
View File
@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
#define SAVEFILE_VERSION_MAX 29
#define SAVEFILE_VERSION_MAX 30
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -47,6 +47,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
parent.update_movement_keys()
to_chat(parent, "<span class='userdanger'>Empty keybindings, setting default to [hotkeys ? "Hotkey" : "Classic"] mode</span>")
if(current_version < 30)
if(clientfps == 0)
clientfps = 60
/datum/preferences/proc/update_character(current_version, savefile/S)
if(current_version < 19)
pda_style = "mono"
+5 -4
View File
@@ -236,8 +236,8 @@
var/current_dir
if(isliving(AM))
current_dir = AM.dir
if(step(AM, t))
step(src, t)
if(AM.Move(get_step(AM.loc, t), t, glide_size))
Move(get_step(loc, t), t)
if(current_dir)
AM.setDir(current_dir)
now_pushing = FALSE
@@ -609,7 +609,7 @@
/mob/living/proc/update_damage_overlays()
return
/mob/living/Move(atom/newloc, direct)
/mob/living/Move(atom/newloc, direct, glide_size_override)
if(lying)
if(direct & EAST)
lying = 90
@@ -619,7 +619,8 @@
lying_prev = lying
if (buckled && buckled.loc != newloc) //not updating position
if (!buckled.anchored)
return buckled.Move(newloc, direct)
buckled.glide_size = glide_size //This should be being set by the override in the move below but it's not and I'm fucking suffering
return buckled.Move(newloc, direct, glide_size_override)
else
return FALSE
+6 -2
View File
@@ -190,7 +190,7 @@
///Allows a datum to intercept all click calls this mob is the source of
var/datum/click_intercept
///THe z level this mob is currently registered in
///The z level this mob is currently registered in
var/registered_z = null
var/memory_throttle_time = 0
@@ -204,7 +204,11 @@
var/bloody_hands = 0
var/datum/focus //What receives our keyboard inputs. src by default
/// What receives our keyboard inputs. src by default
var/datum/focus
/// Used for tracking last uses of emotes for cooldown purposes
var/list/emotes_used
///Whether the mob is updating glide size when movespeed updates or not
var/updating_glide_size = TRUE
+2
View File
@@ -110,6 +110,8 @@ Key procs
continue
. += amt
cached_multiplicative_slowdown = .
if(updating_glide_size)
set_glide_size(DELAY_TO_GLIDE_SIZE(cached_multiplicative_slowdown))
///Get the move speed modifiers list of the mob
/mob/proc/get_movespeed_modifiers()
@@ -1007,7 +1007,6 @@
throwforce = 10
throw_speed = 0.1
throw_range = 28
glide_size = 2
flags_1 = CONDUCT_1
max_amount = 60
turf_type = /turf/open/floor/sepia