mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-10 04:26:50 +03:00
Fix bad_cast exception when hitting creatures
This commit is contained in:
parent
dc6e15f38e
commit
22d5598082
1 changed files with 1 additions and 1 deletions
|
@ -339,7 +339,7 @@ namespace MWClass
|
||||||
const MWWorld::Class &othercls = MWWorld::Class::get(victim);
|
const MWWorld::Class &othercls = MWWorld::Class::get(victim);
|
||||||
if(!othercls.isActor()) // Can't hit non-actors
|
if(!othercls.isActor()) // Can't hit non-actors
|
||||||
return;
|
return;
|
||||||
MWMechanics::CreatureStats &otherstats = getCreatureStats(victim);
|
MWMechanics::CreatureStats &otherstats = victim.getClass().getCreatureStats(victim);
|
||||||
if(otherstats.isDead()) // Can't hit dead actors
|
if(otherstats.isDead()) // Can't hit dead actors
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue