Gleb Mazovetskiy
7fdf19da3a
FixedPoint: Implement comparison with int
2026-10-11 21:55:08 +01:00
Gleb Mazovetskiy and Claude Sonnet 5
92927ca913
Migrate ClassAttributes, player HP/mana, item HP/mana bonuses, and monster HP to Fixed10_6/Fixed26_6
...
Replaces ParseFixed6/parseFixed6/readFixed6/readDecimal's raw-int
plumbing with the new FixedPoint type, then propagates strongly-typed
fixed-point fields through everywhere that consumed them: player
_pHitPoints/_pMana (and their base/max variants), ClassAttributes'
percentage/multiplier fields, Item::_iPLHP/_iPLMana, and
Monster::hitPoints/maxHitPoints. Eliminates manual <<6/>>6 bit-shifting
at nearly every call site in favor of fromInt/fromRaw/whole() and the
new fixed-point arithmetic operators, while preserving raw() only at
genuine serialization/network wire-format boundaries.
Co-Authored-By: Claude Sonnet 5 <[email protected] >
2026-10-11 21:55:08 +01:00
Gleb Mazovetskiy
842b23803f
SDL3: Use endianness swap helpers throughout
2025-10-09 01:28:37 +01:00
Anders Jenbo
1c76897f2c
Apply simple const rules using clang-tidy
2025-08-16 01:21:36 +02:00
staphen
707ceb1485
Fix pointer arithmetic in OnSyncData()
2025-05-15 07:40:52 +01:00
staphen
ecb3e46199
Fix clang-tidy warnings in sync.cpp
2025-05-15 07:24:15 +02:00
staphen
1a2e0eb2e5
Validate length of incoming network messages
2025-05-10 20:01:53 -04:00
staphen
a569d6808e
Unify monster sync packet validation and delta validation
2025-05-10 20:01:53 -04:00
staphen
7831ed6ca1
Isolate monster sync packet validation using Monsters array
2025-05-10 20:01:53 -04:00
obligaron
ef5986f4df
Network: Decouple enemyId from max players
2025-04-23 19:03:01 -04:00
Gleb Mazovetskiy
a49b1f2d58
Extract Is{Any,None}Of out of engine.hpp
...
Untangles some of the dependencies
2025-01-08 09:54:56 +09:00
matheusgomes28
7848ab731e
Splitting CheckInvPaste() into smaller functions ( #6984 )
2024-04-20 11:30:51 +02:00
Gleb Mazovetskiy
25c1c5b372
Fix a few -Wsign-compare warnings
2024-02-04 11:14:14 +00:00
obligaron
ccaf8d1dac
Use uint8_t in msg/multi/sync and fix MSVC warnings ( #6856 )
...
* Fix MSVC warnings in msg.cpp
* Move TBuffer to multi.cpp
* Fix MSVC warnings in multi.cpp
* SNet* change databytes to size_t
* msg/muli/sync: Change playerId to uint8_t
2023-12-16 18:56:06 +01:00
obligaron
81d738e303
Introduce Monster::occupyTile
2023-11-26 17:39:50 +01:00
Gleb Mazovetskiy
74755c8be7
Remove utils/stdcompat/cstddef.hpp
2023-08-14 01:54:29 +01:00
Anders Jenbo
67ea5bcbe6
Sync monster light when position is gotten from the network
2023-06-03 21:07:22 +02:00
Gleb Mazovetskiy
4fa3732526
Add missing <cstdint> includes
...
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
2023-05-10 13:50:12 +01:00
staphen
d18c75bd05
Don't send monster data while warping
2023-03-04 10:23:11 +01:00
Gleb Mazovetskiy
ca69237d59
Big-endian support for multiplayer
...
Not sure if this works but it's a start
2022-12-15 05:59:17 +01:00
obligaron
544be10669
Don't sync monsters while level changing
2022-11-27 18:25:41 +01: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
Andrew James
d9d1385f6c
Take const reference in DirOK ( #4985 )
2022-07-13 12:56:52 +02:00
Gleb Mazovetskiy
33ac2cca8e
♻️ Make Monster counters size_t
2022-07-12 03:04:53 +01:00
Cesar Canassa
4d5aa90d77
♻️ Refactor M_WalkDir
...
- 🔥 Removed DumbWalk
- 🚚 Renames M_WalkDir to Walk
This integrates the DirOK check into M_WalkDir itself, that makes the DumbWalk function useless and most places that were calling DirOK before M_WalkDir can now be simplified.
2022-07-09 19:32:14 +02:00
Mikołaj Piróg
15989609a8
Members' name changes and comments in Monster struct ( #4861 )
2022-07-06 10:21:22 +02:00
ephphatha
2da2ea7b03
Take monster reference in M_ClearSquares
2022-07-03 18:52:12 +02:00
Cesar Canassa
eb2740c7b6
♻️ change M_WalkDir to receive a Monster reference ( #4875 )
2022-07-03 18:49:28 +02:00
Mikołaj Piróg
2e7ff45fbf
Monster global constants cleanup ( #4827 )
...
* Change #defines to constexpr const, add constexpr where applicable, fix typos
2022-07-01 00:43:03 +02:00
Anders Jenbo
ba4ee58c9f
Pass along bools instead of player index
2022-06-28 09:55:10 +02:00
Anders Jenbo
6d56058708
Move level generation to subfolder
2022-06-23 09:21:58 +02:00
obligaron
e151274fdf
Introduce IsValidLevel
2022-06-18 17:05:30 +02:00
obligaron
22a113d3a6
Introduce GetLevelForMultiplayer
2022-06-18 17:05:30 +02:00
staphen
a2fe3a981e
Fix issues with ears due to translation
2022-06-06 07:26:43 +02:00
qndel
354e329644
Players[MyPlayerId] -> MyPlayer
2022-05-31 05:35:52 +02:00
Anders Jenbo
f5872005a4
Avoid resetting monster health and mWhoHit
2022-03-20 09:18:24 +01:00
staphen
eea5a94ab3
Don't sync position on dead monsters
2022-01-19 09:40:01 +01:00
qndel
b00feb4c3d
sync monster mWhoHit and hitpoints
2021-11-06 19:03:05 +01:00
Anders Jenbo
615a9a46cf
Sync monster aggro state
2021-10-26 14:09:32 +02:00
Anders Jenbo
5b3ac35fad
Validate 2 more network messages
2021-10-05 10:46:03 +02:00
Anders Jenbo
2708b16c05
Validate CMD_SYNCDATA ( #2968 )
2021-09-30 15:38:10 +02:00
Juliano Leal Goncalves
fe95e36d90
🎨 Leverage 'IsAnyOf' on monster mode checks
2021-09-01 19:15:08 +02:00
Juliano Leal Goncalves
1cd62bbc64
🚚 Rename 'MonsterMode' members for semantic and consistency
2021-09-01 19:15:08 +02:00
Juliano Leal Goncalves
69a7cb66d4
♻️ Convert 'MON_MODE' enum to 'MonsterMode' enum class
2021-09-01 19:15:08 +02:00
Juliano Leal Goncalves
314ae59828
♻️ Leverage 'IsWalking' function for monster walking checks
2021-09-01 19:15:08 +02:00
Anders Jenbo
7effa1a931
Merge pull request #2433 from diasurgical/player
2021-07-20 22:59:25 +02:00
Anders Jenbo
de0b3a38b8
Apply code style
2021-07-20 02:51:39 +02:00
Anders Jenbo
e5fc7fd17c
Move remaning symbols in to anonymous namespaces
2021-07-20 02:51:39 +02:00
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
2021-07-14 20:22:35 -07:00