aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/scripts/vscripts/gamemodes/sh_gamemode_mfd.nut
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-06-22 14:30:49 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-06-22 14:30:49 +0100
commit207facbc402f5639cbcd31f079214351ef605cf2 (patch)
tree4710b2a88dd64f3dfea1609d31a5de9141640951 /Northstar.CustomServers/scripts/vscripts/gamemodes/sh_gamemode_mfd.nut
parentc2d438568df6d98cf731807e30eaa7da31e5ea52 (diff)
downloadNorthstarMods-207facbc402f5639cbcd31f079214351ef605cf2.tar.gz
NorthstarMods-207facbc402f5639cbcd31f079214351ef605cf2.zip
initial commit after moving to new repo
Diffstat (limited to 'Northstar.CustomServers/scripts/vscripts/gamemodes/sh_gamemode_mfd.nut')
-rw-r--r--Northstar.CustomServers/scripts/vscripts/gamemodes/sh_gamemode_mfd.nut66
1 files changed, 66 insertions, 0 deletions
diff --git a/Northstar.CustomServers/scripts/vscripts/gamemodes/sh_gamemode_mfd.nut b/Northstar.CustomServers/scripts/vscripts/gamemodes/sh_gamemode_mfd.nut
new file mode 100644
index 000000000..4410a5136
--- /dev/null
+++ b/Northstar.CustomServers/scripts/vscripts/gamemodes/sh_gamemode_mfd.nut
@@ -0,0 +1,66 @@
+untyped
+
+global function GamemodeMfdShared_Init
+global function GetMarked
+global function GetPendingMarked
+global function FillMFDMarkers
+global function TargetsMarkedImmediately
+global function IsTitanMarkedForDeathMode
+
+void function GamemodeMfdShared_Init()
+{
+ // mfd mfdActiveMarkedPlayerEnt are server side entities with a boss player that marks the marked
+ level.mfdActiveMarkedPlayerEnt <- {}
+ level.mfdActiveMarkedPlayerEnt[ TEAM_IMC ] <- null
+ level.mfdActiveMarkedPlayerEnt[ TEAM_MILITIA ] <- null
+
+ level.mfdPendingMarkedPlayerEnt <- {}
+ level.mfdPendingMarkedPlayerEnt[ TEAM_IMC ] <- null
+ level.mfdPendingMarkedPlayerEnt[ TEAM_MILITIA ] <- null
+
+ SetWaveSpawnInterval( 8.0 )
+}
+
+entity function GetMarked( int team )
+{
+ if ( IsValid( level.mfdActiveMarkedPlayerEnt[ team ] ) )
+ return expect entity( level.mfdActiveMarkedPlayerEnt[ team ] ).GetOwner()
+
+ return null
+}
+
+entity function GetPendingMarked( int team )
+{
+ if ( IsValid( level.mfdPendingMarkedPlayerEnt[ team ] ) )
+ return expect entity( level.mfdPendingMarkedPlayerEnt[ team ] ).GetOwner()
+
+ return null
+}
+
+function FillMFDMarkers( entity ent ) //Ent used for kill replay related issues...
+{
+ print( "FillMFDMarkers " + ent )
+
+ if ( ent.GetTargetName() == MARKET_ENT_MARKED_NAME )
+ {
+ Assert( ent.GetTeam() != TEAM_UNASSIGNED )
+ level.mfdActiveMarkedPlayerEnt[ ent.GetTeam() ] = ent
+ }
+ else if ( ent.GetTargetName() == MARKET_ENT_PENDING_MARKED_NAME )
+ {
+ Assert( ent.GetTeam() != TEAM_UNASSIGNED )
+ level.mfdPendingMarkedPlayerEnt[ ent.GetTeam() ] = ent
+ }
+
+ return
+}
+
+function TargetsMarkedImmediately()
+{
+ return IsRoundBased() && IsPilotEliminationBased()
+}
+
+bool function IsTitanMarkedForDeathMode()
+{
+ return GetCurrentPlaylistVarInt( "titan_marked_for_death", 0 ) == 1
+} \ No newline at end of file