MeanZombieStalker Accessed None 'Controller' fix
This commit is contained in:
		
							parent
							
								
									410515b99d
								
							
						
					
					
						commit
						c0de294c59
					
				| @ -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); | ||||
|     targetPawn = NiceHumanPawn(Controller.Target); | ||||
|     if(result && targetPawn != none){ | ||||
|        if(targetPawn.ShieldStrength > 100) | ||||
| 
 | ||||
|     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 (targetPawn.ShieldStrength > 100) | ||||
|            return result; | ||||
|        else if(targetPawn.ShieldStrength < 0) | ||||
|        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(); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user