mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 16:18:50 -05:00
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:
parent
589e25948e
commit
569013535e
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user