aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnie Price <contact@connieprice.co.uk>2022-01-28 05:02:29 +0000
committerConnie Price <contact@connieprice.co.uk>2022-01-28 05:02:29 +0000
commitcfff4af0d0a7a91e9f50296ffc610a10decbfb5b (patch)
tree77c32e88d72c611c111189b201d4866285c9eb61
parent838dff86a1868e908c9c6b8d3f5f8255f82dbb7b (diff)
downloadNorthstarMods-cfff4af0d0a7a91e9f50296ffc610a10decbfb5b.tar.gz
NorthstarMods-cfff4af0d0a7a91e9f50296ffc610a10decbfb5b.zip
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.
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/item_inventory/sv_item_inventory.gnut5
1 files changed, 2 insertions, 3 deletions
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<InventoryItem> 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()