Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3846 closed defect (fixed)

Tower shoots wrong number of arrows capturing

Reported by: elexis Owned by: sanderd17
Priority: Release Blocker Milestone: Alpha 20
Component: UI & Simulation Keywords:
Cc: Patch:

Description

As of r17935 capturing towers leads to a wrong number of arrows being shot by the tower.

Reproduce:

  1. Build a tower, garrison with 5 units -> shoots 5+1 arrows
  2. Capture that tower with an enemy -> tooltip says '-4` arrows
  3. Garrison tower with 5 units -> tooltip says 1 arrow

Things that might have broken it: r17882 r17783 r17863 or one/some of the other recent aura/auramanager changes.

Reverting r17931 didn't change the issue.

Change History (2)

comment:1 by sanderd17, 8 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 17938:

Fix counting of arrows in buildings: don't remove entities twice from the garrisonholder. Fixes #3846

comment:2 by elexis, 8 years ago

In 17944:

Return Infinity instead of undefined in BuildingAI.GetMaxArrowCount. Refs #3196, #3846 and r17939.

Notice the previous check if (count > this.GetMaxArrowCount()) implicitly relied on
numerical comparisons returning false if one of the two arguments is undefined.

Note: See TracTickets for help on using tickets.