aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut2
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_lts.nut1
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut1
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut20
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut3
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut2
6 files changed, 27 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
index af028e71b..abd189e82 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
@@ -254,7 +254,7 @@ void function SetPlayerLoadoutDirty( entity player )
void function TryGivePilotLoadoutForGracePeriod( entity player )
{
- if ( !IsLobby() && IsAlive( player ) && player.s.loadoutDirty )
+ if ( !IsLobby() && IsAlive( player ) && player.s.loadoutDirty && !player.IsTitan() && !player.ContextAction_IsActive() )
{
player.s.loadoutDirty = false
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_lts.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_lts.nut
index 485981d8d..31c85a573 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_lts.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_lts.nut
@@ -22,6 +22,7 @@ void function GamemodeLts_Init()
SetShouldUseRoundWinningKillReplay( true )
SetRoundWinningKillReplayKillClasses( true, true ) // both titan and pilot kills are tracked
ScoreEvent_SetupEarnMeterValuesForTitanModes()
+ SetLoadoutGracePeriodEnabled( false )
FlagSet( "ForceStartSpawn" )
AddCallback_OnPilotBecomesTitan( RefreshThirtySecondWallhackHighlight )
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut
index c4ffada1b..a7dc00de1 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut
@@ -8,6 +8,7 @@ void function GamemodeTTDM_Init()
Riff_ForceTitanExitEnabled( eTitanExitEnabled.Never )
TrackTitanDamageInPlayerGameStat( PGS_ASSAULT_SCORE )
ScoreEvent_SetupEarnMeterValuesForMixedModes()
+ SetLoadoutGracePeriodEnabled( false )
ClassicMP_SetCustomIntro( TTDMIntroSetup, TTDMIntroLength )
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut
index 3acd16529..b5c6ea32f 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut
@@ -39,6 +39,10 @@ bool function ClientCommandCallback_PrivateMatchLaunch( entity player, array<str
{
if ( file.startState == ePrivateMatchStartState.STARTING )
{
+ if ( GetConVarBool( "ns_private_match_only_host_can_start" ) )
+ if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) )
+ return true
+
// cancel start if we're already mid-countdown
file.startState = ePrivateMatchStartState.READY
SetUIVar( level, "privatematch_starting", ePrivateMatchStartState.READY )
@@ -62,6 +66,10 @@ bool function ClientCommandCallback_PrivateMatchSetMode( entity player, array<st
if ( args.len() != 1 )
return true
+ if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) == 2 )
+ if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) )
+ return true
+
// todo: need to verify this value
file.mode = args[0]
//GameRules_SetGameMode( args[0] ) // can't do this here due to out of sync errors with new clients
@@ -80,6 +88,10 @@ bool function ClientCommandCallback_SetCustomMap( entity player, array<string> a
if ( args.len() != 1 )
return true
+ if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) == 2 )
+ if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) )
+ return true
+
// todo: need to verify this value
file.map = args[0]
@@ -190,6 +202,10 @@ bool function ClientCommandCallback_PrivateMatchSetPlaylistVarOverride( entity p
{
if ( args.len() < 2 )
return true
+
+ if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) >= 1 )
+ if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) )
+ return true
bool found = false
foreach ( string category in GetPrivateMatchSettingCategories() )
@@ -212,6 +228,10 @@ bool function ClientCommandCallback_PrivateMatchSetPlaylistVarOverride( entity p
bool function ClientCommandCallback_ResetMatchSettingsToDefault( entity player, array<string> args )
{
+ if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) >= 1 )
+ if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) )
+ return true
+
ClearPlaylistVarOverrides()
return true
} \ No newline at end of file
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
index 4b90b1a29..562f65e50 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
@@ -80,6 +80,9 @@ void function PIN_GameStart()
void function SetGameState( int newState )
{
+ if ( newState == GetGameState() )
+ return
+
SetServerVar( "gameStateChangeTime", Time() )
SetServerVar( "gameState", newState )
svGlobal.levelEnt.Signal( "GameStateChanged" )
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
index 108909a30..119b1712b 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
@@ -213,7 +213,7 @@ void function ScoreEvent_SetupEarnMeterValuesForMixedModes() // mixed modes in t
{
// todo needs earn/overdrive values
// player-controlled stuff
- ScoreEvent_SetEarnMeterValues( "KillPilot", 0.7, 0.15 )
+ ScoreEvent_SetEarnMeterValues( "KillPilot", 0.07, 0.15 )
ScoreEvent_SetEarnMeterValues( "KillTitan", 0.0, 0.15 )
ScoreEvent_SetEarnMeterValues( "TitanKillTitan", 0.0, 0.0 ) // unsure
ScoreEvent_SetEarnMeterValues( "PilotBatteryStolen", 0.0, 0.35 ) // this actually just doesn't have overdrive in vanilla even