|
From: <gi...@cr...> - 2026-01-29 00:00:11
|
via a816a2e739f62e6a3b7e2479f6d6c0da62d96bcc (commit)
from 2e2e0191d489cc40a7b79d7fe5660293fc59f135 (commit)
-----------------------------------------------------------------------
commit a816a2e739f62e6a3b7e2479f6d6c0da62d96bcc
Author: DracoOmega <dra...@gm...>
Date: Wed Jan 28 20:25:00 2026 -0330
Fix fsim not reporting monster attacks
Since it believed they always missed.
(Broken since fff38f6)
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/fight.cc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index c15f92726c..cf3c74a67c 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -411,11 +411,11 @@ static void _do_medusa_stinger()
*
* @param[in] attacker,defender The (non-null) participants in the attack.
* Either may be killed as a result of the attack.
- * @param[out] did_hit If non-null, receives true if the attack hit the
- * defender, and false otherwise.
* @param is_rampage Is this an attack caused by rampaging? Adjusts damage of
* the attack based on movement speed and possibly staggers
* the target. (Only effect for player attackers)
+ * @param[out] did_hit If non-null, receives true if the attack hit the
+ * defender, and false otherwise.
* @param simu Is this a simulated attack? Disables a few problematic
* effects such as blood spatter and distortion teleports.
*
@@ -552,6 +552,9 @@ bool fight_melee(actor *attacker, actor *defender, bool is_rampage,
attk.simu = simu;
attk.launch_attack_set();
+ if (did_hit)
+ *did_hit = attk.did_hit;
+
if (!attacker->alive())
return true;
--
Dungeon Crawl Stone Soup
|