MantisBT - Zandronum
View Issue Details
0001966Zandronum[All Projects] Suggestionpublic2014-10-19 19:162018-09-30 22:59
Watermelon 
Watermelon 
normaltweakalways
closedfixed 
1.4 
1.42.0 
0001966: Compressing unlagged and similiar booleans into one field to save bandwidth with userinfo
As discussed on IRC. Need code review from a pull request.
No tags attached.
Issue History
2014-10-19 19:16WatermelonNew Issue
2014-10-19 19:16WatermelonStatusnew => assigned
2014-10-19 19:16WatermelonAssigned To => Watermelon
2014-10-19 19:16WatermelonStatusassigned => needs review
2014-10-23 16:44WatermelonAssigned ToWatermelon =>
2014-10-23 16:44WatermelonAssigned To => Watermelon
2014-10-23 16:44WatermelonStatusneeds review => assigned
2014-10-26 18:05WatermelonNote Added: 0010694
2014-10-26 18:05WatermelonStatusassigned => needs review
2014-10-26 21:26WatermelonStatusneeds review => assigned
2014-10-26 21:36WatermelonNote Deleted: 0010694
2014-10-27 02:00WatermelonNote Added: 0010699
2014-10-27 02:00WatermelonStatusassigned => needs review
2014-10-29 07:15Torr SamahoNote Added: 0010708
2014-10-29 07:15Torr SamahoStatusneeds review => feedback
2014-10-29 14:46WatermelonNote Added: 0010709
2014-10-29 14:46WatermelonStatusfeedback => assigned
2014-10-29 14:46WatermelonStatusassigned => needs review
2014-11-01 11:04Torr SamahoNote Added: 0010758
2014-11-01 11:05Torr SamahoStatusneeds review => feedback
2014-11-01 17:36WatermelonNote Added: 0010770
2014-11-01 17:36WatermelonStatusfeedback => assigned
2014-11-01 20:44WatermelonNote Added: 0010782
2014-11-01 20:44WatermelonStatusassigned => needs review
2014-11-01 20:50WatermelonNote Edited: 0010782bug_revision_view_page.php?bugnote_id=10782#r5916
2014-11-02 05:17WatermelonNote Added: 0010785
2014-11-02 07:24cobaltStatusneeds review => needs testing
2014-11-02 07:24cobaltNote Added: 0010788
2015-03-29 20:21DuskStatusneeds testing => resolved
2015-03-29 20:21DuskFixed in Version => 2.0
2015-03-29 20:21DuskResolutionopen => fixed
2018-09-30 22:59Blzut3Statusresolved => closed

Notes
(0010699)
Watermelon   
2014-10-27 02:00   
Can someone comment on my comment (also needing code review):

'https://bitbucket.org/ChrisKOmg/zandronum_stable/commits/36398a44816aaf74ce7039a4c1c60a72d1d703d4 [^]'

I'm worried about future flags not being able to be set with this new method.
(0010708)
Torr Samaho   
2014-10-29 07:15   
Please see my comments on bitbucket.
(0010709)
Watermelon   
2014-10-29 14:46   
Updated @ pull request
(0010758)
Torr Samaho   
2014-11-01 11:04   
As I already said here:
Quote from Torr Samaho

bUnlagged and bRespawnonfire should also be merged into one int (e.g. ulClientFlags). This way you won't need to touch cl_commands.cpp, cl_main.cpp and sv_commands.cpp and sv_commands.cpp when adding a new client flag.

Your current pull request still requires cl_main.cpp, sv_commands.cpp and sv_commands.cpp to be changed when adding a new client flag. bUnlagged and bRespawnonfire should be removed completely from userinfo_t and replaced by one int called ulClientFlags (or something like this).
(0010770)
Watermelon   
2014-11-01 17:36   
My bad, I erroneously thought when you meant merge into one flag, I thought you just meant use CVAR(Flag).

Now that I understand this, my next update should cover what you said.
(0010782)
Watermelon   
2014-11-01 20:44   
(edited on: 2014-11-01 20:50)
Pull request sent.

Though I also have a question for you which I commented in the pull request as well.

(0010785)
Watermelon   
2014-11-02 05:17   
All nice and updated, hopefully ready this time.
(0010788)
cobalt   
2014-11-02 07:24   
Issue addressed by commit c79a9b1a6f6d: Added CVAR cl_clientflags which controls both cl_unlagged and cl_respawnonfire to save bandwidth and make future booleans easier to transmit over the network (fixes 1966).
Committed by WChrisK [Watermelon] on Sunday 02 November 2014 01:14:39

Changes in files:
 docs/zandronum-history.txt | 1 +
 src/cl_commands.cpp | 6 +--
 src/cl_demo.cpp | 8 +--
 src/cl_main.cpp | 25 ++++--------
 src/d_netinf.h | 11 +++++
 src/d_netinfo.cpp | 90 ++++++++++++++++-----------------------------
 src/d_player.h | 9 +---
 src/m_menu.cpp | 2 +-
 src/m_options.cpp | 2 +-
 src/network.h | 10 ++--
 src/p_user.cpp | 2 +-
 src/sv_commands.cpp | 10 ++---
 src/sv_main.cpp | 12 ++----
 src/unlagged.cpp | 4 +-
 14 files changed, 80 insertions(+), 112 deletions(-)