diff options
author | Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> | 2022-07-07 23:19:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 00:19:17 +0200 |
commit | 6a2513f0d54e1b6cbc2ebcd583e4a9fe22627443 (patch) | |
tree | b961fd66961c2833b26e2554ec8ccca595d400c8 /Northstar.CustomServers/mod | |
parent | d5989edef55c2b6d14e671819c87f9fe65f4b377 (diff) | |
download | NorthstarMods-6a2513f0d54e1b6cbc2ebcd583e4a9fe22627443.tar.gz NorthstarMods-6a2513f0d54e1b6cbc2ebcd583e4a9fe22627443.zip |
improved sprinting and detonating logic for FD (#410)
Diffstat (limited to 'Northstar.CustomServers/mod')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stalker.gnut | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stalker.gnut b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stalker.gnut index 29e235b5..9ff479f9 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stalker.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_stalker.gnut @@ -191,11 +191,13 @@ void function FDStalkerThink( entity npc, entity generator ) generator.EndSignal( "OnDestroy" ) bool isSprinting = false thread FDStalkerGetsStunned( npc , generator ) - while (IsAlive(npc)) + while ( IsAlive( npc ) ) { WaitFrame() - if ( DistanceSqr( npc.GetOrigin(), generator.GetOrigin() ) < (600 * 600) && !isSprinting) + // cant sprint with 1 leg + // also upped to 1800 so that stalkers sprint from roughly their vanilla positions, could probably do it based on % of distance left to go? + if ( !IsCrawling( npc ) && DistanceSqr( npc.GetOrigin(), generator.GetOrigin() ) < (1800 * 1800) && !isSprinting ) { entity weapon = npc.GetActiveWeapon() if (IsValid(weapon)) @@ -206,10 +208,13 @@ void function FDStalkerThink( entity npc, entity generator ) npc.ClearMoveAnim() npc.SetMoveAnim("sp_spectre_sprint_F") npc.SetNoTarget( true ) + // stalkers were just going to the final node and stopping, meaning they never actually reached the harvester + npc.AssaultPoint(generator.GetOrigin()) isSprinting = true } - if ( DistanceSqr( npc.GetOrigin(), generator.GetOrigin() ) > (230 * 230) ) + // upped from 230 to more accurately mimic vanilla i think? + if ( DistanceSqr( npc.GetOrigin(), generator.GetOrigin() ) > (275 * 275) ) continue break |