aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hs.gnut
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-22 16:46:49 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-22 16:46:49 +0000
commitfb32cb1b780c1169a834c951bc0c928199a2b59e (patch)
treee2435cc869fed0fa3f7c3d187335d2350b8b1e14 /Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hs.gnut
parentdade102a0d4d14ba5ee560022b8e2f1ddf960977 (diff)
downloadNorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.tar.gz
NorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.zip
playtest fixes
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hs.gnut')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hs.gnut28
1 files changed, 25 insertions, 3 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hs.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hs.gnut
index 7b96cac75..ed2451528 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hs.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_hs.gnut
@@ -17,6 +17,7 @@ void function GamemodeHideAndSeek_Init()
Riff_ForceBoostAvailability( eBoostAvailability.Disabled )
SetRespawnsEnabled( false )
Riff_ForceSetEliminationMode( eEliminationMode.Pilots )
+ SetLoadoutGracePeriodEnabled( false )
SetTimeoutWinnerDecisionFunc( HideAndSeekDecideWinner )
ClassicMP_SetCustomIntro( GamemodeHideAndSeekIntroSetup, 0.0 )
@@ -85,12 +86,11 @@ void function HideAndSeekIntroPrematch()
ClassicMP_OnIntroStarted()
file.hidingStartTime = Time()
-
foreach ( entity player in GetPlayerArray() )
AddPlayerToHideAndSeekIntro( player )
// this intro is mostly done in playing, so just finish the intro up now and we can do fully custom logic from here
- WaitFrame()
+ wait 2.5
ClassicMP_OnIntroFinished()
thread GlobalSeekerIntroThread()
@@ -98,6 +98,9 @@ void function HideAndSeekIntroPrematch()
void function HiderIntroThread( entity player )
{
+ player.EndSignal( "OnDestroy" )
+ // need to wait a frame in case we're joining after eGameState.Playing, in which case we'll be turned into a spectator on first frame
+ WaitFrame()
RespawnAsPilot( player )
wait ( file.hidingStartTime + file.hidingTime ) - Time()
@@ -107,6 +110,7 @@ void function HiderIntroThread( entity player )
void function SeekerIntroThread( entity player )
{
+ player.EndSignal( "OnDestroy" )
MuteHalfTime( player )
player.SetObserverModeStaticPosition( file.intermissionCam.GetOrigin() )
@@ -132,7 +136,12 @@ void function GlobalSeekerIntroThread()
Remote_CallFunction_NonReplay( hider, "ServerCallback_SeekersIncoming" )
array<entity> seekers = GetPlayerArrayOfTeam( HIDEANDSEEK_TEAM_SEEKER )
- entity podSpawn = file.droppodSpawns.getrandom()
+ entity podSpawn
+ if ( file.droppodSpawns.len() != 0 )
+ podSpawn = file.droppodSpawns.getrandom()
+ else
+ podSpawn = SpawnPoints_GetPilot().getrandom()
+
SpawnPlayersInDropPod( seekers, podSpawn.GetOrigin(), podSpawn.GetAngles() )
foreach ( entity seeker in seekers )
@@ -162,11 +171,24 @@ void function SetupHideAndSeekPlayer( entity player )
// remove red outline, ideally should work tm
Highlight_ClearEnemyHighlight( player )
+ thread PlayHintSoundsForHider( player )
}
else
player.TakeWeapon( "mp_weapon_grenade_sonar" ) // seekers should not have pulse blade
}
+void function PlayHintSoundsForHider( entity player )
+{
+ player.EndSignal( "OnDeath" )
+ player.EndSignal( "OnDestroy" )
+
+ while ( true )
+ {
+ wait 1.0
+ EmitSoundOnEntity( player, "weapon_chargerifle_fire_3p" )
+ }
+}
+
void function TryNotifyLastPlayerAlive( entity victim, entity attacker, var damageInfo )
{
if ( victim.GetTeam() == HIDEANDSEEK_TEAM_HIDER )