I'm currently experimenting with the RenderOverlays function of weapons to allow other inventory items or maybe hud mutators to add some effects.
Now the new UDamage doesn't change the weapon's texture but draws that glow around the weapon.
Everything is fine until I get double enforcers. The right one does get the cool glow, but the left doesn't.
That's the code of the basic weapon class I use:
The UDamage (one of the affectors) gets a PostRenderOverlaysFor() call with the weapon (Self) as a parameter.
Now if a second enforcer is picked up it *should* be registered as the SlaveWeapon but why isn't this working?
Now the new UDamage doesn't change the weapon's texture but draws that glow around the weapon.
Everything is fine until I get double enforcers. The right one does get the cool glow, but the left doesn't.
That's the code of the basic weapon class I use:
Code:
simulated function RenderOverlays(canvas Canvas)
{
local Mutator M;
local PickupPlus A;
local bool bOverride;
for (A = PickupPlus(Affector); !bOverride && A != None; A = PickupPlus(A.NextAffector))
if ( A.bRenderOverlays ) {
bOverride = A.PreRenderOverlaysFor(Self, Canvas) || bOverride;
}
if ( !bOverride ) {
Super.RenderOverlays(Canvas);
for (A = PickupPlus(Affector); A != None; A = PickupPlus(A.NextAffector))
if ( A.bRenderOverlays ) {
A.PostRenderOverlaysFor(Self, Canvas);
}
}
if ( SlaveWeapon != None )
SlaveWeapon.RenderOverlays(Canvas);
}
Now if a second enforcer is picked up it *should* be registered as the SlaveWeapon but why isn't this working?