-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidmo.patch
More file actions
12 lines (12 loc) · 795 Bytes
/
validmo.patch
File metadata and controls
12 lines (12 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/Source/Managers/MovableMan.h b/Source/Managers/MovableMan.h
index abc123..def456 100644
--- a/Source/Managers/MovableMan.h
+++ b/Source/Managers/MovableMan.h
@@ -576,6 +576,8 @@ namespace RTE {
// Or perhaps even more concerningly, stuff can be deleted, re-allocated over the same space, and then readded to movableman. Which even this solution does nothing to fix.
// Anyways, until we fix up ownership semantics... this is the best we can do.
+ // OPTIMIZATION: Combined set for O(1) general validity checks + separate type-specific sets
+ std::unordered_set<const MovableObject*> m_ValidMOs;
std::unordered_set<const MovableObject*> m_ValidActors;
std::unordered_set<const MovableObject*> m_ValidItems;
std::unordered_set<const MovableObject*> m_ValidParticles;