mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-24 17:18:50 -05:00
Merge pull request #1292 from aMannus/custom-key-colors-fix
Rando: Custom key colors fix
This commit is contained in:
commit
f15b3880f3
@ -1170,7 +1170,9 @@ void Player_DrawGetItemImpl(GlobalContext* globalCtx, Player* this, Vec3f* refPo
|
||||
Matrix_RotateZYX(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
|
||||
if (this->getItemEntry.drawFunc != NULL && CVar_GetS32("gRandoMatchKeyColors", 0)) {
|
||||
// RANDOTODO: Make this more flexible for easier toggling of individual item recolors in the future.
|
||||
if (this->getItemEntry.drawFunc != NULL &&
|
||||
(CVar_GetS32("gRandoMatchKeyColors", 0) || this->getItemEntry.getItemId == RG_DOUBLE_DEFENSE)) {
|
||||
this->getItemEntry.drawFunc(globalCtx, &this->getItemEntry);
|
||||
} else {
|
||||
GetItem_Draw(globalCtx, drawIdPlusOne - 1);
|
||||
|
@ -12667,6 +12667,14 @@ s32 func_8084DFF4(GlobalContext* globalCtx, Player* this) {
|
||||
this->stateFlags1 &= ~PLAYER_STATE1_29;
|
||||
func_80852FFC(globalCtx, NULL, 8);
|
||||
}
|
||||
|
||||
// Set unk_862 to 0 early to not have the game draw non-custom colored models for a split second.
|
||||
// This unk is what the game normally uses to decide what item to draw when holding up an item above Link's head.
|
||||
// Only do this when the item actually has a custom draw function.
|
||||
if (this->getItemEntry.drawFunc != NULL) {
|
||||
this->unk_862 = 0;
|
||||
}
|
||||
|
||||
this->getItemId = GI_NONE;
|
||||
this->getItemEntry = (GetItemEntry)GET_ITEM_NONE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user