Page MenuHomeWildfire Games

Don't spawn attackers at the CC if it's captured (not destroyed)
ClosedPublic

Authored by elexis on Jun 5 2017, 11:07 PM.

Details

Summary

The gaia attackers spawned at the gaia civic centers in D380 / rP19707 are still spawned if the according civic center is captured instead of being destroyed.

Test Plan

Verify that it's valid to ignore all entities that become non-gaia and that it doesn't bug if there were multiple ownership changes for the same entity.
A quick test can be done by increasing ccAttackerInterval and ccAttackerCount, maybe shipCount + shipFillInterval and cheat-deleting those entities too.

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

elexis created this revision.Jun 5 2017, 11:07 PM
elexis updated this revision to Diff 2454.Jun 5 2017, 11:25 PM

Small performance optimization considering that we don't support spawning units again in case gaia captures again.

Vulcan added a subscriber: Vulcan.Jun 6 2017, 12:25 AM
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
| 450| »   if·(remainder·!=·0)
|    | [NORMAL] JSHintBear:
|    | Use '!==' to compare with '0'.

binaries/data/mods/public/maps/random/danubius_triggers.js
| 632| »   »   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
| 633| »   »   let·others·=·attackers.filter(ent·=>·siegeEngines.indexOf(ent)·==·-1);
|    | [NORMAL] JSHintBear:
|    | Don't make functions within a loop.
Executing section XML GUI...
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/140/ for more details.

Vulcan added a comment.Jun 6 2017, 2:11 AM
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
| 450| »   if·(remainder·!=·0)
|    | [NORMAL] JSHintBear:
|    | Use '!==' to compare with '0'.

binaries/data/mods/public/maps/random/danubius_triggers.js
| 632| »   »   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
| 633| »   »   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
| 655| »   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/141/ for more details.

Vulcan added a comment.Jun 6 2017, 3:46 AM

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/1493/ for more details.

Vulcan added a comment.Jun 6 2017, 4:34 AM

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/1494/ for more details.

fatherbushido accepted this revision.Jun 8 2017, 4:43 PM
fatherbushido added a subscriber: fatherbushido.

ok, nothing to comment.

This revision is now accepted and ready to land.Jun 8 2017, 4:43 PM
elexis added a comment.Jun 8 2017, 4:59 PM

Thanks for the review (see also irc)

This revision was automatically updated to reflect the committed changes.