From d58e653e083b25d2335e1ccb2982f2fb493d626c Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Fri, 12 Mar 2021 02:48:08 +0100 Subject: [PATCH] func_train: Make sure we trigger PathDone() BEFRE switching to the new node and remove the targetname check for PC_WAIT/TRAIN_WAIT spawnflags --- get_gamepacks.sh | 2 +- src/gs-entbase/server/func_train.qc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/get_gamepacks.sh b/get_gamepacks.sh index c049aa05..3a9ad886 100755 --- a/get_gamepacks.sh +++ b/get_gamepacks.sh @@ -6,7 +6,7 @@ grab_mod() { if [ -f "$SCRPATH/$1"/LICENSE ]; then cd "$SCRPATH/$1" - git pull + git pull else cd "$SCRPATH" git clone "$2" "$1" diff --git a/src/gs-entbase/server/func_train.qc b/src/gs-entbase/server/func_train.qc index 74f15ea0..a68536e6 100644 --- a/src/gs-entbase/server/func_train.qc +++ b/src/gs-entbase/server/func_train.qc @@ -167,6 +167,7 @@ func_train::PathNext(void) } SetOrigin(eNode.origin - (mins + maxs) * 0.5); + PathDone(); /* if speed is 0, retain current speed */ if (eNode.m_flSpeed > 0) @@ -179,11 +180,9 @@ func_train::PathNext(void) /* warp */ if (eNode.spawnflags & PC_TELEPORT) { SetOrigin(eNode.origin - (mins + maxs) * 0.5); - PathDone(); } /* stop until triggered again */ - if (targetname) if (eNode.spawnflags & PC_WAIT || spawnflags & TRAIN_WAIT) { SoundStop(); return;