summaryrefslogtreecommitdiffstats
path: root/src/objects/ParticleObject.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/objects/ParticleObject.cpp
parentfix shotgun (diff)
downloadre3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.gz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.bz2
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.lz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.xz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.zst
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.zip
Diffstat (limited to 'src/objects/ParticleObject.cpp')
-rw-r--r--src/objects/ParticleObject.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp
index 3dd80546..2fbe6195 100644
--- a/src/objects/ParticleObject.cpp
+++ b/src/objects/ParticleObject.cpp
@@ -61,7 +61,7 @@ CParticleObject::CParticleObject() :
m_nState(POBJECTSTATE_INITIALISED),
m_pNext(NULL),
m_pPrev(NULL),
- m_nRemoveTimer(NULL)
+ m_nRemoveTimer(0)
{
;
@@ -1127,13 +1127,21 @@ CParticleObject::SaveParticle(uint8 *buffer, uint32 *length)
for ( CParticleObject *p = pCloseListHead; p != NULL; p = p->m_pNext )
{
+#ifdef FIX_BUGS
+ *(CParticleObject*)buffer = *p;
+#else
memcpy(buffer, p, sizeof(CParticleObject));
+#endif
buffer += sizeof(CParticleObject);
}
for ( CParticleObject *p = pFarListHead; p != NULL; p = p->m_pNext )
{
+#ifdef FIX_BUGS
+ *(CParticleObject*)buffer = *p;
+#else
memcpy(buffer, p, sizeof(CParticleObject));
+#endif
buffer += sizeof(CParticleObject);
}