Commit Graph
941 Commits
Author SHA1 Message Date
ephphatha 8ed451b051 Move AddPlrExperience to class member function of Player 2023-08-24 05:46:44 +02:00
ephphatha e6890cc5cc Move MaxCharacterLevel to playerdat and add helpers for the various uses 2023-08-24 05:46:44 +02:00
ephphatha 14639cd096 Replace _pNextExper with getter method
No real need to persist this value
2023-08-24 05:46:44 +02:00
ephphatha da76e131e4 Add getter/setter for character levels to ensure _pNextExper stays synced 2023-08-24 05:46:44 +02:00
ephphatha d92d152576 Use unsigned type for character levels 2023-08-24 05:46:44 +02:00
ephphatha 486f5ca3e8 Replace ExpLvlsTbl global with helper function 2023-08-24 05:46:44 +02:00
Gleb Mazovetskiy 8c1a847f41 Remove utils/stdcompat/string_view.hpp 2023-08-14 09:59:14 +01:00
Gleb Mazovetskiy c19bfe87fa Remove utils/stdcompat/algorithm.hpp 2023-08-14 01:54:29 +01:00
Gleb Mazovetskiy 62d067b653 Remove utils/stdcompat/abs.hpp 2023-08-14 01:54:29 +01:00
Eric Robinson 7f2010f77b Level Up Sound (#6275) 2023-08-12 18:13:01 +02:00
ephphatha 4e3f46603a Remove unused attribute _pMaxLvl 2023-08-12 17:43:30 +02:00
Gleb Mazovetskiy 65fc1008c6 player.cpp: Avoid redundant copies of PlayerData
Follow-up to #6288
2023-07-10 10:25:56 +09:00
Eric Robinson a2af3b5942 Refactor CreatePlayer() (#6288) 2023-07-10 02:28:02 +02:00
Anders Jenbo 63277a842d Clean up player packing 2023-06-24 04:18:14 +02:00
qndel ddd0f1b051 dont always force staff recharge to change spell 2023-05-28 16:09:01 +02:00
obligaron e94deb7438 Sync Defiler Quest 2023-05-28 01:51:56 +02:00
qndel df8362a1cd fix walking animation getting stuck 2023-05-19 22:06:21 +02:00
qndel c362808165 debug path command (#6101) 2023-05-13 10:20:15 +01:00
ephphatha 03e35988f1 Dedupe OnRespawnItem/OnSpawnItem
Both methods were exactly the same apart from the use of temporaries for swapped message params.
2023-05-07 13:33:40 +02:00
Anders Jenbo b7424a0068 Clean up PmChangeLightOff() 2023-04-30 01:03:34 +02:00
Anders Jenbo 5a12f7b0d5 Always spawn players in a valid location 2023-04-29 15:34:41 -04:00
Anders JenboandStephen C. Wills 4c51e15f26 Update Source/player.cpp
Co-authored-by: Stephen C. Wills <[email protected]>
2023-04-26 03:14:34 +02:00
Anders Jenbo 45c0b780b9 Move back to an exhaustive clearing of players from the current level 2023-04-26 03:14:34 +02:00
obligaron 7985a9211d Change Player::_pSplLvl to uint8_t 2023-04-24 18:19:27 +02:00
Anders Jenbo e969a8ad01 Invert player to vision relation 2023-04-21 21:25:19 +02:00
Anders Jenbo 13c5c09990 Clean up Light related naming
A few are left unchanged as they will be removed in a later commit
2023-04-21 21:25:19 +02:00
DakkJaniels 24bb409086 Remove extra entry in experience level table and cap experience at level 50 requirement (#5782) 2023-04-18 03:10:14 +02:00
obligaron 1a3e72bf17 Unify normal casting and casting from inventory 2023-04-17 03:22:50 +02:00
obligaron e1cdec438e When player position desyncs ensure position.old is also updated 2023-04-17 01:35:34 +02:00
obligaron 9697c82487 Ensure PM_DEATH is reset when restarting in town for remote players 2023-04-14 23:40:08 +02:00
obligaron f6aae56a28 Refactor StartPlayerKill 2023-04-14 23:34:54 +02:00
obligaron 40bb3aeb45 Replace earflag with DeathReason 2023-04-14 23:34:54 +02:00
qndel ce2ce86070 inspect players command 2023-04-14 02:40:17 +02:00
Łukasz 2ec0603896 use Points instead of x, ys in GetRndObjLoc (objects.cpp) and portal-related functions (portal.cpp) (#5897)
Nice cleanup, thanks.
2023-03-18 21:46:00 +01:00
Gleb Mazovetskiy 957bd03b98 Remove FMT_COMPILE in "cold" places
Removes most `FMT_COMPILE` calls.
`FMT_COMPILE` results in better performance but larger code size.

Removes `FMT_COMPILE` calls for places that are called infrequently,
i.e. not on every frame.

RG-99 binary size reduced by ~4 KiB.
2023-03-12 19:29:35 +01:00
Eric Robinson f75f66d54b Add playerdat (#5763) 2023-02-10 12:56:28 +00:00
Gleb Mazovetskiy ebcd6b222d Optimize SpellData size: 40 bytes -> 24 2023-02-10 10:51:06 +00:00
Gleb Mazovetskiy b61dac853b Add GetSpellData(SpellID) 2023-02-05 12:12:48 +00:00
KPhoenix d813f13700 enum spell_id -> enum class SpellID 2023-02-05 10:24:58 +00:00
Gleb Mazovetskiy 1788d2f8ec Remove miniwin
Event handling code moved to `engine/events.{hpp,cpp}`.
2023-02-01 16:06:57 +00:00
ikonomov d05992da75 Remove "Zen" hit recovery (#5724)
The description of Harmony says "Fastest", clearly implying that this is the fastest recovery bonus that is attainable for a given character and also an indication that the bonus is not cumulative with other items.
2023-01-30 19:15:47 +01:00
Eric Robinson 93a145608e Optimize AddPlrExperience() (#5737) 2023-01-30 19:14:37 +01:00
Eric Robinson ef3a57b7d9 enum spell_type -> enum class SpellType (#5674) 2023-01-28 22:25:37 +01:00
staphen c857b7c7e4 Update frame skip logic for attacks after movement to match vanilla behavior 2023-01-27 23:57:03 +01:00
c99f7cf644 Floating numbers (#5639)
Co-authored-by: qndel <[email protected]>
Co-authored-by: Stephen C. Wills <[email protected]>
2023-01-22 07:20:10 +01:00
Gleb Mazovetskiy b48d4b2900 Remove uses of blank.wav
blank.wav is a 22 KiB 1-second silence that is not needed with
our sound engine.
2023-01-21 14:09:02 +00:00
KPhoenix 8db521727d enum missile_id -> enum class MissileID
Changes `enum missile_id` to `enum class MissileID`
2023-01-18 17:17:25 +00:00
KPhoenix f52b2cb71f Enum Class: MagicType
Changes enum magic_type to enum class MagicType
2023-01-17 03:56:10 +01:00
Anders Jenbo a29fc3a074 Correct casing for Player::isWalking() 2023-01-12 09:42:49 +01:00
obligaron d2d96f988c Make TalktoMonster multiplayer compatible 2022-11-22 15:29:04 +01:00