Implement/match Act3Brickster::HitActor (#1212)

* Implement/match `Act3Brickster::HitActor`

* Fixes

* Fixes

* Fixes

* Add `Act3Cop::VTable0x9c`

* Fix
This commit is contained in:
Christian Semmler
2024-12-12 09:10:44 -07:00
committed by GitHub
parent fe57a94416
commit aceba71fbb
25 changed files with 166 additions and 78 deletions

View File

@@ -95,7 +95,7 @@ MxU32 LegoRaceActor::VTable0x90(float p_time, Matrix4& p_transform)
// FUNCTION: LEGO1 0x10014a00
// FUNCTION: BETA10 0x100c9f5c
MxResult LegoRaceActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
MxResult LegoRaceActor::HitActor(LegoPathActor* p_actor, MxBool p_bool)
{
if (!p_actor->GetUserNavFlag()) {
if (p_actor->GetState()) {
@@ -115,5 +115,6 @@ MxResult LegoRaceActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
p_actor->SetState(2);
}
}
return 0;
return SUCCESS;
}

View File

@@ -428,7 +428,7 @@ void LegoRaceCar::VTable0x70(float p_time)
// FUNCTION: LEGO1 0x100133c0
// FUNCTION: BETA10 0x100cbb84
MxResult LegoRaceCar::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
MxResult LegoRaceCar::HitActor(LegoPathActor* p_actor, MxBool p_bool)
{
// Note: Code duplication with LegoRaceActor::VTable0x94
if (!p_actor->GetUserNavFlag()) {
@@ -499,6 +499,7 @@ MxResult LegoRaceCar::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
return FAILURE;
}
}
return SUCCESS;
}

View File

@@ -333,9 +333,9 @@ MxU32 LegoCarRaceActor::VTable0x6c(
p_v3,
m_collideBox && actor->GetCollideBox()
)) {
VTable0x94(actor, TRUE);
HitActor(actor, TRUE);
if (actor->VTable0x94(this, FALSE) < 0) {
if (actor->HitActor(this, FALSE) < 0) {
return 0;
}
else {
@@ -353,9 +353,9 @@ MxU32 LegoCarRaceActor::VTable0x6c(
p_v3,
m_collideBox && actor->GetCollideBox()
)) {
VTable0x94(actor, TRUE);
HitActor(actor, TRUE);
if (actor->VTable0x94(this, FALSE) < 0) {
if (actor->HitActor(this, FALSE) < 0) {
return 0;
}
else {
@@ -366,8 +366,9 @@ MxU32 LegoCarRaceActor::VTable0x6c(
}
else {
if (roi->FUN_100a9410(p_v1, p_v2, p_f1, p_f2, p_v3, m_collideBox && actor->GetCollideBox())) {
VTable0x94(actor, TRUE);
if (actor->VTable0x94(this, FALSE) < 0) {
HitActor(actor, TRUE);
if (actor->HitActor(this, FALSE) < 0) {
return 0;
}
else {