Improves the Block Pushing Speed Enhancement (#2396)

* Increases the actual block pushing speed.

Previously this enhancement only decreased the delay between pushes in any noticeable way because the top speed of the blocks was clamped. The enhancement now increases the top speed of the blocks according to the slider's value.

* Applies previous changes to milk crates.

* Applies same fix to fire temple stone blocks

(I believe these are the ones with the faces on them)

* Applies fixes to Poe painting blocks (forest temple)
This commit is contained in:
Christopher Leggett 2023-01-26 00:58:26 -05:00 committed by GitHub
parent 589e25948e
commit 569013535e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -138,7 +138,8 @@ void func_8088B268(BgHidanRock* this, PlayState* play) {
}
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger("gFasterBlockPush", 0) * 0.3) + 0.5f;
this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f);
this->dyna.actor.speedXZ =
CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
if (D_8088BFC0 > 0.0f) {
temp_v1 = Math_StepToF(&D_8088BFC0, 20.0f, this->dyna.actor.speedXZ);

View File

@ -388,7 +388,7 @@ void BgPoEvent_BlockPush(BgPoEvent* this, PlayState* play) {
Player* player = GET_PLAYER(play);
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger("gFasterBlockPush", 0) * 0.3) + 0.5f;
this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f);
this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
blockStop = Math_StepToF(&sBgPoEventblockPushDist, 20.0f, this->dyna.actor.speedXZ);
displacement = this->direction * sBgPoEventblockPushDist;
this->dyna.actor.world.pos.x = (Math_SinS(this->dyna.unk_158) * displacement) + this->dyna.actor.home.pos.x;

View File

@ -262,7 +262,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
this->unk_174 = this->unk_174 + ((CVarGetInteger("gFasterBlockPush", 0) / 2) * 0.5) + 0.5f;
this->unk_174 = CLAMP_MAX(this->unk_174, 2.0f);
this->unk_174 = CLAMP_MAX(this->unk_174, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
approxFResult = Math_StepToF(&this->unk_178, 20.0f, this->unk_174);

View File

@ -567,9 +567,9 @@ void ObjOshihiki_Push(ObjOshihiki* this, PlayState* play) {
f32 pushDistSigned;
s32 stopFlag;
this->pushSpeed = this->pushSpeed + ((CVarGetInteger("gFasterBlockPush", 0) / 2) * 0.5) + 0.5f;
this->pushSpeed = this->pushSpeed + (CVarGetInteger("gFasterBlockPush", 0) * 0.25) + 0.5f;
this->stateFlags |= PUSHBLOCK_PUSH;
this->pushSpeed = CLAMP_MAX(this->pushSpeed, 2.0f);
this->pushSpeed = CLAMP_MAX(this->pushSpeed, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
stopFlag = Math_StepToF(&this->pushDist, 20.0f, this->pushSpeed);
pushDistSigned = ((this->direction >= 0.0f) ? 1.0f : -1.0f) * this->pushDist;
thisx->world.pos.x = thisx->home.pos.x + (pushDistSigned * this->yawSin);