From 455bae1ef9509d81019bd8efd9eeeac2148cce76 Mon Sep 17 00:00:00 2001 From: Bavario <35093969+bavario-lginc@users.noreply.github.com> Date: Fri, 31 May 2024 01:43:37 +0200 Subject: [PATCH] Add Hackio's initilizeMapObjActorWithColorAndTexChange --- .../source/VanillaBugfixes.cpp | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/PTD/VanillaBugfixes/source/VanillaBugfixes.cpp b/PTD/VanillaBugfixes/source/VanillaBugfixes.cpp index 629a674..edd483d 100644 --- a/PTD/VanillaBugfixes/source/VanillaBugfixes.cpp +++ b/PTD/VanillaBugfixes/source/VanillaBugfixes.cpp @@ -1,7 +1,7 @@ #include "syati.h" /* -* Author: Aurum +* Author: Aurum, Super Hackio */ namespace pt { @@ -68,10 +68,19 @@ namespace pt { void killSamboHeadIfInWater(LiveActor* pActor) { - if (MR::isInWater(pActor->mTranslation) || MR::isBindedGroundSinkDeath(pActor)) - pActor->kill(); - } - - kmCall(0x801F8290, killSamboHeadIfInWater); + if (MR::isInWater(pActor->mTranslation) || MR::isBindedGroundSinkDeath(pActor)) + pActor->kill(); + } + kmCall(0x801F8290, killSamboHeadIfInWater); + + /*****************************************************************************************************************/ + /* Fix certain MapParts from not taking ColorChange/TexChange. */ + /*****************************************************************************************************************/ + void initilizeMapObjActorWithColorAndTexChange(MapObjActor* pActor, const JMapInfoIter& rIter, MapObjActorInitInfo& rInfo) { + MapObjActorUtil::setupInitInfoColorChangeArg0(&rInfo, rIter); + MapObjActorUtil::setupInitInfoTextureChangeArg1(&rInfo, rIter); + pActor->initialize(rIter, rInfo); + } + kmCall(0x802E99E8, initilizeMapObjActorWithColorAndTexChange); } }