MantisBT - Zandronum
View Issue Details
0002072Zandronum[All Projects] Bugpublic2015-01-19 01:292018-09-30 23:03
Edward-san 
Edward-san 
normalminoralways
closedfixed 
2.0-beta 
2.02.0 
0002072: Scoreboard time, after a minute, reports 0 for all the players except consoleplayer
Like the title says. NetCommand conversion broke it. To think it went unnoticed for all this time..
- Host a simple doom2.wad server;
- Connect 2 clients;
- wait at least a minute
- open the scoreboard.

This can be seen also when you exit the current level.
No tags attached.
Issue History
2015-01-19 01:29Edward-sanNew Issue
2015-01-19 02:46Edward-sanNote Added: 0011444
2015-01-19 02:46Edward-sanDescription Updatedbug_revision_view_page.php?rev_id=6449#r6449
2015-01-19 02:47Edward-sanNote Edited: 0011444bug_revision_view_page.php?bugnote_id=11444#r6451
2015-01-19 03:02Edward-sanAssigned To => Edward-san
2015-01-19 03:02Edward-sanStatusnew => needs review
2015-01-19 20:05cobaltStatusneeds review => needs testing
2015-01-19 20:05cobaltTarget Version => 2.0
2015-01-19 20:05cobaltSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6453#r6453
2015-01-19 20:05cobaltNote Added: 0011447
2015-01-19 20:06Torr SamahoNote Added: 0011448
2015-01-19 20:12Edward-sanNote Added: 0011449
2015-01-19 20:13Edward-sanNote Edited: 0011449bug_revision_view_page.php?bugnote_id=11449#r6455
2015-01-19 20:20Edward-sanNote Edited: 0011449bug_revision_view_page.php?bugnote_id=11449#r6456
2015-01-19 20:28Edward-sanNote Edited: 0011449bug_revision_view_page.php?bugnote_id=11449#r6457
2015-01-19 20:34Edward-sanNote Edited: 0011449bug_revision_view_page.php?bugnote_id=11449#r6458
2015-01-21 00:42WaTaKiDNote Added: 0011466
2015-01-21 21:32Edward-sanNote Added: 0011492
2015-01-22 17:33Edward-sanStatusneeds testing => needs review
2015-01-25 09:16Torr SamahoNote Added: 0011523
2015-01-25 09:16Torr SamahoStatusneeds review => needs testing
2015-03-16 19:15StrikerMan780Note Added: 0011852
2015-03-16 19:16StrikerMan780Note Edited: 0011852bug_revision_view_page.php?bugnote_id=11852#r6794
2015-03-16 19:16StrikerMan780Note Edited: 0011852bug_revision_view_page.php?bugnote_id=11852#r6795
2015-03-16 19:59MarcaekNote Added: 0011854
2015-03-17 00:29DuskStatusneeds testing => resolved
2015-03-17 00:29DuskFixed in Version => 2.0
2015-03-17 00:29DuskResolutionopen => fixed
2018-09-30 23:03Blzut3Statusresolved => closed

Notes
(0011444)
Edward-san   
2015-01-19 02:46   
(edited on: 2015-01-19 02:47)
Found the cause, together with Dusk: SERVERCOMMANDS_UpdatePlayerTime, after the netcommand conversion, stopped sending the time to all the clients, just to the client the time is referred, itself. Changing 'command.sendCommandToOneClient( ulPlayer );' to 'command.sendCommandToClients( ulPlayerExtra, ulFlags );' works for me.

I hope there are no other mistakes like that.

(0011447)
cobalt   
2015-01-19 20:05   
Issue addressed by commit d7c3ad2b0b68: Fixed: SERVERCOMMANDS_UpdatePlayerTime ignored the ulPlayerExtra and ulFlags arguments and always sent the command only to the client belonging to the player whose ping was updated (fixes 2072).
Committed by Benjamin Berkels [Torr Samaho] on Monday 19 January 2015 21:01:09

Changes in files:
 src/sv_commands.cpp | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(0011448)
Torr Samaho   
2015-01-19 20:06   
Thanks! Fixed.

BTW: Why didn't GCC warn that the arguments ulPlayerExtra and ulFlags are not used? Or did it? This warning would have immediately shown that there is something wrong here.
(0011449)
Edward-san   
2015-01-19 20:12   
(edited on: 2015-01-19 20:34)
Because zdoom, before some time ago, did not enable -Wextra, hence no warnings. If you add it to CMakeLists.txt, it'll report the following things just on sv_commands.cpp:


In file included from /home/edward-san/zdoom/zandronum/sandbox/src/sv_main.h:58:0,
                 from /home/edward-san/zdoom/zandronum/sandbox/src/network.h:58,
                 from /home/edward-san/zdoom/zandronum/sandbox/src/sv_commands.cpp:62:
/home/edward-san/zdoom/zandronum/sandbox/src/s_sndseq.h:32:30: warning: unused parameter ‘loop’ [-Wunused-parameter]
  virtual void MakeSound (int loop, FSoundID id) {}
                              ^
/home/edward-san/zdoom/zandronum/sandbox/src/s_sndseq.h:32:45: warning: unused parameter ‘id’ [-Wunused-parameter]
  virtual void MakeSound (int loop, FSoundID id) {}
                                             ^
/home/edward-san/zdoom/zandronum/sandbox/src/s_sndseq.h:35:36: warning: unused parameter ‘seqnum’ [-Wunused-parameter]
  virtual DSeqNode *SpawnChild (int seqnum) { return NULL; }
                                    ^
In file included from /home/edward-san/zdoom/zandronum/sandbox/src/r_data.h:29:0,
                 from /home/edward-san/zdoom/zandronum/sandbox/src/r_local.h:33,
                 from /home/edward-san/zdoom/zandronum/sandbox/src/p_local.h:27,
                 from /home/edward-san/zdoom/zandronum/sandbox/src/sv_commands.cpp:63:
/home/edward-san/zdoom/zandronum/sandbox/src/v_video.h:169:26: warning: unused parameter ‘usesimplecanvas’ [-Wunused-parameter]
  virtual bool Lock (bool usesimplecanvas) { return Lock(); }
                          ^
/home/edward-san/zdoom/zandronum/sandbox/src/v_video.h:346:36: warning: unused parameter ‘bright’ [-Wunused-parameter]
  virtual bool SetBrightness (float bright) { return false; }
                                    ^
/home/edward-san/zdoom/zandronum/sandbox/src/v_video.h:347:34: warning: unused parameter ‘contrast’ [-Wunused-parameter]
  virtual bool SetContrast (float contrast) { return false; }
                                  ^
/home/edward-san/zdoom/zandronum/sandbox/src/sv_commands.cpp:135:28: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
  const ULONG operator* ( ) const {
                            ^
/home/edward-san/zdoom/zandronum/sandbox/src/sv_commands.cpp:139:27: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
  const ULONG operator++ ( ) {
                           ^
/home/edward-san/zdoom/zandronum/sandbox/src/sv_commands.cpp:477:51: warning: unused parameter ‘bReliable’ [-Wunused-parameter]
 void SERVERCOMMANDS_Nothing( ULONG ulPlayer, bool bReliable )
                                                   ^
/home/edward-san/zdoom/zandronum/sandbox/src/sv_commands.cpp:1186:61: warning: unused parameter ‘ulPlayerExtra’ [-Wunused-parameter]
 void SERVERCOMMANDS_UpdatePlayerTime( ULONG ulPlayer, ULONG ulPlayerExtra, ULONG ulFlags )
                                                             ^
/home/edward-san/zdoom/zandronum/sandbox/src/sv_commands.cpp:1186:82: warning: unused parameter ‘ulFlags’ [-Wunused-parameter]
 void SERVERCOMMANDS_UpdatePlayerTime( ULONG ulPlayer, ULONG ulPlayerExtra, ULONG ulFlags )
                                                                                  ^


In recent zdoom, CMakeLists.txt provides the following parameters: "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers", because it would become too much verbose. For example, the CCMDs don't use 'who' and 'key' parameter variables, so you'll see tons of warnings on CCMDs instances.


[edit]uh, interesting that SERVERCOMMANDS_Nothing does not use bReliable ... oh damn, this was wrecked, too, in the netcommand change..

(0011466)
WaTaKiD   
2015-01-21 00:42   
after testing with 2.0-r150119-2001, issue seems fixed
(0011492)
Edward-san   
2015-01-21 21:32   
Quote

[edit]uh, interesting that SERVERCOMMANDS_Nothing does not use bReliable ... oh damn, this was wrecked, too, in the netcommand change..

Done a commit which fixes this.
(0011523)
Torr Samaho   
2015-01-25 09:16   
I pulled the change.
(0011852)
StrikerMan780   
2015-03-16 19:15   
(edited on: 2015-03-16 19:16)
After disconnecting and reconnecting, everyone's time resets to zero as far as I see.

EDIT: After about a minute it fixes itself. I'm guessing this is normal.

(0011854)
Marcaek   
2015-03-16 19:59   
Seems fixed now when I tested with Striker.