Page MenuHomeWildfire Games

Change Fogging and AIProxy checks to INVALID_PLAYER
Needs RevisionPublic

Authored by elexis on Jan 22 2018, 2:10 AM.

Details

Reviewers
wraitii
Summary

I wasn't sure about these checks in rP20953.

Test Plan

Ever heard of a place that passes a number smaller than -1 as a playerID?

Diff Detail

Event Timeline

elexis created this revision.Jan 22 2018, 2:10 AM
wraitii accepted this revision.Jan 22 2018, 10:11 AM
wraitii added a subscriber: wraitii.

Good idea as it clarifies what the code is doing. Probably wouldn't ever have bugged but you never know.

This revision is now accepted and ready to land.Jan 22 2018, 10:11 AM
elexis added inline comments.Jan 22 2018, 2:50 PM
binaries/data/mods/public/simulation/components/GarrisonHolder.js
273

These are wrong actually :P

wraitii added inline comments.Jan 23 2018, 9:37 AM
binaries/data/mods/public/simulation/components/GarrisonHolder.js
273

What do you mean?

temple added a subscriber: temple.Jan 27 2018, 7:59 PM
temple added inline comments.
binaries/data/mods/public/simulation/components/GarrisonHolder.js
273

INVALID_ENTITY is about entities in the game (and is equal to 0).
The check here is about the index of an element in a JS array, so it should stay -1.

Go ahead and commit this in A24, just remove the garrisonHolder changes.

binaries/data/mods/public/simulation/components/GarrisonHolder.js
273

ack right.

wraitii requested changes to this revision.Jan 5 2019, 10:06 AM

@elexis: this can be committed once the relevant changes have been done.

This revision now requires changes to proceed.Jan 5 2019, 10:06 AM