PDA

View Full Version : Fix: client glow after nuking + Listenserver host glow



Higor
08-24-2012, 10:39 PM
After wielding a nuke, the player will start glowing until killed.
If the player is a listenserver host, all the others will see him glow as well.

=== sgTrail
Replace Tick with this one:

function Tick(float deltaTime)
{
if ( (Pawn(Owner) == None) || (Pawn(Owner).Health <= 0) || (sgNukeLauncher(Pawn(Owner).Weapon) == none) )
Destroy();
}

And set in the default properties:
RemoteRole=ROLE_None


=== sgNukeLauncher
Replace PostRender with this one:

simulated function PostRender( canvas Canvas )
{
local int i, numReadouts, OldClipX, OldClipY;
local float XScale;

bOwnsCrossHair = ( bGuiding || bShowStatic );

if ( !bGuiding )
{
if ( !bShowStatic )
return;

Canvas.SetPos( 0, 0);
Canvas.Style = ERenderStyle.STY_Normal;
Canvas.DrawIcon(Texture'botpack.Static_a00', FMax(Canvas.ClipX, Canvas.ClipY)/256.0);
if ( Owner.IsA('PlayerPawn') )
PlayerPawn(Owner).ViewTarget = None;
return;
}
if(trail==none) trail=spawn(class'sgtrail',owner,,owner.location);
GuidedShell.PostRender(Canvas);
OldClipX = Canvas.ClipX;
OldClipY = Canvas.ClipY;
XScale = FMax(0.5, int(Canvas.ClipX/640.0));
Canvas.SetPos( 0.5 * OldClipX - 128, 0.5 * OldClipY - 128);
Canvas.Style = ERenderStyle.STY_Translucent;
Canvas.DrawIcon(Texture'WH_A00', 1.0);

numReadouts = OldClipY/128 + 2;
for ( i = 0; i < numReadouts; i++ )
{
Canvas.SetPos(1,Scroll + i * 128);
Scroll--;
if ( Scroll < -128 )
Scroll = 0;
Canvas.DrawIcon(Texture'Readout', 1.0);
}
}