Release Candidate 3 Hotfix 2:

- Corrections on Power Shield behaviour, added option to make it absorb damage
  normally like in Unreal instead of individual hits, although this will make
  it less viable as an Invulnerability replacement.
This commit is contained in:
Marisa the Magician 2019-10-11 13:25:22 +02:00
commit a06ab42a4a
4 changed files with 27 additions and 18 deletions

View file

@ -201,6 +201,7 @@ Class ShieldBelt : UnrealArmor
Class PowerShield : UnrealArmor
{
bool gothit;
int draintimer;
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
{
@ -208,9 +209,17 @@ Class PowerShield : UnrealArmor
{
Owner.A_PlaySound("belt/absorb",CHAN_7);
UTMainHandler.DoFlash(Owner,Color(80,224,0,255),5);
gothit = true;
damage = 0;
newdamage = 0;
if ( !sting_pshield )
{
gothit = true;
damage = 0;
newdamage = 0;
}
}
if ( sting_pshield )
{
Super.AbsorbDamage(damage,damageType,newdamage);
return;
}
if ( damage > 0 ) newdamage = ApplyDamageFactors(GetClass(),damageType,damage,damage);
}
@ -229,7 +238,12 @@ Class PowerShield : UnrealArmor
amount--;
gothit = false;
}
if ( !(level.maptime%15) && !sting_pshield ) amount--;
draintimer++;
if ( draintimer > 35 )
{
amount--;
draintimer = 0;
}
if ( amount <= 0 ) DepleteOrDestroy();
}
Default