Random bonks while rolling

This commit is contained in:
aMannus 2023-03-28 10:49:38 +02:00
commit 6721c2d791

View file

@ -8654,8 +8654,10 @@ void func_80844708(Player* this, PlayState* play) {
func_8083A060(this, play); func_8083A060(this, play);
} }
} else { } else {
f32 rand = Rand_ZeroOne();
uint8_t randomBonk = (rand <= .05);
if (this->linearVelocity >= 7.0f) { if (this->linearVelocity >= 7.0f) {
if (((this->actor.bgCheckFlags & 0x200) && (D_8085360C < 0x2000)) || if (randomBonk || ((this->actor.bgCheckFlags & 0x200) && (D_8085360C < 0x2000)) ||
((this->cylinder.base.ocFlags1 & OC1_HIT) && ((this->cylinder.base.ocFlags1 & OC1_HIT) &&
(cylinderOc = this->cylinder.base.oc, (cylinderOc = this->cylinder.base.oc,
((cylinderOc->id == ACTOR_EN_WOOD02) && ((cylinderOc->id == ACTOR_EN_WOOD02) &&