Commit graph

23 commits

Author SHA1 Message Date
Dennis Felsing 3fff1fdc82 Don't cast write parameter for FindEntities
I think at the point where you use (CEntity **) apPlayersInRange the
compiler says this is a totally different value than apPlayersInRange
since they have a different type. And then it reorders the inlined
FindEntities code to be run afterwards, thus leading to undefined
behavior and crashes.
2022-11-09 23:08:00 +01:00
Robert Müller 4d0cd7f807 Use traditional casts instead of functional-style casts 2022-11-06 11:52:21 +01:00
c0d3d3v ebfc053809
Remove even more redundant variables to avoid inconsistent states. Fix another swap bug. 2022-07-11 13:39:52 +02:00
Chairn a69dc599a9 Huge variable naming format
Fix pointer and pointer array variable naming

Huge renaming to match our rules

Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)[^a]\w+\[
            (?!(return|delete)\b)\b\w+ (?!(m_|ms_|g_|gs_|s_))[^a]\w+\[

Further format static variables

Format almost all pointer names accordingly

Used regex: (?!(return)\b)\b\w+
\*(?!(m_p|p|s_p|m_ap|s_ap|g_p|g_ap|ap|gs_ap|ms_ap|gs_p|ms_p))\w+\b[^:\(p]

clang-format

Fix CI fail

Fix misnamed non pointer as pointer and non array as array

Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)p\w+\b
            (?!return\b)\b\w+ (ms_|m_|g_|gs_|s_)a\w+\b[^\[]

clang-format

Revert to SCREAMING_SNAKE_CASE and reinstate dead code
2022-07-08 18:01:29 +02:00
Robert Müller 4949645663 Organize game-shared includes 2022-06-17 17:39:25 +02:00
trml 548de3804e Rename NumSwitchers to HighestSwitchNumber and remove most references 2022-06-02 00:57:11 +02:00
trml 95c4c2db1c Move switch state to gamecore 2022-06-02 00:51:25 +02:00
Robert Müller c2f92c1e13 Organize game-shared includes 2022-05-29 20:02:22 +02:00
trml 85e86772b2 Don't keep track of characters in the predicted gameworld that are not in the snapshot and require pred characters to be alive 2022-05-28 00:07:31 +02:00
Dennis Felsing 298287fb4e Implement shields that remove specific weapon (fixes #4572)
Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display, maybe someone can
quickly spot what I'm doing wrong
2022-04-28 16:49:32 +02:00
def 8134f9fa55 Enable -Wshadow=local
> Warn when a local variable shadows another local variable or parameter.

Found one actual bug in graphics_threaded.cpp

Should reduce confusion in the future when reading source code
2022-03-20 13:24:34 +01:00
trml 4a8f18c322 Use correct (larger) m_NumSwitchers bound 2021-10-26 16:16:34 +02:00
trml e2dbba3146 Network clipping for entityex in CPickup and CProjectile, snap gamecontroller before gameworld, bound checks for switchers in client 2021-10-25 02:34:28 +02:00
trml 8448f9ef04 Predict switch projectiles and pickups, make blinking effect client-side 2021-09-19 14:14:00 +02:00
trml 48a84aef46 Remove switch state from prediction, initialize m_Layer 2021-06-28 00:29:42 +02:00
Freddie Wang 769970b30b Only predict pickup if affected by movers 2021-05-27 15:45:41 +08:00
def cd8e67df66 Handle switch number 0
Thanks to ReD for report
2021-01-20 20:00:25 +01:00
def 3be8a592e5 Run clang-format
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:

$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
trml f6c44468de Another update, fix typo 2020-05-03 00:00:27 +02:00
trml eb1bacb969 Update prediction with latest server physics 2020-05-02 18:52:04 +02:00
trml 18fbb10451 Fix some unitialized variables in the prediction 2019-06-18 19:08:09 +02:00
trml 6848274b43 Fix pickup prediction on vanilla 2019-05-05 12:33:26 +02:00
trml 0b3f3b03b5 Rewrite of prediction code, with additional prediction 2019-04-21 16:12:20 +02:00