Re: Pawn Roaming -> Some Game Crash
Posted: Tue Jun 07, 2016 11:44 pm
I messed around with a problem that has the same reason: in some maps double jump (DJ_InventoryItem) does not work any more after picking up a certain inventory item. (Also respawning of that item does not work and the map crashed the server later, but I'm not sure if there is caused also by that issue.) Now I found that this happens, if that inventory item has no InventorySpot - that means that the mapper did not rebuild the map after adding that inventory items. Therefore I've added another check function to my base mutator:
Code: Select all
function int CheckInventorySpots(bool bLogBadInventory) {
/******************************************************************************
Iterates over all Inventory items and reports missing InventorySpots.
Vice versa: reports missing Inventory items of InventorySpots.
Returns the number of suspicious cases.
******************************************************************************/
local int result;
local Inventory inv;
local InventorySpot IS;
foreach AllActors(class'Inventory', inv)
if (inv.MyMarker == None)
{
result++;
if (bLogBadInventory)
LogEx("CheckInventorySpots", inv @ "has no InventorySpot");
}
foreach AllActors(class'InventorySpot', IS)
if (IS.markedItem == None)
{
result++;
if (bLogBadInventory)
LogEx("CheckInventorySpots", IS @ "has no inventory item");
}
return result;
}
Example output
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.ForceField0 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.Armor0 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.Armor1 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.SearchLight0 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.SearchLight1 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.SearchLight2 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.SearchLight3 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.SCUBAGear0 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.HealthPack0 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.HealthPack1 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.HealthPack2 has no InventorySpot
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.InventorySpot4 has no inventory item
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.InventorySpot6 has no inventory item
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.CheckInventorySpots: MH-UM-NaliBoat.InventorySpot7 has no inventory item
2016-06-08 00:39:18 MH-UM-NaliBoat.KHMBase0.Auto State Ready.BeginState(): numbers of suspicious inventory items and their spots: 14