Page MenuHomeWildfire Games

Update timer missileHits in case of entity renamed
AbandonedPublic

Authored by mimo on May 27 2017, 2:07 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Currently missileHits sent before the rename but hitting the target after are lost, see #4595 for a more complete description

Test Plan

Test on the commands.txt file attached to #4595 (using the A21 version of the patch).

Event Timeline

mimo created this revision.May 27 2017, 2:07 PM
Vulcan added a subscriber: Vulcan.May 27 2017, 5:06 PM
Executing section Default...
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/components/Timer.js
|  63| »   if·(typeof·repeattime·!=·"number"·||·!(repeattime·>·0))
|    | [NORMAL] JSHintBear:
|    | Confusing use of '!'.
Executing section XML GUI...
Executing section Python...
Executing section Perl...

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

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

leper added a reviewer: Restricted Owners Package.Jun 3 2017, 8:04 PM
leper added a subscriber: leper.

I'm not sure if cmpTimer is the right place for this.

bb added a subscriber: bb.Jul 7 2017, 1:50 PM
In D558#24633, @leper wrote:

I'm not sure if cmpTimer is the right place for this.

imo the place isn't that bad, but this can probably happen with many more functions (not that I can give examples). So shouldn't we skip the functionName check and use this for every timer function with a target (or other entity related data)? (I didn't check or test whether this crashes elsewhere in code)

binaries/data/mods/public/simulation/components/Timer.js
153

remove braces while at it

imo the place isn't that bad, but this can probably happen with many more functions (not that I can give examples). So shouldn't we skip the functionName check and use this for every timer function with a target (or other entity related data)? (I didn't check or test whether this crashes elsewhere in code)

A more generic way might work, though I'm still not sure if that logic should be in cmpTimer.

I think this is a sad consequence of our architecture, but this would be awkward to put anywhere imo.

(I personally think it's a bit useless, at least in that specific case, as the Damage code can handle that)

(I personally think it's a bit useless, at least in that specific case, as the Damage code can handle that)

What do you mean?

elexis added a subscriber: elexis.Dec 24 2017, 8:54 PM

Maybe fatherbushido meant that the arrow can just hit whatever entity happens to be at that location

wraitii abandoned this revision.May 14 2018, 11:35 AM

Think this is going to be slow, and as fatherbushido said atm it's un-necessary.