From 483ebc6f00a35e972ef90fd81dbda39d114960e4 Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 22 May 2013 21:18:44 +0200 Subject: added red ring event control --- src/randomcrap.S | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/randomcrap.S b/src/randomcrap.S index 29bf758..fff6c98 100644 --- a/src/randomcrap.S +++ b/src/randomcrap.S @@ -384,6 +384,16 @@ llaReturn: sfsdfsdf: .float 512.0 .text + +.global RedRingEventControl +RedRingEventControl: + lwz r10, 4(r31) + srwi. r10, r10, 28 + beq dontResetRREDelay + li r5, 0 +dontResetRREDelay: + b set__10dFlagMgr_cFUcibbbUi + .global EFB_Crap .extern EFBMagic2__Fv .extern ContinueFromEFBMagic2 -- cgit v1.2.3 From f525c40321d24bbc83d8dcfdbcd63e89c368917f Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 22 May 2013 21:18:52 +0200 Subject: hammer suit model fixes --- src/poweruphax.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/poweruphax.cpp b/src/poweruphax.cpp index f2895de..1bb5dc8 100644 --- a/src/poweruphax.cpp +++ b/src/poweruphax.cpp @@ -45,8 +45,8 @@ void dHammerSuitRenderer_c::setup(dPlayerModelHandler_c *handler, int sceneID) { nw4r::g3d::ResFile rf(getResource("hammerM", "g3d/suit.brres")); - if (victim->player_id_1 <= 1) { - helmet.setup(rf.GetResMdl((victim->player_id_1 == 0) ? "marioHelmet" : "luigiHelmet"), &allocator, 0, 1, 0); + if (victim->player_id_2 <= 1) { + helmet.setup(rf.GetResMdl((victim->player_id_2 == 0) ? "marioHelmet" : "luigiHelmet"), &allocator, 0, 1, 0); SetupTextures_MapObj(&helmet, sceneID); } @@ -64,7 +64,7 @@ void dHammerSuitRenderer_c::setup(dPlayerModelHandler_c *handler, int sceneID) { (nw4r::g3d::ResMdl*)(((u32)victimModel->scnObj) + 0xE8); //headNodeID = playerResMdl->GetResNode("player_head").GetID(); - if (victim->player_id_1 <= 1) + if (victim->player_id_2 <= 1) headNodeID = playerResMdl->GetResNode("face_1").GetID(); rootNodeID = playerResMdl->GetResNode("skl_root").GetID(); } @@ -73,7 +73,7 @@ void dHammerSuitRenderer_c::draw() { if (victim->powerup_id != 7) return; - if (victim->player_id_1 <= 1) { + if (victim->player_id_2 <= 1) { // Materials: 2=hair 3=hat; Modes: BACK=visible ALL=invisible SetCullModeForMaterial(&victim->getCurrentModel()->head, 3, GX_CULL_ALL); -- cgit v1.2.3 From a165a5fd2e8bd9ce78e7f67e410ad26f4ef87a49 Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 22 May 2013 21:19:01 +0200 Subject: chestnut anti-bubble fix --- src/chestnut.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/chestnut.cpp b/src/chestnut.cpp index 7ebfc4d..ff653c0 100644 --- a/src/chestnut.cpp +++ b/src/chestnut.cpp @@ -159,9 +159,11 @@ float daEnChestnut_c::nearestPlayerDistance() { for (int i = 0; i < 4; i++) { if (dAcPy_c *player = dAcPy_c::findByID(i)) { - float thisDist = abs(player->pos.x - pos.x); - if (thisDist < bestSoFar) - bestSoFar = thisDist; + if (strcmp(player->states2.getCurrentState()->getName(), "dAcPy_c::StateID_Balloon")) { + float thisDist = abs(player->pos.x - pos.x); + if (thisDist < bestSoFar) + bestSoFar = thisDist; + } } } -- cgit v1.2.3