News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Mods > WoD Mod Pod > Ask a Coder

Reply
 
Thread Tools Display Modes
Old 21st Aug 2001, 02:59 PM   #1
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,777
RenderOverlays function

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:
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);
}
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?
Wormbo is offline   Reply With Quote
Old 21st Aug 2001, 04:40 PM   #2
Bytekeeper
Last of the Brunnen G
 
Bytekeeper's Avatar
 
Join Date: Jul. 15th, 2001
Location: Germany
Posts: 64
Your second enforcer's renderoverlay is not called...
You need to call:
SlaveEnforcer.RenderOverlays()

Oh just read a bit more
So it seems that your slaveweapon registration code is buggy.
__________________
-
Dante

Defence Alliance coder
www.planetunreal.com/da/
Bytekeeper is offline   Reply With Quote
Old 22nd Aug 2001, 12:24 PM   #3
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,777
Angry

Damn!
I renamed SlaveEnforcer to SlaveWeapon and moved it and bIsSlave to the super class (that's where this function resides).
Oh well, it's gonna be a long night...
Wormbo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer