Fix the PowerShield?
Posted: Sat Apr 24, 2010 1:36 am
Seriously, in pre 224 versions, shieldbelt calls timer on pickupfunction and it has timer with no function, in 224 plus it has the new shieldbelt effetc myeffect stuff on timer. But powershield doesn't call the super, in pre 224 it made sense, they never fixed powershield though. And also the reason why it takes plus one armor down on impact is that beacuse parent shieldbelt calls it there, othetrwise if it was called on pickup the powershield would gradually lose the points.
This is the old shieldbelt code:
This is the old shieldbelt code:
Code: Select all
function Timer()
{
}
function ArmorImpactEffect(vector HitLocation)
{
if ( Owner.IsA('PlayerPawn') )
{
PlayerPawn(Owner).ClientFlash(-0.05,vect(400,400,400));
PlayerPawn(Owner).PlaySound(DeActivateSound, SLOT_None, 2.7*PlayerPawn(Owner).SoundDampening);
}
}
function PickupFunction(Pawn Other)
{
if ( Level.Game.bTeamGame )
{
if (Other.PlayerReplicationInfo == None )
{
Other.Texture = texture'GoldSkin';
Other.bMeshEnviroMap = True;
SetTimer(1.0, true);
return;
}
switch (Other.PlayerReplicationInfo.Team)
{
case 0:
Other.Texture = texture'RedSkin';
break;
case 1:
Other.Texture = texture'BlueSkin';
break;
default:
Other.Texture = texture'GoldSkin';
break;
}
Other.bMeshEnviroMap = True;
} else {
Other.Texture = texture'GoldSkin';
Other.bMeshEnviroMap = True;
}
SetTimer(1.0,True);
}
function Destroyed()
{
if ( Owner != None )
Owner.bMeshEnviroMap = False;
Super.Destroyed();
}