Skip to content

Commit

Permalink
Workaround for horse dismount making cloaks disappear
Browse files Browse the repository at this point in the history
  • Loading branch information
Logg-y committed Nov 26, 2024
1 parent f268fe5 commit 2101e6f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/nss/inc_horse.nss
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,17 @@ void RemoveMount(object oPC)

SetFootstepType(FOOTSTEP_TYPE_DEFAULT, oPC);
DetermineHorseEffects(oPC);

// Fix for disappearing cloaks after dismount - thanks, Taro
// The local int stuff should avoid cloaks getting set hidden forever if players manage to log out in this window or similar
object oCloak = GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC);
if (!GetHiddenWhenEquipped(oCloak) || GetLocalInt(oCloak, "dismount_fix"))
{
DelayCommand(0.5, SetHiddenWhenEquipped(oCloak, TRUE));
SetLocalInt(oCloak, "dismount_fix", 1);
DelayCommand(1.0, SetHiddenWhenEquipped(oCloak, FALSE));
DelayCommand(1.1, DeleteLocalInt(oCloak, "dismount_fix"));
}
}

void ApplyMount(object oPC, int nHorse = 0)
Expand Down

0 comments on commit 2101e6f

Please sign in to comment.