summaryrefslogtreecommitdiff
path: root/src/core/Pools.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-05-12 01:24:57 +0200
committerFilip Gawin <filip.gawin@zoho.com>2020-05-12 23:18:54 +0200
commitc2ac6b3759901ecede7b22c1e9ab9f5a04ddd527 (patch)
treecf51d6ab8430cd186e02f0e8105004f8e5476728 /src/core/Pools.cpp
parentc40fcdf39ab77cb0fde26e314652e0aaf9dd4544 (diff)
Fix linux warnings
Diffstat (limited to 'src/core/Pools.cpp')
-rw-r--r--src/core/Pools.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp
index bc65f6b6..b361c36f 100644
--- a/src/core/Pools.cpp
+++ b/src/core/Pools.cpp
@@ -90,7 +90,11 @@ CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot)
// relocate to another slot??
CObject *newObject = new CObject(object->GetModelIndex(), false);
CWorld::Remove(object);
+#ifdef FIX_BUGS
+ *newObject = *object;
+#else
memcpy(newObject, object, ms_pObjectPool->GetMaxEntrySize());
+#endif
CWorld::Add(newObject);
object->m_rwObject = nil;
delete object;