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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long actions (like resisting out of handcuffs) will no longer count space drifting as moving. #14187

Merged
merged 3 commits into from
Jan 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 21 additions & 4 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ Proc for attack log creation, because really why not
if(!user || !target)
return 0
var/user_loc = user.loc

var/drifting = 0
if(!user.Process_Spacemove(0) && user.inertia_dir)
drifting = 1

var/target_loc = target.loc

Expand All @@ -167,7 +171,12 @@ Proc for attack log creation, because really why not
break
if(uninterruptible)
continue
if(user.loc != user_loc || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying )

if(drifting && !user.inertia_dir)
drifting = 0
user_loc = user.loc

if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying )
. = 0
break
if (progress)
Expand All @@ -182,7 +191,11 @@ Proc for attack log creation, because really why not
Tloc = target.loc

var/atom/Uloc = user.loc


var/drifting = 0
if(!user.Process_Spacemove(0) && user.inertia_dir)
drifting = 1

var/holding = user.get_active_hand()

var/holdingnull = 1 //User's hand started out empty, check for an empty hand
Expand All @@ -200,8 +213,12 @@ Proc for attack log creation, because really why not
sleep(1)
if (progress)
progbar.update(world.time - starttime)

if(!user || user.stat || user.weakened || user.stunned || user.loc != Uloc)

if(drifting && !user.inertia_dir)
drifting = 0
Uloc = user.loc

if(!user || user.stat || user.weakened || user.stunned || (!drifting && user.loc != Uloc))
. = 0
break

Expand Down