mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 21:49:11 +01:00
Fixes confused movement for walking/running, adjusts behaviour
This commit is contained in:
@@ -125,7 +125,7 @@ default behaviour is:
|
||||
..()
|
||||
if (!istype(AM, /atom/movable) || AM.anchored)
|
||||
if(confused && prob(50) && m_intent=="run")
|
||||
Weaken(1)
|
||||
Weaken(2)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
visible_message("<span class='warning'>[src] [pick("ran", "slammed")] into \the [AM]!</span>")
|
||||
src.apply_damage(5, BRUTE)
|
||||
|
||||
@@ -286,8 +286,8 @@
|
||||
//specific vehicle move delays are set in code\modules\vehicles\vehicle.dm
|
||||
move_delay = world.time + tickcomp
|
||||
//drunk driving
|
||||
if(mob.confused && prob(75))
|
||||
direct = pick(cardinal)
|
||||
if(mob.confused && prob(20)) //vehicles tend to keep moving in the same direction
|
||||
direct = turn(direct, pick(90, -90))
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
|
||||
if(istype(mob.machine, /obj/machinery))
|
||||
@@ -310,9 +310,9 @@
|
||||
else if(mob.confused)
|
||||
switch(mob.m_intent)
|
||||
if("run")
|
||||
if(prob(75)) direct = pick(cardinal)
|
||||
if(prob(50)) direct = turn(direct, pick(90, -90))
|
||||
if("walk")
|
||||
if(prob(25)) direct = pick(cardinal)
|
||||
if(prob(25)) direct = turn(direct, pick(90, -90))
|
||||
move_delay += 2
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
|
||||
@@ -351,13 +351,17 @@
|
||||
M.animate_movement = 2
|
||||
return
|
||||
|
||||
else if(mob.confused)
|
||||
switch(mob.m_intent)
|
||||
if("run")
|
||||
if(prob(75)) step(mob, pick(cardinal))
|
||||
if("walk")
|
||||
if(prob(25)) step(mob, pick(cardinal))
|
||||
else
|
||||
else
|
||||
if(mob.confused)
|
||||
switch(mob.m_intent)
|
||||
if("run")
|
||||
if(prob(75))
|
||||
direct = turn(direct, pick(90, -90))
|
||||
n = get_step(mob, direct)
|
||||
if("walk")
|
||||
if(prob(25))
|
||||
direct = turn(direct, pick(90, -90))
|
||||
n = get_step(mob, direct)
|
||||
. = mob.SelfMove(n, direct)
|
||||
|
||||
for (var/obj/item/weapon/grab/G in mob)
|
||||
|
||||
Reference in New Issue
Block a user