void EntityList::UpdateAllTraps(bool respawn, bool repopnow) { auto it = trap_list.begin(); while (it != trap_list.end()) { Trap* cur = it->second; if (cur->IsTrap()) { cur->UpdateTrap(respawn, repopnow); } ++it; } Log.Out(Logs::General, Logs::Traps, "All traps updated."); }