ephphatha
1d560601f2
Remove duplicated argument to InvGetItem
...
This was obscuring efforts to track how ActiveItems and Items are referenced, hopefully can switch back to the Item& soon.
2021-11-23 19:08:41 +01:00
Anders Jenbo
da05319909
Correct OnNewLevel validation
2021-11-19 16:15:34 +01:00
ephphatha
87651aa2f5
Check the item at the target position before searching all items
2021-11-14 18:32:29 +01:00
Andrew James
8104432db4
Use object reference (and self-id lookup) for BreakBarrel
2021-11-08 00:51:16 +01:00
Andrew James
796e2813cf
Use scoped enums for DungeonFlags/BFLAG ( #3135 )
2021-11-07 03:11:16 +01:00
Gleb Mazovetskiy
3d308983a8
Migrate to libmpq
...
libmpq is a much simpler alternative to StormLib for reading MPQ archives.
We use our own fork of libmpq: https://github.com/diasurgical/libmpq
Impact:
* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
2021-11-06 23:51:42 +00:00
qndel
b00feb4c3d
sync monster mWhoHit and hitpoints
2021-11-06 19:03:05 +01:00
Andrew James
021c7a652f
Add helpers for checking object type ( #3357 )
...
* Add helper to test if an object is a trap source
* Add helper to test if an object is a barrel
* Add helper to test if an object is a crucifix
* Add helpers to check if an object is a chest (and statuses)
* Add helpers to check if an object is a (basic) shrine
2021-11-06 18:32:52 +01:00
Andrew James
7dcc6d15f7
Update some quest object activation functions to use references ( #3356 )
...
- rename with a hopefully more descriptive name
2021-11-01 15:48:54 +01:00
Anders Jenbo
96e1d5caba
Fix spell properties incorrectly being capped at 8
...
Fixes #3187
Revert #3021
destParam3 had been typed ad Direction, but is also sometimes used for
other values.
2021-10-25 20:52:56 +02:00
qndel
d81de165d4
code cleanup ( #3235 )
2021-10-24 16:05:44 +02:00
Anders Jenbo
b4f699f0a3
Validate item network messages
2021-10-12 04:56:30 +02:00
Anders Jenbo
a56452eec3
Validate player sync
2021-10-12 04:56:30 +02:00
Andrew James
e0aafcaf7d
Use correct pointer arithmetic in OnLevelData ( #3094 )
...
Previously was incrementing the pointer 5 places due to the way pointers to complete objects are handled.
see https://en.cppreference.com/w/cpp/language/operator_arithmetic#Additive_operators
2021-10-11 11:02:45 +02:00
KPhoenix
2c8d29b10d
Update msg.cpp
...
Fixes problem where you cannot cast spell on other players in the dungeon
2021-10-11 05:53:38 +02:00
Anders Jenbo
1024973093
Fix equipping weapon not updating current spell
...
Fixes #3074
2021-10-10 05:56:26 +02:00
Anders Jenbo
31ba8e2bc6
Validate additional network messages
2021-10-06 21:47:03 +02:00
obligaron
6b8b6ba77b
Fix OnSpellTile check ( #3021 )
2021-10-06 08:35:59 +02:00
Anders Jenbo
5b3ac35fad
Validate 2 more network messages
2021-10-05 10:46:03 +02:00
Anders Jenbo
403f507d79
Validate spell network messages
2021-10-04 19:22:34 +02:00
Anders Jenbo
614fba6af6
Cleanup package slicing
2021-10-04 19:22:34 +02:00
Anders Jenbo
2443a188a9
Validate param1 messages
2021-10-03 19:58:44 +02:00
Anders Jenbo
ab1046072b
Clean up NetSendCmdString
2021-10-03 19:58:44 +02:00
Anders Jenbo
58257c7cdc
Remove unessesery null checks in multi_msg_add
2021-10-03 10:12:14 +02:00
Anders Jenbo
d227ff33da
Validat input to a few simple network messages
2021-10-02 20:30:16 +02:00
Anders Jenbo
7001ead263
Mark network pointers as const
2021-10-02 20:30:16 +02:00
Anders Jenbo
2708b16c05
Validate CMD_SYNCDATA ( #2968 )
2021-09-30 15:38:10 +02:00
qndel
873e426952
fix light stealing ( #2992 )
2021-09-30 15:16:41 +02:00
Juliano Leal Goncalves
9ac324b8e1
🐛 Prevent manipulation of spell type being cast ( #2856 )
...
This prevents frame-perfect manipulated of the spell type after the command has already been sent.
2021-09-13 23:45:51 +02:00
ephphatha
b12de6fe12
Use scoped enum for Direction
...
Identified and removed an instance of Direction being used as an argument for a bool parameter
Removed a single-use temporary variable being cast from sprite frame to direction to size_t
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Fix alignment of WalkSettings array
2021-09-12 02:27:47 +02:00
Juliano Leal Goncalves
ce23cd6bce
🚚 Rename 'QuestData' global array to 'QuestsData'
...
This will allow us to disambiguate from the 'QuestDataStruct' after the 'Struct' suffix is removed.
2021-09-06 12:54:40 +02:00
Juliano Leal Goncalves
0d3d4c14f6
🚚 Rename 'Dead' concept to 'Corpse' everywhere ( #2808 )
2021-09-06 12:49:00 +02:00
Juliano Leal Goncalves
0baffa6e33
🚚 Rename 'QuestStruct' to 'Quest'
2021-09-02 05:46:01 +02:00
Juliano Leal Goncalves
bbf529c65a
🚚 Rename 'PlayerStruct' to 'Player'
2021-08-30 06:44:18 +02:00
Anders Jenbo
4044fadeb5
Clean up some players references
2021-08-30 03:26:17 +02:00
BC Ko
4df798808e
2435 refactor global variable Items part 2 ( #2673 )
2021-08-26 08:06:48 +02:00
Anders Jenbo
d7c6d8b189
Use proper Direction type for AddMissile midir
2021-08-25 20:24:45 +02:00
qndel
3d92b6eea5
Rewrite manashield into not using a missile
2021-08-25 19:32:10 +02:00
qndel
d76158ca03
reflect without missile! ( #2659 )
2021-08-22 01:32:41 +02:00
Anders Jenbo
d4bd409472
Deduplicate manashild/reflect code
2021-08-21 09:10:53 +02:00
Anders Jenbo
5ddcd90ff9
Make NetSendCmdQuest() take a quest structure as input
2021-08-20 12:13:17 +02:00
BC Ko
1a6562e16d
Merge pull request #2648 from bcko/2435_refactor_Missiles_3
2021-08-20 09:53:17 +02:00
qndel
7ba878fd4d
fix reflect on loading
2021-08-20 00:55:54 +02:00
BC Ko
14b7e3bdc1
2435 refactor missiles part 2 ( #2635 )
2021-08-19 08:15:41 +02:00
BC Ko
e5434e03b3
2602 Use range-based for-loop for Quests ( #2612 )
2021-08-19 01:42:49 +02:00
qndel
6ce32f8d6a
fix incorrect golem removal
2021-08-19 01:30:11 +02:00
Anders Jenbo
9b2cbbdb38
Clean up checks for open warp gates
2021-08-16 05:27:33 +02:00
qndel
1538f84ddc
apply enum and fix invalid check
2021-08-11 15:21:08 +02:00
qndel
640d32a750
make ReadySpellFromEquipment have correct item data
2021-08-10 22:05:35 +02:00
Juliano Leal Goncalves
f64521a722
🐛 Centralize readied spell update on equipment change
...
This ensures all equipment changes will undergo the check to see if the readied spell needs to change, including auto-equipping items on pickup and with shift click.
2021-08-10 12:26:01 +02:00