aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Custom')
-rw-r--r--Northstar.Custom/mod.json7
-rw-r--r--Northstar.Custom/mod/models/weapons/titan_triple_threat_og/atpov_titan_triple_threat_og.mdlbin2402701 -> 756461 bytes
-rw-r--r--Northstar.Custom/mod/models/weapons/titan_triple_threat_og/w_titan_triple_threat_og.mdlbin925524 -> 588501 bytes
-rw-r--r--Northstar.Custom/mod/resource/northstar_custom_english.txtbin6318 -> 6446 bytes
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut2
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut35
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut4
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut10
8 files changed, 33 insertions, 25 deletions
diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json
index e81b197f..66d29cae 100644
--- a/Northstar.Custom/mod.json
+++ b/Northstar.Custom/mod.json
@@ -1,7 +1,7 @@
{
"Name": "Northstar.Custom",
"Description": "Custom content for Northstar: extra weapons, gamemodes, etc.",
- "Version": "1.10.0",
+ "Version": "1.13.0",
"LoadPriority": 1,
"RequiredOnClient": true,
"ConVars": [
@@ -29,10 +29,7 @@
"Scripts": [
{
"Path": "sh_northstar_custom_precache.gnut",
- "RunOn": "( CLIENT || SERVER ) && MP",
- "ClientCallback": {
- "After": "NorthstarCustomPrecache"
- },
+ "RunOn": "SERVER && MP",
"ServerCallback": {
"After": "NorthstarCustomPrecache"
}
diff --git a/Northstar.Custom/mod/models/weapons/titan_triple_threat_og/atpov_titan_triple_threat_og.mdl b/Northstar.Custom/mod/models/weapons/titan_triple_threat_og/atpov_titan_triple_threat_og.mdl
index 7ea0d4da..f2dafaf1 100644
--- a/Northstar.Custom/mod/models/weapons/titan_triple_threat_og/atpov_titan_triple_threat_og.mdl
+++ b/Northstar.Custom/mod/models/weapons/titan_triple_threat_og/atpov_titan_triple_threat_og.mdl
Binary files differ
diff --git a/Northstar.Custom/mod/models/weapons/titan_triple_threat_og/w_titan_triple_threat_og.mdl b/Northstar.Custom/mod/models/weapons/titan_triple_threat_og/w_titan_triple_threat_og.mdl
index 1c338bcf..b955e1c0 100644
--- a/Northstar.Custom/mod/models/weapons/titan_triple_threat_og/w_titan_triple_threat_og.mdl
+++ b/Northstar.Custom/mod/models/weapons/titan_triple_threat_og/w_titan_triple_threat_og.mdl
Binary files differ
diff --git a/Northstar.Custom/mod/resource/northstar_custom_english.txt b/Northstar.Custom/mod/resource/northstar_custom_english.txt
index 04a8d009..dbd3b106 100644
--- a/Northstar.Custom/mod/resource/northstar_custom_english.txt
+++ b/Northstar.Custom/mod/resource/northstar_custom_english.txt
Binary files differ
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut
index 5ce11eb3..409d5ec0 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut
@@ -283,7 +283,7 @@ function FastballOnPanelHacked( panel, player )
// respawn dead players
foreach ( entity deadPlayer in GetPlayerArrayOfTeam( player.GetTeam() ) )
{
- if ( !IsAlive( deadPlayer ) && !IsPrivateMatchSpectator( player ) )
+ if ( !IsAlive( deadPlayer ) && !IsPrivateMatchSpectator( deadPlayer ) )
{
deadPlayer.SetOrigin( panel.s.startOrigin )
deadPlayer.RespawnPlayer( null )
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut
index 7a5b0ee5..850aa7b3 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut
@@ -117,15 +117,15 @@ void function GamemodeFW_Init()
// _battery_port.gnut needs this
RegisterSignal( "BatteryActivate" )
- AiGameModes_SetGruntWeapons( [ "mp_weapon_rspn101", "mp_weapon_dmr", "mp_weapon_r97", "mp_weapon_lmg" ] )
- AiGameModes_SetSpectreWeapons( [ "mp_weapon_hemlok_smg", "mp_weapon_doubletake", "mp_weapon_mastiff" ] )
+ AiGameModes_SetNPCWeapons( "npc_soldier", [ "mp_weapon_rspn101", "mp_weapon_dmr", "mp_weapon_r97", "mp_weapon_lmg" ] )
+ AiGameModes_SetNPCWeapons( "npc_spectre", [ "mp_weapon_hemlok_smg", "mp_weapon_doubletake", "mp_weapon_mastiff" ] )
AddCallback_EntitiesDidLoad( LoadEntities )
AddCallback_GameStateEnter( eGameState.Prematch, OnFWGamePrematch )
AddCallback_GameStateEnter( eGameState.Playing, OnFWGamePlaying )
AddSpawnCallback( "item_powerup", FWAddPowerUpIcon )
- AddSpawnCallback( "npc_turret_mega", FWTurretHighlight )
+ AddSpawnCallback( "npc_turret_mega", OnFWTurretSpawned )
AddCallback_OnClientConnected( OnFWPlayerConnected )
AddCallback_PlayerClassChanged( OnFWPlayerClassChanged )
@@ -582,9 +582,6 @@ void function LoadEntities()
// create turret, spawn with no team and set it after game starts
entity turret = CreateNPC( "npc_turret_mega", TEAM_UNASSIGNED, info_target.GetOrigin(), info_target.GetAngles() )
SetSpawnOption_AISettings( turret, "npc_turret_mega_fortwar" )
- SetDefaultMPEnemyHighlight( turret ) // for sonar highlights to work
- Highlight_SetFriendlyHighlight( turret, "fw_friendly" )
- AddEntityCallback_OnDamaged( turret, OnMegaTurretDamaged )
DispatchSpawn( turret )
turretsite.turret = turret
@@ -1238,10 +1235,18 @@ array<entity> function FW_GetTitanSpawnPointsForTeam( int team )
return validSpawnPoints
}
+// some maps have reversed startpoints! we need a hack
+const array<string> TITAN_POINT_REVERSED_MAPS =
+[
+ "mp_grave"
+]
+
// "Respawn as Titan" don't follow the rateSpawnPoints, fix it manually
entity function FW_ForcedTitanStartPoint( entity player, entity basePoint )
{
int team = player.GetTeam()
+ if ( TITAN_POINT_REVERSED_MAPS.contains( GetMapName() ) )
+ team = GetOtherTeam( player.GetTeam() )
array<entity> startPoints = SpawnPoints_GetTitanStart( team )
entity validPoint = startPoints[ RandomInt( startPoints.len() ) ] // choose a random( maybe not safe ) start point
return validPoint
@@ -1384,19 +1389,23 @@ void function FWAreaThreatLevelThink_Threaded()
///// TURRET FUNCTIONS /////
////////////////////////////
-void function FWTurretHighlight( entity turret )
+void function OnFWTurretSpawned( entity turret )
{
- thread FWTurretHighlightThink( turret )
+ turret.EnableTurret() // always enabled
+ SetDefaultMPEnemyHighlight( turret ) // for sonar highlights to work
+ AddEntityCallback_OnDamaged( turret, OnMegaTurretDamaged )
+ thread FWTurretHighlightThink( turret )
}
// this will clear turret's highlight upon their death, for notifying players to fix them
void function FWTurretHighlightThink( entity turret )
{
- turret.EndSignal( "OnDestroy" )
- Highlight_SetFriendlyHighlight( turret, "fw_friendly" )
+ turret.EndSignal( "OnDestroy" )
+ WaitFrame() // wait a frame for other turret spawn options to set up
+ Highlight_SetFriendlyHighlight( turret, "fw_friendly" ) // initialize the highlight, they will show upon player's next respawn
- turret.WaitSignal( "OnDeath" )
- Highlight_ClearFriendlyHighlight( turret )
+ turret.WaitSignal( "OnDeath" )
+ Highlight_ClearFriendlyHighlight( turret )
}
// for battery_port, replace the turret with new one
@@ -1407,8 +1416,6 @@ entity function FW_ReplaceMegaTurret( entity perviousTurret )
entity turret = CreateNPC( "npc_turret_mega", perviousTurret.GetTeam(), perviousTurret.GetOrigin(), perviousTurret.GetAngles() )
SetSpawnOption_AISettings( turret, "npc_turret_mega_fortwar" )
- SetDefaultMPEnemyHighlight( turret ) // for sonar highlights to work
- AddEntityCallback_OnDamaged( turret, OnMegaTurretDamaged )
DispatchSpawn( turret )
// apply settings to new turret, must up on date
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
index 35e034cc..fef4c8b6 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
@@ -29,7 +29,7 @@ void function GamemodeInfection_Init()
void function InfectionInitPlayer( entity player )
{
- if ( GetGameState() < eGameState.Playing )
+ if ( GetGameState() < eGameState.Playing || !file.hasHadFirstInfection ) // per Gecko's suggestion, make anyone joining before first infected to stay as survivor instead
SetTeam( player, INFECTION_TEAM_SURVIVOR )
else
InfectPlayer( player )
@@ -185,6 +185,8 @@ void function SetLastSurvivor( entity player )
Remote_CallFunction_NonReplay( otherPlayer, "ServerCallback_AnnounceLastSurvivor", player.GetEncodedEHandle() )
Highlight_SetEnemyHighlight( player, "enemy_sonar" )
+ StatusEffect_AddEndless( player, eStatusEffect.sonar_detected, 1.0 ) // sonar is better here so the player themselves see the SONAR DETECTED warning.
+
if ( SpawnPoints_GetTitan().len() > 0 )
thread CreateTitanForPlayerAndHotdrop( player, GetTitanReplacementPoint( player, false ) )
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut
index 848a4b86..79e64684 100644
--- a/Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/sh_northstar_custom_precache.gnut
@@ -1,4 +1,3 @@
-untyped
global function NorthstarCustomPrecache
void function NorthstarCustomPrecache()
@@ -7,7 +6,10 @@ void function NorthstarCustomPrecache()
PrecacheWeapon( "mp_titanweapon_triplethreat" )
PrecacheWeapon( "melee_pilot_kunai" )
- // create kunai damage source so game won't crash when we hit smth with it
- // just using the default melee one, easier than making a new one
- getconsttable()[ "eDamageSourceId" ][ "melee_pilot_kunai" ] <- eDamageSourceId.melee_pilot_emptyhanded
+ RegisterWeaponDamageSources(
+ {
+ mp_weapon_peacekraber = "#WPN_PEACEKRABER",
+ melee_pilot_kunai = "#MELEE_KUNAI"
+ }
+ )
}