From 9d5a6ac807792f21a609ca4537ccd28066df3bb6 Mon Sep 17 00:00:00 2001 From: sirlemonhead Date: Thu, 19 Sep 2019 19:29:58 +0100 Subject: [PATCH] Fix lava floor and crushing ceilings not damaging the player. Fixes issues #2 and #3 --- source/exhumed/src/runlist.cpp | 4 ++-- source/exhumed/src/runlist.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/exhumed/src/runlist.cpp b/source/exhumed/src/runlist.cpp index 2e4f57461..dc13ddaed 100644 --- a/source/exhumed/src/runlist.cpp +++ b/source/exhumed/src/runlist.cpp @@ -1709,7 +1709,7 @@ void runlist_RadialDamageEnemy(short nSprite, short nDamage, short nRadius) } } -void runlist_DamageEnemy(short nSprite, short nSprite2, short nDamage) +void runlist_DamageEnemy(int nSprite, int nSprite2, short nDamage) { if (sprite[nSprite].statnum >= kMaxStatus) { return; @@ -1721,7 +1721,7 @@ void runlist_DamageEnemy(short nSprite, short nSprite2, short nDamage) return; } - runlist_SendMessageToRunRec(nRun, nSprite2 | 0x80000, nDamage * 4); + runlist_SendMessageToRunRec(nRun, (nSprite2 & 0xFFFF) | 0x80000, nDamage * 4); if (nCreaturesLeft <= 0) { return; diff --git a/source/exhumed/src/runlist.h b/source/exhumed/src/runlist.h index 94ae7e0c9..01fd36d60 100644 --- a/source/exhumed/src/runlist.h +++ b/source/exhumed/src/runlist.h @@ -55,7 +55,7 @@ void runlist_SubRunRec(int RunPtr); void runlist_ProcessWallTag(int nWall, short lotag, short hitag); int runlist_CheckRadialDamage(short nSprite); void runlist_RadialDamageEnemy(short nSprite, short nDamage, short nRadius); -void runlist_DamageEnemy(short nSprite, short nSprite2, short nDamage); +void runlist_DamageEnemy(int nSprite, int nSprite2, short nDamage); void runlist_SignalRun(int NxtPtr, int edx); void runlist_CleanRunRecs();