Commit Graph
471 Commits
Author SHA1 Message Date
staphen 116fc6fa40 Add logic to handle ears in DeltaAddItem() and DeltaGetItem() 2022-09-08 06:11:36 +02:00
staphen bfa3ccd90c Clean up code to prep items for the network 2022-09-08 06:11:36 +02:00
staphen 147a13d66c Synchronize gold in player's inventories 2022-09-08 06:11:36 +02:00
staphen 36985295e9 Clean up calls to RecreateItem() in msg.cpp 2022-09-08 06:11:36 +02:00
staphen e28a8065e9 Sync more item data with TCmdChItem 2022-09-08 06:11:36 +02:00
staphen 73028ec04a Define network struct for ears 2022-09-08 06:11:36 +02:00
obligaron 5b6beac375 Introduce Player::getAnimationFramesAndTicksPerFrame 2022-09-04 17:58:18 +02:00
Anders Jenbo f8dca40427 Merge branch 'master' of https://github.com/diasurgical/devilution 2022-08-27 02:41:28 +02:00
obligaron b3aa08589b Don't use MyPlayer in UnPackItem and dependend methods 2022-08-26 18:18:40 +02:00
Anders Jenbo 872456ae5d Use size_t for a select few pnum variables 2022-08-26 13:22:04 +09:00
Gleb Mazovetskiy 188dc79f6e Make Players a vector 2022-08-26 13:22:04 +09:00
staphen 8503efc1db Remove pragma pack from DLevel struct 2022-08-21 05:45:31 +02:00
staphen 40546c9f9d Avoid DLevel copy constructor in GetDeltaLevel() 2022-08-21 00:49:58 +02:00
Stephen C. Wills a06dd25d17 Synchronize player inventories (#5217)
* Synchronize item placement in player's backpack

* Synchronize item remove from player's backpack

* Synchronize item placement and removal from player's belt

* Set up loopback network provider for failing tests
2022-08-20 16:30:40 +00:00
ephphatha 81fa45d9d8 Update multiplayer delta when parsing close door command 2022-08-07 02:46:24 +02:00
ephphatha b4839dadcc Dedupe operate object network commands 2022-08-07 02:46:24 +02:00
Vladimir Olteanu 9a55b13340 Avoid defensive warning in DeltaImportObjects (#5181)
GCC emits -Wsequence-point even with c++20 as the language level, apparently just in case the code gets compiled under an older standard.
2022-08-03 21:57:11 +10:00
staphen 748bb1f84d Split delta trap operation from realtime trap operation 2022-08-03 07:39:25 +02:00
Vladimir Olteanu 74232f13bf Get rid of dthread 2022-08-03 02:18:54 +02:00
2121d8dc67 Use position for object delta messages
Co-authored-by: Stephen C. Wills <[email protected]>
Co-authored-by: Anders Jenbo <[email protected]>
2022-08-02 16:35:40 +02:00
obligaron 6804221199 Store scroll/rune location in SpellCastInfo.spellFrom and remove the scroll/rune only after the spell is casted 2022-08-02 03:05:46 +02:00
obligaron 1cfd1ca99d Fix double casting bug - use separated info for casted and queued spells 2022-08-02 03:05:46 +02:00
Anders Jenbo b9aa2959a6 Split deleta sync from operate door 2022-08-01 12:09:26 +02:00
Anders Jenbo e83c55d444 Clean up object references 2022-07-31 06:19:20 +02:00
Stephen C. Wills e364b7488c HitMonster() cleanup (#5147) 2022-07-30 14:39:24 +02:00
ephphatha 0ce76a3f13 Add Object lookup method to mimic map::at() 2022-07-28 12:47:13 +02:00
Cesar Canassa 75756c518f ♻️ Send the monster reference to the monster AI functions (#5113) 2022-07-25 06:59:56 +02:00
ephphatha 4a8f375011 Use position for operate object network commands
Only one remaining use of Object::getId for caching the target of a command requiring the player to path to an object.
2022-07-22 17:46:53 +02:00
Cesar Canassa a0cd65e082 ♻️ Remove monsterId from M_SyncStartKill 2022-07-21 17:37:18 +02:00
ephphatha 6097a8a90a Deduplicate operate object command handlers 2022-07-19 16:22:52 +02:00
ephphatha de83d9440e Use position for break object network messages 2022-07-19 16:22:52 +02:00
ephphatha 4d730b5e5d Take object reference in DeltaSyncObject
Delta object records are only laid out in the same order as object instances by convention, document this relationship and use the explicit offset instead of "network id"
2022-07-19 16:22:52 +02:00
ephphatha 0c08980c71 Combine Telekinesis with other object network commands 2022-07-19 12:50:00 +02:00
ephphathaandAnders Jenbo 3a7fd8da2d Only send and consume object location for location based messages
Co-authored-by: Anders Jenbo <[email protected]>
2022-07-19 12:50:00 +02:00
Anders Jenbo 56915974d6 Minimize passing of player indexes 2022-07-18 11:15:50 +02:00
qndel 25dc9a61ff fix wrong condition in OnSetStrength 2022-07-18 11:13:17 +02:00
Anders Jenbo d1189388f5 Use user by reference 2022-07-17 18:41:05 +02:00
Anders Jenbo 9cae6dad7d Clean up most usages of DWORD 2022-07-14 23:50:12 +02:00
Cesar Canassa f0d1d58499 ♻️ Remove monsterId from delta_kill_monster 2022-07-13 14:48:31 +02:00
ephphatha 1337ff6ea2 Add check if a monster potentially has leashed minions 2022-07-13 07:13:34 +02:00
ephphatha b60bdf8b9b Unset leader of minions when the leader dies 2022-07-13 07:13:34 +02:00
Gleb Mazovetskiy 33ac2cca8e ♻️ Make Monster counters size_t 2022-07-12 03:04:53 +01:00
Anders Jenbo 2d21fc372e Remove more miniwin code 2022-07-10 21:13:39 +02:00
Anders Jenbo 6a8fd04067 Use player by references (#4938) 2022-07-10 11:40:04 +02:00
Gleb Mazovetskiy 197e1180b2 Add StrCat and StrAppend
Adds simple string / integer concatenation functions.

Many of the uses of `fmt::format` are simply concatenation
of a few strings and integers.

`StrCat` is an easier-to-read alternative to such uses of `fmt`.
2022-07-10 06:14:58 +02:00
Anders Jenbo ce4595b440 Split Crypt from Cathedral 2022-07-09 11:07:47 +02:00
staphen 4a3a8f5a57 Validate spell IDs that are sent over the network 2022-07-09 04:04:22 +02:00
Mikołaj Piróg 15989609a8 Members' name changes and comments in Monster struct (#4861) 2022-07-06 10:21:22 +02:00
Cesar Canassa 0d106beaf3 ♻️ Refactor M_StartHit to receive a Monster reference 2022-07-05 17:37:53 +02:00
Mikołaj Piróg dda0b96ea5 Remove #defines in player.h and add constexpr where applicable (#4896)
* Change defines to constexpr int in player.h

* Add const or constexpr to player.h/cpp where applicable

* Update tests with changed names of player constatns

* remove unecessary variable
2022-07-05 17:25:23 +02:00