diff options
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/item_inventory/sv_item_inventory.gnut | 9 |
1 files changed, 9 insertions, 0 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 7d4552a0..9057f7d8 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 @@ -20,6 +20,7 @@ void function Sv_ItemInventory_Init() { AddCallback_OnClientConnected( Sv_ItemInventory_OnClientConnected ) AddCallback_OnPlayerGetsNewPilotLoadout( Sv_ItemInventory_OnPlayerGetsNewPilotLoadout ) + AddCallback_GameStateEnter( eGameState.Prematch, PrematchClearInventory ) } void function Sv_ItemInventory_OnClientConnected( entity player ) @@ -27,6 +28,14 @@ void function Sv_ItemInventory_OnClientConnected( entity player ) file.playerInventoryStacks[ player ] <- [] } +void function PrematchClearInventory() // vanilla behavior +{ + foreach( entity player in GetPlayerArray() ) + { + PlayerInventory_TakeAllInventoryItems( player ) + } +} + void function Sv_ItemInventory_OnPlayerGetsNewPilotLoadout( entity player, PilotLoadoutDef newPilotLoadout ) { array<InventoryItem> playerInventoryStack = file.playerInventoryStacks[ player ] |