From cfff4af0d0a7a91e9f50296ffc610a10decbfb5b Mon Sep 17 00:00:00 2001 From: Connie Price Date: Fri, 28 Jan 2022 05:02:29 +0000 Subject: Changed callback in "pilot inventory" from respawning to loadout giving. This fixes boosts being lost when players switch loadouts in the post-respawn grace period. --- .../mod/scripts/vscripts/item_inventory/sv_item_inventory.gnut | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Northstar.CustomServers/mod/scripts/vscripts') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/item_inventory/sv_item_inventory.gnut b/Northstar.CustomServers/mod/scripts/vscripts/item_inventory/sv_item_inventory.gnut index a768b3f3..4e8f85ac 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/item_inventory/sv_item_inventory.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/item_inventory/sv_item_inventory.gnut @@ -18,7 +18,7 @@ struct void function Sv_ItemInventory_Init() { AddCallback_OnClientConnected( Sv_ItemInventory_OnClientConnected ) - AddCallback_OnPlayerRespawned( Sv_ItemInventory_OnPlayerRespawned ) + AddCallback_OnPlayerGetsNewPilotLoadout( Sv_ItemInventory_OnPlayerGetsNewPilotLoadout ) } void function Sv_ItemInventory_OnClientConnected( entity player ) @@ -26,7 +26,7 @@ void function Sv_ItemInventory_OnClientConnected( entity player ) file.playerInventoryStacks[ player ] <- [] } -void function Sv_ItemInventory_OnPlayerRespawned( entity player ) +void function Sv_ItemInventory_OnPlayerGetsNewPilotLoadout( entity player, PilotLoadoutDef newPilotLoadout ) { array playerInventoryStack = file.playerInventoryStacks[ player ] @@ -38,7 +38,6 @@ void function Sv_ItemInventory_OnPlayerRespawned( entity player ) return } - int function SvPlayerInventory_ItemCount( entity player ) { return file.playerInventoryStacks[ player ].len() -- cgit v1.2.3