mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-11 21:36:40 -04:00
Allow immobile actors to initiate combat when attacked
This commit is contained in:
parent
3df695df4a
commit
09ed5bb234
@ -360,9 +360,6 @@ namespace MWClass
|
|||||||
{
|
{
|
||||||
stats.setAttacked(true);
|
stats.setAttacked(true);
|
||||||
|
|
||||||
// No retaliation for totally static creatures (they have no movement or attacks anyway)
|
|
||||||
if (isMobile(ptr))
|
|
||||||
{
|
|
||||||
bool complain = sourceType == MWMechanics::DamageSourceType::Melee;
|
bool complain = sourceType == MWMechanics::DamageSourceType::Melee;
|
||||||
bool supportFriendlyFire = sourceType != MWMechanics::DamageSourceType::Ranged;
|
bool supportFriendlyFire = sourceType != MWMechanics::DamageSourceType::Ranged;
|
||||||
if (supportFriendlyFire && MWMechanics::friendlyHit(attacker, ptr, complain))
|
if (supportFriendlyFire && MWMechanics::friendlyHit(attacker, ptr, complain))
|
||||||
@ -370,7 +367,6 @@ namespace MWClass
|
|||||||
else
|
else
|
||||||
setOnPcHitMe = MWBase::Environment::get().getMechanicsManager()->actorAttacked(ptr, attacker);
|
setOnPcHitMe = MWBase::Environment::get().getMechanicsManager()->actorAttacked(ptr, attacker);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Attacker and target store each other as hitattemptactor if they have no one stored yet
|
// Attacker and target store each other as hitattemptactor if they have no one stored yet
|
||||||
if (!attacker.isEmpty() && attacker.getClass().isActor())
|
if (!attacker.isEmpty() && attacker.getClass().isActor())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user