The problem is that my mutator only gives the characters their default starting equipment on every other spawn, so if you get fragged you have to wait till you get fragged again to spawn with equipment
Is the problem in this mutator code, or should I be looking elsewhere?
Is the problem in this mutator code, or should I be looking elsewhere?
class Equipment expands Mutator;
//
//
var PUTlsight LS;
var PUTgrapple GR;
function ModifyPlayer(Pawn Other)
{
Super.ModifyPlayer(Other);
if ( Other.IsA('Spectator') || Other.FindInventoryType(class'PUTLSight') != none ) return;
if ( Other.IsA('Bot') || Other.FindInventoryType(class'PUTLSight') != none ) return;
if ( Other.IsA('Spectator') || Other.FindInventoryType(class'PUTgrapple') != none ) return;
if ( Other.IsA('Bot') || Other.FindInventoryType(class'PUTgrapple') != none ) return;
LS = Spawn(class'PUTLSight',,, Location);
LS.GiveTo(Other);
LS.Activate();
LS.bHeldItem = true;
GR = Spawn(class'PUTgrapple',,, Location);
GR.GiveTo(other);
GR.bHeldItem = true;
}
function Mutate(string MutateString, PlayerPawn Sender)
{
if ( MutateString ~= "SwLSight" )
{
if ( Level.NetMode == NM_Standalone )
{
LS = PUTlsight(Sender.FindInventoryType(class'PUTLSight'));
LS.Activate();
}
}
else Super.Mutate(MutateString, Sender);
}