Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spec_mode bind not working #706

Merged
merged 5 commits into from
Dec 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Northstar.CustomServers/mod/scripts/vscripts/mp/_spectator.gnut
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) { }
}
Expand Down Expand Up @@ -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
}
}
Loading