aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/mp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-06 21:52:34 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-06 21:52:34 +0000
commit1f534d940670d6df826be68b39fcaa846f139a81 (patch)
treeb5c08b6f8a12a2047455e9b1066d855bf803e632 /Northstar.CustomServers/mod/scripts/vscripts/mp
parentf1a07e1b01923b45f7a82c063d25b8dea5b13d53 (diff)
downloadNorthstarMods-1f534d940670d6df826be68b39fcaa846f139a81.tar.gz
NorthstarMods-1f534d940670d6df826be68b39fcaa846f139a81.zip
some bugfixes from playtest
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut23
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut6
2 files changed, 19 insertions, 10 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut
index 70fa148e..fcad7d31 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut
@@ -415,7 +415,6 @@ void function RespawnAsPilot( entity player, bool manualPosition = false )
void function RespawnAsTitan( entity player, bool manualPosition = false )
{
player.isSpawning = true
-
entity spawnpoint = FindSpawnPoint( player, true, ShouldStartSpawn( player ) && !IsFFAGame() )
TitanLoadoutDef titanLoadout = GetTitanLoadoutForPlayer( player )
@@ -429,7 +428,6 @@ void function RespawnAsTitan( entity player, bool manualPosition = false )
player.SetPetTitan( null ) // prevent embark prompt from showing up
AddCinematicFlag( player, CE_FLAG_HIDE_MAIN_HUD ) // hide hud
- player.HolsterWeapon() // hide crosshair
// do titanfall scoreevent
AddPlayerScore( player, "Titanfall", player )
@@ -449,20 +447,27 @@ void function RespawnAsTitan( entity player, bool manualPosition = false )
camera.SetLocalAngles( < camera.GetAngles().x, spawnpoint.GetAngles().y, camera.GetAngles().z > ) // this straight up just does not work lol
camera.Fire( "Enable", "!activator", 0, player )
- waitthread TitanHotDrop( titan, "at_hotdrop_01", spawnpoint.GetOrigin(), spawnpoint.GetAngles(), player, camera ) // do hotdrop anim
+ player.EndSignal( "OnDestroy" )
+ OnThreadEnd( function() : ( player, titan, camera )
+ {
+ if ( IsValid( player ) )
+ {
+ RemoveCinematicFlag( player, CE_FLAG_HIDE_MAIN_HUD ) // show hud
+ player.isSpawning = false
+ }
+
+ titan.Destroy() // pilotbecomestitan leaves an npc titan that we need to delete
+ camera.Fire( "Disable", "!activator", 0, player )
+ camera.Destroy()
+ })
- camera.Fire( "Disable", "!activator", 0, player ) // stop using the camera
- camera.Destroy()
- RemoveCinematicFlag( player, CE_FLAG_HIDE_MAIN_HUD ) // show hud
- player.DeployWeapon() // let them use weapons again
- player.isSpawning = false
+ waitthread TitanHotDrop( titan, "at_hotdrop_01", spawnpoint.GetOrigin(), spawnpoint.GetAngles(), player, camera ) // do hotdrop anim
player.RespawnPlayer( null ) // spawn player as pilot so they get their pilot loadout on embark
player.SetOrigin( titan.GetOrigin() )
WaitFrame()
PilotBecomesTitan( player, titan ) // make player titan
- titan.Destroy() // pilotbecomestitan leaves an npc titan that we need to delete
}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut
index 1766a216..70d1e527 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/spawn.nut
@@ -139,6 +139,10 @@ entity function FindSpawnPoint( entity player, bool isTitan, bool useStartSpawnp
InitRatings( player, team )
+ // don't think this is necessary since we call discardratings
+ //foreach ( entity spawnpoint in spawnpoints )
+ // spawnpoint.CalculateRating( isTitan ? TD_TITAN : TD_PILOT, team, 0.0, 0.0 )
+
void functionref( int, array<entity>, int, entity ) ratingFunc = isTitan ? GameMode_GetTitanSpawnpointsRatingFunc( GAMETYPE ) : GameMode_GetPilotSpawnpointsRatingFunc( GAMETYPE )
ratingFunc( isTitan ? TD_TITAN : TD_PILOT, spawnpoints, team, player )
@@ -165,7 +169,7 @@ entity function FindSpawnPoint( entity player, bool isTitan, bool useStartSpawnp
spawnpoint.s.lastUsedTime = Time()
player.SetLastSpawnPoint( spawnpoint )
-
+
return spawnpoint
}