2025-07-19 20:30 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004241Spring engineGeneralpublic2014-11-04 14:50
Reporterbibim_ 
Assigned Toabma 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version98.0.1+git 
Target VersionFixed in Version 
Summary0004241: invalid usage of SetBoolArg for some no- commands (nospecdraw, nohelp, ...)
DescriptionThe NoSpecDraw mode works backward:

when "/nospecdraw 1" is sent on autohost interface, the resulting message printed in console is correct ("Spectator map drawing is disabled") but actually the spectators can still draw.

When "/nospecdraw 0" is sent on autohost interface, the resulting message printed in console is correct ("Spectator map drawing is enabled") but actually the spectators cannot draw.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0012585

bibim_ (reporter)

Now the resulting messages printed in console are reversed (as I said explicitly in my bug report, the messages were correct, only the behavior of the NoSpecDraw mode was reversed...).

Also, for some reason, now if the NoSpecDraw mode has been enabled once, it can't be disabled (the reversed messages are shown in console but spectators can't draw anymore, whatever value is sent after /nospecdraw).

~0012667

abma (administrator)

broken logic in rts/Net/GameServer.cpp:

SetBoolArg(allowSpecDraw, action.extra);

while it should be (i guess):

bool tmp = !allowSpecDraw;
SetBoolArg(tmp, action.extra);
allowSpecDraw = !tmp;

imo either add a SetInverseBoolArg() or remove all "no"'s from commands.

~0012668

abma (administrator)

also in rts/Game/SyncedGameCommands.cpp:

bool disabled = !inMapDrawer->GetSpecMapDrawingAllowed()

(whole no-logic is really bad imo)

~0012669

abma (administrator)

Last edited: 2014-01-09 11:38

View 3 revisions

also:
[f=0000000] Debug: /nohelp 1
[f=0000000] LuaUI control is enabled!

looks like more no-commands are affected as well. (control should be disabled i guess)



https://github.com/spring/spring/blob/develop/rts/Game/IActionExecutor.h#L125

SetBoolArg() expects parameter "container" to be the current value

~0013802

bibim_ (reporter)

Pull request: https://github.com/spring/spring/pull/143
+Notes

-Issue History
Date Modified Username Field Change
2014-01-02 14:17 bibim_ New Issue
2014-01-02 15:47 Kloot Assigned To => Kloot
2014-01-02 15:47 Kloot Status new => assigned
2014-01-02 16:09 Kloot Changeset attached => spring release 6a8ea411
2014-01-02 16:09 Kloot Status assigned => resolved
2014-01-02 16:09 Kloot Resolution open => fixed
2014-01-04 19:16 bibim_ Note Added: 0012585
2014-01-04 19:16 bibim_ Status resolved => feedback
2014-01-04 19:16 bibim_ Resolution fixed => reopened
2014-01-09 11:27 abma Note Added: 0012667
2014-01-09 11:29 abma Note Added: 0012668
2014-01-09 11:32 abma Note Added: 0012669
2014-01-09 11:33 abma Note Edited: 0012669 View Revisions
2014-01-09 11:38 abma Note Edited: 0012669 View Revisions
2014-01-09 11:39 abma Summary NoSpecDraw mode works backward => invalid usage of SetBoolArg for some no- commands (nospecdraw, nohelp, ...)
2014-01-10 14:02 abma Status feedback => new
2014-11-04 01:12 bibim_ Note Added: 0013802
2014-11-04 14:50 abma Status new => resolved
2014-11-04 14:50 abma Resolution reopened => fixed
2014-11-04 14:50 abma Assigned To Kloot => abma
2014-11-04 14:50 abma Product Version 95.0 => 98.0.1+git
+Issue History