auto state CheckReplacement
{
function BeginState()
{
local int i;
local Actor what;
// destroy any other actors inside a 2-mark radius (safeguard)
foreach RadiusActors(Class'Actor', what,2,location)
{
if (what != self)
{
if (bDebug) log("safeguard destroys "$what,'ARBITITEM');
what.destroy();
}
}
I don't see any reasons why ArbitItem should destroy anything, not just Inventory. It may remove unrelated actors (f.e., Triggers, SpecialEvents, and even Info actors) that could be placed nearby for some reason. Note that RadiusActors takes collision metrics into account, hence it may find actors whose Location is 2000uu or more away from the ArbitItem as long as their CollisionRadius and CollisionHeight are big enough for occupying the space within the given radius. I faced with this situation when I tried to spawn some actors on DmRetrospective, and figuring out why they were suddenly destroyed took a lot of time.
My suggestion is to replace Actor class by Inventory class in the aforementioned piece of code.
Actually RadiusActors doesn't take collision metrics into account, it only checks distance between Location and test location.
But I changed it to only check with inventory based colliding actors.
I don't see any reasons why ArbitItem should destroy anything, not just Inventory. It may remove unrelated actors (f.e., Triggers, SpecialEvents, and even Info actors) that could be placed nearby for some reason. Note that RadiusActors takes collision metrics into account, hence it may find actors whose Location is 2000uu or more away from the ArbitItem as long as their CollisionRadius and CollisionHeight are big enough for occupying the space within the given radius. I faced with this situation when I tried to spawn some actors on DmRetrospective, and figuring out why they were suddenly destroyed took a lot of time.
My suggestion is to replace Actor class by Inventory class in the aforementioned piece of code.