Mutator.ReplaceWith(): Inventory.Location == vect(0,0,0)

Discussions about Coding and Scripting
User avatar
Barbie
Godlike
Posts: 2923
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Mutator.ReplaceWith(): Inventory.Location == vect(0,0,0)

Post by Barbie »

See Mutator.ReplaceWith():

Code: Select all

/* ReplaceWith()
Call this function to replace an actor Other with an actor of aClass.
*/
function bool ReplaceWith(actor Other, string aClassName)
{
	local Actor A;
	local class<Actor> aClass;

	if ( Other.IsA('Inventory') && (Other.Location == vect(0,0,0)) )
		return false;
Why isn't inventory located at (0, 0, 0) treated? :???:
"If Origin not in center it be not in center." --Buggie
Buggie
Godlike
Posts: 3164
Joined: Sat Mar 21, 2020 5:32 am

Re: Mutator.ReplaceWith(): Inventory.Location == vect(0,0,0)

Post by Buggie »

Usually there spawned items, like default weapon (which is bug, lead to lost it if there lava zone, for example) and ammo (not sure).
Possible it is bad way for avoid replace such items.