Page 1 of 1

Fix the PowerShield?

Posted: Sat Apr 24, 2010 1:36 am
by Leo T_C_K
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:

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();
}

Re: Fix the PowerShield?

Posted: Sat Apr 24, 2010 8:26 am
by creavion
I also wondered about that.. shieldbelt and powershield at the same time. But I didnt have any problems with that, always thought it was intended as like it is, since it seems a rare used powerup.

Re: Fix the PowerShield?

Posted: Sat Apr 24, 2010 1:05 pm
by Leo T_C_K
I also wondered about that.. shieldbelt and powershield at the same time. But I didnt have any problems with that, always thought it was intended as like it is, since it seems a rare used powerup.
The problem is that at powershield the effect sometimes never disappears, due to the timer of shieldbelt not being called, if not restoring the original functionality at least it should call the super.

Re: Fix the PowerShield?

Posted: Sat Apr 24, 2010 2:47 pm
by GreatEmerald
I think it was discussed earlier and it would change things too much + it could be added to a mutator. Although that 1 point bug should be fixed.

Re: Fix the PowerShield?

Posted: Sat Apr 24, 2010 4:26 pm
by Leo T_C_K
I think it was discussed earlier and it would change things too much + it could be added to a mutator. Although that 1 point bug should be fixed.
No, what should be changed is the function calling super, because it does not call it, therefore the effect can get stuck on player.
That's where the bug technically is, they just forgot to redo the powershield.
It wouldn't change too much still, if done right.