3508 Commits

Author SHA1 Message Date
staphen
14a9620921 lighting: add BUGFIX for MakeLightTable
The i/j/k/l variables obfuscate the fact that the distance
formula used for generating data in lightblock is using the x
offset with the y component of the tile coordinate and vice-versa.

Mixing x and y this way causes light to move horizontally within
a tile when the light source is moving vertically and vice-versa.
2025-03-14 01:23:24 +01:00
staphen
e30328b316 missiles: add BUGFIX for flame wave light radius 2025-03-14 00:00:47 +01:00
Robin Eklind
6b7135cec3 objects: add BUGFIX for OperateBook
myplr and pnum are used without consistency, thus making a
sanity check for the spell level of the Guardian spell void.

If another connected peer interacts with the Ancient Tome
(then pnum!=myplr), and they have Guardian spell level < 15,
while the local player has Guardian spell level = 15; then
the sanity check is skipped, and the local player gets
Guardian spell level 16
2024-12-01 23:16:30 +01:00
Robin Eklind
4fad6709b4 player: add BUGFIX for CreatePlayer
The _pBaseToBlk field of the player struct is never set
if creating a New Game using an existing save (since CreatePlayer
is never invoked in this case).
2024-11-29 22:33:59 +01:00
staphen
bbda8dd586 Remove global optimizations for SHA1ProcessMessageBlock() 2024-04-17 13:17:03 +02:00
Eric Robinson
27e6ef5f4c Add Diablo Version 1.08-Specific Behavior with Preprocessor Directives (#2292)
* add preprocessor directive for version 1.08

* Update MakefileVC

* Missed "endif"

* revise handling of diablo version
2024-03-06 05:27:53 +01:00
qndel
2aa3919214 fix typos (#2291) 2024-01-02 21:24:34 +01:00
NiteKat
a982e4c7b0 monster: add BUGFIX for mVar2 (#2290) 2023-07-21 17:31:27 +02:00
Robin Eklind
3c92fec81b multi: add BUGFIX for multi_mon_seeds 2023-02-12 22:29:05 +01:00
Robin Eklind
2901b22fd3 msg: add BUGFIX for DeltaLoadLevel
The incorrect monster array index is used.
The active monster index should be used, which
may fall outside of range [0, nummonsters).
2023-02-11 18:12:02 +01:00
Robin
21e36336dc diablo: add BUGFIX for LoadGameLevel (#2287)
An incorrect placement of unique monsters was used in set levels
when entering through Town Portal from Tristram (or entering from
a dungeon level with different dungeon type).

To reproduce, use a Town Portal to enter any set level containing unique
monsters (e.g. Skeleton King's Lair or Archbishop Lazarus' Lair).

As LoadGameLevel invokes InitMonsters without first invoking
FillSolidBlockTbls for set levels, the nSolidTable will contain
garbage data (the collision mapping for mini tiles of the _previous_
dungeon type, NOT the current dungeon type).
2023-02-02 18:39:15 +01:00
staphen
50c9b533cf monster: add BUGFIX for ClrAllMonsters 2023-01-02 00:41:26 +01:00
Robin Eklind
03f2aee78e inv: add BUGFIX for CheckInvCut
For consistency, use (mx, my) parameters in call to SetCursorPos.
As all callers of CheckInvCut pass (MouseX, MouseY) as arguments,
this BUGFIX is only for consistency, there is no functional
change.
2022-10-21 01:23:19 +02:00
Robin Eklind
cc05492f14 missiles: add BUGFIX for MI_Element and MI_Bonespirit
The Elemental and Bone Spirit spells tries to locate the
closest monster at each logic tick, to update the
direction of the spell. This is done using the FindClosest
function, which returns the monster array index of the
closest monster; or -1 if no monster is located.

The callee of FindClosest checks if `mid > 0`, and as such
does not handle the monster array index 0 case. Since this
case is known to be the Golem of player 1, perhaps this is
intentional. If so, the FindClosest function should instead
be updated to find the closest monster that is NOT a Golem;
as the current code will simply fail to find other monsters
if there is a Golem of player 1 closer. It will also handle
Golems of other players differently than player 1
(regardless of PvP settings).
2022-10-16 04:00:36 +02:00
Robin Eklind
a103525ea6 items: add BUGFIX for RndItem, invalid logic for Scroll of Resurrect
Scroll of Resurrect occurs twice in the item data list, firstly at
IDI_RESURRECT with IDROP_NEVER, and secondly a regular item with
IDROP_REGULAR.

Since the ri-- logic only checks for spell ID, ri will be decremented
also for IDROP_NEVER; thus unintentionally removing the previously added
valid item ID in Single Player (which is this case is always gold).

Therefore, the chance for gold drop is higher in Multi Player than
Single Player.
2022-10-15 01:12:56 +02:00
Robin Eklind
c20001a817 objects: add BUGFIX for InitObjects
Don't load objects from Blind2.DUN, as Blind2.DUN is missing
an objects layer. This may results in an out-of-bounds read.
2022-10-04 21:31:05 +02:00
Anders Jenbo
126f674388 Update README.md 2022-08-26 18:23:29 +02:00
Anders Jenbo
fdaabc40c2 Update LICENSE (#2279) 2022-08-26 17:27:29 +02:00
Robin Eklind
aa2ab57539 items: add BUGFIX for SpawnItem, uninitialized use of onlygood 2022-08-06 00:57:25 +02:00
Anders Jenbo
e60d490bc9 Document bug in DRLG_WillThemeRoomFit (#2277) 2022-08-04 22:49:01 +02:00
Anders Jenbo
f06427a1eb drlg_l1 bugfix notes (#2276) 2022-08-04 22:47:51 +02:00
Robin
b86b8fd7c4 msg: add BUGFIX for delta_kill_monster (#2261)
The monster direction is synced even if the receiving player is not
on the same dungeon level as the player killing the monster.

Note, this happens, even if one player is in town, and the other
kills a monster at e.g. dlvl=1. Then the code will check the
monster at index mi even for the player in town, so it will just
read garbage data from memory.
2022-05-14 02:40:18 +02:00
qndel
ab9b61626f add hellfire rune dmg calc (#2270) 2022-05-14 02:39:40 +02:00
Robin Eklind
bc0488382a missiles: add BUGFIX for SetMissAnim
A buffer overflow is triggered when casting Identify (or any other
spell which has mFileNum set to 255).
2022-05-09 02:43:55 +02:00
Robin
f074a33cc1 objects: add BUGFIX for AddShrine (#2272) 2022-03-23 21:51:47 -05:00
DakkJaniels
a44cb36af6 Fix mlSFX miSFX labeling
swapped labels to match structure definition
2022-02-21 01:46:23 +01:00
Robin
a401471daf diablo: add BUGFIX for PressChar; out-of-bounds access to dungeon (#2266)
* diablo: add BUGFIX for PressChar; out-of-bounds access to dungeon

* diablo: update BUGFIX comment of PressChar, should be dPiece not dungeon

Pointed out by @galaxyhaxz in https://github.com/diasurgical/devilution/pull/2266#discussion_r786302976
2022-01-17 18:38:37 -06:00
Anders Jenbo
3fd926d544 BUGFIX: check for dObject OOB 2021-11-26 17:16:37 +01:00
qndel
3df3a81f50 golem addmonster bugfix 2021-11-26 17:16:13 +01:00
Robin Eklind
0db71a1975 monster: add BUGFIX for MAI_Fallen, invalid out-of-bounds check
The out-of-bounds check in MAI_Fallen checks whether the relative
offset coordinates (x, y) are out of bounds, rather than the
absoulte coordinate (xpos, ypos) which is used for array access
into dMonster.
2021-11-15 01:48:36 +01:00
qndel
de6154094d fix class sounds 2021-10-25 18:13:42 +02:00
Avinal Kumar
529c0e0ae6 Migrate macOS CI to GitHub Actions
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
2021-10-24 16:32:32 +02:00
qndel
5c6b1693b4 OOB bugfix 2021-10-24 16:28:55 +02:00
Anders Jenbo
5d2dad4456 Remove TravisCI 2021-10-20 21:50:30 +02:00
Anders Jenbo
4c0a4317f0 Document causing of Scavenger leader getting stuck (#2256) 2021-10-16 08:25:15 +02:00
Robin Eklind
721460e375 missiles: add BUGFIX for PutMissile
Prior to this commit, if the player was standing on coodinate with
x=0 or y=0, no missile would be created when casting a spell. This
is due to an off-by-one when doing bounds-checking.
2021-09-01 19:46:47 +02:00
Robin Eklind
3626759011 gendung: update out-of-bounds BUGFIX comment of DRLG_WillThemeRoomFit 2021-09-01 19:43:40 +02:00
Robin Eklind
82133085fc themes: add BUGFIX for Theme_Treasure 2021-09-01 19:42:50 +02:00
Robin Eklind
045cb90dbf items: add BUGFIX for GetItemRecord when handling quest items
When spawing quest items (e.g. blood stone), no unique seed is set
for the item. Therefor two quest items may share the same seed, this
happens deterministically for the Valor quest, since three blood stones
are spawned, each with item seed 0x00000000.

For this reason, if two or more such quest items with identical seed are
looted within less than 6 seconds, the 2nd, 3rd, etc loot actions are
ignored.
2021-09-01 08:05:56 +02:00
Robin Eklind
56fefc89e9 objects: add BUGFIX for holy shrine
If the random number generator ends up giving X-Y coordinate pairs
that always are on bad tiles (e.g. solid, with object or with monster)
then after a total of MAXDUNX * MAXDUNY tries, it will still cast
phasing to teleport to the bad tile.
2021-08-26 01:55:17 +02:00
Robin Eklind
0c50c87cf5 items: add BUGFIX, item get records not reset when resetting items
The item get record array tracks items being recently looted in an
effort to prevent the same item from being looted more than once.
Prior to this commit, the item get record array (and corresponding
item get record array length) variables were not cleared when
creating a new game. Therefore, the item get record array of a
previous game could remain in between games and prevent an item
from being looted (if it was looted in a previous), even if it was
never looted in the current game. In practice this almost never
shows up, since each item get record is valid for a total of 6
seconds before being cleared. So, you would either have to save
a game, quickly loot an item, when load the game and try to loot
the same item before 6 seconds pass. OR, you could use the demo
replay functionality to run test cases, and speed up execution to
run e.g. 10'000'000 logic ticks per second. Both would exhibit the
bug and prevent the item from being looted.

ref: diasurgical/devilutionX#2691
2021-08-24 12:56:48 +02:00
qndel
d76d58bcc2 fix wrong cleanup of farmer value (#2250) 2021-08-21 12:10:23 +02:00
qndel
1c9256d5d5 rename SetDead (#2249)
* rename SetDead

* rename in comparer
2021-08-21 03:04:37 -05:00
qndel
7bcea607bc golem bugfix 2021-08-19 01:34:33 +02:00
Robin
da7ea7b593 items: add BUGFIX for PrintItemPower (#2241) 2021-08-04 18:45:40 -05:00
qndel
d68181fd91 _pIEnAc bugfix 2021-08-05 00:01:47 +02:00
Robin Eklind
8f936de2c5 missiles: add BUGFIXes for MI_LArrow, MI_Arrow, MI_Lightctrl and MI_Weapexp
These bugs are related to time of access, where fields of e.g. a
player or monster struct is accessed upon missile impact (instead
of missile launch), and at this point, the monster may be dead, or
the player may have left the game, resulting in accessing garbage
data that may have been overwritten by other data (e.g. new monster
spawn or new player joining).

One way to resolve this issue is to store e.g. the damage in the
missile struct when lanuching the missing. This way, the missile
would have all information required to know its damage on imact
instead of having to rely on outside sources that may no longer
be present.
2021-08-04 20:48:06 +02:00
Robin Eklind
27df8f7aef monsters: add BUGFIXes for ProcessMonsters, PosOkMonst, PosOkMonst2, PosOkMonst3
Incorrect firewall check and time of access bug related to
monster enemy targets.
2021-08-04 16:11:49 +02:00
Robin Eklind
7d536834ce inv: add incorrect enum/off-by-one BUGFIX for UseInvItem 2021-08-04 16:08:10 +02:00
qndel
7263aa5f74 bugfix for loading/saving dLight 2021-08-04 12:03:31 +02:00