Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Fix allocation of players, spelling corrections and fewer LOC #4612

Closed
wzdev-ci opened this issue Jul 29, 2017 · 13 comments
Closed

Fix allocation of players, spelling corrections and fewer LOC #4612

wzdev-ci opened this issue Jul 29, 2017 · 13 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_patch (an actual patch, not a request for one) | by Forgon


The function 'processDebugMappings()' in './src/keymap.cpp' activates the debug mode if Player 0 is
not allocated at its invocation. This lead to two errors in the bizarre code responsible for loading games, both of which are now patched:

  • skirmish savegames loaded from within skirmish games start in DEBUG mode (see './src/game.cpp')
  • games launched with '--game' start in DEBUG mode. In all modes except TUTORIAL3, the player cannot move units with a left click after selecting them as in the cheat 'autogame on' (see './src/clparse.cpp')

Other changes:

  • 'keyClearMappings' in './src/keymap.cpp' was a useless function and called both before and during the start of 'keyInitMappings' in several instances (see './src/init.cpp', './src/keyedit.cpp', './src/keymap.cpp')

  • chat messages in campaigns and tutorials now display 'Commander' as player name (see './src/multiplay.cpp')

  • no more empty line at the start of logfiles (see './lib/framework/debug.cpp')

  • no more two consecutive slashes in pathnames (hopefully) (see './lib/framework/frame.cpp' and './src/levels.cpp')

  • removed unused and empty functions 'StartTextInput()' and 'StopTextInput' (see './lib/qtgame/main_qt.cpp')

  • fixed typos: allign -> align, allignment -> alignment, blu box -> blue box, bluboxes -> blue boxes, initalised -> initialised, initalise -> initialise, seperated -> separated, seperate -> separate, seperator -> separator


Issue migrated from trac:4612 at 2022-04-16 12:45:16 -0700

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file git_format-patch.patch (17.5 KiB)

patch file created with git format-patch

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 2, 2017

Per Inge Mathisen <per.mathisen@...> commented


In Warzone2100/warzone2100@d0dd6cf:

#CommitTicketReference repository="" revision="d0dd6cf6b801918cba042b65bdc56e183fb675fd"
Various spelling fixes and unused code deletion.

Patch by Forgon from #4612.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 3, 2017

Forgon commented


What about all the rest of the patch?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 3, 2017

Per changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 3, 2017

Per changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 3, 2017

Per commented


I need some more time to look at those. Just took the easy things first.

Thanks for the patch, BTW.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 4, 2017

Per commented


I'm a bit confused by the "ensures game does not start in DEBUG mode" part of the patch, because I've never seen this problem. How and when does this happen?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 4, 2017

Berserk Cyborg commented


Replying to Warzone2100/old-trac-import#4612 (comment:4):

I'm a bit confused by the "ensures game does not start in DEBUG mode" part of the patch, because I've never seen this problem. How and when does this happen?
It happens if you load a skirmish save while in a skirmish. It will then allow the player to enter cheats without actually using shift+backspace.

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> committed [3]


In Warzone2100/warzone2100@3a871f2:

#CommitTicketReference repository="" revision="3a871f21d8bbc5a660d5ce996a56e65761905fe5"
Address player as 'Commander' in tutorial/campaign.

Patch in #4612 by Forgon.

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> changed owner from `` to Per Inge Mathisen <per.mathisen@gmail.com>

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> committed [4]


In Warzone2100/warzone2100@4b91398:

#CommitTicketReference repository="" revision="4b91398c86a8d3e1e9c05787768508ad5929dcbc"
Protect cheat mode also after loading game.

Used to be possible to enter cheat mode without the
special key command if you had loaded a savegame.

Closes #4612, patch by Forgon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant