Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5531 closed defect (fixed)

this.order is undefined in INDIVIDUAL.PATROL.MovementUpdate

Reported by: elexis Owned by: wraitii
Priority: Release Blocker Milestone: Alpha 24
Component: Simulation Keywords: regression
Cc: Patch: Phab:D2118

Description

In this r22537 replay,

after sending a Patrol order to these units, I got this error message:

TypeError: this.order is undefined
  UnitAI.prototype.UnitFsmSpec.INDIVIDUAL.PATROL.MovementUpdate@simulation/components/UnitAI.js:1594:5
  FSM.prototype.ProcessMessage@simulation/helpers/FSM.js:265:12
  UnitAI.prototype.OnMotionUpdate@simulation/components/UnitAI.js:3866:2
ERROR: Script message handler OnMotionUpdate failed
ERROR: JavaScript error: simulation/components/UnitAI.js line 1594
TypeError: this.order is undefined
  UnitAI.prototype.UnitFsmSpec.INDIVIDUAL.PATROL.MovementUpdate@simulation/components/UnitAI.js:1594:5
  FSM.prototype.ProcessMessage@simulation/helpers/FSM.js:265:12
  UnitAI.prototype.OnMotionUpdate@simulation/components/UnitAI.js:3866:2
ERROR: Script message handler OnMotionUpdate failed

Attachments (1)

commands.txt (18.7 KB ) - added by elexis 5 years ago.

Download all attachments as: .zip

Change History (6)

by elexis, 5 years ago

Attachment: commands.txt added

comment:1 by elexis, 5 years ago

Milestone: BacklogAlpha 24

comment:2 by wraitii, 5 years ago

Owner: set to wraitii

Introduced by Phab:rP22526 L1589 of UnitAI.js . I call FinishOrder() but don't return and thus this.order is undefined below it.

I'll check the diff for other similar mistakes since this is not so obvious a bug form reading the code and fix it.

Thanks for reporting.

comment:3 by wraitii, 5 years ago

Patch: Phab:D2118

comment:4 by wraitii, 5 years ago

Resolution: fixed
Status: newclosed

In 22546:

Fix patrol order and make the relaxed range check into a constant.

Introduced by rP22526.

Reported By: elexis

Fixes #5531 .

Differential Revision: https://code.wildfiregames.com/D2118

comment:5 by elexis, 5 years ago

Keywords: regression added
Note: See TracTickets for help on using tickets.