aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Northstar.Client/mod.json5
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_english.txtbin20116 -> 10737 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_german.txtbin9760 -> 19418 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_japanese.txtbin16304 -> 17396 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txtbin9389 -> 18936 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txtbin0 -> 15824 bytes
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut63
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut5
-rw-r--r--Northstar.Coop/mod.json6
-rw-r--r--Northstar.Custom/keyvalues/playlists_v2.txt286
-rw-r--r--Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman.txt11
-rw-r--r--Northstar.Custom/mod.json66
-rw-r--r--Northstar.Custom/mod/resource/northstar_custom_portuguese.txtbin2639 -> 5338 bytes
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut95
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut195
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut23
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_chamber.nut26
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hidden.nut60
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_chamber.nut41
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut44
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut11
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut32
-rw-r--r--Northstar.CustomServers/mod.json18
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut57
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut14
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut2
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut16
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut1
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_ai_mp.gnut4
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut2
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut53
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_wargames.nut16
32 files changed, 977 insertions, 175 deletions
diff --git a/Northstar.Client/mod.json b/Northstar.Client/mod.json
index 4842755b..fbaf1203 100644
--- a/Northstar.Client/mod.json
+++ b/Northstar.Client/mod.json
@@ -25,14 +25,13 @@
"DefaultValue": "0"
}
],
- // ui inits need to happen before so our init callbacks get called
"Scripts": [
{
"Path": "ui/menu_ns_modmenu.nut",
"RunOn": "UI",
"UICallback": {
"Before": "AddNorthstarModMenu",
- "After": "AddNorthstarModMenu_MainMenuFooter" // need to do this after, so we add footer after mainmenu init
+ "After": "AddNorthstarModMenu_MainMenuFooter"
}
},
@@ -72,4 +71,4 @@
"Localisation": [
"resource/northstar_client_localisation_%language%.txt"
]
-} \ No newline at end of file
+}
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
index 49ec746c..4cb79354 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_german.txt b/Northstar.Client/mod/resource/northstar_client_localisation_german.txt
index fdea511e..3d7a7551 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_german.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_german.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt b/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt
index e4ac2680..58abc549 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_japanese.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txt b/Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txt
index 332d25f8..0db15c43 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_portuguese.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt b/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt
new file mode 100644
index 00000000..cd8cf977
--- /dev/null
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt
Binary files differ
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
index bca14f05..7254f199 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
@@ -91,6 +91,36 @@ void function AddNorthstarServerBrowserMenu()
AddMenu( "ServerBrowserMenu", $"resource/ui/menus/server_browser.menu", InitServerBrowserMenu, "#MENU_SERVER_BROWSER" )
}
+void function UpdatePrivateMatchModesAndMaps()
+{
+ array<string> realMaps = [ "mp_lobby" ]
+ realMaps.extend( GetPrivateMatchMaps() )
+
+ foreach ( int enum_, string map in realMaps )
+ {
+ if ( filterArguments.filterMaps.find( map ) != -1 )
+ continue
+
+ filterArguments.filterMaps.append( map )
+
+ string localized = GetMapDisplayName( map )
+ Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectMap" ) , localized, string( enum_ + 1 ) )
+ }
+
+ array<string> realModes = [ "private_match" ]
+ realModes.extend( GetPrivateMatchModes() )
+
+ foreach( int enum_, string mode in realModes )
+ {
+ string localized = GetGameModeDisplayName( mode )
+ if ( filterArguments.filterGamemodes.find( localized ) != -1 )
+ continue
+
+ filterArguments.filterGamemodes.append( localized )
+ Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectGamemode" ) , localized, string( enum_ + 1 ) )
+ }
+}
+
void function InitServerBrowserMenu()
{
file.menu = GetMenu( "ServerBrowserMenu" )
@@ -104,28 +134,14 @@ void function InitServerBrowserMenu()
file.serversGamemode = GetElementsByClassname( file.menu, "ServerGamemode" )
file.serversLatency = GetElementsByClassname( file.menu, "ServerLatency" )
- // Create filter arrays
- filterArguments.filterMaps.extend(GetPrivateMatchMaps())
- filterArguments.filterMaps.insert(0, "SWITCH_ANY")
- filterArguments.filterMaps.append("mp_lobby")
-
- foreach ( int enum_, string map in filterArguments.filterMaps )
- Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectMap" ) , map, string( enum_ ) )
-
-
- filterArguments.filterGamemodes = clone GetPrivateMatchModes()
- filterArguments.filterGamemodes.insert(0, "SWITCH_ANY")
-
- // GetGameModeDisplayName( mode ) requires server talk even if it can be entirely client side
- foreach ( int enum_, string mode in filterArguments.filterGamemodes )
- Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectGamemode" ) , mode, string( enum_ ) )
-
+ filterArguments.filterMaps = [ "SWITCH_ANY" ]
+ Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectMap" ), "SWITCH_ANY", "0" )
+
+ filterArguments.filterGamemodes = [ "SWITCH_ANY" ]
+ Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectGamemode" ), "SWITCH_ANY", "0" )
// Event handlers
AddMenuEventHandler( file.menu, eUIEvent.MENU_CLOSE, OnCloseServerBrowserMenu )
-
-
-
AddMenuEventHandler( file.menu, eUIEvent.MENU_OPEN, OnServerBrowserMenuOpened )
AddMenuFooterOption( file.menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
AddMenuFooterOption( file.menu, BUTTON_Y, "#Y_REFRESH_SERVERS", "#REFRESH_SERVERS", RefreshServers )
@@ -375,6 +391,7 @@ void function OnCloseServerBrowserMenu()
void function OnServerBrowserMenuOpened()
{
+ UpdatePrivateMatchModesAndMaps()
Hud_SetText( Hud_GetChild( file.menu, "Title" ), "#MENU_TITLE_SERVER_BROWSER" )
UI_SetPresentationType( ePresentationType.KNOWLEDGEBASE_MAIN )
@@ -696,14 +713,6 @@ void function FilterServerList()
}
}
-
- printt("Better.Serverbrowser:------------------------")
- printt("Server count: ", NSGetServerCount())
- printt("Filtered count: ", file.serversArrayFiltered.len())
- printt("Total players: ", totalPlayers)
- printt("This message gets shown only on full refresh")
- printt("---------------------------------------------")
-
Hud_SetText( Hud_GetChild( file.menu, "InGamePlayerCount" ), string( totalPlayers ) )
Hud_SetText( Hud_GetChild( file.menu, "TotalServerCount" ), string( NSGetServerCount() ) )
}
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
index ecb34d47..e59e0e59 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
@@ -502,9 +502,10 @@ void function TryUnlockNorthstarButton()
// unlock "Launch Northstar" button until you're authed with masterserver, are allowing insecure auth, or 7.5 seconds have passed
float time = Time()
- while ( GetConVarInt( "ns_has_agreed_to_send_token" ) != NS_AGREED_TO_SEND_TOKEN )
+ while ( GetConVarInt( "ns_has_agreed_to_send_token" ) != NS_AGREED_TO_SEND_TOKEN || time + 10.0 > Time() )
{
- if ( ( NSIsMasterServerAuthenticated() && IsStryderAllowingMP() ) || GetConVarBool( "ns_auth_allow_insecure" ) )
+ Hud_SetLocked( file.fdButton, true )
+ if ( ( NSIsMasterServerAuthenticated() && IsStryderAuthenticated() ) || GetConVarBool( "ns_auth_allow_insecure" ) )
break
WaitFrame()
diff --git a/Northstar.Coop/mod.json b/Northstar.Coop/mod.json
index b4dfaeb2..f4fafbf9 100644
--- a/Northstar.Coop/mod.json
+++ b/Northstar.Coop/mod.json
@@ -20,6 +20,6 @@
"ServerCallback": {
"After": "SingleplayerCoopLobby_Init"
}
- },
- ],
-} \ No newline at end of file
+ }
+ ]
+}
diff --git a/Northstar.Custom/keyvalues/playlists_v2.txt b/Northstar.Custom/keyvalues/playlists_v2.txt
index 813accb6..37734025 100644
--- a/Northstar.Custom/keyvalues/playlists_v2.txt
+++ b/Northstar.Custom/keyvalues/playlists_v2.txt
@@ -202,6 +202,45 @@ playlists
gamemode_score_hint #GAMEMODE_SCORE_HINT_TDM
}
}
+ chamber
+ {
+ inherit defaults
+ vars
+ {
+ name #PL_chamber
+ lobbytitle #PL_chamber_lobby
+ description #PL_chamber_desc
+ hint #PL_chamber_hint
+ abbreviation #PL_chamber_abbr
+ max_players 12
+ max_teams 12
+ classic_mp 1
+
+ gamemode_score_hint #GAMEMODE_SCORE_HINT_FFA
+ gamemode_bullet_001 #GAMEMODE_BULLET_FFA_001
+ gamemode_bullet_002 #GAMEMODE_BULLET_FFA_002
+ gamemode_bullet_003 #GAMEMODE_BULLET_FFA_003
+ gamemode_bullet_004 #GAMEMODE_BULLET_FFA_004
+ gamemode_bullet_005 #GAMEMODE_BULLET_FFA_005
+ }
+ }
+ hidden
+ {
+ inherit defaults
+ vars
+ {
+ name #PL_hidden
+ lobbytitle #PL_hidden_lobby
+ description #PL_hidden_desc
+ hint #PL_hidden_hint
+ abbreviation #PL_hidden_abbr
+ max_players 16
+ max_teams 2
+ classic_mp 1
+
+ gamemode_score_hint #GAMEMODE_SCORE_HINT_TDM
+ }
+ }
}
Playlists
{
@@ -225,18 +264,18 @@ playlists
{
maps
{
- mp_forwardbase_kodai 1
- mp_grave 1
- mp_homestead 1
- mp_thaw 1
- mp_black_water_canal 1
- mp_eden 1
- mp_drydock 1
- mp_crashsite3 1
- mp_complex3 1
- mp_angel_city 1
- mp_colony02 1
- mp_glitch 1
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
mp_lf_stacks 1
mp_lf_deck 1
mp_lf_meadow 1
@@ -269,18 +308,19 @@ playlists
{
maps
{
- mp_forwardbase_kodai 1
- mp_grave 1
- mp_homestead 1
- mp_thaw 1
- mp_black_water_canal 1
- mp_eden 1
- mp_drydock 1
- mp_crashsite3 1
- mp_complex3 1
- mp_angel_city 1
- mp_colony02 1
- mp_glitch 1
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
+ mp_lf_stacks 1
mp_relic02 1
mp_wargames 1
mp_rise 1
@@ -307,18 +347,19 @@ playlists
{
maps
{
- mp_forwardbase_kodai 1
- mp_grave 1
- mp_homestead 1
- mp_thaw 1
- mp_black_water_canal 1
- mp_eden 1
- mp_drydock 1
- mp_crashsite3 1
- mp_complex3 1
- mp_angel_city 1
- mp_colony02 1
- mp_glitch 1
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
+ mp_lf_stacks 1
mp_lf_stacks 1
mp_lf_deck 1
mp_lf_meadow 1
@@ -360,18 +401,19 @@ playlists
{
maps
{
- mp_forwardbase_kodai 1
- mp_grave 1
- mp_homestead 1
- mp_thaw 1
- mp_black_water_canal 1
- mp_eden 1
- mp_drydock 1
- mp_crashsite3 1
- mp_complex3 1
- mp_angel_city 1
- mp_colony02 1
- mp_glitch 1
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
+ mp_lf_stacks 1
mp_lf_stacks 1
mp_lf_deck 1
mp_lf_meadow 1
@@ -408,18 +450,19 @@ playlists
{
maps
{
- mp_forwardbase_kodai 1
- mp_grave 1
- mp_homestead 1
- mp_thaw 1
- mp_black_water_canal 1
- mp_eden 1
- mp_drydock 1
- mp_crashsite3 1
- mp_complex3 1
- mp_angel_city 1
- mp_colony02 1
- mp_glitch 1
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
+ mp_lf_stacks 1
mp_lf_stacks 1
mp_lf_deck 1
mp_lf_meadow 1
@@ -459,18 +502,19 @@ playlists
{
maps
{
- mp_forwardbase_kodai 1
- mp_grave 1
- mp_homestead 1
- mp_thaw 1
- mp_black_water_canal 1
- mp_eden 1
- mp_drydock 1
- mp_crashsite3 1
- mp_complex3 1
- mp_angel_city 1
- mp_colony02 1
- mp_glitch 1
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
+ mp_lf_stacks 1
mp_relic02 1
mp_wargames 1
mp_rise 1
@@ -640,5 +684,101 @@ playlists
}
}
}
+ chamber
+ {
+ inherit defaults
+ vars
+ {
+ name #PL_chamber
+ lobbytitle #PL_chamber_lobby
+ description #PL_chamber_desc
+ abbreviation #PL_chamber_abbr
+ image ps
+ //mixtape_slot 7
+ mixtape_timeout 120
+ visible 0
+ }
+ gamemodes
+ {
+ chamber
+ {
+ maps
+ {
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
+ mp_lf_stacks 1
+ mp_lf_stacks 1
+ mp_lf_deck 1
+ mp_lf_meadow 1
+ mp_lf_traffic 1
+ mp_lf_township 1
+ mp_lf_uma 1
+ mp_relic02 1
+ mp_wargames 1
+ mp_rise 1
+ mp_coliseum 1
+ mp_coliseum_column 1
+ }
+ }
+ }
+ }
+ hidden
+ {
+ inherit defaults
+ vars
+ {
+ name #PL_hidden
+ lobbytitle #PL_hidden_lobby
+ description #PL_hidden_desc
+ abbreviation #PL_hidden_abbr
+ image ps
+ //mixtape_slot 7
+ mixtape_timeout 120
+ visible 0
+ }
+ gamemodes
+ {
+ hidden
+ {
+ maps
+ {
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
+ mp_lf_stacks 1
+ mp_lf_stacks 1
+ mp_lf_deck 1
+ mp_lf_meadow 1
+ mp_lf_traffic 1
+ mp_lf_township 1
+ mp_lf_uma 1
+ mp_relic02 1
+ mp_wargames 1
+ mp_rise 1
+ mp_coliseum 1
+ mp_coliseum_column 1
+ }
+ }
+ }
+ }
}
-} \ No newline at end of file
+}
diff --git a/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman.txt b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman.txt
new file mode 100644
index 00000000..8255df15
--- /dev/null
+++ b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman.txt
@@ -0,0 +1,11 @@
+WeaponData
+{
+ Mods
+ {
+ one_in_the_chamber
+ {
+ damage_near_value "9999"
+ damage_far_value "9999"
+ }
+ }
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json
index 23132642..e687264c 100644
--- a/Northstar.Custom/mod.json
+++ b/Northstar.Custom/mod.json
@@ -38,10 +38,48 @@
{
"Path": "weapons/mp_weapon_peacekraber.nut",
+ "RunOn": "( CLIENT || SERVER ) && MP"
+ },
+
+ {
+ "Path": "gamemodes/sh_gamemode_chamber.nut",
"RunOn": "( CLIENT || SERVER ) && MP",
+ "ClientCallback": {
+ "Before": "Sh_GamemodeChamber_Init"
+ },
+
+ "ServerCallback": {
+ "Before": "Sh_GamemodeChamber_Init"
+ }
+ },
+ {
+ "Path": "gamemodes/_gamemode_chamber.nut",
+ "RunOn": "SERVER && MP"
+ },
+ {
+ "Path": "gamemodes/cl_gamemode_chamber.nut",
+ "RunOn": "CLIENT && MP"
+ },
+ {
+ "Path": "gamemodes/sh_gamemode_hidden.nut",
+ "RunOn": "( CLIENT || SERVER ) && MP",
+ "ClientCallback": {
+ "Before": "Sh_GamemodeHidden_Init"
+ },
+
+ "ServerCallback": {
+ "Before": "Sh_GamemodeHidden_Init"
+ }
+ },
+ {
+ "Path": "gamemodes/_gamemode_hidden.nut",
+ "RunOn": "SERVER && MP"
+ },
+ {
+ "Path": "gamemodes/cl_gamemode_hidden.nut",
+ "RunOn": "CLIENT && MP"
},
- // fortwar
{
"Path": "gamemodes/sh_gamemode_fw_custom.nut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -62,7 +100,6 @@
"RunOn": "CLIENT && MP"
},
- // gungame
{
"Path": "gamemodes/sh_gamemode_gg.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -83,7 +120,6 @@
"RunOn": "CLIENT && MP"
},
- // titan tag
{
"Path": "gamemodes/sh_gamemode_tt.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -104,12 +140,11 @@
"RunOn": "CLIENT && MP"
},
- // infection
{
"Path": "gamemodes/sh_gamemode_inf.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
- "Before": "Sh_GamemodeInfection_Init",
+ "Before": "Sh_GamemodeInfection_Init"
},
"ServerCallback": {
@@ -125,7 +160,6 @@
"RunOn": "CLIENT && MP"
},
- // arena
{
"Path": "_droppod_spawn.gnut",
"RunOn": "SERVER && MP",
@@ -169,7 +203,6 @@
"RunOn": "CLIENT && MP"
},
- // amped killrace
{
"Path": "gamemodes/sh_gamemode_kr.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -190,7 +223,6 @@
"RunOn": "CLIENT && MP"
},
- // fastball
{
"Path": "gamemodes/sh_gamemode_fastball.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -215,7 +247,6 @@
"RunOn": "CLIENT && MP"
},
- // hide and seek
{
"Path": "gamemodes/sh_gamemode_hs.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -236,7 +267,6 @@
"RunOn": "CLIENT && MP"
},
- // ctf comp
{
"Path": "gamemodes/sh_gamemode_ctf_comp.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -263,7 +293,6 @@
}
},
- // riffs, playlist vars etc
{
"Path": "gamemodes/sh_riff_instagib.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -344,10 +373,21 @@
"ServerCallback": {
"After": "DisallowedWeapons_Init"
}
+ },
+
+ {
+ "Path": "sh_custom_pilot_collision.gnut",
+ "RunOn": "( CLIENT || SERVER ) && MP",
+ "ClientCallback": {
+ "After": "CustomPilotCollision_InitPlaylistVars"
+ },
+
+ "ServerCallback": {
+ "After": "CustomPilotCollision_InitPlaylistVars"
+ }
}
],
- // todo this bit of the format
"Maps": [
{
"Name": "mp_skyway_v1",
@@ -359,4 +399,4 @@
"Localisation": [
"resource/northstar_custom_%language%.txt"
]
-} \ No newline at end of file
+}
diff --git a/Northstar.Custom/mod/resource/northstar_custom_portuguese.txt b/Northstar.Custom/mod/resource/northstar_custom_portuguese.txt
index 62835f52..0a7b19d2 100644
--- a/Northstar.Custom/mod/resource/northstar_custom_portuguese.txt
+++ b/Northstar.Custom/mod/resource/northstar_custom_portuguese.txt
Binary files differ
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut
new file mode 100644
index 00000000..bbd669cd
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut
@@ -0,0 +1,95 @@
+global function GamemodeChamber_Init
+
+void function GamemodeChamber_Init()
+{
+ SetSpawnpointGamemodeOverride( FFA )
+
+ SetShouldUseRoundWinningKillReplay( true )
+ SetLoadoutGracePeriodEnabled( false ) // prevent modifying loadouts with grace period
+ SetWeaponDropsEnabled( false )
+ Riff_ForceTitanAvailability( eTitanAvailability.Never )
+ Riff_ForceBoostAvailability( eBoostAvailability.Disabled )
+ ClassicMP_ForceDisableEpilogue( true )
+
+ AddCallback_OnClientConnected( ChamberInitPlayer )
+ AddCallback_OnPlayerKilled( ChamberOnPlayerKilled )
+ AddCallback_OnPlayerRespawned( UpdateLoadout )
+
+}
+
+void function ChamberInitPlayer( entity player )
+{
+ UpdateLoadout( player )
+}
+
+void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageInfo )
+{
+ if ( !victim.IsPlayer() || GetGameState() != eGameState.Playing || attacker == victim)
+ return
+
+ if ( attacker.IsPlayer() )
+ {
+ attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
+ AddTeamScore( attacker.GetTeam(), 1 )
+ if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.human_execution )
+ {
+ string message = victim.GetPlayerName() + " got executed."
+ foreach ( entity player in GetPlayerArray() )
+ SendHudMessage( player, message, -1, 0.4, 255, 0, 0, 0, 0, 3, 0.15 )
+
+ foreach ( entity weapon in attacker.GetMainWeapons() )
+ {
+ weapon.SetWeaponPrimaryAmmoCount(0)
+ int clip = weapon.GetWeaponPrimaryClipCount() + 4
+ if (weapon.GetWeaponPrimaryClipCountMax() < clip)
+ weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCountMax())
+ else
+ weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCount() + 4)
+ }
+ } else
+ {
+ foreach ( entity weapon in attacker.GetMainWeapons() )
+ {
+ weapon.SetWeaponPrimaryAmmoCount(0)
+ int clip = weapon.GetWeaponPrimaryClipCount() + 1
+ if (weapon.GetWeaponPrimaryClipCountMax() < clip)
+ weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCountMax())
+ else
+ weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCount() + 1)
+ }
+ }
+ SetRoundWinningKillReplayAttacker(attacker)
+ }
+}
+
+void function UpdateLoadout( entity player )
+{
+ if (IsAlive(player) && player != null)
+ {
+
+ // set loadout
+ foreach ( entity weapon in player.GetMainWeapons() )
+ player.TakeWeaponNow( weapon.GetWeaponClassName() )
+
+ foreach ( entity weapon in player.GetOffhandWeapons() )
+ player.TakeWeaponNow( weapon.GetWeaponClassName() )
+
+ array<string> mods = ["one_in_the_chamber"]
+ player.GiveWeapon( "mp_weapon_wingman", mods)
+ player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE )
+
+ thread SetAmmo( player )
+ }
+}
+
+void function SetAmmo( entity player )
+{
+ foreach ( entity weapon in player.GetMainWeapons() )
+ {
+ weapon.SetWeaponPrimaryAmmoCount(0)
+ weapon.SetWeaponPrimaryClipCount(1)
+ }
+ WaitFrame()
+ if ( IsValid( player ) )
+ PlayerEarnMeter_SetMode( player, eEarnMeterMode.DISABLED )
+}
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut
new file mode 100644
index 00000000..4d52835b
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hidden.nut
@@ -0,0 +1,195 @@
+global function GamemodeHidden_Init
+
+
+void function GamemodeHidden_Init()
+{
+ SetShouldUseRoundWinningKillReplay( true )
+ SetLoadoutGracePeriodEnabled( false ) // prevent modifying loadouts with grace period
+ SetWeaponDropsEnabled( false )
+ SetRespawnsEnabled( false )
+ Riff_ForceTitanAvailability( eTitanAvailability.Never )
+ Riff_ForceBoostAvailability( eBoostAvailability.Disabled )
+ Riff_ForceSetEliminationMode( eEliminationMode.Pilots )
+
+ ClassicMP_SetCustomIntro( ClassicMP_DefaultNoIntro_Setup, ClassicMP_DefaultNoIntro_GetLength() )
+ ClassicMP_ForceDisableEpilogue( true )
+
+ AddCallback_OnClientConnected( HiddenInitPlayer )
+ AddCallback_OnPlayerKilled( HiddenOnPlayerKilled )
+ AddCallback_GameStateEnter( eGameState.Playing, SelectFirstHidden )
+ AddCallback_GameStateEnter( eGameState.Postmatch, RemoveHidden )
+ SetTimeoutWinnerDecisionFunc( TimeoutCheckSurvivors )
+
+ thread PredatorMain()
+
+}
+
+void function HiddenInitPlayer( entity player )
+{
+ SetTeam( player, TEAM_MILITIA )
+}
+
+void function SelectFirstHidden()
+{
+ thread SelectFirstHiddenDelayed()
+}
+
+void function SelectFirstHiddenDelayed()
+{
+ wait 10.0 + RandomFloat( 5.0 )
+
+ array<entity> players = GetPlayerArray()
+ entity hidden = players[ RandomInt( players.len() ) ]
+
+ if (hidden != null || IsAlive(hidden))
+ MakePlayerHidden( hidden ) // randomly selected player becomes hidden
+
+ foreach ( entity otherPlayer in GetPlayerArray() )
+ if ( hidden != otherPlayer )
+ Remote_CallFunction_NonReplay( otherPlayer, "ServerCallback_AnnounceHidden", hidden.GetEncodedEHandle() )
+
+ PlayMusicToAll( eMusicPieceID.GAMEMODE_1 )
+
+ thread UpdateSurvivorsLoadout()
+}
+
+void function UpdateSurvivorsLoadout()
+{
+ foreach (entity player in GetPlayerArray())
+ {
+ if (player.GetTeam() != TEAM_MILITIA || !IsAlive(player) || player == null)
+ continue;
+
+ foreach ( entity weapon in player.GetOffhandWeapons() )
+ player.TakeWeaponNow( weapon.GetWeaponClassName() )
+
+ try {
+ player.GiveOffhandWeapon("mp_ability_cloak", OFFHAND_SPECIAL )
+ player.GiveOffhandWeapon("mp_weapon_grenade_emp", OFFHAND_ORDNANCE )
+ player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE )
+ } catch (ex) {}
+ }
+}
+
+void function MakePlayerHidden(entity player)
+{
+ if (player == null)
+ return;
+
+ SetTeam( player, TEAM_IMC )
+ player.SetPlayerGameStat( PGS_ASSAULT_SCORE, 0 ) // reset kills
+ RespawnHidden( player )
+ Remote_CallFunction_NonReplay( player, "ServerCallback_YouAreHidden" )
+}
+
+void function RespawnHidden(entity player)
+{
+ if (player.GetTeam() != TEAM_IMC )
+ return
+
+ // scale health of the hidden, with 50 as base health
+ player.SetMaxHealth( 80 + ( (GetPlayerArrayOfTeam( TEAM_MILITIA ).len() + 1 ) * 20) )
+ player.SetHealth( 80 + ( (GetPlayerArrayOfTeam( TEAM_MILITIA ).len() + 1 ) * 20) )
+
+ if ( !player.IsMechanical() )
+ player.SetBodygroup( player.FindBodyGroup( "head" ), 1 )
+
+ // set loadout
+ foreach ( entity weapon in player.GetMainWeapons() )
+ player.TakeWeaponNow( weapon.GetWeaponClassName() )
+
+ foreach ( entity weapon in player.GetOffhandWeapons() )
+ player.TakeWeaponNow( weapon.GetWeaponClassName() )
+
+ player.GiveWeapon("mp_weapon_wingman_n")
+ player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE )
+ player.GiveOffhandWeapon( "mp_weapon_grenade_sonar", OFFHAND_SPECIAL );
+ thread UpdateLoadout(player)
+ thread GiveArcGrenade(player)
+}
+
+void function GiveArcGrenade(entity player)
+{
+ wait 45.0
+ if (IsAlive(player) || player != null)
+ player.GiveOffhandWeapon( "mp_weapon_grenade_emp", OFFHAND_ORDNANCE );
+}
+
+void function HiddenOnPlayerKilled( entity victim, entity attacker, var damageInfo )
+{
+ if ( !victim.IsPlayer() || GetGameState() != eGameState.Playing )
+ return
+
+ if ( attacker.IsPlayer() )
+ {
+ // increase kills by 1
+ attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
+ }
+
+}
+
+void function UpdateLoadout( entity player )
+{
+ string p2016 = "mp_weapon_wingman_n"
+ foreach ( entity weapon in player.GetMainWeapons() )
+ {
+ if (weapon.GetWeaponClassName() == p2016)
+ {
+ weapon.SetWeaponPrimaryAmmoCount(0)
+ weapon.SetWeaponPrimaryClipCount(weapon.GetWeaponPrimaryClipCountMax())
+ }
+ }
+ WaitFrame()
+ if ( IsValid( player ) )
+ PlayerEarnMeter_SetMode( player, eEarnMeterMode.DISABLED )
+}
+
+void function RemoveHidden()
+{
+ foreach (entity player in GetPlayerArray())
+ {
+ if (player.GetTeam() == TEAM_IMC && player != null)
+ player.kv.VisibilityFlags = ENTITY_VISIBLE_TO_EVERYONE
+ }
+}
+
+void function PredatorMain()
+{
+ while (true)
+ {
+ WaitFrame()
+ if(!IsLobby())
+ {
+ foreach (entity player in GetPlayerArray())
+ {
+ if (player == null || !IsValid(player) || !IsAlive(player) || player.GetTeam() != TEAM_IMC)
+ continue
+ vector playerVelV = player.GetVelocity()
+ float playerVel
+ playerVel = sqrt(playerVelV.x * playerVelV.x + playerVelV.y * playerVelV.y + playerVelV.z * playerVelV.z)
+ float playerVelNormal = playerVel * 0.068544
+ if (playerVel/300 < 1.3)
+ {
+ player.SetCloakFlicker(0, 0)
+ player.kv.VisibilityFlags = 0
+ }
+ else
+ {
+ player.SetCloakFlicker(0.2 , 1 )
+ player.kv.VisibilityFlags = 0
+ float waittime = RandomFloat(0.5)
+ wait waittime
+ player.kv.VisibilityFlags = ENTITY_VISIBLE_TO_EVERYONE
+ }
+ }
+ }
+ }
+}
+
+int function TimeoutCheckSurvivors()
+{
+ if ( GetPlayerArrayOfTeam( TEAM_MILITIA ).len() > 0 )
+ return TEAM_IMC
+
+ return TEAM_MILITIA
+}
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
index a0e0b743..2ccd46ba 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
@@ -30,7 +30,7 @@ void function InfectionInitPlayer( entity player )
if ( GetGameState() < eGameState.Playing )
SetTeam( player, INFECTION_TEAM_SURVIVOR )
else
- InfectPlayer( player )
+ InfectPlayer( player, player )
}
void function SelectFirstInfected()
@@ -45,23 +45,23 @@ void function SelectFirstInfectedDelayed()
array<entity> players = GetPlayerArray()
entity infected = players[ RandomInt( players.len() ) ]
- InfectPlayer( infected )
+ InfectPlayer( infected, infected )
RespawnInfected( infected )
}
void function InfectionOnPlayerKilled( entity victim, entity attacker, var damageInfo )
{
- if ( !victim.IsPlayer() || GetGameState() != eGameState.Playing )
+ if ( !victim.IsPlayer() || !attacker.IsPlayer() || GetGameState() != eGameState.Playing )
return
if ( victim.GetTeam() == INFECTION_TEAM_SURVIVOR )
- InfectPlayer( victim )
+ InfectPlayer( victim, attacker )
if ( attacker.IsPlayer() )
attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
}
-void function InfectPlayer( entity player )
+void function InfectPlayer( entity player, entity attacker )
{
SetTeam( player, INFECTION_TEAM_INFECTED )
player.SetPlayerGameStat( PGS_ASSAULT_SCORE, 0 ) // reset kills
@@ -70,7 +70,12 @@ void function InfectPlayer( entity player )
// check how many survivors there are
array<entity> survivors = GetPlayerArrayOfTeam( INFECTION_TEAM_SURVIVOR )
if ( survivors.len() == 0 )
+ {
+ SetRespawnsEnabled( false )
+ SetKillcamsEnabled( false )
+ SetRoundWinningKillReplayAttacker(attacker)
SetWinner( INFECTION_TEAM_INFECTED )
+ }
else if ( survivors.len() == 1 && !file.hasHadLastInfection )
SetLastSurvivor( survivors[ 0 ] )
@@ -183,8 +188,14 @@ void function SetLastSurvivor( entity player )
int function TimeoutCheckSurvivors()
{
- if ( GetPlayerArrayOfTeam( INFECTION_TEAM_SURVIVOR ).len() > 0 )
+ array<entity> survivors = GetPlayerArrayOfTeam( INFECTION_TEAM_SURVIVOR )
+ if ( survivors.len() > 0 )
+ {
+ SetRespawnsEnabled( false )
+ SetKillcamsEnabled( false )
+ SetRoundWinningKillReplayAttacker(survivors[ 0 ])
return INFECTION_TEAM_SURVIVOR
+ }
return INFECTION_TEAM_INFECTED
}
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_chamber.nut
new file mode 100644
index 00000000..37b0acd3
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_chamber.nut
@@ -0,0 +1,26 @@
+global function ClGamemodeChamber_Init
+
+void function ClGamemodeChamber_Init()
+{
+ // add ffa gamestate asset
+ ClGameState_RegisterGameStateAsset( $"ui/gamestate_info_ffa.rpak" )
+
+ // add music for mode, this is copied directly from the ffa/fra music registered in cl_music.gnut
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_MILITIA )
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hidden.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hidden.nut
new file mode 100644
index 00000000..e0f2bfeb
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hidden.nut
@@ -0,0 +1,60 @@
+global function ClGamemodeHidden_Init
+global function ServerCallback_YouAreHidden
+global function ServerCallback_AnnounceHidden
+
+void function ClGamemodeHidden_Init()
+{
+ // add ffa gamestate asset
+ // ClGameState_RegisterGameStateAsset( $"ui/gamestate_info_ffa.rpak" )
+
+ // add music for mode, this is copied directly from the ffa/fra music registered in cl_music.gnut
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_MILITIA )
+}
+
+void function ServerCallback_YouAreHidden()
+{
+ // heavily based on mfd code
+ entity localPlayer = GetLocalViewPlayer()
+
+ StartParticleEffectOnEntity( localPlayer.GetCockpit(), GetParticleSystemIndex( $"P_MFD" ), FX_PATTACH_ABSORIGIN_FOLLOW, -1 )
+ EmitSoundOnEntity( localPlayer, "UI_InGame_MarkedForDeath_PlayerMarked" )
+ HideEventNotification()
+ AnnouncementData announcement = Announcement_Create( "#HIDDEN_YOU_ARE_HIDDEN" )
+ Announcement_SetSubText( announcement, "#HIDDEN_KILL_SURVIVORS" )
+ Announcement_SetTitleColor( announcement, <1,0,0> )
+ Announcement_SetPurge( announcement, true )
+ Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc
+ Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK )
+ Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK )
+ AnnouncementFromClass( localPlayer, announcement )
+}
+
+void function ServerCallback_AnnounceHidden( int survivorEHandle )
+{
+ entity player = GetEntityFromEncodedEHandle( survivorEHandle )
+
+ AnnouncementData announcement = Announcement_Create( Localize( "#HIDDEN_FIRST_HIDDEN", player.GetPlayerName() ) )
+ //Announcement_SetSubText( announcement, "#INFECTION_KILL_LAST_SURVIVOR" )
+ Announcement_SetTitleColor( announcement, <1,0,0> )
+ Announcement_SetPurge( announcement, true )
+ Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc
+ Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK )
+ Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK )
+ AnnouncementFromClass( GetLocalViewPlayer(), announcement )
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_chamber.nut
new file mode 100644
index 00000000..e78a020b
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_chamber.nut
@@ -0,0 +1,41 @@
+global function Sh_GamemodeChamber_Init
+
+global const string GAMEMODE_CHAMBER = "chamber"
+
+void function Sh_GamemodeChamber_Init()
+{
+ // create custom gamemode
+ AddCallback_OnCustomGamemodesInit( CreateGamemodeChamber )
+}
+
+void function CreateGamemodeChamber()
+{
+ GameMode_Create( GAMEMODE_CHAMBER )
+ GameMode_SetName( GAMEMODE_CHAMBER, "#GAMEMODE_CHAMBER" )
+ GameMode_SetDesc( GAMEMODE_CHAMBER, "#PL_chamber_desc" )
+ GameMode_SetGameModeAnnouncement( GAMEMODE_CHAMBER, "ffa_modeDesc" )
+ GameMode_SetDefaultTimeLimits( GAMEMODE_CHAMBER, 10, 0.0 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_CHAMBER, "#SCOREBOARD_SCORE", PGS_ASSAULT_SCORE, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_CHAMBER, "#SCOREBOARD_PILOT_KILLS", PGS_PILOT_KILLS, 2 )
+ GameMode_SetColor( GAMEMODE_CHAMBER, [147, 204, 57, 255] )
+
+ AddPrivateMatchMode( GAMEMODE_CHAMBER ) // add to private lobby modes
+
+ // set this to 25 score limit default
+ GameMode_SetDefaultScoreLimits( GAMEMODE_CHAMBER, 25, 0 )
+
+ #if SERVER
+ GameMode_AddServerInit( GAMEMODE_CHAMBER, GamemodeChamber_Init )
+ GameMode_AddServerInit( GAMEMODE_CHAMBER, GamemodeFFAShared_Init )
+ GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_CHAMBER, RateSpawnpoints_Generic )
+ GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_CHAMBER, RateSpawnpoints_Generic )
+ #elseif CLIENT
+ GameMode_AddClientInit( GAMEMODE_CHAMBER, ClGamemodeChamber_Init )
+ GameMode_AddClientInit( GAMEMODE_CHAMBER, GamemodeFFAShared_Init )
+ GameMode_AddClientInit( GAMEMODE_CHAMBER, ClGamemodeFFA_Init )
+ #endif
+ #if !UI
+ GameMode_SetScoreCompareFunc( GAMEMODE_CHAMBER, CompareAssaultScore )
+ GameMode_AddSharedInit( GAMEMODE_CHAMBER, GamemodeFFA_Dialogue_Init )
+ #endif
+}
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut
new file mode 100644
index 00000000..78357d20
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut
@@ -0,0 +1,44 @@
+global function Sh_GamemodeHidden_Init
+
+global const string GAMEMODE_HIDDEN = "hidden"
+
+void function Sh_GamemodeHidden_Init()
+{
+ // create custom gamemode
+ AddCallback_OnCustomGamemodesInit( CreateGamemodeHidden )
+ AddCallback_OnRegisteringCustomNetworkVars( HiddenRegisterNetworkVars )
+}
+
+void function CreateGamemodeHidden()
+{
+ GameMode_Create( GAMEMODE_HIDDEN )
+ GameMode_SetName( GAMEMODE_HIDDEN, "#GAMEMODE_HIDDEN" )
+ GameMode_SetDesc( GAMEMODE_HIDDEN, "#PL_hidden_desc" )
+ GameMode_SetGameModeAnnouncement( GAMEMODE_HIDDEN, "ffa_modeDesc" )
+ GameMode_SetDefaultTimeLimits( GAMEMODE_HIDDEN, 5, 0.0 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_HIDDEN, "#SCOREBOARD_SCORE", PGS_ASSAULT_SCORE, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_HIDDEN, "#SCOREBOARD_PILOT_KILLS", PGS_PILOT_KILLS, 2 )
+ GameMode_SetColor( GAMEMODE_HIDDEN, [147, 204, 57, 255] )
+
+ AddPrivateMatchMode( GAMEMODE_HIDDEN ) // add to private lobby modes
+
+ #if SERVER
+ GameMode_AddServerInit( GAMEMODE_HIDDEN, GamemodeHidden_Init )
+ GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_HIDDEN, RateSpawnpoints_Generic )
+ GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_HIDDEN, RateSpawnpoints_Generic )
+ #elseif CLIENT
+ GameMode_AddClientInit( GAMEMODE_HIDDEN, ClGamemodeHidden_Init )
+ #endif
+ #if !UI
+ GameMode_SetScoreCompareFunc( GAMEMODE_HIDDEN, CompareAssaultScore )
+ #endif
+}
+
+void function HiddenRegisterNetworkVars()
+{
+ if ( GAMETYPE != GAMEMODE_HIDDEN )
+ return
+
+ Remote_RegisterFunction( "ServerCallback_YouAreHidden" )
+ Remote_RegisterFunction( "ServerCallback_AnnounceHidden" )
+}
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut
index faa92480..2ce93013 100644
--- a/Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/sh_custom_air_accel.gnut
@@ -8,7 +8,9 @@ void function CustomAirAccelVars_Init()
#if SERVER
AddCallback_OnPlayerRespawned( ApplyCustomPlayerAirAccel )
- AddCallback_OnPilotBecomesTitan( ApplyCustomPlayerAirAccelFromTitan ) // not sure if necessary but assuming it is
+ AddCallback_OnTitanBecomesPilot( ApplyCustomPlayerAirAccelFromTitan ) // airaccel is reset after player leaves titan
+ AddCallback_OnPilotBecomesTitan( ApplyCustomPlayerAirAccelFromTitan ) // airaccel is also reset after player enters titan
+ AddCallback_OnPlayerGetsNewPilotLoadout( ApplyCustomPlayerAirAccelOnLoadoutChange ) // airaccel is also reset on loadout change for some reason
#endif
}
@@ -22,4 +24,9 @@ void function ApplyCustomPlayerAirAccelFromTitan( entity player, entity titan )
{
player.kv.airAcceleration = GetCurrentPlaylistVarInt( "custom_air_accel_pilot", int( player.GetPlayerSettingsField( "airAcceleration" ) ) )
}
-#endif \ No newline at end of file
+
+void function ApplyCustomPlayerAirAccelOnLoadoutChange( entity player, PilotLoadoutDef loadout )
+{
+ player.kv.airAcceleration = GetCurrentPlaylistVarInt( "custom_air_accel_pilot", int( player.GetPlayerSettingsField( "airAcceleration" ) ) )
+}
+#endif
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut
new file mode 100644
index 00000000..b33a4c02
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut
@@ -0,0 +1,32 @@
+global function CustomPilotCollision_InitPlaylistVars
+
+void function CustomPilotCollision_InitPlaylistVars()
+{
+ AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_PILOT", "no_pilot_collision", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "0" )
+
+#if SERVER
+ AddCallback_OnPlayerRespawned( SetPilotCollisionFlagsForRespawn )
+ AddCallback_OnPilotBecomesTitan( PilotCollisionOnPilotBecomesTitan )
+ AddCallback_OnTitanBecomesPilot( PilotCollisionOnTitanBecomesPilot )
+#endif
+}
+
+#if SERVER
+void function SetPilotCollisionFlagsForRespawn( entity player )
+{
+ if ( GetCurrentPlaylistVarInt( "no_pilot_collision", 0 ) == 1 )
+ player.kv.CollisionGroup = TRACE_COLLISION_GROUP_BLOCK_WEAPONS
+}
+
+void function PilotCollisionOnPilotBecomesTitan( entity player, entity titan )
+{
+ if ( GetCurrentPlaylistVarInt( "no_pilot_collision", 0 ) == 1 )
+ player.kv.CollisionGroup = TRACE_COLLISION_GROUP_PLAYER
+}
+
+void function PilotCollisionOnTitanBecomesPilot( entity player, entity titan )
+{
+ if ( GetCurrentPlaylistVarInt( "no_pilot_collision", 0 ) == 1 )
+ player.kv.CollisionGroup = TRACE_COLLISION_GROUP_BLOCK_WEAPONS
+}
+#endif \ No newline at end of file
diff --git a/Northstar.CustomServers/mod.json b/Northstar.CustomServers/mod.json
index 40e64cf6..28a08868 100644
--- a/Northstar.CustomServers/mod.json
+++ b/Northstar.CustomServers/mod.json
@@ -13,7 +13,7 @@
{
"Name": "ns_is_modded_server",
"DefaultValue": "1",
- "Flags": 8192 // FCVAR_REPLICATED
+ "Flags": 8192
},
{
@@ -60,20 +60,20 @@
"Scripts": [
{
"Path": "_misc_stubs.gnut",
- "RunOn": "SERVER && MP",
+ "RunOn": "SERVER && MP"
},
{
"Path": "_store.gnut",
- "RunOn": "SERVER && MP",
+ "RunOn": "SERVER && MP"
},
{
"Path": "_script_movers.gnut",
- "RunOn": "SERVER && MP",
+ "RunOn": "SERVER && MP"
},
{
"Path": "sh_northstar_utils.gnut",
- "RunOn": "CLIENT || SERVER || UI",
+ "RunOn": "CLIENT || SERVER || UI"
},
{
@@ -99,7 +99,7 @@
{
"Path": "mp/_classic_mp_dropship_intro.gnut",
- "RunOn": "SERVER && MP",
+ "RunOn": "SERVER && MP"
},
{
"Path": "mp/_classic_mp_no_intro.gnut",
@@ -116,7 +116,7 @@
{
"Path": "lobby/sh_private_lobby_modes_init.gnut",
- "RunOn": "( SERVER || CLIENT ) && MP",
- },
+ "RunOn": "( SERVER || CLIENT ) && MP"
+ }
]
-} \ No newline at end of file
+}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
index 3eb6bda6..6d13c75b 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
@@ -34,13 +34,15 @@ void function BurnMeter_Init()
// setup burncard use funcs
BurnReward_GetByRef( "burnmeter_amped_weapons" ).rewardAvailableCallback = PlayerUsesAmpedWeaponsBurncard
BurnReward_GetByRef( "burnmeter_smart_pistol" ).rewardAvailableCallback = PlayerUsesSmartPistolBurncard
- BurnReward_GetByRef( "burnmeter_emergency_battery" ).rewardAvailableCallback = PlayerUsesBatteryBurncard
+ BurnReward_GetByRef( "burnmeter_emergency_battery" ).rewardAvailableCallback = Burnmeter_EmergencyBattery
BurnReward_GetByRef( "burnmeter_radar_jammer" ).rewardAvailableCallback = PlayerUsesRadarJammerBurncard
BurnReward_GetByRef( "burnmeter_maphack" ).rewardAvailableCallback = PlayerUsesMaphackBurncard
BurnReward_GetByRef( "burnmeter_phase_rewind" ).rewardAvailableCallback = PlayerUsesPhaseRewindBurncard
// these ones aren't so important, they're either for fd ( unsupported rn ) or unused
- //BurnReward_GetByRef( "burnmeter_harvester_shield" ).rewardAvailableCallback =
+ BurnReward_GetByRef( "burnmeter_harvester_shield" ).rewardAvailableCallback = PlayerUsesHarvesterShieldBurncard
+ BurnReward_GetByRef( "burnmeter_amped_weapons_permanent" ).rewardAvailableCallback = PlayerUsesPermanentAmpedWeaponsBurncard
+ BurnReward_GetByRef( "burnmeter_instant_battery" ).rewardAvailableCallback = Burnmeter_AmpedBattery
BurnReward_GetByRef( "burnmeter_rodeo_grenade" ).rewardAvailableCallback = PlayerUsesRodeoGrenadeBurncard
BurnReward_GetByRef( "burnmeter_nuke_titan" ).rewardAvailableCallback = PlayerUsesNukeTitanBurncard // unused in vanilla, fun though
@@ -185,9 +187,13 @@ void function PhaseRewindLifetime( entity player )
void function RunBurnCardUseFunc( entity player, string itemRef )
{
+ print( itemRef )
+
void functionref( entity ) ornull func = BurnReward_GetByRef( itemRef ).rewardAvailableCallback
if ( func != null )
( expect void functionref( entity ) ( func ) )( player )
+ else
+ print( "tried to call usefunc for burncard " + itemRef + ", but func did not exist!" )
}
void function UseBurnCardWeapon( entity weapon, entity player )
@@ -214,6 +220,19 @@ void function UseBurnCardWeaponInCriticalSection( entity weapon, entity ownerPla
void function BurnMeter_GiveRewardDirect( entity player, string itemRef )
{
+ BurnReward burncard = BurnReward_GetByRef( itemRef )
+
+ array<string> mods = [ "burn_card_weapon_mod" ]
+ if ( burncard.extraWeaponMod != "" )
+ mods.append( burncard.extraWeaponMod )
+
+ // ensure inventory slot isn't full to avoid crash
+ entity preexistingWeapon = player.GetOffhandWeapon( OFFHAND_INVENTORY )
+ if ( IsValid( preexistingWeapon ) )
+ player.TakeWeaponNow( preexistingWeapon.GetWeaponClassName() )
+
+ player.GiveOffhandWeapon( burncard.weaponName, OFFHAND_INVENTORY, mods )
+ Remote_CallFunction_Replay( player, "ServerCallback_RewardReadyMessage", player.s.respawnTime )
}
@@ -294,11 +313,6 @@ void function PlayerUsesSmartPistolBurncard( entity player )
// do we need to track the player losing smart pistol, then give their old weapon back? idk not implementing for now, check later
}
-void function PlayerUsesBatteryBurncard( entity player )
-{
- Rodeo_GiveBatteryToPlayer( player )
-}
-
void function PlayerUsesRadarJammerBurncard( entity player )
{
foreach ( entity otherPlayer in GetPlayerArray() )
@@ -425,6 +439,35 @@ void function PlayerUsesNukeBurncardThreaded( entity player )
PlayerEarnMeter_SetOwnedFrac( player, ownedFrac )
}
+void function PlayerUsesPermanentAmpedWeaponsBurncard( entity player )
+{
+ array<entity> weapons = player.GetMainWeapons()
+ //weapons.extend( player.GetOffhandWeapons() ) // idk? unsure of vanilla behaviour here
+ foreach ( entity weapon in weapons )
+ {
+ weapon.RemoveMod( "silencer" ) // both this and the burnmod will override firing fx, if a second one overrides this we crash
+ foreach ( string mod in GetWeaponBurnMods( weapon.GetWeaponClassName() ) )
+ {
+ // catch incompatibilities just in case
+ try
+ {
+ weapon.AddMod( mod )
+ }
+ catch( ex )
+ {
+ weapons.removebyvalue( weapon )
+ }
+ }
+
+ weapon.SetScriptFlags0( weapon.GetScriptFlags0() | WEAPONFLAG_AMPED )
+ }
+}
+
+void function PlayerUsesHarvesterShieldBurncard( entity player )
+{
+ player.SetPlayerNetInt( "numHarvesterShieldBoost", player.GetPlayerNetInt( "numHarvesterShieldBoost" ) + 1 )
+}
+
void function PlayerUsesRodeoGrenadeBurncard( entity player )
{
player.SetPlayerNetInt( "numSuperRodeoGrenades", player.GetPlayerNetInt( "numSuperRodeoGrenades" ) + 1 )
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut
index 6682807b..4c42a825 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut
@@ -166,18 +166,8 @@ void function EarnMeterMP_BoostEarned( entity player )
while ( burncard.ref == "burnmeter_random_foil" )
burncard = BurnReward_GetRandom()
-
- array<string> mods = [ "burn_card_weapon_mod" ]
- if ( burncard.extraWeaponMod != "" )
- mods.append( burncard.extraWeaponMod )
-
- // ensure inventory slot isn't full to avoid crash
- entity preexistingWeapon = player.GetOffhandWeapon( OFFHAND_INVENTORY )
- if ( IsValid( preexistingWeapon ) )
- player.TakeWeaponNow( preexistingWeapon.GetWeaponClassName() )
-
- player.GiveOffhandWeapon( burncard.weaponName, OFFHAND_INVENTORY, mods )
- Remote_CallFunction_Replay( player, "ServerCallback_RewardReadyMessage", player.s.respawnTime )
+
+ BurnMeter_GiveRewardDirect( player, burncard.ref )
}
void function EarnMeterMP_TitanEarned( entity player )
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut
index b5f700e5..8a6b8bf0 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut
@@ -3,7 +3,7 @@ global function RateSpawnpoints_FD
void function GamemodeFD_Init()
{
-
+ PrecacheModel( MODEL_ATTRITION_BANK )
}
void function RateSpawnpoints_FD(int _0, array<entity> _1, int _2, entity _3)
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut
index 3bc11c3a..974481c1 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut
@@ -21,6 +21,7 @@ void function GamemodeSpeedball_Init()
AddSpawnCallbackEditorClass( "script_ref", "info_speedball_flag", CreateFlag )
+ AddCallback_GameStateEnter( eGameState.Prematch, CreateFlagIfNoFlagSpawnpoint )
AddCallback_GameStateEnter( eGameState.Playing, ResetFlag )
AddCallback_OnTouchHealthKit( "item_flag", OnFlagCollected )
AddCallback_OnPlayerKilled( OnPlayerKilled )
@@ -114,6 +115,21 @@ void function DropFlag()
file.flagCarrier = null
}
+void function CreateFlagIfNoFlagSpawnpoint()
+{
+ if ( IsValid( file.flag ) )
+ return
+
+ foreach ( entity hardpoint in GetEntArrayByClass_Expensive( "info_hardpoint" ) )
+ {
+ if ( hardpoint.kv.hardpointGroup == "B" )
+ {
+ CreateFlag( hardpoint )
+ return
+ }
+ }
+}
+
void function ResetFlag()
{
file.flag.ClearParent()
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut
index c72fcb0d..417d0fbf 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut
@@ -53,6 +53,7 @@ void function TTDMIntroShowIntermissionCam( entity player )
void function PlayerWatchesTTDMIntroIntermissionCam( entity player )
{
+ player.EndSignal( "OnDestroy" )
ScreenFadeFromBlack( player )
entity intermissionCam = GetEntArrayByClass_Expensive( "info_intermission" )[ 0 ]
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_ai_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_ai_mp.gnut
index 87e3650f..1102aae1 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_ai_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_ai_mp.gnut
@@ -13,7 +13,7 @@ void function MpInitAILoadouts()
void function SetProficiency( entity npc )
{
// unsure what the logic for deciding this should be so just going to default good
- npc.kv.WeaponProfiency = eWeaponProficiency.VERYGOOD
+ npc.kv.WeaponProficiency = eWeaponProficiency.VERYGOOD
}
void function SPMP_UpdateNPCProficiency( entity npc )
@@ -66,4 +66,4 @@ bool function SPMP_Callback_ForceAIMissPlayer( entity npc, entity player )
}
return false
-} \ No newline at end of file
+}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut
index 8e624c14..1e19abd3 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut
@@ -86,7 +86,7 @@ void function OnPrematchStart()
foreach ( entity dropshipSpawn in validDropshipSpawns )
{
// todo: possibly make this only spawn dropships if we've got enough players to need them
- int createTeam = HasSwitchedSides() ? dropshipSpawn.GetTeam() : GetOtherTeam( dropshipSpawn.GetTeam() )
+ int createTeam = HasSwitchedSides() ? GetOtherTeam( dropshipSpawn.GetTeam() ) : dropshipSpawn.GetTeam()
array<IntroDropship> teamDropships = createTeam == TEAM_MILITIA ? file.militiaDropships : file.imcDropships
if ( teamDropships.len() >= 2 )
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
index 63ecbf68..598b4522 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
@@ -39,7 +39,9 @@ struct {
bool roundWinningKillReplayTrackPilotKills = true
bool roundWinningKillReplayTrackTitanKills = false
-
+
+ bool gameWonThisFrame
+ bool hasKillForGameWonThisFrame
float roundWinningKillReplayTime
entity roundWinningKillReplayVictim
entity roundWinningKillReplayAttacker
@@ -282,7 +284,7 @@ void function GameStateEnter_WinnerDetermined_Threaded()
entity replayAttacker = file.roundWinningKillReplayAttacker
bool doReplay = Replay_IsEnabled() && IsRoundWinningKillReplayEnabled() && IsValid( replayAttacker )
- && Time() - file.roundWinningKillReplayTime <= ROUND_WINNING_KILL_REPLAY_LENGTH_OF_REPLAY
+ && Time() - file.roundWinningKillReplayTime <= ROUND_WINNING_KILL_REPLAY_LENGTH_OF_REPLAY && winningTeam != TEAM_UNASSIGNED
float replayLength = 2.0 // extra delay if no replay
if ( doReplay )
@@ -541,12 +543,22 @@ void function ForceFadeToBlack( entity player )
void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
{
if ( !GamePlayingOrSuddenDeath() )
- return
+ {
+ if ( file.gameWonThisFrame )
+ {
+ if ( file.hasKillForGameWonThisFrame )
+ return
+ }
+ else
+ return
+ }
// set round winning killreplay info here if we're tracking pilot kills
// todo: make this not count environmental deaths like falls, unsure how to prevent this
if ( file.roundWinningKillReplayTrackPilotKills && victim != attacker && attacker != svGlobal.worldspawn && IsValid( attacker ) )
{
+ if ( file.gameWonThisFrame )
+ file.hasKillForGameWonThisFrame = true
file.roundWinningKillReplayTime = Time()
file.roundWinningKillReplayVictim = victim
file.roundWinningKillReplayAttacker = attacker
@@ -555,6 +567,12 @@ void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
file.roundWinningKillReplayHealthFrac = GetHealthFrac( attacker )
}
+ if ( ( Riff_EliminationMode() == eEliminationMode.Titans || Riff_EliminationMode() == eEliminationMode.PilotsTitans ) && victim.IsTitan() ) // need an extra check for this
+ OnTitanKilled( victim, damageInfo )
+
+ if ( !GamePlayingOrSuddenDeath() )
+ return
+
// note: pilotstitans is just win if enemy team runs out of either pilots or titans
if ( IsPilotEliminationBased() || GetGameState() == eGameState.SuddenDeath )
{
@@ -579,21 +597,28 @@ void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
SetWinner( GetOtherTeam( victim.GetTeam() ), "#GAMEMODE_ENEMY_PILOTS_ELIMINATED", "#GAMEMODE_FRIENDLY_PILOTS_ELIMINATED" )
}
}
-
- if ( ( Riff_EliminationMode() == eEliminationMode.Titans || Riff_EliminationMode() == eEliminationMode.PilotsTitans ) && victim.IsTitan() ) // need an extra check for this
- OnTitanKilled( victim, damageInfo )
}
void function OnTitanKilled( entity victim, var damageInfo )
{
if ( !GamePlayingOrSuddenDeath() )
- return
+ {
+ if ( file.gameWonThisFrame )
+ {
+ if ( file.hasKillForGameWonThisFrame )
+ return
+ }
+ else
+ return
+ }
// set round winning killreplay info here if we're tracking titan kills
// todo: make this not count environmental deaths like falls, unsure how to prevent this
entity attacker = DamageInfo_GetAttacker( damageInfo )
if ( file.roundWinningKillReplayTrackTitanKills && victim != attacker && attacker != svGlobal.worldspawn && IsValid( attacker ) )
{
+ if ( file.gameWonThisFrame )
+ file.hasKillForGameWonThisFrame = true
file.roundWinningKillReplayTime = Time()
file.roundWinningKillReplayVictim = victim
file.roundWinningKillReplayAttacker = attacker
@@ -601,6 +626,9 @@ void function OnTitanKilled( entity victim, var damageInfo )
file.roundWinningKillReplayTimeOfDeath = Time()
file.roundWinningKillReplayHealthFrac = GetHealthFrac( attacker )
}
+
+ if ( !GamePlayingOrSuddenDeath() )
+ return
// note: pilotstitans is just win if enemy team runs out of either pilots or titans
if ( IsTitanEliminationBased() )
@@ -706,12 +734,16 @@ void function SetRoundWinningKillReplayAttacker( entity attacker )
file.roundWinningKillReplayTime = Time()
file.roundWinningKillReplayHealthFrac = GetHealthFrac( attacker )
file.roundWinningKillReplayAttacker = attacker
+ file.roundWinningKillReplayTimeOfDeath = Time()
}
void function SetWinner( int team, string winningReason = "", string losingReason = "" )
{
SetServerVar( "winningTeam", team )
+ file.gameWonThisFrame = true
+ thread UpdateGameWonThisFrameNextFrame()
+
if ( winningReason.len() == 0 )
file.announceRoundWinnerWinningSubstr = 0
else
@@ -739,6 +771,13 @@ void function SetWinner( int team, string winningReason = "", string losingReaso
}
}
+void function UpdateGameWonThisFrameNextFrame()
+{
+ WaitFrame()
+ file.gameWonThisFrame = false
+ file.hasKillForGameWonThisFrame = false
+}
+
void function AddTeamScore( int team, int amount )
{
GameRules_SetTeamScore( team, GameRules_GetTeamScore( team ) + amount )
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_wargames.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_wargames.nut
index 92307f3c..11587947 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_wargames.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_wargames.nut
@@ -104,7 +104,8 @@ void function OnPrematchStart()
entity militiaIon = CreatePropDynamic( $"models/titans/medium/titan_medium_ajax.mdl", < -1809.98, 2790.39, -1409 >, < 0, 80, 0 > )
thread PlayAnim( militiaIon, "at_titan_activation_wargames_intro" )
-
+ militiaIon.Anim_SetInitialTime( 4.5 )
+
entity militiaPilot = CreateElitePilot( TEAM_UNASSIGNED, < 0, 0, 0 >, < 0, 0, 0 > )
DispatchSpawn( militiaPilot )
militiaPilot.SetParent( militiaIon, "HIJACK" )
@@ -116,7 +117,6 @@ void function OnPrematchStart()
DispatchSpawn( militiaMarvinChillin )
thread PlayAnim( militiaMarvinChillin, "mv_idle_unarmed" )
-
// imc grunts
entity imcGrunt1 = CreatePropDynamic( $"models/humans/grunts/imc_grunt_rifle.mdl", < -2915, 2867, -1788 >, < 0, -137, 0 > )
thread PlayAnim( imcGrunt1, "pt_console_idle" )
@@ -188,6 +188,7 @@ void function PlayerWatchesWargamesIntro( entity player )
player.kv.VisibilityFlags = ENTITY_VISIBLE_TO_EVERYONE
ClearPlayerAnimViewEntity( player )
player.EnableWeaponViewModel()
+ DeployAndEnableWeapons(player)
player.ClearParent()
player.UnforceStand()
player.MovementEnable()
@@ -224,15 +225,16 @@ void function PlayerWatchesWargamesIntro( entity player )
player.kv.VisibilityFlags = ENTITY_VISIBLE_TO_OWNER
TrainingPod_ViewConeLock_PodClosed( player )
player.DisableWeaponViewModel()
+ HolsterAndDisableWeapons(player)
player.MovementDisable()
player.SetInvulnerable()
- // spawn faction leader
- // no clue why client subtracts 4.5 from the time we give this, so just add it here instead
- if ( factionTeam == TEAM_IMC )
- Remote_CallFunction_NonReplay( player, "ServerCallback_SpawnIMCFactionLeaderForIntro", file.introStartTime + 4.5, playerPod.GetEncodedEHandle() )
+ if ( factionTeam == TEAM_MILITIA && GetFactionChoice( player ) == "faction_marvin" )
+ Remote_CallFunction_NonReplay( player, "ServerCallback_SpawnMilitiaFactionLeaderForIntro", file.introStartTime, playerPod.GetEncodedEHandle() )
+ else if ( factionTeam == TEAM_MILITIA )
+ Remote_CallFunction_NonReplay( player, "ServerCallback_SpawnMilitiaFactionLeaderForIntro", file.introStartTime + 1.75, playerPod.GetEncodedEHandle() )
else
- Remote_CallFunction_NonReplay( player, "ServerCallback_SpawnMilitiaFactionLeaderForIntro", file.introStartTime + 4.5, playerPod.GetEncodedEHandle() )
+ Remote_CallFunction_NonReplay( player, "ServerCallback_SpawnIMCFactionLeaderForIntro", file.introStartTime + 4.5, playerPod.GetEncodedEHandle() )
// idle pod sequence
FirstPersonSequenceStruct podIdleSequence