From 6721c2d7915607b0b6ae83e02383b44dd4af335f Mon Sep 17 00:00:00 2001 From: aMannus Date: Tue, 28 Mar 2023 10:49:38 +0200 Subject: [PATCH] Random bonks while rolling --- soh/src/overlays/actors/ovl_player_actor/z_player.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 1c016b21d..e41d22953 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -8654,8 +8654,10 @@ void func_80844708(Player* this, PlayState* play) { func_8083A060(this, play); } } else { + f32 rand = Rand_ZeroOne(); + uint8_t randomBonk = (rand <= .05); 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) && (cylinderOc = this->cylinder.base.oc, ((cylinderOc->id == ACTOR_EN_WOOD02) &&