summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Heli.cpp
diff options
context:
space:
mode:
authorsaml1er <danishroar@gmail.com>2020-04-16 21:01:53 +0200
committersaml1er <danishroar@gmail.com>2020-04-16 21:01:53 +0200
commite52a02fb9e1dd5602e80d88691f2ee2291d1fa52 (patch)
tree333caa1599e2f0c6b91bdae2092cf085eaf8238a /src/vehicles/Heli.cpp
parentReverse CWorld (diff)
parentMore refs removed (diff)
downloadre3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.gz
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.bz2
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.lz
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.xz
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.tar.zst
re3-e52a02fb9e1dd5602e80d88691f2ee2291d1fa52.zip
Diffstat (limited to 'src/vehicles/Heli.cpp')
-rw-r--r--src/vehicles/Heli.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp
index 3dc1deeb..61714133 100644
--- a/src/vehicles/Heli.cpp
+++ b/src/vehicles/Heli.cpp
@@ -34,13 +34,13 @@ enum
HELI_STATUS_HOVER2,
};
-CHeli **CHeli::pHelis = (CHeli**)0x72CF50;
-int16 &CHeli::NumRandomHelis = *(int16*)0x95CCAA;
-uint32 &CHeli::TestForNewRandomHelisTimer = *(uint32*)0x8F1A7C;
+CHeli *CHeli::pHelis[NUM_HELIS];// = (CHeli**)0x72CF50;
+int16 CHeli::NumRandomHelis;// = *(int16*)0x95CCAA;
+uint32 CHeli::TestForNewRandomHelisTimer;// = *(uint32*)0x8F1A7C;
int16 CHeli::NumScriptHelis; // unused
-bool &CHeli::CatalinaHeliOn = *(bool*)0x95CD85;
-bool &CHeli::CatalinaHasBeenShotDown = *(bool*)0x95CD56;
-bool &CHeli::ScriptHeliOn = *(bool*)0x95CD43;
+bool CHeli::CatalinaHeliOn;// = *(bool*)0x95CD85;
+bool CHeli::CatalinaHasBeenShotDown;// = *(bool*)0x95CD56;
+bool CHeli::ScriptHeliOn;// = *(bool*)0x95CD43;
CHeli::CHeli(int32 id, uint8 CreatedBy)
: CVehicle(CreatedBy)
@@ -78,6 +78,9 @@ CHeli::CHeli(int32 id, uint8 CreatedBy)
m_bTestRight = true;
m_fTargetOffset = 0.0f;
m_fSearchLightX = m_fSearchLightY = 0.0f;
+
+ // BUG: not in game but gets initialized to CDCDCDCD in debug
+ m_nLastShotTime = 0;
}
void
@@ -590,7 +593,12 @@ CHeli::PreRender(void)
break;
}
RwRGBA col = { r, g, b, 32 };
+#ifdef FIX_BUGS
+ pos.z = m_fHeliDustZ[frm];
+#else
+ // What the hell is the point of this?
pos.z = m_fHeliDustZ[(i - (i&3))/4]; // advance every 4 iterations, why not just /4?
+#endif
if(pos.z > -200.0f && GetPosition().z - pos.z < 20.0f)
CParticle::AddParticle(PARTICLE_HELI_DUST, pos, dir, nil, 0.0f, col);
i++;