As reported at https://wildfiregames.com/forum/index.php?/topic/22688-new-players-rekt-by-gaia-on-danubius/ if one side of the river is completely wiped out and if there are more than 2 teams,
then gaia units are continuously spawned at that civic center, creating indefinite lag slowly but surely.
Details
- Reviewers
bb - Commits
- rP19972: Don't spawn Danubius attackers (indefinitely) at the Gaia Civic Center if all…
- Trac Tickets
- #4715
Start a 1v1 on that map and resign. Your side of the river should not spawn any more units while the other side continues.
You can set ccAttackerCount = 5 and ccAttackerInterval = 0.2 to make it easier to notice.
Notice ships already consider that fact, so merge the according code.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
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! Checking XML files...
http://jw:8080/job/phabricator/1832/ for more details.
Executing section Default... Executing section Source... Executing section JS... binaries/data/mods/public/maps/random/danubius_triggers.js | 239| » if·(remainder·!=·0) | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/danubius_triggers.js | 456| » if·(remainder·!=·0) | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/danubius_triggers.js | 645| » » let·siegeEngines·=·attackers.filter(ent·=>·Engine.QueryInterface(ent,·IID_Identity).HasClass("Siege")); | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/danubius_triggers.js | 646| » » let·others·=·attackers.filter(ent·=>·siegeEngines.indexOf(ent)·==·-1); | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/danubius_triggers.js | 668| » if·(data.from·!=·0) | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. Executing section XML GUI... Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/376/ for more details.
code works as advertised, after pressing "suppress" on the segfault popping up after few seconds (is already present in current code)
Period can be added when committing
binaries/data/mods/public/maps/random/danubius_triggers.js | ||
---|---|---|
309 ↗ | (On Diff #3066) | notice isLeft iff !isRight so correct |
544–545 ↗ | (On Diff #3066) | period |
547 ↗ | (On Diff #3066) | riverside is one word so correct |
Thanks for the review!
There is still one catch: players can garrison their last female in a house. Then both ships and CCs will attack that riverside.
That can be solved either by using "Unit" instead of "Structure" in this patch or preferably by changing the patroling units to not ignore Structures after all units on that riverside disappeared.
binaries/data/mods/public/maps/random/danubius_triggers.js | ||
---|---|---|
557 ↗ | (On Diff #3066) | As discussed on irc, "Structure" becomes siegeTargetClass so that both ships and CCs stop spawning units if the only remaining buildings are ignored by units and siege engines. Gaia units should eventually become smart enough to look for remianing houses too after the prefered targets are gone. |