Compare commits

...

3 Commits

Author SHA1 Message Date
David Markowitz
d4b1fa8c56 Merge branch 'main' into fix_mechs_for_real 2024-02-16 19:49:13 -08:00
David Markowitz
3a50470dbb use erase remove if 2024-01-27 21:48:12 -08:00
David Markowitz
a67ef6336f fix faction change issue
fixes an issue where enemies who would have their faction changed would not change aggro targets.

Tested that stromling mechs and ronin/horsemen in forbidden valley still aggro on spawn as expected.
2024-01-26 02:20:00 -08:00

View File

@@ -2022,7 +2022,7 @@ std::vector<LWOOBJID> Entity::GetTargetsInPhantom() {
// Clean up invalid targets, like disconnected players
m_TargetsInPhantom.erase(std::remove_if(m_TargetsInPhantom.begin(), m_TargetsInPhantom.end(), [](const LWOOBJID id) {
return !Game::entityManager->GetEntity(id);
}), m_TargetsInPhantom.end());
}), m_TargetsInPhantom.end());
std::vector<LWOOBJID> enemies;
for (const auto id : m_TargetsInPhantom) {