From 2a305d6746ad61967a8a00dd60ca6bacab08bdbb Mon Sep 17 00:00:00 2001 From: Eric Robinson Date: Mon, 8 Dec 2025 18:04:45 -0500 Subject: [PATCH 1/2] Update CHANGELOG.md --- docs/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 912eb495e..344e77f75 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Bug Fixes +#### Controls + +- Gamepad: Unable to cast Resurrect on players + #### Graphics / Audio - Music doesn't unmute when focus is lost on level transition with Auto Pause On Focus Lost disabled From f0e6fbf487c7516b8af63914c574b5f3e2052e6e Mon Sep 17 00:00:00 2001 From: Eric Robinson Date: Mon, 8 Dec 2025 18:02:21 -0500 Subject: [PATCH 2/2] Fix Resurrect on Gamepad --- Source/controls/plrctrls.cpp | 8 ++++---- Source/player.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/controls/plrctrls.cpp b/Source/controls/plrctrls.cpp index 7a54aba31..14b1d020f 100644 --- a/Source/controls/plrctrls.cpp +++ b/Source/controls/plrctrls.cpp @@ -385,7 +385,7 @@ void CheckPlayerNearby() const Player &myPlayer = *MyPlayer; const SpellID spl = myPlayer._pRSpell; - if (myPlayer.friendlyMode && spl != SpellID::Resurrect && spl != SpellID::HealOther) + if (myPlayer.friendlyMode && IsNoneOf(spl, SpellID::Resurrect, SpellID::HealOther)) return; for (const Player &player : Players) { @@ -393,12 +393,12 @@ void CheckPlayerNearby() continue; const int mx = player.position.future.x; const int my = player.position.future.y; - if (dPlayer[mx][my] == 0 + if ((dPlayer[mx][my] == 0 && spl != SpellID::Resurrect) || !IsTileLit(player.position.future) || (player.hasNoLife() && spl != SpellID::Resurrect)) continue; - if (myPlayer.UsesRangedWeapon() || HasRangedSpell() || spl == SpellID::HealOther) { + if (myPlayer.UsesRangedWeapon() || HasRangedSpell() || IsAnyOf(spl, SpellID::Resurrect, SpellID::HealOther)) { newDdistance = GetDistanceRanged(player.position.future); } else { newDdistance = GetDistance(player.position.future, distance); @@ -2130,7 +2130,7 @@ void PerformSpellAction() const Player &myPlayer = *MyPlayer; const SpellID spl = myPlayer._pRSpell; - if ((PlayerUnderCursor == nullptr && (spl == SpellID::Resurrect || spl == SpellID::HealOther)) + if ((PlayerUnderCursor == nullptr && IsAnyOf(spl, SpellID::Resurrect, SpellID::HealOther)) || (ObjectUnderCursor == nullptr && spl == SpellID::TrapDisarm)) { myPlayer.Say(HeroSpeech::ICantCastThatHere); return; diff --git a/Source/player.cpp b/Source/player.cpp index b0e9a7222..e292d3f04 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -1117,7 +1117,7 @@ void CheckNewPath(Player &player, bool pmWillBeCalled) case ACTION_RATTACKPLR: case ACTION_SPELLPLR: target = &Players[targetId]; - if (target->hasNoLife()) { + if (target->hasNoLife() && player.queuedSpell.spellId != SpellID::Resurrect) { player.Stop(); return; } @@ -3208,7 +3208,9 @@ void CheckPlrSpell(bool isShiftHeld, SpellID spellID, SpellType spellType) } else if (pcursmonst != -1 && !isShiftHeld) { LastPlayerAction = PlayerActionType::SpellMonsterTarget; NetSendCmdParam4(true, CMD_SPELLID, pcursmonst, static_cast(spellID), static_cast(spellType), spellFrom); - } else if (PlayerUnderCursor != nullptr && !PlayerUnderCursor->hasNoLife() && !isShiftHeld && !myPlayer.friendlyMode) { + } else if (PlayerUnderCursor != nullptr && !isShiftHeld + && (!myPlayer.friendlyMode || IsAnyOf(spellID, SpellID::HealOther, SpellID::Resurrect)) + && (!PlayerUnderCursor->hasNoLife() || spellID == SpellID::Resurrect)) { LastPlayerAction = PlayerActionType::SpellPlayerTarget; NetSendCmdParam4(true, CMD_SPELLPID, PlayerUnderCursor->getId(), static_cast(spellID), static_cast(spellType), spellFrom); } else {