Issue #68: tally deaths

This commit is contained in:
Marc Zinnschlag 2012-10-27 11:15:52 +02:00
parent 6b09b3ad61
commit f72c35fc17
2 changed files with 4 additions and 0 deletions

View file

@ -234,6 +234,8 @@ namespace MWMechanics
continue;
}
++mDeathCount[MWWorld::Class::get (*iter).getId (*iter)];
MWBase::Environment::get().getWorld()->playAnimationGroup (*iter, "death1", 0);
mActors.erase (iter++);

View file

@ -4,6 +4,7 @@
#include <set>
#include <vector>
#include <string>
#include <map>
namespace Ogre
{
@ -22,6 +23,7 @@ namespace MWMechanics
{
std::set<MWWorld::Ptr> mActors;
float mDuration;
std::map<std::string, int> mDeathCount;
void updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused);