Commit graph

6,225 commits

Author SHA1 Message Date
qndel
9ba64ad08b
TRN rewrite + bugfix (#4056)
* working new TRN system
* apply TRNs to all unique missiles
2022-02-20 14:28:51 +01:00
obligaron
1f7b0607a6 public game browsing: show difficulty, speed, players and possible incompatibility 2022-02-20 12:18:31 +01:00
Gleb Mazovetskiy
48ff656dc0 Load monster graphics into a single buffer
Follow-up to a5e1fa5bbe, which loaded
the missiles into a single buffer.
2022-02-17 22:02:41 +00:00
obligaron
05dd2f9f90 Fix flash infinite casting: Add check for _pInvincible to RepeatMouseAction 2022-02-17 19:56:29 +01:00
DakkJaniels
0790416781
Unique Monster Variable Rename (#4060)
* fix variable name to reflect what it is modifying (unique monster custom to hit, not custom hit points)
* align UniqueMonstersData table
2022-02-14 13:38:31 +01:00
qndel
b7b01ce1fd remove InitLightMax 2022-02-11 02:34:47 +01:00
galaxyhaxz
13175df53d Add vanilla trap bugfix 2022-02-09 22:52:44 +01:00
obligaron
90fbf1c535 Remove old dungeon reroll bugfix 2022-02-08 21:45:43 +01:00
obligaron
9fff4a1b53 Fix keymapper translations 2022-02-08 20:14:50 +01:00
ephphatha
9a2002e200 Get rid of RemoveEmptyLevelItems
This was a cleanup function to handle converting saves between Hellfire <-> Diablo, mainly when a hellfire specific item was dropped and should be removed from a Diablo game. This had an off by one with the way it iterated backwards over the active items list which meant it always called DeleteItem at least once (since it uses an invalid item past the end of the active items range). DeleteItem then always decremented the ActiveItems count. When saving the game after converting the items we then end up with a dropped items array containing an index to an item that is no longer considered active.

However the code in LoadDroppedItems already checks that the conversion was successful before considering it active, so this function doesn't need to be called. Instead we can just save if we converted game mode.
2022-02-08 12:10:42 +01:00
KPhoenix
32d39c6524
Fix Stat Adjustment (#3898)
This fixes a problem related to shrines. When a player with a base Magic or Vitality stat of 0 has their respective stat reduced below 0, they lose Mana/Life, and their stat is corrected to 0 without refunding them the lost Mana/Life. This will prevent stats from being modified to a value less than 0 in the first place.
2022-02-07 10:14:54 +01:00
Gleb Mazovetskiy
bd5647fb06 Fix premium items reroll on level change
Bug introduced a few commits ago in 1519e995cf

Fixes #4036
2022-02-06 18:45:07 +01:00
obligaron
4073fdd531 Fix dungeon reroll - Initialize special Room coordinates 2022-02-06 12:42:14 +01:00
obligaron
2d6c602ef5 Show public games only on zero tier 2022-02-05 22:33:58 +01:00
obligaron
79b926c375 Move more options to OptionEntryBase 2022-02-05 20:51:54 +01:00
staphen
30a9595020 Fix Hork Demon and Nakrul drops in multiplayer 2022-02-04 18:44:26 +01:00
staphen
8d5b709749 Restore default Windows audio driver (WASAPI) 2022-02-03 06:40:59 +01:00
Anders Jenbo
d11eeaa9ec
Log uninplemented plural expressions (#4017) 2022-02-01 08:30:08 +01:00
Gleb Mazovetskiy
a5e1fa5bbe Load missile frames into a single buffer
Previously, the memory for each frame was allocated separately.

Changes it to allocate a single buffer for all the frames.

This has the following advantages:

1. Less bookkeeping overhead in the allocator.
2. Less alignment overhead (allocator results are max-aligned by default).

We can follow this up with a similar treatment for other multi-file
animations.
2022-02-01 04:04:59 +00:00
Gleb Mazovetskiy
1519e995cf Move store graphics out of stores.cpp
These graphics are used in various places outside of `stores.cpp`.
2022-01-30 14:56:04 +01:00
Gleb Mazovetskiy
6bcac742ed CMake: Link gperftools directly to the binary
Not sure why this is necessary but it fixes the gperf build
2022-01-30 14:56:04 +01:00
Gleb Mazovetskiy
7c07e9a3e1 loadsave.cpp: Fix -Wsign-compare and -Wnarrowing 2022-01-30 14:56:04 +01:00
obligaron
c6abd7401b Preview Frame: Disable for towncast 2022-01-28 21:42:31 +01:00
qndel
9536927301
Display hp/mana values on life/mana orbs (#4006) 2022-01-27 12:19:32 +01:00
Anders Jenbo
a19d3ad6a2 Fix typo of availableMissiles 2022-01-27 05:08:32 +01:00
qndel
73a5f4861e changemp/hp commands 2022-01-25 20:49:13 +01:00
qndel
c2b2d0c0e6 use RestoreFullHP/Mana functions 2022-01-25 20:13:50 +01:00
ephphatha
eeb9ac3303 Sync dropped items if another player triggers an action on the current level 2022-01-24 21:12:13 +01:00
ephphatha
68b3252d24 Call dropitem when spawning a quest reward in a network game
This allows the item to appear in the delta sync when a new player joins the game, but does not cause the item to drop for other players on the same level at the time the action occurs due to differences in the way this message is handled.
2022-01-24 21:12:13 +01:00
ephphatha
db1d776539 Deduplicate PItem and DItem 2022-01-24 21:12:13 +01:00
ephphatha
000a04ad4d Cleanups from https://github.com/diasurgical/devilutionX/pull/3980 2022-01-23 05:25:48 +01:00
staphen
3546b41be0 Introduce NOEXIT build option to disable Quit Game options in menus 2022-01-23 05:25:48 +01:00
staphen
df830f6495 Save settings before leaving the settings menu 2022-01-23 05:25:48 +01:00
ephphatha
32d397eb2a Add max_size checks when adding missiles to allow for limited size containers
This doesn't handle failed allocations (e.g. if the platform runs out of memory) but makes it easier to use a fixed size container on limited memory devices.
2022-01-23 05:02:57 +01:00
ephphatha
d3c42544a6 Address warnings/dead code 2022-01-23 05:02:57 +01:00
staphen
ca93d852d2 Fix comparison checking for invalid quest state in DeltaSyncJunk 2022-01-22 23:35:50 +01:00
staphen
dcb376d284 Fix blinking when position desyncs during E/W movement 2022-01-21 11:38:52 +01:00
obligaron
c68eeb25cc Add additional missiles to save game 2022-01-20 23:12:48 +01:00
obligaron
234a053863 Change Missiles Array to std::list 2022-01-20 23:12:48 +01:00
obligaron
a45eca5d40 Remove unused ChainStruct 2022-01-20 23:12:48 +01:00
obligaron
0ed8c941de Replace FindParent and use of var4 to identify parent with pParent member in AddMissileParameter 2022-01-20 23:12:48 +01:00
obligaron
1aabcf295b Add AddMissileParameter 2022-01-20 23:12:48 +01:00
obligaron
ed5a3b3dcb Remove SyncPositionWithParent 2022-01-20 23:12:48 +01:00
KPhoenix
707d8a1379 Mana Shield 1.07 bugfix revision
This is a bugfix for the vanilla 1.06 and earlier Mana Shield logic. In 1.07 Blizzard North "fixed" the Mana Shield logic since the damage reduction would decrease in effectiveness with increased spell level instead of increase. As a fix, they set the damage reduction to a flat value regardless of spell level. Originally, damage reduction started at 1/3 and capped at 1/21 at spell level 7. This fix reverses the order and gives 1/21 damage reduction at spell level 1, and caps at 1/3 damage reduction at spell level 7.
2022-01-20 11:37:54 +01:00
staphen
eea5a94ab3 Don't sync position on dead monsters 2022-01-19 09:40:01 +01:00
ephphatha
3bc2eb8471 Use ObjectAtPosition when highlighting from gamepad movement 2022-01-19 03:05:27 +01:00
ephphatha
5c4f6d80e8 Use Point/range iterator in FindItemOrObject
This addresses a todo comment, though not in the way that was originally intended as we no longer use Direction::Omni
2022-01-19 03:05:27 +01:00
ephphatha
fb21ffb635 Define a column major iterator for code requiring that iteration order.
GCC and specifically GCC6 really don't like inheriting common code, requires redefining almost everything.
2022-01-19 03:05:27 +01:00
ephphatha
8a0f81ec12 Pass regionId to TFit_Obj3 to extract reference to themes global 2022-01-19 03:05:27 +01:00
ephphatha
3e991fc9a8 Use Point/range iterator in CheckThemeObj3
This does introduce a slight behaviour difference for some callers. It was possible to read out of bounds due to the bounds check only guarding against negative indexes (e.g. Theme_Library uses 1, MAXDUN - 1 as the bounds, but Theme_ArmorStand includes boundary tiles so could read off the right/bottom edge). Given the way vanilla levels are generated with a border this has no impact in practice.
2022-01-19 03:05:27 +01:00