From 22d559808256e74ea88fa68bbcfc690edefc635a Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 22 Aug 2013 12:17:12 +0200 Subject: [PATCH] Fix bad_cast exception when hitting creatures --- apps/openmw/mwclass/npc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 5c46ee75ed..d9c1da77bf 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -339,7 +339,7 @@ namespace MWClass const MWWorld::Class &othercls = MWWorld::Class::get(victim); if(!othercls.isActor()) // Can't hit non-actors return; - MWMechanics::CreatureStats &otherstats = getCreatureStats(victim); + MWMechanics::CreatureStats &otherstats = victim.getClass().getCreatureStats(victim); if(otherstats.isDead()) // Can't hit dead actors return;