Weapon checks valid frozen actor
This commit is contained in:
committed by
Matthias Mailänder
parent
a25558b550
commit
ac92162825
@@ -220,6 +220,9 @@ namespace OpenRA.GameRules
|
|||||||
/// <summary>Checks if the weapon is valid against (can target) the frozen actor.</summary>
|
/// <summary>Checks if the weapon is valid against (can target) the frozen actor.</summary>
|
||||||
public bool IsValidAgainst(FrozenActor victim, Actor firedBy)
|
public bool IsValidAgainst(FrozenActor victim, Actor firedBy)
|
||||||
{
|
{
|
||||||
|
if (!victim.IsValid)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!CanTargetSelf && victim.Actor == firedBy)
|
if (!CanTargetSelf && victim.Actor == firedBy)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user