Replace STAT_DEAD_YAW logic to player_state->damagePitch and player_state->damageYaw, and preserve enum padding for demo netcode by renaming as STAT_UNUSED_BIT#69
Conversation
5ef3ef2 to
40e4cc0
Compare
|
This is demo and pseudo-netcode breaking requiring client to have forced matching cgame.qvm now. |
40e4cc0 to
5c4d1b5
Compare
|
Thanks for the warning! Just commited. Then, do I leave like it as is? |
5c4d1b5 to
91af79d
Compare
You could also leave all the changes as they are, but restore back the enum to its place. But that would defeat the purpose of the PR. |
|
You can manually assign the values of enums to accommodate a missing entry or just rename it unused or something. |
91af79d to
b5b2e26
Compare
|
@ensiform Done, I just renamed this unused enum value and added a comment on it. EDIT: Sorry for the last force-pushed commits, I was renaming as correctly as possible. |
849e88e to
8dd03d5
Compare
|
Also of note, by the way, damageYaw is only networked 8 bits so technically can only hold 0-255 (what does do about the range 255-360)? at network transmission anything higher results in either wrapping or it is capped, I don't recall what the engine does for this. Although it may actually be -127 to 127. I believe this cannot be safely merged using that variable. |
|
Sh*t! I knew something bad was happening in the code and in-game, the rest of angles from 255 and 360 aren't showing correctly. At the end, I close the PR. |
…tate->damageYaw, and preserve enum padding for demo netcode by renaming as STAT_UNUSED_BIT
8dd03d5 to
5a42e80
Compare
|
What about reusing |
|
Seems fine to me to do this if you need access to more stats in a mod. but the fixme comment could just be removed TBH. as this behavior was propagated across all the other idtech games using this stat, so it seems more like they just forgot to remove the fixme and everyone was okay with it. " If it ain't broke don't fix it" Others may approve of the change and it doesn't really matter either way for me. |
Uses
player_state->damageYawdoes the same behavior and can be reused for these situations.That could fix a
FIXMEtask inSTAT_DEAD_YAWenum from id Software, which was left since the first Q3 version release.Tested and works.
Moreover, this
STAT_slot can be reused, it isn't removed because it must retain the enum value for demo netcode safeness.EDIT:
Uses
ps->damagePitchandps->damageYawto get the correct result, so that avoids 8 bits value issues.