1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 06:21:16 +00:00

Improve Matches: Part 4 (#1545)

* more improvements

* small cleanup

* PR Review
This commit is contained in:
engineer124 2023-09-25 01:51:03 +10:00 committed by GitHub
parent fefeb369dd
commit 873c55faad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 426 additions and 413 deletions

View file

@ -2863,9 +2863,6 @@ void BossTw_Update(Actor* thisx, PlayState* play) {
this->blastTailPos[this->work[TAIL_IDX]] = this->actor.world.pos;
if (1) {}
if (1) {}
for (i = 0; i < 5; i++) {
if (this->timers[i] != 0) {
this->timers[i]--;
@ -2890,68 +2887,62 @@ void BossTw_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->actionFunc != BossTw_Wait) {
this->collider.dim.radius = 45;
if (this->actionFunc == BossTw_Wait) {
return;
}
if (this->actionFunc == BossTw_Spin) {
this->collider.dim.radius *= 2;
this->collider.dim.radius = 45;
if (this->actionFunc == BossTw_Spin) {
this->collider.dim.radius *= 2;
}
this->collider.dim.height = 120;
this->collider.dim.yShift = -30;
if (this->work[INVINC_TIMER] == 0) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
}
this->collider.dim.height = 120;
this->collider.dim.yShift = -30;
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
}
if (this->work[INVINC_TIMER] == 0) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
}
if (this->actor.params == TW_KOTAKE) {
this->workf[OUTR_CRWN_TX_X2] += 1.0f;
this->workf[OUTR_CRWN_TX_Y2] -= 7.0f;
this->workf[INNR_CRWN_TX_Y1] += 1.0f;
} else {
this->workf[OUTR_CRWN_TX_X2] += 0.0f;
this->workf[INNR_CRWN_TX_X2] += 0.0f;
this->workf[OUTR_CRWN_TX_Y2] += -15.0f;
this->workf[INNR_CRWN_TX_Y2] += -10.0f;
}
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
}
if (((this->work[CS_TIMER_2] % 32) == 0) && (Rand_ZeroOne() < 0.3f)) {
this->work[BLINK_IDX] = 4;
}
if (this->actor.params == TW_KOTAKE) {
this->workf[OUTR_CRWN_TX_X2] += 1.0f;
this->workf[OUTR_CRWN_TX_Y2] -= 7.0f;
this->workf[INNR_CRWN_TX_Y1] += 1.0f;
} else {
this->workf[OUTR_CRWN_TX_X2] += 0.0f;
this->workf[INNR_CRWN_TX_X2] += 0.0f;
this->workf[OUTR_CRWN_TX_Y2] += -15.0f;
this->workf[INNR_CRWN_TX_Y2] += -10.0f;
}
this->eyeTexIdx = D_8094A900[this->work[BLINK_IDX]];
if (((this->work[CS_TIMER_2] % 32) == 0) && (Rand_ZeroOne() < 0.3f)) {
this->work[BLINK_IDX] = 4;
}
if (this->work[BLINK_IDX] != 0) {
this->work[BLINK_IDX]--;
}
this->eyeTexIdx = D_8094A900[this->work[BLINK_IDX]];
if ((this->actionFunc == BossTw_MergeCS) || (this->unk_5F8 == 0)) {
return;
}
if (this->work[BLINK_IDX] != 0) {
this->work[BLINK_IDX]--;
}
if (this->actionFunc != BossTw_MergeCS && this->unk_5F8 != 0) {
Vec3f pos;
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
Vec3f accel = { 0.0f, 0.0f, 0.0f };
if (this->scepterAlpha > 0.0f) {
for (i = 0; i <= 0; i++) {
pos = this->scepterFlamePos[0];
pos.x += Rand_CenteredFloat(70.0f);
pos.y += Rand_CenteredFloat(70.0f);
pos.z += Rand_CenteredFloat(70.0f);
accel.y = 0.4f;
accel.x = Rand_CenteredFloat(0.5f);
accel.z = Rand_CenteredFloat(0.5f);
BossTw_AddDotEffect(play, &pos, &velocity, &accel, (s16)Rand_ZeroFloat(2.0f) + 8,
this->actor.params, 37);
}
}
{
Vec3f pos;
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
Vec3f accel = { 0.0f, 0.0f, 0.0f };
if (this->scepterAlpha > 0.0f) {
for (i = 0; i <= 0; i++) {
pos = this->crownPos;
pos = this->scepterFlamePos[0];
pos.x += Rand_CenteredFloat(70.0f);
pos.y += Rand_CenteredFloat(70.0f);
pos.z += Rand_CenteredFloat(70.0f);
@ -2962,6 +2953,17 @@ void BossTw_Update(Actor* thisx, PlayState* play) {
37);
}
}
for (i = 0; i <= 0; i++) {
pos = this->crownPos;
pos.x += Rand_CenteredFloat(70.0f);
pos.y += Rand_CenteredFloat(70.0f);
pos.z += Rand_CenteredFloat(70.0f);
accel.y = 0.4f;
accel.x = Rand_CenteredFloat(0.5f);
accel.z = Rand_CenteredFloat(0.5f);
BossTw_AddDotEffect(play, &pos, &velocity, &accel, (s16)Rand_ZeroFloat(2.0f) + 8, this->actor.params, 37);
}
}
}