Minor speedups to movement: First Blood Part 2

This commit is contained in:
vuonojenmustaturska
2017-11-14 22:59:45 +02:00
committed by CitadelStationBot
parent 9c7da6a133
commit 8136148303
27 changed files with 48 additions and 63 deletions
@@ -56,8 +56,6 @@
nutrition -= HUNGER_FACTOR/10
if(m_intent == MOVE_INTENT_RUN)
nutrition -= HUNGER_FACTOR/10
if((disabilities & FAT) && m_intent == MOVE_INTENT_RUN && bodytemperature <= 360)
bodytemperature += 2
/mob/living/carbon/Moved(oldLoc, Dir)
. = ..()
@@ -56,8 +56,8 @@
FP.update_icon()
update_inv_shoes()
//End bloody footprints
S.step_action()
/mob/living/carbon/human/Moved()
. = ..()
if(buckled_mobs && buckled_mobs.len && riding_datum)
-1
View File
@@ -471,7 +471,6 @@
s_active.close(src)
if(lying && !buckled && prob(getBruteLoss()*200/maxHealth))
makeTrail(newloc, T, old_direction)
/mob/living/movement_delay(ignorewalk = 0)
+3 -2
View File
@@ -395,7 +395,10 @@
pulling = null
grab_state = 0
update_pull_hud_icon()
<<<<<<< HEAD
=======
>>>>>>> 3f58245... Minor speedups to movement: First Blood Part 2 (#32702)
if(isliving(ex_pulled))
var/mob/living/L = ex_pulled
L.update_canmove()// mob gets up if it was lyng down in a chokehold
@@ -676,8 +679,6 @@
/mob/proc/canface()
if(!canmove)
return 0
if(client.moving)
return 0
if(world.time < client.move_delay)
return 0
if(stat==2)
+9 -14
View File
@@ -1,8 +1,8 @@
/mob/CanPass(atom/movable/mover, turf/target)
if((mover.pass_flags & PASSMOB))
return TRUE
if(istype(mover, /obj/item/projectile) || mover.throwing)
return (!density || lying)
if(mover.checkpass(PASSMOB))
return TRUE
if(buckled == mover)
return TRUE
if(ismob(mover))
@@ -112,6 +112,7 @@
#define MOVEMENT_DELAY_BUFFER 0.75
#define MOVEMENT_DELAY_BUFFER_DELTA 1.25
/client/Move(n, direct)
if(world.time < move_delay)
return FALSE
@@ -129,15 +130,13 @@
if(mob.stat == DEAD)
mob.ghostize()
return FALSE
if(moving)
return FALSE
if(mob.force_moving)
return FALSE
if(isliving(mob))
var/mob/living/L = mob
if(L.incorporeal_move) //Move though walls
Process_Incorpmove(direct)
return FALSE
var/mob/living/L = mob //Already checked for isliving earlier
if(L.incorporeal_move) //Move though walls
Process_Incorpmove(direct)
return FALSE
if(mob.remote_control) //we're controlling something, our movement is relayed to it
return mob.remote_control.relaymove(mob, direct)
@@ -162,7 +161,6 @@
return FALSE
//We are now going to move
moving = 1
var/delay = mob.movement_delay()
if (old_move_delay + (delay*MOVEMENT_DELAY_BUFFER_DELTA) + MOVEMENT_DELAY_BUFFER > world.time)
move_delay = old_move_delay + delay
@@ -181,8 +179,7 @@
else
. = ..()
moving = 0
if(mob && .)
if(.) // If mob is null here, we deserve the runtime
if(mob.throwing)
mob.throwing.finalize(FALSE)
@@ -190,8 +187,6 @@
for(var/obj/O in mob.user_movement_hooks)
O.intercept_user_move(direct, mob, n, oldloc)
return .
/mob/Moved(oldLoc, dir, Forced = FALSE)
. = ..()
for(var/obj/O in contents)