Movement delay
Posted: Wed Jan 03, 2018 5:36 pm
So I was trying to reduce the impact stamina damage has on movement speed, but I found some weird behaviour in the way movement delay works.
It seems like the minimum movement delay increase at 40 already feels like a very large slowdown. It also seems to me like there should be a difference between running around with 41 health and 51 health, but somehow I don't notice this at all when testing.
Does this code round or cut off the value? Why am I not seeing the difference when testing? Above 75 I get the extra slowdown I would expect.
This is what I would expect:
0-39 health -> no slowdown
40-49 health -> +1 move delay
50-74 health -> +2 move delay
75->99 health -> +3 move delay
Can someone help me make sense of this?
It seems like the minimum movement delay increase at 40 already feels like a very large slowdown. It also seems to me like there should be a difference between running around with 41 health and 51 health, but somehow I don't notice this at all when testing.
Code: Select all
if(health_deficiency + H.staminaloss >= 40)
if(flight)
. += (health_deficiency / 75)
else
. += (health_deficiency / 25)
This is what I would expect:
0-39 health -> no slowdown
40-49 health -> +1 move delay
50-74 health -> +2 move delay
75->99 health -> +3 move delay
Can someone help me make sense of this?