fix: Accessed None 'Enemy' (WMAIController_ZedHusk_Omega:ShootFireballBarrage)

ScriptWarning: Accessed None 'Enemy'
011WMAIController_ZedHusk_Omega KF-RIG.TheWorld:PersistentLevel.WMAIController_ZedHusk_Omega_28
011Function CustomZeds.WMAIController_ZedHusk_Omega:ShootFireballBarrage:00BB

ScriptWarning: Accessed None 'Enemy'
011WMAIController_ZedHusk_Omega KF-RIG.TheWorld:PersistentLevel.WMAIController_ZedHusk_Omega_28
011Function CustomZeds.WMAIController_ZedHusk_Omega:ShootFireballBarrage:0116

ScriptWarning: Accessed None 'Enemy'
011WMAIController_ZedHusk_Omega KF-RIG.TheWorld:PersistentLevel.WMAIController_ZedHusk_Omega_28
011Function CustomZeds.WMAIController_ZedHusk_Omega:ShootFireballBarrage:0142
This commit is contained in:
GenZmeY 2022-07-13 09:03:58 +03:00
parent 1098caff4a
commit 0bc421adf7

View File

@ -166,7 +166,7 @@ function ShootFireballBarrage(class<KFProj_Husk_Fireball> FireballClass, vector
}
SocketLocation = MyKFPawn.GetPawnViewLocation() + (FireballOffset >> Pawn.GetViewRotation());
if (MyKFPawn.Health > 0.0f && Role == ROLE_Authority)
if (MyKFPawn.Health > 0.0f && Role == ROLE_Authority && Enemy != None)
{
AimLocation = Enemy.Location;