diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-22 16:46:49 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-22 16:46:49 +0000 |
commit | fb32cb1b780c1169a834c951bc0c928199a2b59e (patch) | |
tree | e2435cc869fed0fa3f7c3d187335d2350b8b1e14 /Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut | |
parent | dade102a0d4d14ba5ee560022b8e2f1ddf960977 (diff) | |
download | NorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.tar.gz NorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.zip |
playtest fixes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut index 2017b64b9..af028e71b 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut @@ -55,7 +55,14 @@ void function SetWeaponDropsEnabled( bool enabled ) void function DestroyDroppedWeapon( entity victim, entity attacker, var damageInfo ) { if ( !file.weaponDropsEnabled && IsValid( victim.GetActiveWeapon() ) ) - victim.GetActiveWeapon().Destroy() + thread DelayDestroyDroppedWeapon( victim.GetActiveWeapon() ) +} + +void function DelayDestroyDroppedWeapon( entity weapon ) +{ + WaitEndFrame() + if ( IsValid( weapon ) ) + weapon.Destroy() } TitanLoadoutDef function GetTitanLoadoutForPlayer( entity player ) @@ -258,7 +265,7 @@ void function TryGivePilotLoadoutForGracePeriod( entity player ) else respawnTimeReal = expect float( player.s.respawnTime ) - if ( Time() - respawnTimeReal <= CLASS_CHANGE_GRACE_PERIOD || player.p.usingLoadoutCrate || GetGameState() < eGameState.Playing ) + if ( ( ( Time() - respawnTimeReal <= CLASS_CHANGE_GRACE_PERIOD || GetGameState() < eGameState.Playing ) && file.loadoutGracePeriodEnabled ) || player.p.usingLoadoutCrate ) { // because the game sucks and stuff Loadouts_TryGivePilotLoadout doesn't work in intro so have to do this manually int loadoutIndex = GetPersistentSpawnLoadoutIndex( player, "pilot" ) |