zedtest3 #3

Merged
dkanus merged 15 commits from :zedtest3 into master 2022-01-21 11:56:43 +03:00
Showing only changes of commit c0de294c59 - Show all commits

View File

@ -173,25 +173,34 @@ simulated function int AttackAndMoveDoAnimAction( name AnimName ) {
}
return super.DoAnimAction( AnimName );
}
function bool MeleeDamageTarget(int hitdamage, vector pushdir) {
function bool MeleeDamageTarget(int hitdamage, vector pushdir)
{
local bool result;
local float effectStrenght;
local NiceHumanPawn targetPawn;
result = Super(NiceMonster).MeleeDamageTarget(hitdamage, pushdir);
result = super(NiceMonster).MeleeDamageTarget(hitdamage, pushdir);
// if true means we checked ctlr and ctrl.target != none
if (result)
targetPawn = NiceHumanPawn(Controller.Target);
if(result && targetPawn != none){
if (result && targetPawn != none)
{
if (targetPawn.ShieldStrength > 100)
return result;
else if (targetPawn.ShieldStrength < 0)
effectStrenght = 1.0;
else
effectStrenght = (100 - targetPawn.ShieldStrength) * 0.01;
class'MeanReplicationInfo'.static
.findSZri(targetPawn.PlayerReplicationInfo)
.setBleeding(Self, effectStrenght);
}
return result;
}
function RemoveHead()
{
Super(NiceMonster).RemoveHead();