aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack <66967891+ASpoonPlaysGames@users.noreply.github.com>2023-12-17 01:25:30 +0000
committerGeckoEidechse <gecko.eidechse+git@pm.me>2023-12-17 02:26:42 +0100
commit93b9c734d66af04d6e245216723c93ea49766c5b (patch)
tree319a7533f5d7bebaa332ed45ab8e2f9ee8c1c2a8
parente49e7e8321269a3de19f07981c8974e87e9fd938 (diff)
downloadNorthstarMods-93b9c734d66af04d6e245216723c93ea49766c5b.tar.gz
NorthstarMods-93b9c734d66af04d6e245216723c93ea49766c5b.zip
Fix `spec_mode` bind not working (#706)
Fixes `spec_mode` bind not working by adding a small spectator replay delay Co-authored-by: DBmaoha <56738369+DBmaoha@users.noreply.github.com>
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_spectator.gnut10
1 files changed, 8 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_spectator.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_spectator.gnut
index aa2fc108..510a9b7e 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_spectator.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_spectator.gnut
@@ -170,6 +170,9 @@ void function SpectatorFunc_Default( entity player )
{
player.SetObserverTarget( target )
player.StartObserverMode( OBS_MODE_CHASE )
+ // the delay of 0.1 seems to fix the spec_mode command not working
+ // when using the keybind
+ player.SetSpecReplayDelay( 0.1 )
}
catch ( ex ) { }
}
@@ -215,9 +218,12 @@ bool function ClientCommandCallback_spec_mode( entity player, array<string> args
else if ( player.GetObserverMode() == OBS_MODE_IN_EYE )
{
// set to third person spectate
- player.SetSpecReplayDelay( 0.0 )
+
+ // the delay of 0.1 seems to fix the spec_mode command not working
+ // when using the keybind
+ player.SetSpecReplayDelay( 0.1 )
player.StartObserverMode( OBS_MODE_CHASE )
}
return true
-} \ No newline at end of file
+}