do_after() now does its checks every tick, thus preventing people from fucking off for the duration, and coming back just before it finishes.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2770 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2011-12-22 14:15:35 +00:00
parent a694e06991
commit d650ded822

View File

@@ -1253,12 +1253,14 @@ proc/listclearnulls(list/list)
/proc/do_after(mob/M as mob, time as num)
var/turf/T = M.loc
var/holding = M.equipped()
sleep(time)
if(M)
if ((M.loc == T && M.equipped() == holding && !( M.stat )))
return 1
else
return 0
for(var/i=0, i<time)
if(M)
if ((M.loc == T && M.equipped() == holding && !( M.stat )))
i++
sleep(1)
else
return 0
return 1
/proc/hasvar(var/datum/A, var/varname)
//Takes: Anything that could possibly have variables and a varname to check.