diff options
| author | MegaMech <7255464+MegaMech@users.noreply.github.com> | 2024-12-30 20:39:31 -0700 |
|---|---|---|
| committer | MegaMech <7255464+MegaMech@users.noreply.github.com> | 2024-12-30 20:39:31 -0700 |
| commit | 7ee714e4e93609a5dbf1dc648df0ce504e3d7284 (patch) | |
| tree | e63c623057b555fedd3d017b5d6c34d12de31098 /src/engine/objects/BombKart.cpp | |
| parent | 41fb92b7b989290947d8f39c442219afe12d0215 (diff) | |
| parent | 57afb90c3901b4c5dc586f1be3f6604c52c423d6 (diff) | |
Merge branch 'next' of https://github.com/MegaMech/SpaghettiKart into next
Diffstat (limited to 'src/engine/objects/BombKart.cpp')
| -rw-r--r-- | src/engine/objects/BombKart.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/engine/objects/BombKart.cpp b/src/engine/objects/BombKart.cpp index 42506f826..c33b4b107 100644 --- a/src/engine/objects/BombKart.cpp +++ b/src/engine/objects/BombKart.cpp @@ -26,8 +26,10 @@ extern "C" { extern s8 gPlayerCount; } -OBombKart::OBombKart(Vec3f pos, TrackWaypoint* waypoint, uint16_t waypointIndex, uint16_t state, f32 unk_3C) { +size_t OBombKart::_count = 0; +OBombKart::OBombKart(Vec3f pos, TrackWaypoint* waypoint, uint16_t waypointIndex, uint16_t state, f32 unk_3C) { + _idx = _count; Vec3f _pos = {0, 0, 0}; if (waypoint) { // Spawn kart on waypoint @@ -68,6 +70,8 @@ OBombKart::OBombKart(Vec3f pos, TrackWaypoint* waypoint, uint16_t waypointIndex, WheelPos[3][1] = _pos[1]; WheelPos[3][2] = _pos[2]; check_bounding_collision(&_Collision, 2.0f, _pos[0], _pos[1], _pos[2]); + + _count++; } void OBombKart::Spawn() { @@ -334,9 +338,7 @@ void OBombKart::Draw(s32 cameraId) { } if (GetCourse() == GetPodiumCeremony()) { - // This isn't functionally equivallent. - // Technicaly it should be if (kart[0].WaypointIndex < 16) - if (WaypointIndex < 16) { + if ((_idx == 0) && (WaypointIndex < 16)) { return; } else { cameraId = PLAYER_FOUR; |
