From 51e16034230f4dd759900c7922b8db43941e0a70 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Sun, 5 Dec 2021 16:03:50 +0000 Subject: big commit for playtesting --- .../vscripts/gamemodes/_gamemode_fastball_intro.gnut | 19 ++++++++++++++----- .../mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut | 2 +- .../lobby/sh_private_lobby_custom_modes_init.gnut | 3 +++ .../mod/scripts/vscripts/sh_bleedout_damage.gnut | 18 ++++++++++++++++++ 4 files changed, 36 insertions(+), 6 deletions(-) (limited to 'Northstar.Custom/mod/scripts/vscripts') 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 b26016f37..367cafc22 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut @@ -121,16 +121,26 @@ void function AddPlayerToFastballIntro( entity player ) void function FastballPlayer( entity player ) { + if ( IsAlive( player ) ) + player.Die() // kill player if they're alive so there's no issues with that + + WaitFrame() + player.EndSignal( "OnDeath" ) player.EndSignal( "OnDestroy" ) - - OnThreadEnd( function() : ( player ) + + // do this here so it's in OnThreadEnd + var oldVisibility = player.kv.VisibilityFlags + + OnThreadEnd( function() : ( player, oldVisibility ) { RemoveCinematicFlag( player, CE_FLAG_CLASSIC_MP_SPAWNING ) player.ClearParent() ClearPlayerAnimViewEntity( player ) player.DeployWeapon() player.PlayerCone_Disable() + player.ClearInvulnerable() + player.kv.VisibilityFlags = oldVisibility // restore visibility }) FirstPersonSequenceStruct throwSequence @@ -154,8 +164,8 @@ void function FastballPlayer( entity player ) // respawn the player player.SetOrigin( buddy.GetOrigin() ) player.RespawnPlayer( null ) - var oldVisibility = player.kv.VisibilityFlags // better than .Hide(), hides weapons and such - player.kv.VisibilityFlags = 0 + player.kv.VisibilityFlags = 0 // better than .Hide(), hides weapons and such + player.SetInvulnerable() // in deadly ground we die without this lol player.HolsterWeapon() // hide hud, fade screen out from black @@ -185,7 +195,6 @@ void function FastballPlayer( entity player ) // have to correct this manually here since due to no 3p animation our position isn't set right during this sequence player.SetOrigin( buddy.GetAttachmentOrigin( buddy.LookupAttachment( "FASTBALL_R" ) ) ) - player.kv.VisibilityFlags = oldVisibility // restore visibility player.SetVelocity( throwVel ) TryGameModeAnnouncement( player ) diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut index c2b2b0214..1e6778e12 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut @@ -170,7 +170,7 @@ void function SetLastSurvivor( entity player ) Remote_CallFunction_NonReplay( otherPlayer, "ServerCallback_AnnounceLastSurvivor", player.GetEncodedEHandle() ) Highlight_SetEnemyHighlight( player, "enemy_sonar" ) - //thread CreateTitanForPlayerAndHotdrop( player, GetTitanReplacementPoint( player, false ) ) + thread CreateTitanForPlayerAndHotdrop( player, GetTitanReplacementPoint( player, false ) ) if ( GameTime_TimeLeftSeconds() > 45 ) SetServerVar( "gameEndTime", Time() + 45.0 ) diff --git a/Northstar.Custom/mod/scripts/vscripts/lobby/sh_private_lobby_custom_modes_init.gnut b/Northstar.Custom/mod/scripts/vscripts/lobby/sh_private_lobby_custom_modes_init.gnut index 81c08f225..f67a274b9 100644 --- a/Northstar.Custom/mod/scripts/vscripts/lobby/sh_private_lobby_custom_modes_init.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/lobby/sh_private_lobby_custom_modes_init.gnut @@ -8,4 +8,7 @@ void function CustomPrivateMatchModesInit() AddPrivateMatchMode( "kr" ) AddPrivateMatchMode( "tt" ) AddPrivateMatchMode( "ctf_comp" ) + + // this is nonfunctional for some reason + AddPrivateMatchMap( "mp_skyway_v1" ) } \ No newline at end of file diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_bleedout_damage.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_bleedout_damage.gnut index 8b21184ad..2fd36e45a 100644 --- a/Northstar.Custom/mod/scripts/vscripts/sh_bleedout_damage.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/sh_bleedout_damage.gnut @@ -114,11 +114,29 @@ void function HandleDamageForBleedout( entity player, var damageInfo ) void function OnPlayerBleedoutBegin( entity player ) { file.bleedingPlayers.append( player ) + EmitSoundOnEntity( player, "Player_Death_Begin" ) + + thread PlayerBleedoutGracePeriod( player ) // would prefer to use Bleedout_SetCallback_OnPlayerGiveFirstAid for this, but it doesn't expose the player that's receiving first aid for some reason thread TrackPlayerBleedout( player ) } +void function PlayerBleedoutGracePeriod( entity player ) +{ + player.EndSignal( "OnDeath" ) + player.EndSignal( "OnDestroy" ) + + OnThreadEnd( function() : ( player ) + { + player.ClearInvulnerable() + StopSoundOnEntity( player, "Player_Death_Begin" ) + }) + + player.SetInvulnerable() + wait 2.5 +} + void function TrackPlayerBleedout( entity player ) { player.EndSignal( "OnDeath" ) -- cgit v1.2.3