mirror of
https://github.com/n64decomp/mk64
synced 2026-08-03 16:42:06 -04:00
+95
-94
@@ -7,8 +7,8 @@
|
||||
#include "code_800029B0.h"
|
||||
#include "math_util.h"
|
||||
#include "kart_attributes.h"
|
||||
#include "waypoints.h"
|
||||
#include "code_80005FD0.h"
|
||||
#include "path.h"
|
||||
#include "cpu_vehicles_camera_path.h"
|
||||
#include "render_player.h"
|
||||
#include "player_controller.h"
|
||||
#include "render_objects.h"
|
||||
@@ -167,7 +167,7 @@ void clean_effect(Player* player, s8 arg1) {
|
||||
if ((player->effects & 0x800000) == 0x800000) {
|
||||
func_8008D97C(player);
|
||||
}
|
||||
if ((player->effects & 0x1000000) == 0x1000000) {
|
||||
if ((player->effects & UNKNOWN_EFFECT_0x1000000) == UNKNOWN_EFFECT_0x1000000) {
|
||||
func_8008E884(player, arg1);
|
||||
}
|
||||
if ((player->effects & HIT_BY_ITEM_EFFECT) == HIT_BY_ITEM_EFFECT) {
|
||||
@@ -182,10 +182,10 @@ void clean_effect(Player* player, s8 arg1) {
|
||||
if ((player->effects & 0x4000) == 0x4000) {
|
||||
func_8008F3E0(player);
|
||||
}
|
||||
if ((player->effects & 0x10000) == 0x10000) {
|
||||
if ((player->effects & UNKNOWN_EFFECT_0x10000) == UNKNOWN_EFFECT_0x10000) {
|
||||
func_8008F5A4(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x10000000) == 0x10000000) {
|
||||
if ((player->effects & UNKNOWN_EFFECT_0x10000000) == UNKNOWN_EFFECT_0x10000000) {
|
||||
func_8008FEDC(player, arg1);
|
||||
}
|
||||
player->unk_044 = (s16) (player->unk_044 & 0xFFFE);
|
||||
@@ -214,14 +214,14 @@ void func_8008C528(Player* player, s8 arg1) {
|
||||
func_800C90F4(arg1, (temp_v1 * 0x10) + 0x29008005);
|
||||
func_800C9060(arg1, SOUND_ACTION_EXPLOSION);
|
||||
} else {
|
||||
func_800098FC(arg1, player);
|
||||
play_cpu_sound_effect(arg1, player);
|
||||
}
|
||||
player->soundEffects = (s32) (player->soundEffects & ~4);
|
||||
}
|
||||
|
||||
void func_8008C62C(Player* player, s8 arg1) {
|
||||
|
||||
decelerate_ai_player(player, 5.0f);
|
||||
decelerate_player(player, 5.0f);
|
||||
player->unk_0A8 += (s16) 0xA0;
|
||||
player->unk_042 += (s16) 0x71C;
|
||||
if (player->unk_0A8 >= 0x2000) {
|
||||
@@ -285,7 +285,7 @@ void func_8008C73C(Player* player, s8 arg1) {
|
||||
((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008003);
|
||||
} else {
|
||||
func_800098FC(arg1, player);
|
||||
play_cpu_sound_effect(arg1, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -309,7 +309,7 @@ void func_8008C8C4(Player* player, s8 playerId) {
|
||||
if ((gIsPlayerTripleAButtonCombo[playerId] == true) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
player->currentSpeed = (f32) (player->currentSpeed + 100.0f);
|
||||
}
|
||||
if ((gModeSelection == VERSUS) && ((player->type & PLAYER_KART_AI) == PLAYER_KART_AI) && (!gDemoMode) &&
|
||||
if ((gModeSelection == VERSUS) && ((player->type & PLAYER_CPU) == PLAYER_CPU) && (!gDemoMode) &&
|
||||
((player->unk_0CA & 2) == 0) && (gGPCurrentRaceRankByPlayerId[playerId] != 0)) {
|
||||
player->soundEffects = (s32) (player->soundEffects | REVERSE_SOUND_EFFECT);
|
||||
}
|
||||
@@ -323,15 +323,15 @@ void func_8008C9EC(Player* player, s8 arg1) {
|
||||
player->unk_206 = 0;
|
||||
player->slopeAccel = 0;
|
||||
if ((player->unk_046 & 0x40) == 0x40) {
|
||||
decelerate_ai_player(player, 100.0f);
|
||||
decelerate_player(player, 100.0f);
|
||||
} else {
|
||||
if ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) {
|
||||
decelerate_ai_player(player, 1.0f);
|
||||
decelerate_player(player, 1.0f);
|
||||
} else {
|
||||
decelerate_ai_player(player, 4.0f);
|
||||
decelerate_player(player, 4.0f);
|
||||
}
|
||||
if (!(player->type & PLAYER_HUMAN)) {
|
||||
decelerate_ai_player(player, 30.0f);
|
||||
decelerate_player(player, 30.0f);
|
||||
}
|
||||
}
|
||||
if ((player->effects & 0x80) == 0x80) {
|
||||
@@ -379,8 +379,8 @@ void func_8008CDC0(Player* player, s8 arg1) {
|
||||
player->effects &= ~0x10;
|
||||
|
||||
if (((player->unk_07C >> 0x10) >= 0x14) || ((player->unk_07C >> 0x10) < -0x13) ||
|
||||
(((player->unk_094 / 18.0f) * 216.0f) <= 30.0f) || ((player->effects & 8) != 0) ||
|
||||
(((player->type & PLAYER_HUMAN) == 0) && ((player->effects & 0x1000) == 0))) {
|
||||
(((player->speed / 18.0f) * 216.0f) <= 30.0f) || ((player->effects & 8) != 0) ||
|
||||
(((player->type & PLAYER_HUMAN) == 0) && ((player->effects & UNKNOWN_EFFECT_0x1000) == 0))) {
|
||||
func_8008C73C(player, arg1);
|
||||
} else {
|
||||
player->effects |= 0x800;
|
||||
@@ -714,7 +714,7 @@ void apply_hit_sound_effect(Player* player, s8 arg1) {
|
||||
|
||||
player->effects |= HIT_EFFECT;
|
||||
if (((player->type) & 0x1000) != 0) {
|
||||
func_800098FC(arg1, player);
|
||||
play_cpu_sound_effect(arg1, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -727,7 +727,7 @@ void apply_hit_effect(Player* player, s8 arg1) {
|
||||
player->unk_08C = 0.0f;
|
||||
player->currentSpeed = 0.0f;
|
||||
// clang-format off
|
||||
if ((player->collision.surfaceDistance[2] >= 600.0f) || ((player->effects & 0x1000) != 0)) { D_8018D990[arg1] = 3; } // placed block on same line to match
|
||||
if ((player->collision.surfaceDistance[2] >= 600.0f) || ((player->effects & UNKNOWN_EFFECT_0x1000) != 0)) { D_8018D990[arg1] = 3; } // placed block on same line to match
|
||||
// clang-format on
|
||||
|
||||
switch (D_8018D990[arg1]) {
|
||||
@@ -854,7 +854,7 @@ void apply_hit_rotating_sound_effect(Player* player, s8 arg1) {
|
||||
((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008003);
|
||||
} else {
|
||||
func_800098FC(arg1, player);
|
||||
play_cpu_sound_effect(arg1, player);
|
||||
}
|
||||
if (gModeSelection == BATTLE) {
|
||||
func_8006B8B4(player, arg1);
|
||||
@@ -893,7 +893,7 @@ void apply_lightning_effect(Player* player, s8 arg1) {
|
||||
D_80165190[3][arg1] = 1;
|
||||
}
|
||||
}
|
||||
decelerate_ai_player(player, 1.0f);
|
||||
decelerate_player(player, 1.0f);
|
||||
} else {
|
||||
player->unk_0B0 += 1;
|
||||
player->unk_08C = (f32) ((f64) player->unk_08C * 0.6);
|
||||
@@ -949,7 +949,7 @@ void func_8008E4A4(Player* player, s8 arg1) {
|
||||
}
|
||||
|
||||
if (player->unk_0E0 == 3) {
|
||||
player->effects &= ~0x01000000;
|
||||
player->effects &= ~UNKNOWN_EFFECT_0x1000000;
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_236 = 0;
|
||||
D_80165190[0][arg1] = 1;
|
||||
@@ -971,7 +971,7 @@ void func_8008E4A4(Player* player, s8 arg1) {
|
||||
player->unk_0A8 = 0;
|
||||
--player->unk_236;
|
||||
if (player->unk_236 == 0) {
|
||||
player->effects &= ~0x01000000;
|
||||
player->effects &= ~UNKNOWN_EFFECT_0x1000000;
|
||||
player->unk_236 = 0;
|
||||
D_80165190[0][arg1] = 1;
|
||||
D_80165190[1][arg1] = 1;
|
||||
@@ -997,7 +997,7 @@ void apply_reverse_sound_effect(Player* player, s8 arg1) {
|
||||
func_8008C310(player);
|
||||
|
||||
player->unk_0A8 = 0;
|
||||
player->effects |= 0x01000000;
|
||||
player->effects |= UNKNOWN_EFFECT_0x1000000;
|
||||
player->effects &= ~0x10;
|
||||
player->kartHopJerk = 0.0f;
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
@@ -1010,19 +1010,19 @@ void apply_reverse_sound_effect(Player* player, s8 arg1) {
|
||||
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) &&
|
||||
((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
if (((gModeSelection == VERSUS) && ((player->type & PLAYER_KART_AI) != 0)) && (!gDemoMode)) {
|
||||
if (((gModeSelection == VERSUS) && ((player->type & PLAYER_CPU) != 0)) && (!gDemoMode)) {
|
||||
func_800CA24C(arg1);
|
||||
}
|
||||
|
||||
if (1) {}
|
||||
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008005);
|
||||
if (((gModeSelection == VERSUS) && ((player->type & PLAYER_KART_AI) != 0)) && (!gDemoMode)) {
|
||||
if (((gModeSelection == VERSUS) && ((player->type & PLAYER_CPU) != 0)) && (!gDemoMode)) {
|
||||
func_800CA24C(arg1);
|
||||
}
|
||||
func_800C9060(arg1, SOUND_ACTION_EXPLOSION);
|
||||
} else {
|
||||
func_800098FC(arg1, player);
|
||||
play_cpu_sound_effect(arg1, player);
|
||||
}
|
||||
|
||||
player->soundEffects &= ~(REVERSE_SOUND_EFFECT | 0x80000);
|
||||
@@ -1034,7 +1034,7 @@ void apply_reverse_sound_effect(Player* player, s8 arg1) {
|
||||
}
|
||||
|
||||
void func_8008E884(Player* player, s8 arg1) {
|
||||
player->effects &= ~0x01000000;
|
||||
player->effects &= ~UNKNOWN_EFFECT_0x1000000;
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_236 = 0;
|
||||
D_80165190[0][arg1] = 1;
|
||||
@@ -1121,7 +1121,7 @@ void apply_hit_by_item_sound_effect(Player* player, s8 arg1) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008005);
|
||||
func_800C9060(arg1, SOUND_ACTION_EXPLOSION);
|
||||
} else {
|
||||
func_800098FC(arg1, player);
|
||||
play_cpu_sound_effect(arg1, player);
|
||||
}
|
||||
|
||||
player->effects |= HIT_BY_ITEM_EFFECT;
|
||||
@@ -1315,7 +1315,7 @@ void func_8008F3F4(Player* player, UNUSED s8 arg1) {
|
||||
player->unk_0A8 = 0;
|
||||
--player->unk_236;
|
||||
if (player->unk_236 == 0) {
|
||||
player->effects &= ~0x00010000;
|
||||
player->effects &= ~UNKNOWN_EFFECT_0x10000;
|
||||
func_80090778(player);
|
||||
func_80090868(player);
|
||||
}
|
||||
@@ -1323,8 +1323,9 @@ void func_8008F3F4(Player* player, UNUSED s8 arg1) {
|
||||
}
|
||||
|
||||
void func_8008F494(Player* player, s8 arg1) {
|
||||
if ((((player->effects & 0x80) != 0) || ((player->effects & 0x40) != 0) || ((player->effects & 0x01000000)) ||
|
||||
((player->effects & HIT_BY_ITEM_EFFECT)) || ((player->effects & 0x400) != 0)) &&
|
||||
if ((((player->effects & UNKNOWN_EFFECT_0x80) != 0) || ((player->effects & UNKNOWN_EFFECT_0x40) != 0) ||
|
||||
((player->effects & UNKNOWN_EFFECT_0x1000000)) || ((player->effects & HIT_BY_ITEM_EFFECT)) ||
|
||||
((player->effects & 0x400) != 0)) &&
|
||||
(gModeSelection == BATTLE)) {
|
||||
player->unk_044 |= 0x8000;
|
||||
}
|
||||
@@ -1333,7 +1334,7 @@ void func_8008F494(Player* player, s8 arg1) {
|
||||
func_8008F86C(player, arg1);
|
||||
|
||||
player->unk_0A8 = 0;
|
||||
player->effects |= 0x10000;
|
||||
player->effects |= UNKNOWN_EFFECT_0x10000;
|
||||
player->effects &= ~0x10;
|
||||
player->unk_236 = 0x1E;
|
||||
player->unk_042 = 0;
|
||||
@@ -1353,7 +1354,7 @@ void func_8008F5A4(Player* player, s8 arg1) {
|
||||
|
||||
player->unk_206 = 0;
|
||||
player->slopeAccel = 0;
|
||||
player->effects &= ~0x10000;
|
||||
player->effects &= ~UNKNOWN_EFFECT_0x10000;
|
||||
player->unk_0A8 = 0;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_07C = 0;
|
||||
@@ -1569,94 +1570,94 @@ void func_8008FDF4(Player* player, UNUSED s8 arg1) {
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
player->kartHopVelocity = D_800E37D0[player->characterId];
|
||||
player->soundEffects &= ~0x00100000;
|
||||
player->effects |= 0x10000000;
|
||||
player->effects |= UNKNOWN_EFFECT_0x10000000;
|
||||
}
|
||||
|
||||
void func_8008FE84(Player* player, UNUSED s8 arg1) {
|
||||
player->effects &= ~0x10;
|
||||
if ((player->effects & 8) != 8) {
|
||||
player->effects &= ~0x10000000;
|
||||
player->effects &= ~UNKNOWN_EFFECT_0x10000000;
|
||||
player->currentSpeed /= 2;
|
||||
player->unk_08C /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008FEDC(Player* player, UNUSED s8 arg1) {
|
||||
player->effects &= ~0x10000000;
|
||||
player->effects &= ~UNKNOWN_EFFECT_0x10000000;
|
||||
player->kartHopJerk = 0.0f;
|
||||
player->kartHopVelocity = 0.0f;
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
}
|
||||
|
||||
void course_update_waypoint(Player* player, s8 playerId) {
|
||||
s16 waypoint;
|
||||
void course_update_path_point(Player* player, s8 playerId) {
|
||||
s16 pathPoint;
|
||||
|
||||
#if !ENABLE_CUSTOM_COURSE_ENGINE
|
||||
switch (gCurrentCourseId) {
|
||||
case COURSE_BOWSER_CASTLE:
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if ((waypoint >= 0x235) && (waypoint < 0x247)) {
|
||||
player->nearestWaypointId = 0x214;
|
||||
} else if ((waypoint >= 0x267) && (waypoint < 0x277)) {
|
||||
player->nearestWaypointId = 0x25B;
|
||||
pathPoint = gNearestPathPointByPlayerId[playerId];
|
||||
if ((pathPoint >= 0x235) && (pathPoint < 0x247)) {
|
||||
player->nearestPathPointId = 0x214;
|
||||
} else if ((pathPoint >= 0x267) && (pathPoint < 0x277)) {
|
||||
player->nearestPathPointId = 0x25B;
|
||||
} else {
|
||||
player->nearestWaypointId = gNearestWaypointByPlayerId[playerId];
|
||||
if (player->nearestWaypointId < 0) {
|
||||
player->nearestWaypointId = gWaypointCountByPathIndex[0] + player->nearestWaypointId;
|
||||
player->nearestPathPointId = gNearestPathPointByPlayerId[playerId];
|
||||
if (player->nearestPathPointId < 0) {
|
||||
player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case COURSE_BANSHEE_BOARDWALK:
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if ((waypoint >= 0x12C) && (waypoint < 0x13C)) {
|
||||
player->nearestWaypointId = 0x12CU;
|
||||
pathPoint = gNearestPathPointByPlayerId[playerId];
|
||||
if ((pathPoint >= 0x12C) && (pathPoint < 0x13C)) {
|
||||
player->nearestPathPointId = 0x12CU;
|
||||
} else {
|
||||
player->nearestWaypointId = gNearestWaypointByPlayerId[playerId];
|
||||
if (player->nearestWaypointId < 0) {
|
||||
player->nearestWaypointId = gWaypointCountByPathIndex[0] + player->nearestWaypointId;
|
||||
player->nearestPathPointId = gNearestPathPointByPlayerId[playerId];
|
||||
if (player->nearestPathPointId < 0) {
|
||||
player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
case COURSE_RAINBOW_ROAD:
|
||||
player->nearestWaypointId = gCopyNearestWaypointByPlayerId[playerId];
|
||||
player->nearestPathPointId = gCopyNearestPathPointByPlayerId[playerId];
|
||||
break;
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
pathPoint = gNearestPathPointByPlayerId[playerId];
|
||||
#ifdef VERSION_EU
|
||||
if (((waypoint >= 0xF0) && (waypoint < 0x11E)) || ((gCopyNearestWaypointByPlayerId[playerId] >= 0xF0) &&
|
||||
(gCopyNearestWaypointByPlayerId[playerId] < 0x11E)))
|
||||
if (((pathPoint >= 0xF0) && (pathPoint < 0x11E)) || ((gCopyNearestPathPointByPlayerId[playerId] >= 0xF0) &&
|
||||
(gCopyNearestPathPointByPlayerId[playerId] < 0x11E)))
|
||||
#else
|
||||
if ((waypoint >= 0xF0) && (waypoint < 0x105))
|
||||
if ((pathPoint >= 0xF0) && (pathPoint < 0x105))
|
||||
#endif
|
||||
{
|
||||
player->nearestWaypointId = 0xF0U;
|
||||
player->nearestPathPointId = 0xF0U;
|
||||
} else {
|
||||
player->nearestWaypointId = gCopyNearestWaypointByPlayerId[playerId];
|
||||
if (player->nearestWaypointId < 0) {
|
||||
player->nearestWaypointId = gWaypointCountByPathIndex[0] + player->nearestWaypointId;
|
||||
player->nearestPathPointId = gCopyNearestPathPointByPlayerId[playerId];
|
||||
if (player->nearestPathPointId < 0) {
|
||||
player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if ((waypoint >= 0x258) && (waypoint < 0x2A4)) {
|
||||
player->nearestWaypointId = 0x258U;
|
||||
pathPoint = gNearestPathPointByPlayerId[playerId];
|
||||
if ((pathPoint >= 0x258) && (pathPoint < 0x2A4)) {
|
||||
player->nearestPathPointId = 0x258U;
|
||||
} else {
|
||||
player->nearestWaypointId = gCopyNearestWaypointByPlayerId[playerId];
|
||||
if (player->nearestWaypointId < 0) {
|
||||
player->nearestWaypointId = gWaypointCountByPathIndex[0] + player->nearestWaypointId;
|
||||
player->nearestPathPointId = gCopyNearestPathPointByPlayerId[playerId];
|
||||
if (player->nearestPathPointId < 0) {
|
||||
player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case COURSE_DK_JUNGLE:
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if ((waypoint >= 0xB9) && (waypoint < 0x119)) {
|
||||
player->nearestWaypointId = 0xB9U;
|
||||
pathPoint = gNearestPathPointByPlayerId[playerId];
|
||||
if ((pathPoint >= 0xB9) && (pathPoint < 0x119)) {
|
||||
player->nearestPathPointId = 0xB9U;
|
||||
} else {
|
||||
player->nearestWaypointId = gNearestWaypointByPlayerId[playerId];
|
||||
if (player->nearestWaypointId < 0) {
|
||||
player->nearestWaypointId = gWaypointCountByPathIndex[0] + player->nearestWaypointId;
|
||||
player->nearestPathPointId = gNearestPathPointByPlayerId[playerId];
|
||||
if (player->nearestPathPointId < 0) {
|
||||
player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1664,12 +1665,12 @@ void course_update_waypoint(Player* player, s8 playerId) {
|
||||
case COURSE_SKYSCRAPER:
|
||||
case COURSE_DOUBLE_DECK:
|
||||
case COURSE_BIG_DONUT:
|
||||
player->nearestWaypointId = 0U;
|
||||
player->nearestPathPointId = 0U;
|
||||
break;
|
||||
default:
|
||||
player->nearestWaypointId = gNearestWaypointByPlayerId[playerId];
|
||||
if (player->nearestWaypointId < 0) {
|
||||
player->nearestWaypointId = gWaypointCountByPathIndex[0] + player->nearestWaypointId;
|
||||
player->nearestPathPointId = gNearestPathPointByPlayerId[playerId];
|
||||
if (player->nearestPathPointId < 0) {
|
||||
player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1680,7 +1681,7 @@ void course_update_waypoint(Player* player, s8 playerId) {
|
||||
|
||||
void func_80090178(Player* player, s8 playerId, Vec3f arg2, Vec3f arg3) {
|
||||
u16 test;
|
||||
TrackWaypoint* temp_v1;
|
||||
TrackPathPoint* temp_v1;
|
||||
f32 spF8[4] = { 0.0f, 0.0f, -700.0f, 700.0f };
|
||||
f32 spE8[4] = { 700.0f, -700.0f, 0.0f, 0.0f };
|
||||
f32 spD8[4] = { 0.0f, 0.0f, -650.0f, 650.0f };
|
||||
@@ -1700,14 +1701,14 @@ void func_80090178(Player* player, s8 playerId, Vec3f arg2, Vec3f arg3) {
|
||||
|
||||
switch (gCurrentCourseId) {
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
test = player->nearestWaypointId;
|
||||
temp_v1 = &D_80164550[gCopyPathIndexByPlayerId[playerId]][test];
|
||||
test = player->nearestPathPointId;
|
||||
temp_v1 = &gTrackPaths[gCopyPathIndexByPlayerId[playerId]][test];
|
||||
arg2[0] = temp_v1->posX;
|
||||
arg2[1] = temp_v1->posY;
|
||||
arg2[2] = temp_v1->posZ;
|
||||
temp_v1 = &D_80164550[gCopyPathIndexByPlayerId[playerId]]
|
||||
[(player->nearestWaypointId + 5) %
|
||||
(gWaypointCountByPathIndex[gCopyPathIndexByPlayerId[playerId]] + 1)];
|
||||
temp_v1 = &gTrackPaths[gCopyPathIndexByPlayerId[playerId]]
|
||||
[(player->nearestPathPointId + 5) %
|
||||
(gPathCountByPathIndex[gCopyPathIndexByPlayerId[playerId]] + 1)];
|
||||
arg3[0] = temp_v1->posX;
|
||||
arg3[1] = temp_v1->posY;
|
||||
arg3[2] = temp_v1->posZ;
|
||||
@@ -1745,12 +1746,12 @@ void func_80090178(Player* player, s8 playerId, Vec3f arg2, Vec3f arg3) {
|
||||
arg3[2] = sp08[playerId];
|
||||
break;
|
||||
default:
|
||||
test = player->nearestWaypointId;
|
||||
temp_v1 = &D_80164550[0][test];
|
||||
test = player->nearestPathPointId;
|
||||
temp_v1 = &gTrackPaths[0][test];
|
||||
arg2[0] = temp_v1->posX;
|
||||
arg2[1] = temp_v1->posY;
|
||||
arg2[2] = temp_v1->posZ;
|
||||
temp_v1 = &D_80164550[0][(player->nearestWaypointId + 5) % (gWaypointCountByPathIndex[0] + 1)];
|
||||
temp_v1 = &gTrackPaths[0][(player->nearestPathPointId + 5) % (gPathCountByPathIndex[0] + 1)];
|
||||
arg3[0] = temp_v1->posX;
|
||||
arg3[1] = temp_v1->posY;
|
||||
arg3[2] = temp_v1->posZ;
|
||||
@@ -1801,7 +1802,7 @@ void func_80090868(Player* player) {
|
||||
player->unk_D98 = 1;
|
||||
player->unk_D9C = 0.0f;
|
||||
player->unk_DA0 = 0.5f;
|
||||
course_update_waypoint(player, playerIndex);
|
||||
course_update_path_point(player, playerIndex);
|
||||
player->unk_222 = 0;
|
||||
player->unk_0CA |= 2;
|
||||
player->unk_0C8 = 0;
|
||||
@@ -1825,7 +1826,7 @@ void func_80090970(Player* player, s8 playerId, s8 arg2) {
|
||||
UNUSED s32 stackPadding1;
|
||||
Vec3f sp44;
|
||||
Vec3f sp38;
|
||||
TrackWaypoint* waypoint;
|
||||
TrackPathPoint* pathPoint;
|
||||
UNUSED s32 stackPadding2;
|
||||
UNUSED s32 stackPadding3;
|
||||
|
||||
@@ -1866,7 +1867,7 @@ void func_80090970(Player* player, s8 playerId, s8 arg2) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (((player->type & PLAYER_HUMAN) == 0x4000) && ((player->type & PLAYER_KART_AI) == 0)) {
|
||||
if (((player->type & PLAYER_HUMAN) == 0x4000) && ((player->type & PLAYER_CPU) == 0)) {
|
||||
func_8009E088(playerId, 0xA);
|
||||
}
|
||||
if ((player->unk_0CA & 1) == 1) {
|
||||
@@ -1898,7 +1899,7 @@ void func_80090970(Player* player, s8 playerId, s8 arg2) {
|
||||
break;
|
||||
case 3:
|
||||
D_80165330[playerId] = 0;
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_KART_AI) == 0)) {
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_CPU) == 0)) {
|
||||
func_8009E020(playerId, 0x14);
|
||||
}
|
||||
func_80090178(player, playerId, sp44, sp38);
|
||||
@@ -1921,10 +1922,10 @@ void func_80090970(Player* player, s8 playerId, s8 arg2) {
|
||||
player->pos[0] = player->pos[0] + sins(-player->rotation[1]) * -10.0f;
|
||||
}
|
||||
if (player->unk_0C8 == 0x00FC) {
|
||||
waypoint = D_80164550[0];
|
||||
player->pos[0] = waypoint->posX;
|
||||
player->pos[1] = waypoint->posY;
|
||||
player->pos[2] = waypoint->posZ;
|
||||
pathPoint = gTrackPaths[0];
|
||||
player->pos[0] = pathPoint->posX;
|
||||
player->pos[1] = pathPoint->posY;
|
||||
player->pos[2] = pathPoint->posZ;
|
||||
}
|
||||
move_f32_towards(&player->pos[1], (player->unk_074 + player->boundingBoxSize) - 2.0f, 0.04f);
|
||||
player->unk_0C8++;
|
||||
@@ -2080,7 +2081,7 @@ void func_80091298(Player* player, s8 arg1) {
|
||||
player->kartGravity = gKartGravityTable[player->characterId];
|
||||
player->unk_0D4[0] = 0;
|
||||
player->type |= PLAYER_START_SEQUENCE;
|
||||
player->unk_094 = 0.0f;
|
||||
player->speed = 0.0f;
|
||||
player->unk_08C = 0.0f;
|
||||
player->currentSpeed = 0.0f;
|
||||
if (arg1 == 0) {
|
||||
|
||||
Reference in New Issue
Block a user