mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Adds "Pause after first step" functionality to integrated pAI bots and the AI Eye (#13653)
* adds stumble functionality to pais * better lastmovement setting * adds stumble to the AIeye
This commit is contained in:
@@ -119,9 +119,13 @@ var/global/list/reagents_to_log = list(FUEL, PLASMA, PACID, SACID, AMUTATIONTOXI
|
||||
|
||||
/obj/proc/pAImove(mob/living/silicon/pai/user, dir) //called when integrated pAI attempts to move
|
||||
if(pAImove_delayer.blocked())
|
||||
user.last_movement=world.time
|
||||
return 0
|
||||
else
|
||||
delayNextpAIMove(getpAIMovementDelay())
|
||||
if (user.client.prefs.stumble && ((world.time - user.last_movement) > 5) && getpAIMovementDelay() < 2)
|
||||
delayNextpAIMove(3) //if set, delays the second step when a mob starts moving to attempt to make precise high ping movement easier
|
||||
user.last_movement=world.time
|
||||
return 1
|
||||
|
||||
/obj/proc/getpAIMovementDelay()
|
||||
|
||||
@@ -123,7 +123,10 @@
|
||||
for(var/i = 0; i < max(user.sprint, initial); i += 20)
|
||||
var/turf/step = get_turf(get_step(user.eyeobj, direct))
|
||||
if(step)
|
||||
if (user.client.prefs.stumble && ((world.time - user.last_movement) > 4))
|
||||
user.delayNextMove(3) //if set, delays the second step when a mob starts moving to attempt to make precise high ping movement easier
|
||||
user.eyeobj.forceMove(step)
|
||||
user.last_movement=world.time
|
||||
|
||||
user.cooldown = world.timeofday + 5
|
||||
if(user.acceleration)
|
||||
|
||||
Reference in New Issue
Block a user