#3001 closed defect (fixed)
[PATCH] Game mode defaults to Conquest when Endless mode is selected
Reported by: | Niek | Owned by: | Niek |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 18 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description
When testing my trigger defeatconditions I noticed that the game itself handled them incorrectly (while Atlas did work as should). My research show that source:ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js#1941 is the problem
Changing
r.scripts = [[]];
to
r.scripts = [[""]];
worked for me.
Attachments (1)
Change History (8)
by , 9 years ago
Attachment: | 3001.1.diff added |
---|
comment:1 by , 9 years ago
Keywords: | review patch added |
---|---|
Owner: | set to |
Summary: | Game mode defaults to Conquest when Endless mode is selected → [PATCH] Game mode defaults to Conquest when Endless mode is selected |
comment:3 by , 9 years ago
Keywords: | simple review patch removed |
---|
comment:6 by , 9 years ago
The last commit (r16238) was required as you get the following bug otherwise:
- Pick a skirmish map
- Set the victory condition to None
- Click on map type "scenario" (== selecting a scenario with a conquest condition)
- after loading the map, the game conquest, but the scripts are loaded
Source:
< niektb> Pick a skirmish map, set the conditions to None and then change to a scenario that has a Conquest condition. You'll see that when you load the map no victory conditions are set. http://irclogs.wildfiregames.com/2015-01-27-QuakeNet-%230ad-dev.log
It only seems to occur when doing it exactly that way - doing a different maptype / map change seems to work.
Unfortunately #3209 (r16840) reverts the commit. An easy and correct way to handle both tickets is to reset the victory condition in case of non-random maps. When we will rewrite/clean the gamesetup code we might find a better solution.
You can check which victory scripts are loaded by printing them when starting the game:
Index: binaries/data/mods/public/gui/gamesetup/gamesetup.js =================================================================== --- binaries/data/mods/public/gui/gamesetup/gamesetup.js (revision 17021) +++ binaries/data/mods/public/gui/gamesetup/gamesetup.js (working copy) @@ -1107,10 +1107,12 @@ else g_GameAttributes.settings.PlayerData[i].Name = chosenName; } } + error(JSON.stringify(g_GameAttributes.settings.TriggerScripts)); + // Copy playernames from initial player assignment to the settings for (let guid in g_PlayerAssignments) { let player = g_PlayerAssignments[guid]; if (player.player > 0) // not observer or GAIA
Add the quotes. Patch by Niektb. Made by Ticketman.