This should fix #4501
Details
- Reviewers
elexis - Commits
- rP19530: Sanitize playername in sanitizePlayerData in gamesetup and remove some…
- Trac Tickets
- #4501
Can be tested with most scenario demo maps (e.g. "We Are Legion")
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- https://svn.wildfiregames.com/svn/ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 1452 Build 2298: Vulcan Build Jenkins Build 2297: arc lint + arc unit
Event Timeline
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1005/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1006/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1007/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1008/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1009/ for more details.
Patch works as expected, but there is a design issue.
By copying the names, the lobby will show "Player 2" and so forth. It would be better to show "Player 2 (unassigned)".
It should also be seen in the session equally "Player 2 (unassigned)" (instead of "Player 2 (unassigned)" sometime.
Looks like it is possible to determine the unassigned state from the absence of an assigned online or offline player in g_PlayerAssignments (the NetServer equally keeps those for offliners) + the absence of an assigned AI in g_GameAttributes.
binaries/data/mods/public/gui/gamesetup/gamesetup.js | ||
---|---|---|
869 | This comment is slightly wrong, because we could change the underlying defaults file, it is just a decision that we want to have different defaults in atlas and gamesetup. The player_defaults.json file should also contain the Team property, so that all properites are well defined in that file. |
I want this code to be committed. The session.js and gamedescription.js changes to display unassigned player slots can go in independently.
It seems changing the civ in the player_defaults.json doesn't even affect atlas, so it's probably better to just not add a comment until we have this resolved.
Player.cpp just selects the jth civ for the jth player in L720.
Also notice "Player 2" should be translated in SP onl (just like botnames), but that is already not translated in Alpha 21.
binaries/data/mods/public/gui/gamesetup/gamesetup.js | ||
---|---|---|
1349 | Guess that is a bit nicer with index instead of 0 Also for ... in, not for ... of |
Build has FAILED
Link to build: http://jw:8080/job/phabricator/1071/
See console output for more information: http://jw:8080/job/phabricator/1071/console
Build has FAILED
Link to build: http://jw:8080/job/phabricator/1072/
See console output for more information: http://jw:8080/job/phabricator/1072/console
Build has FAILED
Link to build: http://jw:8080/job/phabricator/1073/
See console output for more information: http://jw:8080/job/phabricator/1073/console