#include "MW4Headers.hpp" #include "AI_Graveyard.hpp" using namespace MW4AI; Graveyard::Graveyard() { } Graveyard::~Graveyard() { } void Graveyard::NotifyCreated(Adept::ObjectID id) { {for (grave_list::iterator i = m_Graves.begin(); i != m_Graves.end(); ++i) { if ((*i).id == id) { m_Graves.erase(i); return; } }} } void Graveyard::NotifyDeceased(Adept::ObjectID id, Adept::ObjectID destroyer, Stuff::Scalar time_of_death) { #ifdef LAB_ONLY {for (grave_list::iterator i = m_Graves.begin(); i != m_Graves.end(); ++i) { Verify((*i).id != id); }} #endif Grave grave(id,destroyer,time_of_death); m_Graves.push_back(grave); } const grave_list& Graveyard::GetGraves() const { return (m_Graves); }