fox_tr spacing

This commit is contained in:
Alejandro Javier Asenjo Nitti
2024-05-16 11:13:04 -03:00
parent 27c77ddeba
commit 9ac4472388
+11
View File
@@ -22,12 +22,14 @@ void Training_ItemRing_Update(ItemTrainingRing* this) {
case 0:
this->obj.rot.z += 1.0f;
Math_SmoothStepToF(&this->width, 1.0f, 1.0f, 0.05f, 0.0f);
if ((this->unk_44 == 0) && !gPlayer[0].somersault) {
if (this->obj.rot.y == 0.0f) {
var_fv0 = 550.0f;
} else {
var_fv0 = 1000.0f;
}
if (this->obj.pos.z > (gPlayer[0].trueZpos + var_fv0)) {
this->unk_44 = 1;
PRINTF("♪:リング未通過音\n"); // Ring not passed sound
@@ -35,29 +37,38 @@ void Training_ItemRing_Update(ItemTrainingRing* this) {
gRingPassCount = 0;
}
}
if (this->collected) {
this->state = 1;
this->timer_48 = 50;
this->info.cullDistance = 10000.0f;
PRINTF("♪:リング通過音\n"); // Ring passing sound
AUDIO_PLAY_SFX(NA_SE_RING_PASS, gDefaultSfxSource, 4);
gRingPassCount++;
if ((this->obj.rot.x != 0.0f) && (gRingPassCount >= 100)) {
Radio_PlayMessage(gMsg_ID_20330, RCID_ROB64);
}
}
break;
case 1:
this->obj.pos.x += ((gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.05f);
this->obj.pos.y += ((gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.05f);
if (gPlayer[0].alternateView) {
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.05f;
} else {
this->obj.pos.z += ((gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.05f);
}
this->obj.rot.z += 22.0f;
Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f,
0.0f);
if (this->timer_48 == 0) {
Object_Kill(&this->obj, this->sfxSource);
}