mirror of
https://github.com/HarbourMasters/Starship
synced 2026-09-03 11:01:36 -04:00
Event opcodes documented, more all range stuff (#229)
* stuff * Torch1 * dark link
This commit is contained in:
+126
-126
@@ -32,32 +32,6 @@ typedef enum ActorAllRangeState {
|
||||
STATE360_19,
|
||||
} ActorAllRangeState;
|
||||
|
||||
/* static */ Vec3f D_360_800C9A90 = { 0.0f, -10.0f, 0.0f };
|
||||
/* static */ Vec3f D_360_800C9A9C[4] = {
|
||||
{ 0.0f, 20000.0f, 0.0f },
|
||||
{ 0.0f, 700.0f, 6500.0f },
|
||||
{ -300.0f, 800.0f, 6800.0f },
|
||||
{ 300.0f, 900.0f, 7200.0f },
|
||||
};
|
||||
/* static */ AllRangeAi D_360_800C9ACC[4] = { AI360_FOX, AI360_FALCO, AI360_SLIPPY, AI360_PEPPY };
|
||||
/* static */ s32 D_360_800C9ADC[4] = { -1, AI360_10, AI360_10 + 1, AI360_10 + 2 };
|
||||
/* static */ s32 D_360_800C9AEC[4] = { -1, AI360_10 + 11, AI360_10 + 13, AI360_10 + 15 };
|
||||
/* static */ Vec3f D_360_800C9AFC[4] = {
|
||||
{ 9500.0f, 5000.0f, 9500.0f },
|
||||
{ 10000.0f, 5000.0f, 10000.0f },
|
||||
{ 10000.0f, 5000.0f, 9500.0f },
|
||||
{ 9500.0f, 5000.0f, 10000.0f },
|
||||
};
|
||||
/* static */ s32 D_360_800C9B2C[4] = { AI360_FOX, AI360_FALCO, AI360_PEPPY, AI360_SLIPPY };
|
||||
/* static */ f32 D_360_800C9B3C[4] = { 330.0f, 90.0f, 280.0f, 70.0f };
|
||||
s32 D_360_800C9B4C = 96 * 30;
|
||||
/* static */ Vec3f D_360_800C9B50[6] = {
|
||||
{ 8000.0f, 500.0f, 0.0f }, { 5000.0f, 400.0f, 0.0f }, { 2000.0f, 300.0f, 0.0f },
|
||||
{ -500.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f },
|
||||
};
|
||||
/* static */ Vec3f D_360_800C9B98 = { 60.0f, 0.0f, -170.0f };
|
||||
/* static */ Vec3f D_360_800C9BA4 = { -60.0f, 0.0f, -170.0f };
|
||||
|
||||
s32 gAllRangeSupplyTimer;
|
||||
s32 sStarWolfKillTimer;
|
||||
s16 gStarWolfMsgTimer;
|
||||
@@ -318,7 +292,7 @@ void func_360_8002EE64(Actor* this) {
|
||||
Vec3f spB4;
|
||||
Vec3f spA8;
|
||||
f32 spA0[2];
|
||||
Vec3f sp94 = D_360_800C9A90;
|
||||
Vec3f sp94 = { 0.0f, -10.0f, 0.0f };
|
||||
s32 pad1;
|
||||
s32 pad2;
|
||||
|
||||
@@ -377,6 +351,16 @@ void func_360_8002EE64(Actor* this) {
|
||||
}
|
||||
}
|
||||
|
||||
static Vec3f sTeamSpawnPos[4] = {
|
||||
{ 0.0f, 20000.0f, 0.0f },
|
||||
{ 0.0f, 700.0f, 6500.0f },
|
||||
{ -300.0f, 800.0f, 6800.0f },
|
||||
{ 300.0f, 900.0f, 7200.0f },
|
||||
};
|
||||
static AllRangeAi sTeamAi[4] = { AI360_FOX, AI360_FALCO, AI360_SLIPPY, AI360_PEPPY };
|
||||
static s32 sTeamSpawnTargets[4] = { -1, AI360_10, AI360_10 + 1, AI360_10 + 2 };
|
||||
static s32 sTeamSpawnTargetsKA[4] = { -1, AI360_10 + 11, AI360_10 + 13, AI360_10 + 15 };
|
||||
|
||||
void ActorAllRange_SpawnTeam(void) {
|
||||
Actor* actor;
|
||||
s32 i;
|
||||
@@ -393,14 +377,14 @@ void ActorAllRange_SpawnTeam(void) {
|
||||
if (i == 0) {
|
||||
actor->aiType = AI360_EVENT_HANDLER;
|
||||
} else {
|
||||
actor->obj.pos.x = D_360_800C9A9C[i].x;
|
||||
actor->obj.pos.y = D_360_800C9A9C[i].y;
|
||||
actor->obj.pos.z = D_360_800C9A9C[i].z;
|
||||
actor->aiType = D_360_800C9ACC[i];
|
||||
actor->obj.pos.x = sTeamSpawnPos[i].x;
|
||||
actor->obj.pos.y = sTeamSpawnPos[i].y;
|
||||
actor->obj.pos.z = sTeamSpawnPos[i].z;
|
||||
actor->aiType = sTeamAi[i];
|
||||
if (gCurrentLevel == LEVEL_KATINA) {
|
||||
actor->aiIndex = D_360_800C9AEC[i];
|
||||
actor->aiIndex = sTeamSpawnTargetsKA[i];
|
||||
} else {
|
||||
actor->aiIndex = D_360_800C9ADC[i];
|
||||
actor->aiIndex = sTeamSpawnTargets[i];
|
||||
}
|
||||
actor->state = STATE360_2;
|
||||
actor->unk_0F4.y = 180.0f;
|
||||
@@ -424,6 +408,16 @@ void ActorAllRange_SpawnTeam(void) {
|
||||
}
|
||||
}
|
||||
|
||||
static Vec3f sStarWolfSpawnPos[4] = {
|
||||
{ 9500.0f, 5000.0f, 9500.0f },
|
||||
{ 10000.0f, 5000.0f, 10000.0f },
|
||||
{ 10000.0f, 5000.0f, 9500.0f },
|
||||
{ 9500.0f, 5000.0f, 10000.0f },
|
||||
};
|
||||
static s32 sStarWolfSpawnTargets[4] = { AI360_FOX, AI360_FALCO, AI360_PEPPY, AI360_SLIPPY };
|
||||
static f32 sStarWolfVE2SpawnRot[4] = { 330.0f, 90.0f, 280.0f, 70.0f };
|
||||
s32 gAllRangeSpawnEvent = 96 * 30;
|
||||
|
||||
void ActorAllRange_SpawnStarWolf(void) {
|
||||
Actor* actor;
|
||||
s32 i;
|
||||
@@ -432,12 +426,12 @@ void ActorAllRange_SpawnStarWolf(void) {
|
||||
if (gStarWolfTeamAlive[i] != 0) {
|
||||
Actor_Initialize(actor);
|
||||
actor->obj.status = OBJ_ACTIVE;
|
||||
actor->obj.pos.x = D_360_800C9AFC[i].x;
|
||||
actor->obj.pos.y = D_360_800C9AFC[i].y;
|
||||
actor->obj.pos.z = D_360_800C9AFC[i].z;
|
||||
actor->obj.pos.x = sStarWolfSpawnPos[i].x;
|
||||
actor->obj.pos.y = sStarWolfSpawnPos[i].y;
|
||||
actor->obj.pos.z = sStarWolfSpawnPos[i].z;
|
||||
actor->obj.id = OBJ_ACTOR_ALLRANGE;
|
||||
actor->aiType = i + AI360_WOLF;
|
||||
actor->aiIndex = D_360_800C9B2C[i];
|
||||
actor->aiIndex = sStarWolfSpawnTargets[i];
|
||||
gActors[actor->aiIndex].aiIndex = -1;
|
||||
actor->health = 100;
|
||||
actor->unk_0C9 = 1;
|
||||
@@ -447,7 +441,7 @@ void ActorAllRange_SpawnStarWolf(void) {
|
||||
actor->unk_0F4.x = -20.0f;
|
||||
actor->iwork[11] = 1;
|
||||
if (gCurrentLevel == LEVEL_VENOM_2) {
|
||||
actor->obj.rot.z = D_360_800C9B3C[i];
|
||||
actor->obj.rot.z = sStarWolfVE2SpawnRot[i];
|
||||
actor->itemDrop = DROP_SILVER_STAR;
|
||||
}
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
@@ -473,7 +467,7 @@ void ActorAllRange_StarWolfDefeatMesg(u16* msg, RadioCharacterId character) {
|
||||
ActorAllRange_PlayMessage(msg, character);
|
||||
}
|
||||
|
||||
void func_360_8002F69C(Actor* this) {
|
||||
void ActorAllRange_UpdateStarWolfEvents(Actor* this) {
|
||||
Actor* actor;
|
||||
s32 i;
|
||||
|
||||
@@ -484,12 +478,12 @@ void func_360_8002F69C(Actor* this) {
|
||||
Radio_PlayMessage(gMsg_ID_19465, RCID_FOX);
|
||||
}
|
||||
}
|
||||
if (((gAllRangeEventTimer + 100) == (0, D_360_800C9B4C)) && (gCurrentLevel != LEVEL_VENOM_2)) {
|
||||
if ((gAllRangeEventTimer + 100 == (0, gAllRangeSpawnEvent)) && (gCurrentLevel != LEVEL_VENOM_2)) {
|
||||
// fake?
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30);
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30);
|
||||
}
|
||||
if (gAllRangeEventTimer == D_360_800C9B4C) {
|
||||
if (gAllRangeEventTimer == gAllRangeSpawnEvent) {
|
||||
ActorAllRange_SpawnStarWolf();
|
||||
this->state = STATE360_3;
|
||||
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY;
|
||||
@@ -509,11 +503,11 @@ void func_360_8002F69C(Actor* this) {
|
||||
gPlayer[0].cam.at.y = gActors[AI360_WOLF].obj.pos.y;
|
||||
gPlayer[0].cam.at.z = gActors[AI360_WOLF].obj.pos.z;
|
||||
}
|
||||
if ((gAllRangeEventTimer > D_360_800C9B4C) && (gStarWolfMsgTimer == 0)) {
|
||||
if ((gAllRangeEventTimer > gAllRangeSpawnEvent) && (gStarWolfMsgTimer == 0)) {
|
||||
gAllRangeFrameCount++;
|
||||
for (i = AI360_FALCO, actor = &gActors[AI360_FALCO]; i <= AI360_ANDREW; i++, actor++) {
|
||||
if ((actor->obj.status == OBJ_ACTIVE) && (actor->state == STATE360_2) && (actor->health < 70) &&
|
||||
(actor->timer_0C6 != 0) && (actor->dmgSource == 1)) {
|
||||
(actor->timer_0C6 != 0) && (actor->dmgSource == AI360_FOX + 1)) {
|
||||
if ((gActors[actor->aiIndex].state == STATE360_3) && (gActors[actor->aiIndex].aiType <= AI360_ANDREW)) {
|
||||
gActors[actor->aiIndex].iwork[2] = AI360_FOX;
|
||||
gActors[actor->aiIndex].state = STATE360_2;
|
||||
@@ -560,24 +554,24 @@ void func_360_8002F69C(Actor* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_360_8002FB4C(Actor* actor) {
|
||||
Actor* actor2;
|
||||
Actor* actor1;
|
||||
s32 var_a0;
|
||||
s32 j;
|
||||
s32 i;
|
||||
void ActorAllRange_ChooseNewTarget(Actor* actor) {
|
||||
Actor* team;
|
||||
Actor* enemy;
|
||||
s32 alreadyTaken;
|
||||
s32 teamId;
|
||||
s32 enemyId;
|
||||
|
||||
for (i = 10, actor1 = &gActors[10]; i < ARRAY_COUNT(gActors); i++, actor1++) {
|
||||
if ((actor1->obj.status == OBJ_ACTIVE) && (actor1->obj.id == OBJ_ACTOR_ALLRANGE) && (actor1->unk_0B6 == 0) &&
|
||||
(actor1->aiIndex <= -1)) {
|
||||
var_a0 = false;
|
||||
for (j = 1, actor2 = &gActors[1]; j < 4; j++, actor2++) {
|
||||
if ((j != actor->index) && (i == actor2->aiIndex)) {
|
||||
var_a0 = true;
|
||||
for (enemyId = AI360_10, enemy = &gActors[AI360_10]; enemyId < ARRAY_COUNT(gActors); enemyId++, enemy++) {
|
||||
if ((enemy->obj.status == OBJ_ACTIVE) && (enemy->obj.id == OBJ_ACTOR_ALLRANGE) && (enemy->unk_0B6 == 0) &&
|
||||
(enemy->aiIndex <= -1)) {
|
||||
alreadyTaken = false;
|
||||
for (teamId = AI360_FALCO, team = &gActors[AI360_FALCO]; teamId <= AI360_PEPPY; teamId++, team++) {
|
||||
if ((teamId != actor->index) && (enemyId == team->aiIndex)) {
|
||||
alreadyTaken = true;
|
||||
}
|
||||
}
|
||||
if (!var_a0) {
|
||||
actor->aiIndex = i;
|
||||
if (!alreadyTaken) {
|
||||
actor->aiIndex = enemyId;
|
||||
actor->state = STATE360_2;
|
||||
actor->iwork[2] = AI360_FOX;
|
||||
break;
|
||||
@@ -586,29 +580,30 @@ void func_360_8002FB4C(Actor* actor) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_360_8002FC00(Actor* this) {
|
||||
Actor* actor;
|
||||
void ActorAllRange_UpdateEvemyEvents(Actor* this) {
|
||||
Actor* enemy;
|
||||
s32 i;
|
||||
|
||||
for (i = 0, actor = &gActors[10]; i < 50; i++, actor++) {
|
||||
if ((actor->obj.status == OBJ_DYING) && (actor->aiIndex >= AI360_FALCO) && (actor->aiIndex <= AI360_PEPPY)) {
|
||||
Actor* actor2;
|
||||
for (i = 0, enemy = &gActors[AI360_10]; i < 50; i++, enemy++) {
|
||||
if ((enemy->obj.status == OBJ_DYING) && (enemy->aiIndex >= AI360_FALCO) && (enemy->aiIndex <= AI360_PEPPY)) {
|
||||
Actor* enemy2;
|
||||
s32 j;
|
||||
|
||||
for (j = 0, actor2 = &gActors[10]; j < 51; j++, actor2++) {
|
||||
if ((actor2->obj.status == OBJ_ACTIVE) && (actor2->state == STATE360_2) &&
|
||||
(actor2->aiIndex == actor->aiIndex)) {
|
||||
for (j = 0, enemy2 = &gActors[AI360_10]; j <= 50; j++, enemy2++) { // bug? should be <
|
||||
if ((enemy2->obj.status == OBJ_ACTIVE) && (enemy2->state == STATE360_2) &&
|
||||
(enemy2->aiIndex == enemy->aiIndex)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (gTeamShields[actor->aiIndex] > 0) {
|
||||
func_360_8002FB4C(&gActors[actor->aiIndex]);
|
||||
if ((actor->iwork[5] != 0) && (actor->dmgSource == 1) && (gActors[actor->aiIndex].iwork[3] == 0)) {
|
||||
if (gTeamHelpActor == &gActors[actor->aiIndex]) {
|
||||
if (gTeamShields[enemy->aiIndex] > 0) {
|
||||
ActorAllRange_ChooseNewTarget(&gActors[enemy->aiIndex]);
|
||||
if ((enemy->iwork[5] != 0) && (enemy->dmgSource == AI360_FOX + 1) &&
|
||||
(gActors[enemy->aiIndex].iwork[3] == 0)) {
|
||||
if (gTeamHelpActor == &gActors[enemy->aiIndex]) {
|
||||
gTeamHelpActor = NULL;
|
||||
gTeamHelpTimer = 0;
|
||||
}
|
||||
switch (gActors[actor->aiIndex].aiType) {
|
||||
switch (gActors[enemy->aiIndex].aiType) {
|
||||
case AI360_FALCO:
|
||||
ActorAllRange_PlayMessage(gMsg_ID_9160, RCID_FALCO);
|
||||
break;
|
||||
@@ -619,8 +614,8 @@ void func_360_8002FC00(Actor* this) {
|
||||
ActorAllRange_PlayMessage(gMsg_ID_9180, RCID_PEPPY);
|
||||
break;
|
||||
}
|
||||
gActors[actor->aiIndex].iwork[3] = 200;
|
||||
gActors[actor->aiIndex].timer_0C4 = 600;
|
||||
gActors[enemy->aiIndex].iwork[3] = 200;
|
||||
gActors[enemy->aiIndex].timer_0C4 = 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -630,7 +625,7 @@ void func_360_8002FC00(Actor* this) {
|
||||
bool AllRange_SupplyEvent(void) {
|
||||
switch (gCurrentLevel) {
|
||||
case LEVEL_FORTUNA:
|
||||
return gAllRangeEventTimer == D_360_800C9B4C + 2400;
|
||||
return gAllRangeEventTimer == gAllRangeSpawnEvent + 2400;
|
||||
case LEVEL_BOLSE:
|
||||
return gBosses[2].swork[36] == 4;
|
||||
case LEVEL_KATINA:
|
||||
@@ -814,40 +809,40 @@ void ActorAllRange_ApplyDamage(Actor* this) {
|
||||
Vec3f sp48;
|
||||
Vec3f sp3C;
|
||||
|
||||
if (this->dmgType != 0) {
|
||||
if (this->dmgType != DMG_NONE) {
|
||||
if (this->aiType == AI360_GREAT_FOX) {
|
||||
this->dmgType = 0;
|
||||
this->dmgType = DMG_NONE;
|
||||
}
|
||||
if ((this->dmgType >= 2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) {
|
||||
if ((this->dmgType >= DMG_EXPLOSION) && (this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) {
|
||||
this->damage = 10;
|
||||
this->timer_0C2 = 10;
|
||||
}
|
||||
if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) &&
|
||||
(this->dmgType == 2)) {
|
||||
this->dmgType = 0;
|
||||
(this->dmgType == DMG_EXPLOSION)) {
|
||||
this->dmgType = DMG_NONE;
|
||||
}
|
||||
if ((this->dmgType == 2) && (this->fwork[22] > 0.0f)) {
|
||||
this->dmgType = 0;
|
||||
if ((this->dmgType == DMG_EXPLOSION) && (this->fwork[22] > 0.0f)) {
|
||||
this->dmgType = DMG_NONE;
|
||||
}
|
||||
if (this->fwork[23] > 1.0f) {
|
||||
this->dmgType = 0;
|
||||
this->dmgType = DMG_NONE;
|
||||
}
|
||||
if (this->dmgType != 0) {
|
||||
if (this->dmgType != DMG_NONE) {
|
||||
var_a1 = false;
|
||||
if ((this->unk_0B6 == 3) ||
|
||||
((gCurrentLevel == LEVEL_BOLSE) && (gBosses[1].obj.status != OBJ_FREE) &&
|
||||
(this->aiType >= AI360_WOLF)) ||
|
||||
((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) &&
|
||||
(this->dmgType == 2))) {
|
||||
this->damage = 0;
|
||||
(this->dmgType == DMG_EXPLOSION))) {
|
||||
this->damage = DMG_NONE;
|
||||
var_a1 = true;
|
||||
if (gCurrentLevel == LEVEL_BOLSE) {
|
||||
this->dmgSource = 0;
|
||||
}
|
||||
}
|
||||
if (this->aiType >= AI360_WOLF) {
|
||||
if (!((this->dmgType == 3) && (this->aiType == AI360_WOLF)) &&
|
||||
!((this->aiType == AI360_MISSILE) && (this->dmgType == 2))) {
|
||||
if (!((this->dmgType == DMG_COLLISION) && (this->aiType == AI360_WOLF)) &&
|
||||
!((this->aiType == AI360_MISSILE) && (this->dmgType == DMG_EXPLOSION))) {
|
||||
this->health -= this->damage;
|
||||
}
|
||||
} else if ((this->aiType <= AI360_PEPPY) && (this->state != STATE360_6)) {
|
||||
@@ -861,8 +856,8 @@ void ActorAllRange_ApplyDamage(Actor* this) {
|
||||
this->health = 0;
|
||||
if (this->aiType == AI360_MISSILE) {
|
||||
SectorZ_80199900(this, 1);
|
||||
if (this->dmgSource == 1) {
|
||||
if (gActors[8].obj.status == OBJ_ACTIVE) {
|
||||
if (this->dmgSource == AI360_FOX + 1) {
|
||||
if (gActors[AI360_KATT].obj.status == OBJ_ACTIVE) {
|
||||
Radio_PlayMessage(gMsg_ID_16140, RCID_KATT);
|
||||
}
|
||||
BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10);
|
||||
@@ -870,16 +865,16 @@ void ActorAllRange_ApplyDamage(Actor* this) {
|
||||
D_ctx_80177850 = 15;
|
||||
} else {
|
||||
switch (this->dmgSource) {
|
||||
case 102:
|
||||
case AI360_FALCO + NPC_SHOT_ID + 1:
|
||||
Radio_PlayMessage(gMsg_ID_16170, RCID_FALCO);
|
||||
break;
|
||||
case 103:
|
||||
case AI360_SLIPPY + NPC_SHOT_ID + 1:
|
||||
Radio_PlayMessage(gMsg_ID_16180, RCID_SLIPPY);
|
||||
break;
|
||||
case 104:
|
||||
case AI360_PEPPY + NPC_SHOT_ID + 1:
|
||||
Radio_PlayMessage(gMsg_ID_16175, RCID_PEPPY);
|
||||
break;
|
||||
case 109:
|
||||
case AI360_KATT + NPC_SHOT_ID + 1:
|
||||
Radio_PlayMessage(gMsg_ID_16185, RCID_KATT);
|
||||
break;
|
||||
}
|
||||
@@ -925,7 +920,7 @@ void ActorAllRange_ApplyDamage(Actor* this) {
|
||||
if (this->damage >= 20) {
|
||||
this->timer_0BC = 0;
|
||||
}
|
||||
if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (this->dmgSource == 1)) {
|
||||
if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (this->dmgSource == AI360_FOX + 1)) {
|
||||
if (gKaAllyKillCount < 2) {
|
||||
ActorAllRange_PlayMessage(gMsg_ID_18018, RCID_BILL);
|
||||
}
|
||||
@@ -969,7 +964,7 @@ void ActorAllRange_ApplyDamage(Actor* this) {
|
||||
sStarWolfKillTimer = 150;
|
||||
}
|
||||
switch (this->dmgSource) {
|
||||
case 1:
|
||||
case AI360_FOX + 1:
|
||||
if (this->aiType >= AI360_10) {
|
||||
switch (this->iwork[2]) {
|
||||
case AI360_FALCO:
|
||||
@@ -984,28 +979,28 @@ void ActorAllRange_ApplyDamage(Actor* this) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 102:
|
||||
case 103:
|
||||
case 104:
|
||||
case AI360_FALCO + NPC_SHOT_ID + 1:
|
||||
case AI360_SLIPPY + NPC_SHOT_ID + 1:
|
||||
case AI360_PEPPY + NPC_SHOT_ID + 1:
|
||||
if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) {
|
||||
if ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] +
|
||||
gStarWolfTeamAlive[3]) == 0) {
|
||||
switch (this->dmgSource) {
|
||||
case 102:
|
||||
case AI360_FALCO + NPC_SHOT_ID + 1:
|
||||
Radio_PlayMessage(gMsg_ID_9438, RCID_FALCO);
|
||||
break;
|
||||
case 103:
|
||||
case AI360_SLIPPY + NPC_SHOT_ID + 1:
|
||||
Radio_PlayMessage(gMsg_ID_9436, RCID_SLIPPY);
|
||||
break;
|
||||
case 104:
|
||||
case AI360_PEPPY + NPC_SHOT_ID + 1:
|
||||
Radio_PlayMessage(gMsg_ID_9437, RCID_PEPPY);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
gActors[this->dmgSource - 101].iwork[1] = 80;
|
||||
gActors[this->dmgSource - NPC_SHOT_ID - 1].iwork[1] = 80;
|
||||
}
|
||||
} else {
|
||||
gActors[this->dmgSource - 101].iwork[1] = 80;
|
||||
gActors[this->dmgSource - NPC_SHOT_ID - 1].iwork[1] = 80;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1054,7 +1049,7 @@ void ActorAllRange_ApplyDamage(Actor* this) {
|
||||
this->fwork[12] = sp3C.z;
|
||||
}
|
||||
if ((gRadioState == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) {
|
||||
if (this->dmgType == 3) {
|
||||
if (this->dmgType == DMG_COLLISION) {
|
||||
switch (this->aiType) {
|
||||
case AI360_FALCO:
|
||||
ActorAllRange_PlayMessage(gMsg_ID_20210, RCID_FALCO);
|
||||
@@ -1071,7 +1066,7 @@ void ActorAllRange_ApplyDamage(Actor* this) {
|
||||
}
|
||||
} else if (this->dmgSource <= AI360_PEPPY + 101) {
|
||||
if (this->aiType >= AI360_WOLF) {
|
||||
if (this->dmgSource == 1) {
|
||||
if (this->dmgSource == AI360_FOX + 1) {
|
||||
if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && !gKaKilledAlly) {
|
||||
gKaKilledAlly = true;
|
||||
Radio_PlayMessage(gMsg_ID_18015, RCID_BILL);
|
||||
@@ -1149,7 +1144,7 @@ void ActorAllRange_ApplyDamage(Actor* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
this->dmgType = 0;
|
||||
this->dmgType = DMG_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1180,6 +1175,11 @@ bool func_360_80031900(Actor* actor) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static Vec3f sSectorZRetreatPath[6] = {
|
||||
{ 8000.0f, 500.0f, 0.0f }, { 5000.0f, 400.0f, 0.0f }, { 2000.0f, 300.0f, 0.0f },
|
||||
{ -500.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f },
|
||||
};
|
||||
|
||||
void ActorAllRange_Update(Actor* this) {
|
||||
u8 sp10F;
|
||||
s32 sp108;
|
||||
@@ -1207,8 +1207,8 @@ void ActorAllRange_Update(Actor* this) {
|
||||
Vec3f spA8;
|
||||
Vec3f sp9C;
|
||||
Vec3f sp90;
|
||||
Vec3f sp84 = D_360_800C9B98;
|
||||
Vec3f sp78 = D_360_800C9BA4;
|
||||
Vec3f sp84 = { 60.0f, 0.0f, -170.0f };
|
||||
Vec3f sp78 = { -60.0f, 0.0f, -170.0f };
|
||||
s32 pad1;
|
||||
s32 pad2;
|
||||
s32 pad3;
|
||||
@@ -1380,11 +1380,11 @@ void ActorAllRange_Update(Actor* this) {
|
||||
gTeamShields[this->aiType] = -1;
|
||||
gTeamDamage[this->aiType] = 0;
|
||||
if (gCurrentLevel == LEVEL_SECTOR_Z) {
|
||||
this->fwork[4] = D_360_800C9B50[this->unk_046].x;
|
||||
this->fwork[5] = D_360_800C9B50[this->unk_046].y;
|
||||
this->fwork[6] = D_360_800C9B50[this->unk_046].z;
|
||||
if ((fabsf(this->obj.pos.x - D_360_800C9B50[this->unk_046].x) < 800.0f) &&
|
||||
(fabsf(this->obj.pos.z - D_360_800C9B50[this->unk_046].z) < 800.0f)) {
|
||||
this->fwork[4] = sSectorZRetreatPath[this->unk_046].x;
|
||||
this->fwork[5] = sSectorZRetreatPath[this->unk_046].y;
|
||||
this->fwork[6] = sSectorZRetreatPath[this->unk_046].z;
|
||||
if ((fabsf(this->obj.pos.x - sSectorZRetreatPath[this->unk_046].x) < 800.0f) &&
|
||||
(fabsf(this->obj.pos.z - sSectorZRetreatPath[this->unk_046].z) < 800.0f)) {
|
||||
this->unk_046++;
|
||||
if (this->unk_046 >= 4) {
|
||||
Object_Kill(&this->obj, this->sfxSource);
|
||||
@@ -1751,7 +1751,7 @@ void ActorAllRange_Update(Actor* this) {
|
||||
(gActors[this->aiIndex].obj.status == OBJ_FREE))) {
|
||||
this->state = STATE360_3;
|
||||
if (gCurrentLevel == LEVEL_BOLSE) {
|
||||
func_360_8002FB4C(this);
|
||||
ActorAllRange_ChooseNewTarget(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2019,23 +2019,23 @@ void ActorAllRange_Update(Actor* this) {
|
||||
if (Rand_ZeroOne() < 0.8f) {
|
||||
spA8.x = 60.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA8, &sp9C);
|
||||
func_enmy2_8006EEFC(this->aiType, this->obj.pos.x + sp9C.x + (sp90.x * 1.5f),
|
||||
this->obj.pos.y + sp9C.y + (sp90.y * 1.5f),
|
||||
this->obj.pos.z + sp9C.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, this->obj.rot.x,
|
||||
this->obj.rot.y, this->obj.rot.z);
|
||||
Actor_SpawnPlayerLaser(this->aiType, this->obj.pos.x + sp9C.x + (sp90.x * 1.5f),
|
||||
this->obj.pos.y + sp9C.y + (sp90.y * 1.5f),
|
||||
this->obj.pos.z + sp9C.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z,
|
||||
this->obj.rot.x, this->obj.rot.y, this->obj.rot.z);
|
||||
}
|
||||
if (Rand_ZeroOne() < 0.8f) {
|
||||
spA8.x = -60.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA8, &sp9C);
|
||||
func_enmy2_8006EEFC(this->aiType, this->obj.pos.x + sp9C.x + (sp90.x * 1.5f),
|
||||
this->obj.pos.y + sp9C.y + (sp90.y * 1.5f),
|
||||
this->obj.pos.z + sp9C.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, this->obj.rot.x,
|
||||
this->obj.rot.y, this->obj.rot.z);
|
||||
Actor_SpawnPlayerLaser(this->aiType, this->obj.pos.x + sp9C.x + (sp90.x * 1.5f),
|
||||
this->obj.pos.y + sp9C.y + (sp90.y * 1.5f),
|
||||
this->obj.pos.z + sp9C.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z,
|
||||
this->obj.rot.x, this->obj.rot.y, this->obj.rot.z);
|
||||
}
|
||||
} else {
|
||||
func_enmy2_8006EEFC(this->aiType, this->obj.pos.x + (sp90.x * 1.5f), this->obj.pos.y + (sp90.y * 1.5f),
|
||||
this->obj.pos.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, this->obj.rot.x,
|
||||
this->obj.rot.y, this->obj.rot.z);
|
||||
Actor_SpawnPlayerLaser(this->aiType, this->obj.pos.x + (sp90.x * 1.5f), this->obj.pos.y + (sp90.y * 1.5f),
|
||||
this->obj.pos.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, this->obj.rot.x,
|
||||
this->obj.rot.y, this->obj.rot.z);
|
||||
}
|
||||
}
|
||||
ActorAllRange_ApplyDamage(this);
|
||||
@@ -2096,7 +2096,7 @@ void ActorAllRange_Update(Actor* this) {
|
||||
func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 15);
|
||||
func_effect_8007A6F0(&this->obj.pos, 0x2903A008);
|
||||
} else {
|
||||
this->dmgType = 1;
|
||||
this->dmgType = DMG_BEAM;
|
||||
this->damage = 10;
|
||||
this->health = 0;
|
||||
ActorAllRange_ApplyDamage(this);
|
||||
|
||||
+99
-97
@@ -56,7 +56,7 @@ void func_beam_80035E78(PlayerShot* shot) {
|
||||
shot->unk_5C = 1;
|
||||
shot->unk_64 = 30;
|
||||
shot->unk_58 = 150;
|
||||
Audio_PlayBombExplodeSfx(shot->playerNum, shot->sfxSource);
|
||||
Audio_PlayBombExplodeSfx(shot->sourceId, shot->sfxSource);
|
||||
gScreenFlashTimer = 4;
|
||||
if (shot->obj.pos.y < (gGroundHeight + 450.0f)) {
|
||||
gCameraShake = 15;
|
||||
@@ -88,7 +88,7 @@ void func_beam_80035E78(PlayerShot* shot) {
|
||||
}
|
||||
|
||||
if (gVersusMode) {
|
||||
var_v0 = shot->playerNum + 10;
|
||||
var_v0 = shot->sourceId + 10;
|
||||
} else {
|
||||
var_v0 = 0;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ void func_beam_80036318(PlayerShot* shot) {
|
||||
} else if (shot->obj.id == PLAYERSHOT_8) {
|
||||
shot->scale = 7.5f;
|
||||
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
|
||||
gActors[i].lockOnTimers[shot->playerNum] = 0;
|
||||
gActors[i].lockOnTimers[shot->sourceId] = 0;
|
||||
}
|
||||
shot->vel.x = shot->vel.y = shot->vel.z = 0.0f;
|
||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
@@ -149,7 +149,7 @@ void func_beam_80036318(PlayerShot* shot) {
|
||||
} else {
|
||||
|
||||
if (gVersusMode) {
|
||||
var_v0_2 = shot->playerNum + 10;
|
||||
var_v0_2 = shot->sourceId + 10;
|
||||
} else {
|
||||
var_v0_2 = 12;
|
||||
}
|
||||
@@ -256,8 +256,8 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) {
|
||||
count = *hitboxData;
|
||||
if (count != 0) {
|
||||
xySizeMod = 10.0f;
|
||||
if ((shot->playerNum < 4) &&
|
||||
((gLaserStrength[shot->playerNum] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) {
|
||||
if ((shot->sourceId < 4) &&
|
||||
((gLaserStrength[shot->sourceId] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) {
|
||||
xySizeMod += 30.0f;
|
||||
}
|
||||
hitboxData++;
|
||||
@@ -368,8 +368,8 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) {
|
||||
xySizeMod = 0.0f;
|
||||
if (actor->info.unk_16 == 1) {
|
||||
xySizeMod = fabsf((actor->obj.pos.z + gPathProgress) / 50.0f) + 10.0f;
|
||||
if ((shot->playerNum < 4) &&
|
||||
((gLaserStrength[shot->playerNum] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) {
|
||||
if ((shot->sourceId < 4) &&
|
||||
((gLaserStrength[shot->sourceId] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) {
|
||||
xySizeMod += 30.0f;
|
||||
}
|
||||
}
|
||||
@@ -394,7 +394,7 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) {
|
||||
}
|
||||
if (((actor->vwork[29].z != 0.0f) || (actor->vwork[29].x != 0.0f) || (actor->unk_0F4.z != 0.0f) ||
|
||||
(actor->vwork[29].y != 0.0f)) &&
|
||||
(actor->unk_0B4 != EINFO_31)) {
|
||||
(actor->unk_0B4 != EVID_31)) {
|
||||
Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->unk_0F4.z) * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateX(gCalcMatrix, -actor->vwork[29].x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -actor->vwork[29].y * M_DTOR, MTXF_APPLY);
|
||||
@@ -427,7 +427,7 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) {
|
||||
f32* hitboxData = actor->info.hitbox;
|
||||
|
||||
if (((s32) hitboxData[0] != 0) && (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) <= 500.0f)) {
|
||||
if (shot->playerNum < 4) {
|
||||
if (shot->sourceId < 4) {
|
||||
temp_fv1 = actor->obj.pos.x - gPlayer[0].cam.eye.x;
|
||||
temp_fa0 = actor->obj.pos.z + gPathProgress - gPlayer[0].cam.eye.z;
|
||||
var_fa1 = (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) / 50.0f) + 20.0f + 10.0f;
|
||||
@@ -436,7 +436,7 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) {
|
||||
}
|
||||
if (shotx->id == PLAYERSHOT_8) {
|
||||
var_fa1 = 30.0f;
|
||||
} else if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) {
|
||||
} else if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) {
|
||||
var_fa1 += 30.0f;
|
||||
}
|
||||
if (fabsf(hitboxData[1] + actor->obj.pos.z - shotx->pos.z) < (hitboxData[2] + var_fa1)) {
|
||||
@@ -652,12 +652,12 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) {
|
||||
Vec3f sp44 = { 0.0f, 0.0f, -100.0f };
|
||||
Vec3f sp38;
|
||||
|
||||
actor->dmgType = 1;
|
||||
actor->dmgType = DMG_BEAM;
|
||||
actor->dmgPart = hitIndex - 1;
|
||||
actor->timer_0C2 = 2;
|
||||
actor->damage = 10;
|
||||
if ((shot->playerNum < 4) && (gPlayer[shot->playerNum].form != FORM_LANDMASTER)) {
|
||||
switch (gLaserStrength[shot->playerNum]) {
|
||||
if ((shot->sourceId < 4) && (gPlayer[shot->sourceId].form != FORM_LANDMASTER)) {
|
||||
switch (gLaserStrength[shot->sourceId]) {
|
||||
case LASERS_TWIN:
|
||||
actor->damage = 12;
|
||||
break;
|
||||
@@ -665,9 +665,9 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) {
|
||||
actor->damage = 15;
|
||||
break;
|
||||
}
|
||||
} else if ((shot->playerNum >= 100) && (gCurrentLevel == LEVEL_SECTOR_X)) {
|
||||
if ((gActors[shot->playerNum - 100].obj.id == OBJ_ACTOR_EVENT) &&
|
||||
(gActors[shot->playerNum - 100].iwork[12] == TEAM_ID_BILL)) {
|
||||
} else if ((shot->sourceId >= NPC_SHOT_ID) && (gCurrentLevel == LEVEL_SECTOR_X)) {
|
||||
if ((gActors[shot->sourceId - NPC_SHOT_ID].obj.id == OBJ_ACTOR_EVENT) &&
|
||||
(gActors[shot->sourceId - NPC_SHOT_ID].iwork[12] == TEAM_ID_BILL)) {
|
||||
actor->damage = 30;
|
||||
}
|
||||
}
|
||||
@@ -677,19 +677,19 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) {
|
||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
actor->damage = 31;
|
||||
} else {
|
||||
actor->dmgType = 2;
|
||||
actor->dmgType = DMG_EXPLOSION;
|
||||
actor->damage = 30;
|
||||
actor->lockOnTimers[shot->playerNum] = 0;
|
||||
actor->lockOnTimers[shot->sourceId] = 0;
|
||||
}
|
||||
}
|
||||
actor->dmgSource = shot->playerNum + 1;
|
||||
actor->dmgSource = shot->sourceId + 1;
|
||||
actor->hitPos.x = shot->obj.pos.x;
|
||||
actor->hitPos.y = shot->obj.pos.y;
|
||||
actor->hitPos.z = shot->obj.pos.z;
|
||||
if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) &&
|
||||
((actor->unk_0B4 == EINFO_48) || (actor->unk_0B4 == EINFO_49) || (actor->unk_0B4 == EINFO_50))) ||
|
||||
((actor->unk_0B4 == EVID_48) || (actor->unk_0B4 == EVID_49) || (actor->unk_0B4 == EVID_50))) ||
|
||||
((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) ||
|
||||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->unk_0B4 == EINFO_67)) ||
|
||||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->unk_0B4 == EVID_67)) ||
|
||||
((actor->obj.id == OBJ_ACTOR_261) && (shot->obj.id != PLAYERSHOT_8) &&
|
||||
((actor->state < 3) || (actor->state >= 5))) ||
|
||||
((actor->obj.id == OBJ_ACTOR_260) && (shot->obj.id != PLAYERSHOT_8) && (actor->timer_0BC != 0))) {
|
||||
@@ -760,19 +760,19 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
switch (actor->obj.id) {
|
||||
case OBJ_ACTOR_180:
|
||||
if (func_beam_8003774C(shot, actor->obj.id, &actor->obj)) {
|
||||
actor->dmgType = 1;
|
||||
actor->dmgPart = shot->playerNum;
|
||||
actor->dmgType = DMG_BEAM;
|
||||
actor->dmgPart = shot->sourceId;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case OBJ_ACTOR_EVENT:
|
||||
if (actor->unk_0B4 == EINFO_42) {
|
||||
if (actor->unk_0B4 == EVID_42) {
|
||||
if (func_beam_8003774C(shot, ACTOR_EVENT_ID, &actor->obj)) {
|
||||
actor->dmgType = 1;
|
||||
actor->dmgPart = shot->playerNum;
|
||||
actor->dmgType = DMG_BEAM;
|
||||
actor->dmgPart = shot->sourceId;
|
||||
return;
|
||||
}
|
||||
} else if (actor->unk_0B4 == EINFO_63) {
|
||||
} else if (actor->unk_0B4 == EVID_63) {
|
||||
test.x = fabsf(actor->obj.pos.x - shot->obj.pos.x);
|
||||
test.y = fabsf(actor->obj.pos.y - shot->obj.pos.y);
|
||||
test.z = fabsf(actor->obj.pos.z - shot->obj.pos.z);
|
||||
@@ -791,8 +791,9 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
if (actor->info.unk_16 != 0) {
|
||||
if (actor->obj.id == OBJ_ACTOR_ALLRANGE) {
|
||||
if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_10) &&
|
||||
(((gCurrentLevel == LEVEL_VENOM_2) && (shot->playerNum < 104)) ||
|
||||
((gCurrentLevel != LEVEL_VENOM_2) && (shot->playerNum == 0))) &&
|
||||
(((gCurrentLevel == LEVEL_VENOM_2) &&
|
||||
(shot->sourceId <= NPC_SHOT_ID + AI360_PEPPY)) ||
|
||||
((gCurrentLevel != LEVEL_VENOM_2) && (shot->sourceId == AI360_FOX))) &&
|
||||
(shot->obj.id != PLAYERSHOT_8) &&
|
||||
(fabsf(actor->obj.pos.x - shot->obj.pos.x) < 500.0f) &&
|
||||
(fabsf(actor->obj.pos.y - shot->obj.pos.y) < 300.0f) &&
|
||||
@@ -823,8 +824,8 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
|
||||
test.x = 50.0f;
|
||||
if (gVersusMode && (shot->playerNum < 4) &&
|
||||
!((gLaserStrength[shot->playerNum] == LASERS_SINGLE) && (shot->obj.id != PLAYERSHOT_8))) {
|
||||
if (gVersusMode && (shot->sourceId < 4) &&
|
||||
!((gLaserStrength[shot->sourceId] == LASERS_SINGLE) && (shot->obj.id != PLAYERSHOT_8))) {
|
||||
test.x = 100.0f;
|
||||
}
|
||||
if (player->barrelRollAlpha >= 100) {
|
||||
@@ -839,7 +840,7 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
test.y = test.x;
|
||||
}
|
||||
test.z = test.x;
|
||||
if ((i != shot->playerNum) &&
|
||||
if ((i != shot->sourceId) &&
|
||||
((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_DOWN)) &&
|
||||
(fabsf(player->trueZpos - shot->obj.pos.z) < test.z) &&
|
||||
(fabsf(player->pos.x - shot->obj.pos.x) < test.x) &&
|
||||
@@ -871,7 +872,7 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
}
|
||||
player->unk_284 = 1;
|
||||
if (gCamCount != 1) {
|
||||
player->unk_288 = shot->playerNum + 1;
|
||||
player->unk_288 = shot->sourceId + 1;
|
||||
}
|
||||
player->knockback.x = shot->vel.x * 0.1f;
|
||||
player->knockback.y = shot->vel.y * 0.1f;
|
||||
@@ -898,7 +899,7 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((gLevelMode == LEVELMODE_ALL_RANGE) && (shot->playerNum < 110)) {
|
||||
if ((gLevelMode == LEVELMODE_ALL_RANGE) && (shot->sourceId < 110)) {
|
||||
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
|
||||
if (scenery360->obj.status == OBJ_ACTIVE) {
|
||||
if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) ||
|
||||
@@ -926,7 +927,7 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
} else {
|
||||
temp_v0 = func_beam_80036874(shot, scenery->info.hitbox, &scenery->obj);
|
||||
if (temp_v0 != 0) {
|
||||
scenery->dmgType = 1;
|
||||
scenery->dmgType = DMG_BEAM;
|
||||
scenery->dmgPart = temp_v0 - 1;
|
||||
}
|
||||
}
|
||||
@@ -987,7 +988,7 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
if (shot->obj.id == PLAYERSHOT_4) {
|
||||
Object_Kill(&shot->obj, shot->sfxSource);
|
||||
} else {
|
||||
if ((boss->obj.id == OBJ_BOSS_316) && (shot->playerNum != 0)) {
|
||||
if ((boss->obj.id == OBJ_BOSS_316) && (shot->sourceId != TEAM_ID_FOX)) {
|
||||
break;
|
||||
}
|
||||
boss->dmgType = DMG_BEAM;
|
||||
@@ -1002,8 +1003,8 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
}
|
||||
} else {
|
||||
boss->damage = 10;
|
||||
if (shot->playerNum < 4) {
|
||||
switch (gLaserStrength[shot->playerNum]) {
|
||||
if (shot->sourceId < 4) {
|
||||
switch (gLaserStrength[shot->sourceId]) {
|
||||
case LASERS_SINGLE:
|
||||
case LASERS_TWIN:
|
||||
break;
|
||||
@@ -1014,7 +1015,7 @@ void func_beam_80038140(PlayerShot* shot) {
|
||||
}
|
||||
}
|
||||
if (boss->obj.id == OBJ_BOSS_314) {
|
||||
boss->swork[19] = shot->playerNum;
|
||||
boss->swork[19] = shot->sourceId;
|
||||
}
|
||||
boss->dmgPart = temp_v0 - 1;
|
||||
if (boss->obj.id == OBJ_BOSS_301) {
|
||||
@@ -1114,23 +1115,24 @@ void func_beam_80039210(PlayerShot* shot) {
|
||||
gSPDisplayList(gMasterDisp++, sp6C);
|
||||
} else {
|
||||
var_a1 = 0;
|
||||
if ((gCurrentLevel != LEVEL_KATINA) && (shot->playerNum >= 104) && (shot->playerNum != 108)) {
|
||||
if (gActors[shot->playerNum - 100].obj.id != OBJ_ACTOR_EVENT) {
|
||||
if ((gCurrentLevel != LEVEL_KATINA) && (shot->sourceId > NPC_SHOT_ID + AI360_PEPPY) &&
|
||||
(shot->sourceId != NPC_SHOT_ID + AI360_KATT)) {
|
||||
if (gActors[shot->sourceId - NPC_SHOT_ID].obj.id != OBJ_ACTOR_EVENT) {
|
||||
var_a1 = 1;
|
||||
} else if (gActors[shot->playerNum - 100].iwork[12] == TEAM_ID_BILL) {
|
||||
} else if (gActors[shot->sourceId - NPC_SHOT_ID].iwork[12] == TEAM_ID_BILL) {
|
||||
var_a1 = 2;
|
||||
}
|
||||
} else if (gCurrentLevel == LEVEL_KATINA) {
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) {
|
||||
if (shot->playerNum >= 104) {
|
||||
if (gActors[shot->playerNum - 100].unk_0B6 == 0) {
|
||||
if (shot->sourceId > NPC_SHOT_ID + AI360_PEPPY) {
|
||||
if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 0) {
|
||||
var_a1 = 1;
|
||||
}
|
||||
if (gActors[shot->playerNum - 100].unk_0B6 == 2) {
|
||||
if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 2) {
|
||||
var_a1 = 2;
|
||||
}
|
||||
}
|
||||
} else if (gActors[shot->playerNum - 100].unk_0B6 == 34) {
|
||||
} else if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 34) {
|
||||
var_a1 = 1;
|
||||
}
|
||||
}
|
||||
@@ -1177,7 +1179,7 @@ void func_beam_80039210(PlayerShot* shot) {
|
||||
}
|
||||
} else {
|
||||
RCP_SetupDL_64();
|
||||
switch (shot->playerNum) {
|
||||
switch (shot->sourceId) {
|
||||
case 0:
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 32, 255);
|
||||
break;
|
||||
@@ -1194,7 +1196,7 @@ void func_beam_80039210(PlayerShot* shot) {
|
||||
Matrix_Scale(gGfxMatrix, 6.0f, 4.0f, 10.0f, MTXF_APPLY);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) {
|
||||
if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) {
|
||||
Matrix_Translate(gGfxMatrix, 6.0f, 0.0f, 0.0f, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_versus_302D120);
|
||||
@@ -1272,7 +1274,7 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
if (gVersusMode) {
|
||||
switch (shot->playerNum) {
|
||||
switch (shot->sourceId) {
|
||||
case 0:
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 255, 32, 128);
|
||||
break;
|
||||
@@ -1297,7 +1299,7 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
if (gVersusMode) {
|
||||
RCP_SetupDL_49();
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, shot->unk_58);
|
||||
switch (shot->playerNum) {
|
||||
switch (shot->sourceId) {
|
||||
case 0:
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 255, 32, shot->unk_58);
|
||||
break;
|
||||
@@ -1323,10 +1325,10 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
RCP_SetupDL_40();
|
||||
if (gVersusMode) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->playerNum], D_800C9C04[shot->playerNum],
|
||||
D_800C9C08[shot->playerNum], 255);
|
||||
gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->sourceId], D_800C9C04[shot->sourceId],
|
||||
D_800C9C08[shot->sourceId], 255);
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) {
|
||||
if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) {
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, 50.0f, 0.0f, MTXF_APPLY);
|
||||
@@ -1375,9 +1377,9 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->playerNum], D_800C9C04[shot->playerNum],
|
||||
D_800C9C08[shot->playerNum], 255);
|
||||
if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) {
|
||||
gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->sourceId], D_800C9C04[shot->sourceId],
|
||||
D_800C9C08[shot->sourceId], 255);
|
||||
if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) {
|
||||
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, MTXF_APPLY);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.f, 40.0f, 0.0f, MTXF_APPLY);
|
||||
@@ -1420,7 +1422,7 @@ void func_beam_80039A50(PlayerShot* shot) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
||||
if (gVersusMode) {
|
||||
switch (shot->playerNum) {
|
||||
switch (shot->sourceId) {
|
||||
case 0:
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 255, 32, 255);
|
||||
break;
|
||||
@@ -1611,7 +1613,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) {
|
||||
func_effect_8007A6F0(&shot->obj.pos, 0x29121007);
|
||||
}
|
||||
if ((gCamCount != 4) && (gCurrentLevel != LEVEL_AQUAS)) {
|
||||
if ((shot->playerNum == 0) && (gLaserStrength[0] != LASERS_SINGLE) &&
|
||||
if ((shot->sourceId == TEAM_ID_FOX) && (gLaserStrength[0] != LASERS_SINGLE) &&
|
||||
(gPlayer[0].form != FORM_LANDMASTER)) {
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY);
|
||||
@@ -1653,7 +1655,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) {
|
||||
if (shot->unk_64 == 0) {
|
||||
Object_Kill(&shot->obj, shot->sfxSource);
|
||||
return;
|
||||
} else if ((shot->playerNum < 110) || ((shot->unk_64 % 2) != 0)) {
|
||||
} else if ((shot->sourceId < NPC_SHOT_ID + AI360_10) || ((shot->unk_64 % 2) != 0)) {
|
||||
func_beam_80038140(shot);
|
||||
}
|
||||
}
|
||||
@@ -1699,39 +1701,39 @@ bool func_beam_8003BB4C(PlayerShot* shot) {
|
||||
}
|
||||
for (i = 0, actor = gActors; i < 60; i++, actor++) {
|
||||
if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) &&
|
||||
((actor->lockOnTimers[shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) &&
|
||||
((actor->lockOnTimers[shot->sourceId] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) &&
|
||||
(fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.targetOffset)) <= var_fa0) &&
|
||||
(fabsf(shot->obj.pos.z - actor->obj.pos.z) <= var_fa0))) {
|
||||
actor->lockOnTimers[shot->playerNum] = 20;
|
||||
func_enmy_80060F30(gPlayer[shot->playerNum].sfxSource, 0x49008027, shot->playerNum);
|
||||
actor->lockOnTimers[shot->sourceId] = 20;
|
||||
func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, 0x49008027, shot->sourceId);
|
||||
for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) {
|
||||
if (gPlayerShots[j].obj.id == PLAYERSHOT_4) {
|
||||
Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxSource);
|
||||
}
|
||||
}
|
||||
D_display_801615B8[shot->playerNum] = 3.0f;
|
||||
D_display_801615A8[shot->playerNum] = 300.0f;
|
||||
D_display_801615B8[shot->sourceId] = 3.0f;
|
||||
D_display_801615A8[shot->sourceId] = 300.0f;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (gVersusMode) {
|
||||
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
|
||||
if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !player->somersault &&
|
||||
(player->form != FORM_ON_FOOT) && (i != shot->playerNum) &&
|
||||
(gVsLockOnTimers[i][shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) &&
|
||||
(player->form != FORM_ON_FOOT) && (i != shot->sourceId) && (gVsLockOnTimers[i][shot->sourceId] == 0) &&
|
||||
(fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) &&
|
||||
(fabsf(shot->obj.pos.y - player->pos.y) <= var_fa0) &&
|
||||
(fabsf(shot->obj.pos.z - player->trueZpos) <= var_fa0)) {
|
||||
gVsLockOnTimers[0][shot->playerNum] = gVsLockOnTimers[1][shot->playerNum] =
|
||||
gVsLockOnTimers[2][shot->playerNum] = gVsLockOnTimers[3][shot->playerNum] = 0;
|
||||
gVsLockOnTimers[i][shot->playerNum] = 20;
|
||||
func_enmy_80060F30(gPlayer[shot->playerNum].sfxSource, 0x49008027, shot->playerNum);
|
||||
gVsLockOnTimers[0][shot->sourceId] = gVsLockOnTimers[1][shot->sourceId] =
|
||||
gVsLockOnTimers[2][shot->sourceId] = gVsLockOnTimers[3][shot->sourceId] = 0;
|
||||
gVsLockOnTimers[i][shot->sourceId] = 20;
|
||||
func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, 0x49008027, shot->sourceId);
|
||||
for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) {
|
||||
if (gPlayerShots[j].obj.id == PLAYERSHOT_4) {
|
||||
Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxSource);
|
||||
}
|
||||
}
|
||||
D_display_801615B8[shot->playerNum] = 3.0f;
|
||||
D_display_801615A8[shot->playerNum] = 300.0f;
|
||||
D_display_801615B8[shot->sourceId] = 3.0f;
|
||||
D_display_801615A8[shot->sourceId] = 300.0f;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1742,7 +1744,7 @@ bool func_beam_8003BB4C(PlayerShot* shot) {
|
||||
void func_beam_8003BEF4(PlayerShot* shot) {
|
||||
if (gVersusMode) {
|
||||
if ((shot->obj.pos.y < gGroundHeight) || func_beam_8003BB4C(shot) ||
|
||||
!(gControllerHold[shot->playerNum].button & A_BUTTON) || (shot->unk_64 == 0)) {
|
||||
!(gControllerHold[shot->sourceId].button & A_BUTTON) || (shot->unk_64 == 0)) {
|
||||
Object_Kill(&shot->obj, shot->sfxSource);
|
||||
}
|
||||
} else {
|
||||
@@ -1826,9 +1828,9 @@ void func_beam_8003C3D8(PlayerShot* shot) {
|
||||
gLight3y = shot->obj.pos.y;
|
||||
gLight3z = shot->obj.pos.z;
|
||||
if (gVersusMode) {
|
||||
gLight3R = D_800C9C18[shot->playerNum];
|
||||
gLight3G = D_800C9C1C[shot->playerNum];
|
||||
gLight3B = D_800C9C20[shot->playerNum];
|
||||
gLight3R = D_800C9C18[shot->sourceId];
|
||||
gLight3G = D_800C9C1C[shot->sourceId];
|
||||
gLight3B = D_800C9C20[shot->sourceId];
|
||||
} else {
|
||||
gLight3R = 90;
|
||||
gLight3G = 90;
|
||||
@@ -1860,7 +1862,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) {
|
||||
sp64 = scenery->obj.pos.y - shot->obj.pos.y;
|
||||
sp60 = scenery->obj.pos.z - shot->obj.pos.z;
|
||||
if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) {
|
||||
scenery->dmgType = 2;
|
||||
scenery->dmgType = DMG_EXPLOSION;
|
||||
}
|
||||
scenery->dmgPart = 0;
|
||||
}
|
||||
@@ -1897,19 +1899,19 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) {
|
||||
if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) ||
|
||||
(actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) ||
|
||||
(actor->obj.id == OBJ_ACTOR_201) || (actor->obj.id == OBJ_ACTOR_187) ||
|
||||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_78)) ||
|
||||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_38)) ||
|
||||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_78)) ||
|
||||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_38)) ||
|
||||
(actor->obj.id == OBJ_ACTOR_196)) {
|
||||
actor->dmgType = 2;
|
||||
actor->dmgType = DMG_EXPLOSION;
|
||||
actor->dmgPart = 0;
|
||||
actor->dmgSource = shot->playerNum + 1;
|
||||
actor->dmgSource = shot->sourceId + 1;
|
||||
actor->damage = damage;
|
||||
|
||||
if (actor->info.bonus != 0) {
|
||||
shot->bonus++;
|
||||
}
|
||||
} else if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->scale >= 0.5f) && (damage > 30)) {
|
||||
actor->dmgSource = shot->playerNum + 1;
|
||||
actor->dmgSource = shot->sourceId + 1;
|
||||
actor->vel.x = sp68 * 0.03f;
|
||||
actor->vel.y = sp64 * 0.03f;
|
||||
actor->vel.z = sp60 * 0.03f;
|
||||
@@ -1922,9 +1924,9 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) {
|
||||
shot->bonus++;
|
||||
}
|
||||
} else {
|
||||
actor->dmgType = 2;
|
||||
actor->dmgType = DMG_EXPLOSION;
|
||||
actor->dmgPart = 0;
|
||||
actor->dmgSource = shot->playerNum + 1;
|
||||
actor->dmgSource = shot->sourceId + 1;
|
||||
actor->damage = damage;
|
||||
if (actor->info.bonus != 0) {
|
||||
shot->bonus++;
|
||||
@@ -1969,12 +1971,12 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) {
|
||||
}
|
||||
if (gVersusMode) {
|
||||
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
|
||||
if ((i != shot->playerNum) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->hitTimer == 0)) {
|
||||
if ((i != shot->sourceId) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->hitTimer == 0)) {
|
||||
sp68 = player->pos.x - shot->obj.pos.x;
|
||||
sp64 = player->pos.y - shot->obj.pos.y;
|
||||
sp60 = player->trueZpos - shot->obj.pos.z;
|
||||
if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) {
|
||||
player->unk_288 = shot->playerNum + 1;
|
||||
player->unk_288 = shot->sourceId + 1;
|
||||
switch (player->form) {
|
||||
case FORM_ARWING:
|
||||
Player_ApplyDamage(player, 0, 80);
|
||||
@@ -2006,18 +2008,18 @@ void func_beam_8003CC08(PlayerShot* shot) {
|
||||
func_beam_80035E78(shot);
|
||||
break;
|
||||
}
|
||||
if ((gPlayer[shot->playerNum].form == FORM_LANDMASTER) || (gPlayer[shot->playerNum].form == FORM_ON_FOOT)) {
|
||||
if ((gPlayer[shot->sourceId].form == FORM_LANDMASTER) || (gPlayer[shot->sourceId].form == FORM_ON_FOOT)) {
|
||||
shot->vel.y -= 1.0f;
|
||||
Math_SmoothStepToF(&shot->obj.rot.x, -90.0f, 0.05f, 1.0f, 0.0f);
|
||||
}
|
||||
if (shot->unk_64 < 25) {
|
||||
if (gVersusMode) {
|
||||
if (gControllerPress[shot->playerNum].button & gBombButton[shot->playerNum]) {
|
||||
if (gControllerPress[shot->sourceId].button & gBombButton[shot->sourceId]) {
|
||||
func_beam_80035E78(shot);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (gControllerPress[gMainController].button & gBombButton[shot->playerNum]) {
|
||||
if (gControllerPress[gMainController].button & gBombButton[shot->sourceId]) {
|
||||
func_beam_80035E78(shot);
|
||||
break;
|
||||
}
|
||||
@@ -2091,18 +2093,18 @@ void func_beam_8003CF90(PlayerShot* shot) {
|
||||
if (shot->unk_60 == 0) {
|
||||
for (i = 0, actor = gActors; i < 60; i++, actor++) {
|
||||
if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) &&
|
||||
(actor->lockOnTimers[shot->playerNum] != 0)) {
|
||||
(actor->lockOnTimers[shot->sourceId] != 0)) {
|
||||
var_a3 = 1;
|
||||
actor->lockOnTimers[shot->playerNum] = 2;
|
||||
actor->lockOnTimers[shot->sourceId] = 2;
|
||||
D_800C9C24 = actor->obj.pos;
|
||||
D_800C9C24.y += actor->info.targetOffset;
|
||||
}
|
||||
}
|
||||
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
|
||||
if (((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) &&
|
||||
(gVsLockOnTimers[i][shot->playerNum] != 0)) {
|
||||
(gVsLockOnTimers[i][shot->sourceId] != 0)) {
|
||||
var_a3 = 1;
|
||||
gVsLockOnTimers[i][shot->playerNum] = 2;
|
||||
gVsLockOnTimers[i][shot->sourceId] = 2;
|
||||
D_800C9C24.x = player->pos.x;
|
||||
if (player->form == FORM_ARWING) {
|
||||
D_800C9C24.y = player->pos.y;
|
||||
@@ -2143,7 +2145,7 @@ void func_beam_8003CF90(PlayerShot* shot) {
|
||||
} else {
|
||||
Math_SmoothStepToF(&shot->unk_54, 91.0f, 1.0f, 7.7999997f, 0.f);
|
||||
}
|
||||
if (!((gPlayer[shot->playerNum].form == FORM_LANDMASTER) && (shot->unk_60 != 0))) {
|
||||
if (!((gPlayer[shot->sourceId].form == FORM_LANDMASTER) && (shot->unk_60 != 0))) {
|
||||
Vec3f sp44;
|
||||
Vec3f sp38;
|
||||
|
||||
@@ -2185,7 +2187,7 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) {
|
||||
func_beam_8003B55C(shot, index);
|
||||
break;
|
||||
case PLAYERSHOT_2:
|
||||
func_beam_8003B00C(shot, &gPlayer[shot->playerNum]);
|
||||
func_beam_8003B00C(shot, &gPlayer[shot->sourceId]);
|
||||
break;
|
||||
case PLAYERSHOT_BOMB:
|
||||
func_beam_8003CC08(shot);
|
||||
@@ -2207,7 +2209,7 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) {
|
||||
func_beam_8003C4D0(shot, 30);
|
||||
if (shot->bonus != 0) {
|
||||
if (gVersusMode) {
|
||||
gPlayerScores[shot->playerNum] += shot->bonus;
|
||||
gPlayerScores[shot->sourceId] += shot->bonus;
|
||||
} else {
|
||||
bonus = shot->bonus;
|
||||
if (shot->bonus > 10) {
|
||||
|
||||
@@ -78,10 +78,10 @@ UNK_TYPE F_80177DE8;
|
||||
s32 gGameFrameCount;
|
||||
s32 gObjectLoadIndex;
|
||||
s32 gPrevEventActorIndex;
|
||||
s32 D_ctx_80177E78;
|
||||
s32 gFormationLeaderIndex;
|
||||
s32 gRingPassCount;
|
||||
Vec3f D_ctx_80177E88;
|
||||
Vec3f D_ctx_80177F10;
|
||||
Vec3f gFormationInitRot;
|
||||
Vec3f gFormationInitPos;
|
||||
UNK_TYPE F_80178020;
|
||||
s32 D_ctx_8017812C;
|
||||
LevelId gCurrentLevel;
|
||||
|
||||
@@ -401,7 +401,7 @@ void func_demo_80049968(Actor* actor, s32 arg1) {
|
||||
actor->obj.id = OBJ_ACTOR_CUTSCENE;
|
||||
actor->obj.pos.x = D_demo_800C9FD0[arg1];
|
||||
actor->obj.pos.y = D_demo_800C9FE0[arg1];
|
||||
actor->obj.pos.z = D_demo_800C9FF0[arg1] + ((void) 0, gPlayer)[0].trueZpos;
|
||||
actor->obj.pos.z = D_demo_800C9FF0[arg1] + gPlayer[0].trueZpos;
|
||||
actor->fwork[0] = D_demo_800CA000[arg1];
|
||||
actor->fwork[1] = D_demo_800CA010[arg1];
|
||||
actor->unk_0B6 = D_demo_800CA030[arg1];
|
||||
|
||||
@@ -92,7 +92,7 @@ f32 gWarpZoneEvent93Hitbox[] = {
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
ObjectInfo D_edata_800CC124[0x190] = {
|
||||
ObjectInfo gObjectInfo[] = {
|
||||
/* OBJ_SCENERY_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 },
|
||||
/* OBJ_SCENERY_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
|
||||
/* OBJ_SCENERY_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 },
|
||||
|
||||
@@ -98,7 +98,7 @@ void Actor202_Draw(Actor202* this) {
|
||||
Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, Actor202_PostLimbDraw, &this->index, &gIdentityMatrix);
|
||||
}
|
||||
|
||||
void MeteoTunnel_Draw(Scenery_39* this) {
|
||||
void MeteoTunnel_Draw(MeteoTunnel* this) {
|
||||
gSPDisplayList(gMasterDisp++, D_ME_601AE40);
|
||||
}
|
||||
|
||||
@@ -638,13 +638,13 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
|
||||
case OBJ_ACTOR_TEAM_BOSS:
|
||||
case OBJ_ACTOR_EVENT:
|
||||
switch (gActors[index].unk_0B4) {
|
||||
case EINFO_3:
|
||||
case EVID_3:
|
||||
Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, MTXF_APPLY);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A010);
|
||||
break;
|
||||
case EINFO_81:
|
||||
case EVID_81:
|
||||
RCP_SetupDL(&gMasterDisp, 0x30);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255);
|
||||
@@ -1001,14 +1001,14 @@ void Actor_DrawOnRails(Actor* this) {
|
||||
Zoness_80190F08(this);
|
||||
return;
|
||||
}
|
||||
if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 == EINFO_200)) {
|
||||
if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 == EVID_200)) {
|
||||
Actor194_Draw(this);
|
||||
} else {
|
||||
if (this->info.unk_19 != 0) {
|
||||
this->obj.pos.y += gCameraShakeY;
|
||||
func_edisplay_8005D008(&this->obj, this->info.drawType);
|
||||
this->obj.pos.y -= gCameraShakeY;
|
||||
} else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 != EINFO_31)) {
|
||||
} else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 != EVID_31)) {
|
||||
func_edisplay_8005D3CC(&this->obj, this->vwork[29].x, this->vwork[29].y,
|
||||
this->vwork[29].z + this->unk_0F4.z, this->info.drawType);
|
||||
} else {
|
||||
|
||||
+8
-14
@@ -2407,14 +2407,11 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_4A = 180;
|
||||
effect->scale2 = 5.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) {
|
||||
} else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) {
|
||||
AUDIO_PLAY_SFX(0x31000025, effect->sfxSource, 4);
|
||||
return;
|
||||
} else {
|
||||
AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4);
|
||||
}
|
||||
AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4);
|
||||
}
|
||||
|
||||
void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) {
|
||||
@@ -2464,14 +2461,11 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_4A = 180;
|
||||
effect->scale2 = 5.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) {
|
||||
} else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) {
|
||||
AUDIO_PLAY_SFX(0x31000025, effect->sfxSource, 4);
|
||||
return;
|
||||
} else {
|
||||
AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4);
|
||||
}
|
||||
AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4);
|
||||
}
|
||||
|
||||
void func_effect_8007EBB8(Effect* effect, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel,
|
||||
@@ -2825,13 +2819,13 @@ bool func_effect_8007FD84(Effect* effect) {
|
||||
(fabsf(actor->obj.pos.z - effect->obj.pos.z) < 100.0f) &&
|
||||
(fabsf(actor->obj.pos.x - effect->obj.pos.x) < 100.0f) &&
|
||||
(fabsf(actor->obj.pos.y - effect->obj.pos.y) < 100.0f)) {
|
||||
actor->dmgType = 1;
|
||||
actor->dmgType = DMG_BEAM;
|
||||
actor->dmgPart = 0;
|
||||
actor->damage = 10;
|
||||
if (effect->obj.id == OBJ_EFFECT_354) {
|
||||
actor->damage = 30;
|
||||
}
|
||||
actor->dmgSource = 100;
|
||||
actor->dmgSource = CS_SHOT_ID;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
+28
-28
@@ -72,7 +72,7 @@ u32 gWarpRingSfx[] = {
|
||||
0x19404038, 0x19404139, 0x1940423A, 0x1940433B, 0x1940443C, 0x1940453D, 0x1940463E, 0x1940463E, 0x1940463E,
|
||||
};
|
||||
|
||||
void func_enmy_80060F30(f32* pos, u32 sfxId, s32 arg2) {
|
||||
void func_enmy_80060F30(f32* pos, u32 sfxId, s32 shotSource) {
|
||||
PRINTF("CHIME SET \n");
|
||||
PRINTF("BOMB SET 1\n");
|
||||
PRINTF("BOMB SET 2\n");
|
||||
@@ -81,7 +81,7 @@ void func_enmy_80060F30(f32* pos, u32 sfxId, s32 arg2) {
|
||||
if (!gVersusMode) {
|
||||
AUDIO_PLAY_SFX(sfxId, gDefaultSfxSource, 4);
|
||||
} else {
|
||||
AUDIO_PLAY_SFX(sfxId, pos, arg2);
|
||||
AUDIO_PLAY_SFX(sfxId, pos, shotSource);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,8 +132,8 @@ bool func_enmy_80061148(Vec3f* arg0, f32 arg1) {
|
||||
}
|
||||
|
||||
void Object_SetInfo(ObjectInfo* info, u32 objId) {
|
||||
*info = D_edata_800CC124[objId];
|
||||
info->hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CC124[objId].hitbox);
|
||||
*info = gObjectInfo[objId];
|
||||
info->hitbox = SEGMENTED_TO_VIRTUAL(gObjectInfo[objId].hitbox);
|
||||
if (gLevelMode == LEVELMODE_UNK_2) {
|
||||
info->cullDistance += 200.0f;
|
||||
}
|
||||
@@ -384,7 +384,7 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) {
|
||||
actor->unk_0F4.z = objInit->rot.z;
|
||||
actor->obj.id = OBJ_ACTOR_EVENT;
|
||||
actor->timer_0C2 = 10;
|
||||
actor->unk_0B4 = EINFO_FFF;
|
||||
actor->unk_0B4 = EVID_FFF;
|
||||
actor->aiType = objInit->id - ACTOR_EVENT_ID;
|
||||
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
@@ -393,14 +393,14 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) {
|
||||
actor->iwork[1] = gPrevEventActorIndex;
|
||||
actor->iwork[10] = gActors[gPrevEventActorIndex].aiType;
|
||||
actor->fwork[22] = gArwingSpeed;
|
||||
Matrix_RotateZ(gCalcMatrix, -D_ctx_80177E88.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -D_ctx_80177E88.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -D_ctx_80177E88.y * M_DTOR, MTXF_APPLY);
|
||||
sp24.x = actor->obj.pos.x - D_ctx_80177F10.x;
|
||||
sp24.y = actor->obj.pos.y - D_ctx_80177F10.y;
|
||||
sp24.z = actor->obj.pos.z - D_ctx_80177F10.z;
|
||||
Matrix_RotateZ(gCalcMatrix, -gFormationInitRot.z * M_DTOR, MTXF_NEW);
|
||||
Matrix_RotateX(gCalcMatrix, -gFormationInitRot.x * M_DTOR, MTXF_APPLY);
|
||||
Matrix_RotateY(gCalcMatrix, -gFormationInitRot.y * M_DTOR, MTXF_APPLY);
|
||||
sp24.x = actor->obj.pos.x - gFormationInitPos.x;
|
||||
sp24.y = actor->obj.pos.y - gFormationInitPos.y;
|
||||
sp24.z = actor->obj.pos.z - gFormationInitPos.z;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp24, &actor->vwork[28]);
|
||||
actor->iwork[9] = D_ctx_80177E78;
|
||||
actor->iwork[9] = gFormationLeaderIndex;
|
||||
gPrevEventActorIndex = index;
|
||||
Actor_Update(actor);
|
||||
}
|
||||
@@ -902,7 +902,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) {
|
||||
} else if (actor->scale < 0.0f) {
|
||||
if (Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x,
|
||||
actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z)) {
|
||||
actor->dmgType = 1;
|
||||
actor->dmgType = DMG_BEAM;
|
||||
actor->damage = 10;
|
||||
actor->dmgPart = -1;
|
||||
actor->hitPos.x = pos->x;
|
||||
@@ -912,7 +912,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) {
|
||||
}
|
||||
} else if ((mode != 2) && (mode != 3)) {
|
||||
if (Object_CheckSingleHitbox(pos, actor->info.hitbox, &actor->obj.pos)) {
|
||||
actor->dmgType = 1;
|
||||
actor->dmgType = DMG_BEAM;
|
||||
actor->damage = 10;
|
||||
actor->dmgPart = -1;
|
||||
if (!(((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->iwork[12] != 0)) ||
|
||||
@@ -1547,9 +1547,9 @@ void func_enmy_800656D4(Actor* actor) {
|
||||
if ((fabsf(actor->fwork[27] - actor->obj.pos.x) < 60.0f) &&
|
||||
(fabsf(actor->fwork[28] - actor->obj.pos.y) < 60.0f) &&
|
||||
(fabsf(actor->fwork[29] - actor->obj.pos.z) < 60.0f) && ((spC4 == 2) || (spC4 == 3) || (spC4 == 4))) {
|
||||
gActors[spC4].dmgType = 1;
|
||||
gActors[spC4].dmgType = DMG_BEAM;
|
||||
gActors[spC4].damage = 20;
|
||||
gActors[spC4].dmgSource = 2;
|
||||
gActors[spC4].dmgSource = DMG_SRC_2;
|
||||
func_effect_8007A6F0(&actor->obj.pos, 0x2903A008);
|
||||
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f);
|
||||
Object_Kill(&actor->obj, actor->sfxSource);
|
||||
@@ -1583,11 +1583,11 @@ void func_enmy_800656D4(Actor* actor) {
|
||||
sp8C.x = actor->vel.x;
|
||||
sp8C.y = actor->vel.y;
|
||||
sp8C.z = actor->vel.z;
|
||||
if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->dmgType != 0) ||
|
||||
if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->dmgType != DMG_NONE) ||
|
||||
(actor->obj.pos.y < (gGroundHeight + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
|
||||
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f);
|
||||
Object_Kill(&actor->obj, actor->sfxSource);
|
||||
if (actor->dmgType != 0) {
|
||||
if (actor->dmgType != DMG_NONE) {
|
||||
actor->itemDrop = DROP_SILVER_RING_50p;
|
||||
if ((gCurrentLevel == LEVEL_CORNERIA)) {
|
||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||
@@ -1649,12 +1649,12 @@ void Actor_Despawn(Actor* actor) {
|
||||
s32 i;
|
||||
|
||||
if (gVersusMode) {
|
||||
if ((actor->dmgSource > 0) && (actor->dmgSource < 5) &&
|
||||
if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) &&
|
||||
!((D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) {
|
||||
gPlayerScores[actor->dmgSource - 1] += actor->info.bonus;
|
||||
}
|
||||
} else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->unk_0B6 == 1))) {
|
||||
if ((actor->dmgSource == 1) && (actor->info.bonus != 0)) {
|
||||
if ((actor->dmgSource == AI360_FOX + 1) && (actor->info.bonus != 0)) {
|
||||
gHitCount += actor->info.bonus;
|
||||
D_ctx_80177850 = 15;
|
||||
if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gDropHitCountItem != 0)) {
|
||||
@@ -1751,10 +1751,10 @@ void func_enmy_8006654C(Actor* actor) {
|
||||
break;
|
||||
}
|
||||
actor->scale = 0.8f;
|
||||
if (actor->dmgType != 0) {
|
||||
if (actor->dmgType != DMG_NONE) {
|
||||
actor->obj.status = OBJ_DYING;
|
||||
actor->vel.y = RAND_FLOAT(5.0f) + 6.0f;
|
||||
if (actor->dmgType == 2) {
|
||||
if (actor->dmgType == DMG_EXPLOSION) {
|
||||
actor->vel.y = -2.0f;
|
||||
}
|
||||
actor->vel.z = -15.0f;
|
||||
@@ -1798,7 +1798,7 @@ void func_enmy_800669A0(Actor* actor) {
|
||||
}
|
||||
} else {
|
||||
actor->obj.rot.y += 5.0f;
|
||||
if (actor->dmgType != 0) {
|
||||
if (actor->dmgType != DMG_NONE) {
|
||||
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 8.0f);
|
||||
func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f,
|
||||
5);
|
||||
@@ -2003,8 +2003,8 @@ void ActorSupplies_Update(ActorSupplies* this) {
|
||||
Math_SmoothStepToF(&this->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f);
|
||||
}
|
||||
}
|
||||
if (this->dmgType != 0) {
|
||||
this->dmgType = 0;
|
||||
if (this->dmgType != DMG_NONE) {
|
||||
this->dmgType = DMG_NONE;
|
||||
this->health -= this->damage;
|
||||
if (this->health <= 0) {
|
||||
func_effect_8007A6F0(&this->obj.pos, 0x2903A008);
|
||||
@@ -2502,7 +2502,7 @@ void Actor_Move(Actor* actor) {
|
||||
var_fv0 = 4000.0f;
|
||||
|
||||
if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) ||
|
||||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_56))) {
|
||||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_56))) {
|
||||
var_fv0 = 8000.0f;
|
||||
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) {
|
||||
var_fv0 = 100000.0f;
|
||||
@@ -2523,9 +2523,9 @@ void Actor_Move(Actor* actor) {
|
||||
gActor194Status[actor->unk_046] = 0;
|
||||
break;
|
||||
case OBJ_ACTOR_EVENT:
|
||||
if ((actor->unk_0B4 >= EINFO_200) && (actor->unk_0B4 < EINFO_300)) {
|
||||
if ((actor->unk_0B4 >= EVID_200) && (actor->unk_0B4 < EVID_300)) {
|
||||
gActor194Status[actor->unk_046] = 0;
|
||||
} else if ((actor->unk_0B4 == EINFO_38) && (actor->unk_046 != 2)) {
|
||||
} else if ((actor->unk_0B4 == EVID_38) && (actor->unk_046 != 2)) {
|
||||
gRingPassCount = -1;
|
||||
}
|
||||
break;
|
||||
|
||||
+269
-268
File diff suppressed because it is too large
Load Diff
+10
-10
@@ -2460,7 +2460,7 @@ s32 func_hud_8008B774(void) {
|
||||
(gCurrentLevel == LEVEL_SECTOR_Y))) {
|
||||
for (i = 0; i < 60; i++) {
|
||||
if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) {
|
||||
if ((gActors[i].unk_0B4 == EINFO_2) || (gActors[i].unk_0B4 == EINFO_43) ||
|
||||
if ((gActors[i].unk_0B4 == EVID_2) || (gActors[i].unk_0B4 == EVID_43) ||
|
||||
((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) &&
|
||||
((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) ||
|
||||
(gActors[i].aiType == AI360_PEPPY)))) {
|
||||
@@ -4327,9 +4327,9 @@ bool func_hud_80091DF4(Actor* actor) {
|
||||
sp44.y = 0.0f;
|
||||
sp44.z = 100.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
|
||||
func_enmy2_8006EEFC(actor->aiType, actor->obj.pos.x + (sp38.x * 1.5), actor->obj.pos.y + (sp38.y * 1.5),
|
||||
actor->obj.pos.z + (sp38.z * 1.5), sp38.x, sp38.y, sp38.z, actor->obj.rot.x,
|
||||
actor->obj.rot.y, actor->obj.rot.z);
|
||||
Actor_SpawnPlayerLaser(actor->aiType, actor->obj.pos.x + (sp38.x * 1.5), actor->obj.pos.y + (sp38.y * 1.5),
|
||||
actor->obj.pos.z + (sp38.z * 1.5), sp38.x, sp38.y, sp38.z, actor->obj.rot.x,
|
||||
actor->obj.rot.y, actor->obj.rot.z);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -4339,9 +4339,9 @@ bool func_hud_80091F00(Actor* actor) {
|
||||
Vec3f sp40;
|
||||
Vec3f sp34;
|
||||
|
||||
actor->dmgType = 0;
|
||||
actor->dmgType = DMG_NONE;
|
||||
|
||||
if ((actor->state == 3) || (temp_v0 == 2)) {
|
||||
if ((actor->state == 3) || (temp_v0 == DMG_EXPLOSION)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4376,7 +4376,7 @@ bool func_hud_80091F00(Actor* actor) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((actor->dmgType == 3) && (actor->dmgSource == 1)) {
|
||||
if ((actor->dmgType == DMG_COLLISION) && (actor->dmgSource == AI360_FOX + 1)) {
|
||||
switch (actor->aiType) {
|
||||
case AI360_FALCO:
|
||||
Radio_PlayMessage(gMsg_ID_20210, RCID_FALCO);
|
||||
@@ -4390,7 +4390,7 @@ bool func_hud_80091F00(Actor* actor) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((actor->dmgType != 3) && (actor->dmgSource == 1)) {
|
||||
if ((actor->dmgType != DMG_COLLISION) && (actor->dmgSource == AI360_FOX + 1)) {
|
||||
switch (actor->aiType) {
|
||||
case AI360_FALCO:
|
||||
Radio_PlayMessage(gMsg_ID_20060, RCID_FALCO);
|
||||
@@ -4404,7 +4404,7 @@ bool func_hud_80091F00(Actor* actor) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((actor->dmgSource == 2) || (actor->dmgSource == 100)) {
|
||||
if ((actor->dmgSource == DMG_SRC_2) || (actor->dmgSource == DMG_SRC_100)) {
|
||||
switch (actor->aiType) {
|
||||
case AI360_FALCO:
|
||||
Radio_PlayMessage(gMsg_ID_20030, RCID_FALCO);
|
||||
@@ -4705,7 +4705,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) {
|
||||
func_hud_80091B90(this);
|
||||
func_hud_80091DF4(this);
|
||||
|
||||
if (this->dmgType != 0) {
|
||||
if (this->dmgType != DMG_NONE) {
|
||||
func_hud_80091F00(this);
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -655,9 +655,9 @@ void Play_ClearObjectData(void) {
|
||||
PlayerShot_Initialize(&gPlayerShots[i]);
|
||||
}
|
||||
D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C =
|
||||
gPrevEventActorIndex = D_ctx_80177E78 = gRingPassCount = 0;
|
||||
D_ctx_80177F10.x = D_ctx_80177F10.y = D_ctx_80177F10.z = D_ctx_80177E88.x = D_ctx_80177E88.y = D_ctx_80177E88.z =
|
||||
0.0f;
|
||||
gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0;
|
||||
gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y =
|
||||
gFormationInitRot.z = 0.0f;
|
||||
for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) {
|
||||
gTeamArrowsViewPos[i].x = gTeamArrowsViewPos[i].y = gTeamArrowsViewPos[i].z = 100.0f;
|
||||
}
|
||||
@@ -1914,20 +1914,20 @@ void func_play_800A8BA4(Player* player) {
|
||||
Player_ApplyDamage(player, temp_v0, actor->info.damage);
|
||||
}
|
||||
} else if (actor->obj.id == OBJ_ACTOR_EVENT) {
|
||||
if (actor->unk_0B4 == EINFO_42) {
|
||||
if (actor->unk_0B4 == EVID_42) {
|
||||
temp_v0 =
|
||||
func_play_800A8304(player, ACTOR_EVENT_ID, actor->obj.pos.x, actor->obj.pos.y,
|
||||
actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z);
|
||||
if (temp_v0 != 0) {
|
||||
Player_ApplyDamage(player, temp_v0, actor->info.damage);
|
||||
}
|
||||
} else if (actor->unk_0B4 == EINFO_63) {
|
||||
} else if (actor->unk_0B4 == EVID_63) {
|
||||
spfD4.x = fabsf(actor->obj.pos.x - player->pos.x);
|
||||
spfD4.y = fabsf(actor->obj.pos.y - player->pos.y);
|
||||
spfD4.z = fabsf(actor->obj.pos.z - player->trueZpos);
|
||||
if ((VEC3F_MAG(&spfD4)) < 900.0f) {
|
||||
Player_ApplyDamage(player, 0, actor->info.damage);
|
||||
actor->dmgType = 3;
|
||||
actor->dmgType = DMG_COLLISION;
|
||||
}
|
||||
} else {
|
||||
temp_v0 = func_play_800A7974(player, actor->info.hitbox, &sp98, actor->obj.pos.x,
|
||||
@@ -1935,7 +1935,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x,
|
||||
actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z);
|
||||
if (temp_v0 != 0) {
|
||||
if ((temp_v0 < 0) && (actor->unk_0B4 == EINFO_38)) {
|
||||
if ((temp_v0 < 0) && (actor->unk_0B4 == EVID_38)) {
|
||||
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032328);
|
||||
if (gRingPassCount >= 0) {
|
||||
actor->unk_046 = 2;
|
||||
@@ -1956,7 +1956,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
}
|
||||
} else {
|
||||
Player_ApplyDamage(player, temp_v0, actor->info.damage);
|
||||
actor->dmgType = 3;
|
||||
actor->dmgType = DMG_COLLISION;
|
||||
actor->dmgSource = player->num + 1;
|
||||
}
|
||||
}
|
||||
@@ -1967,7 +1967,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z,
|
||||
actor->fwork[29], actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f, 0.0f);
|
||||
if (temp_v0 != 0) {
|
||||
actor->dmgType = 3;
|
||||
actor->dmgType = DMG_COLLISION;
|
||||
if (actor->info.damage) {
|
||||
Player_ApplyDamage(player, temp_v0, actor->info.damage);
|
||||
} else {
|
||||
@@ -1988,7 +1988,7 @@ void func_play_800A8BA4(Player* player) {
|
||||
player->whooshTimer = 4;
|
||||
}
|
||||
} else {
|
||||
actor->dmgType = 3;
|
||||
actor->dmgType = DMG_COLLISION;
|
||||
if (actor->obj.id == OBJ_ACTOR_190) {
|
||||
actor->dmgType = -1;
|
||||
}
|
||||
@@ -2764,7 +2764,7 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl
|
||||
shot->unk_64 = 30;
|
||||
}
|
||||
}
|
||||
shot->playerNum = player->num;
|
||||
shot->sourceId = player->num;
|
||||
}
|
||||
|
||||
void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f32 speed) {
|
||||
@@ -2815,7 +2815,7 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f
|
||||
shot->unk_64 = 40;
|
||||
shot->obj.id = shotId;
|
||||
|
||||
shot->playerNum = player->num;
|
||||
shot->sourceId = player->num;
|
||||
if (shotId == PLAYERSHOT_8) {
|
||||
if (speed <= 65.0f) {
|
||||
shot->unk_5C = 1;
|
||||
@@ -2940,7 +2940,7 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) {
|
||||
shot->unk_64 = 30;
|
||||
shot->unk_58 = 1;
|
||||
|
||||
shot->playerNum = player->num;
|
||||
shot->sourceId = player->num;
|
||||
}
|
||||
|
||||
void func_play_800AD094(Player* player) {
|
||||
|
||||
@@ -1403,7 +1403,7 @@ void func_tank_800481F4(Player* player) {
|
||||
actor->vwork[29].z + actor->unk_0F4.z);
|
||||
if (temp_v0 != 0) {
|
||||
Player_ApplyDamage(player, temp_v0, actor->info.damage);
|
||||
actor->dmgType = 3;
|
||||
actor->dmgType = DMG_COLLISION;
|
||||
actor->dmgSource = player->num + 1;
|
||||
}
|
||||
} else if (actor->obj.id == OBJ_ACTOR_207) {
|
||||
@@ -1426,7 +1426,7 @@ void func_tank_800481F4(Player* player) {
|
||||
player->vel.x = 0.0f;
|
||||
player->vel.y = 30.0f;
|
||||
player->pos.x = player->basePos.x;
|
||||
actor->dmgType = 3;
|
||||
actor->dmgType = DMG_COLLISION;
|
||||
Player_ApplyDamage(player, 0, 5);
|
||||
player->timer_498 = 1;
|
||||
}
|
||||
@@ -1451,7 +1451,7 @@ void func_tank_800481F4(Player* player) {
|
||||
player->vel.x = 0.0f;
|
||||
player->vel.y = 30.0f;
|
||||
player->pos.x = player->basePos.x;
|
||||
actor->dmgType = 3;
|
||||
actor->dmgType = DMG_COLLISION;
|
||||
if (actor->info.damage != 0) {
|
||||
Player_ApplyDamage(player, 0, 20);
|
||||
} else {
|
||||
@@ -1463,7 +1463,7 @@ void func_tank_800481F4(Player* player) {
|
||||
actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z,
|
||||
0.0f, 0.0f, 0.0f);
|
||||
if (temp_v0 != 0) {
|
||||
actor->dmgType = 3;
|
||||
actor->dmgType = DMG_COLLISION;
|
||||
if ((actor->obj.id == OBJ_ACTOR_225) || (actor->obj.id == OBJ_ACTOR_190)) {
|
||||
actor->dmgType = -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user