public float GetTargetHealth(EnemyInfo playerInfo, int additionalTime) { if (playerInfo.Player.IsVisible) return playerInfo.Player.Health; var predictedhealth = playerInfo.Player.Health + playerInfo.Player.HPRegenRate * ((Utils.TickCount - playerInfo.LastSeen + additionalTime) / 1000f); return predictedhealth > playerInfo.Player.MaxHealth ? playerInfo.Player.MaxHealth : predictedhealth; }
public float GetTargetHealth(EnemyInfo playerInfo, int additionalTime) { if (playerInfo.Player.IsVisible) { return(playerInfo.Player.Health); } var predictedhealth = playerInfo.Player.Health + playerInfo.Player.HPRegenRate * ((Environment.TickCount - playerInfo.LastSeen + additionalTime) / 1000f); return(predictedhealth > playerInfo.Player.MaxHealth ? playerInfo.Player.MaxHealth : predictedhealth); }