aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_ai_gamemodes.gnut41
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut6
2 files changed, 46 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_ai_gamemodes.gnut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_ai_gamemodes.gnut
index d6d578bb..0fad768c 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_ai_gamemodes.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_ai_gamemodes.gnut
@@ -111,7 +111,16 @@ void function AiGameModes_SpawnDropPod( vector pos, vector rot, int team, string
void function AiGameModes_SpawnReaper( vector pos, vector rot, int team, string aiSettings = "", void functionref( entity reaper ) reaperHandler = null )
{
+ thread Reaper_Spawnpoint( pos, team, 11.2 )
+
+ wait 10
+ // spawn reapers right before it warpfalls, or round_end clean up will crash the game
entity reaper = CreateSuperSpectre( team, pos, rot )
+ // reaper highlight
+ Highlight_SetFriendlyHighlight( reaper, "sp_enemy_pilot" )
+ reaper.Highlight_SetParam( 1, 0, < 3,3,3 > )
+ Highlight_SetEnemyHighlight( reaper, "enemy_titan" )
+
SetSpawnOption_Titanfall( reaper )
SetSpawnOption_Warpfall( reaper )
@@ -125,6 +134,38 @@ void function AiGameModes_SpawnReaper( vector pos, vector rot, int team, string
thread reaperHandler( reaper )
}
+// copied from cl_replacement_titan_hud.gnut
+void function Reaper_Spawnpoint( vector origin, int team, float impactTime, bool hasFriendlyWarning = false )
+{
+ array<entity> targetEffects = []
+ vector surfaceNormal = < 0, 0, 1 >
+
+ int index = GetParticleSystemIndex( $"P_ar_titan_droppoint" )
+
+ if( hasFriendlyWarning )
+ {
+ entity effectFriendly = StartParticleEffectInWorld_ReturnEntity( index, origin, surfaceNormal )
+ SetTeam( effectFriendly, team )
+ EffectSetControlPointVector( effectFriendly, 1, < 128,188,255 > )
+ effectFriendly.kv.VisibilityFlags = ENTITY_VISIBLE_TO_FRIENDLY
+ targetEffects.append( effectFriendly )
+ }
+
+ entity effectEnemy = StartParticleEffectInWorld_ReturnEntity( index, origin, surfaceNormal )
+ SetTeam( effectEnemy, team )
+ EffectSetControlPointVector( effectEnemy, 1, < 255,99,0 > )
+ effectEnemy.kv.VisibilityFlags = ENTITY_VISIBLE_TO_ENEMY
+ targetEffects.append( effectEnemy )
+
+ wait impactTime
+
+ foreach( entity targetEffect in targetEffects )
+ {
+ if ( IsValid( targetEffect ) )
+ EffectStop( targetEffect )
+ }
+}
+
// including aisettings stuff specifically for at bounty titans
void function AiGameModes_SpawnTitan( vector pos, vector rot, int team, string setFile, string aiSettings = "", void functionref( entity titan ) titanHandler = null )
{
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut
index 9a94b848..fae778d6 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut
@@ -78,6 +78,10 @@ void function HandleScoreEvent( entity victim, entity attacker, var damageInfo )
// Hacked spectre filter
if ( victim.GetOwner() == attacker )
return
+
+ // NPC titans without an owner player will not count towards any team's score
+ if ( attacker.IsNPC() && attacker.IsTitan() && !IsValid( GetPetTitanOwner( attacker ) ) )
+ return
// Split score so we can check if we are over the score max
// without showing the wrong value on client
@@ -507,4 +511,4 @@ void function AITdm_CleanupBoredNPCThread( entity guy )
print( "cleaning up bored npc: " + guy + " from team " + guy.GetTeam() )
guy.Destroy()
-} \ No newline at end of file
+}