mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
fix: incorrectly inverted statement (#1459)
if we DONT find it, we want to kill/delete it. not the other way around where if we find it we try to delete it again. tested that you no longer crash when trying to login tested that bird monument issues are fixed
This commit is contained in:
parent
b6af92ef81
commit
f38537aece
@ -575,13 +575,13 @@ void EntityManager::ScheduleForKill(Entity* entity) {
|
|||||||
|
|
||||||
const auto objectId = entity->GetObjectID();
|
const auto objectId = entity->GetObjectID();
|
||||||
|
|
||||||
if (std::find(m_EntitiesToKill.begin(), m_EntitiesToKill.end(), objectId) != m_EntitiesToKill.end()) {
|
if (std::find(m_EntitiesToKill.begin(), m_EntitiesToKill.end(), objectId) == m_EntitiesToKill.end()) {
|
||||||
m_EntitiesToKill.push_back(objectId);
|
m_EntitiesToKill.push_back(objectId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityManager::ScheduleForDeletion(LWOOBJID entity) {
|
void EntityManager::ScheduleForDeletion(LWOOBJID entity) {
|
||||||
if (std::find(m_EntitiesToDelete.begin(), m_EntitiesToDelete.end(), entity) != m_EntitiesToDelete.end()) {
|
if (std::find(m_EntitiesToDelete.begin(), m_EntitiesToDelete.end(), entity) == m_EntitiesToDelete.end()) {
|
||||||
m_EntitiesToDelete.push_back(entity);
|
m_EntitiesToDelete.push_back(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user