Pawn Roaming -> Some Game Crash

Search, find and discuss about Mutators!
User avatar
Barbie
Godlike
Posts: 1969
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Pawn Roaming -> Some Game Crash

Post by Barbie » 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
Show
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
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
sektor2111
Godlike
Posts: 4883
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Pawn Roaming -> Some Game Crash

Post by sektor2111 » Wed Jun 08, 2016 4:08 pm

Heh, I saw this post right now... This tool somehow must be rewritten. It's not about InventorySpot without items is about an InventorySpot or something missing/stupidly deleted in Editor without rebuiding paths, the crash in cause looks different. Else I will try something compiled normally. Of course THIS is not a priority, I don't like to bug things this way because of some stupid who don't know what it does in Editor. Previous tool is half operational... because of compiling style it leads in later troubles, at this moment is not the right thing, perhaps someone else will find the right way. Example of such crash, MH-Egyptica, some MH-GolgothaAL_fix (or such) yes it's amazingly called "fix". Even with 0 Bots loaded, a Krall can crash game while is trying to hunt player.

User avatar
sektor2111
Godlike
Posts: 4883
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Pawn Roaming -> Some Game Crash

Post by sektor2111 » Wed Jun 15, 2016 9:40 pm

I think the fix in case of such a crash is very simple, I'm not sure if mutator fixer or actor needs more than 1kb of file.
It might be like that:

Code: Select all

class ANameToIncreaseMutatorSize expands Mutator /* or Actor */;

var bool bInitialized;

Event PrebeginPlay()
{
  if (!bInitialized)
  {
      ConsoleCommand("SET LEVELINFO NAVIGATIONPOINTLIST NONE");
      bInitialized=True;
  }
}
Compile it properly and strip code to not exhaust entire disk space by making it smaller... so it doesn't need a hacked compilation.