From 3e98aad76ce9f69eba30770e71518a715991e820 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Tue, 25 Jan 2022 23:55:08 +0000 Subject: add switching sides to fastball --- .../vscripts/gamemodes/_gamemode_fastball.gnut | 1 + .../gamemodes/_gamemode_fastball_intro.gnut | 24 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes') diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut index 628bb4b5..6ef26dcf 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut @@ -17,6 +17,7 @@ void function GamemodeFastball_Init() SetShouldUseRoundWinningKillReplay( true ) SetRoundBased( true ) + SetSwitchSidesBased( true ) SetRespawnsEnabled( false ) Riff_ForceTitanAvailability( eTitanAvailability.Never ) Riff_ForceSetEliminationMode( eEliminationMode.Pilots ) diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut index 2a137744..b4c18328 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut @@ -77,13 +77,29 @@ void function OnPrematchStart() } file.militiaBuddy = CreatePropDynamic( $"models/titans/buddy/titan_buddy.mdl" ) - file.militiaBuddy.SetOrigin( militiaBuddySpawn.origin ) - file.militiaBuddy.SetAngles( militiaBuddySpawn.angles ) + if ( HasSwitchedSides() ) + { + file.militiaBuddy.SetOrigin( imcBuddySpawn.origin ) + file.militiaBuddy.SetAngles( imcBuddySpawn.angles ) + } + else + { + file.militiaBuddy.SetOrigin( militiaBuddySpawn.origin ) + file.militiaBuddy.SetAngles( militiaBuddySpawn.angles ) + } thread AnimateBuddy( file.militiaBuddy ) file.imcBuddy = CreatePropDynamic( $"models/titans/buddy/titan_buddy.mdl" ) - file.imcBuddy.SetOrigin( imcBuddySpawn.origin ) - file.imcBuddy.SetAngles( imcBuddySpawn.angles ) + if ( HasSwitchedSides() ) + { + file.imcBuddy.SetOrigin( militiaBuddySpawn.origin ) + file.imcBuddy.SetAngles( militiaBuddySpawn.angles ) + } + else + { + file.imcBuddy.SetOrigin( imcBuddySpawn.origin ) + file.imcBuddy.SetAngles( imcBuddySpawn.angles ) + } thread AnimateBuddy( file.imcBuddy ) foreach ( entity player in GetPlayerArray() ) -- cgit v1.2.3