Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#1257 closed defect (fixed)

[PATCH] move the banner of spawn point along with the unit

Reported by: Евгений Owned by: Itms
Priority: Should Have Milestone: Alpha 17
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by Itms)

If I set a spawn point of any buildings on unit that can transport people(like Aries), and move this units, the banner of spawn point not move, but people from this buildings will continue to go to the Aries. This can be confusing. Need to move the banner along with the Aries.

Attachments (1)

moving_flag.patch (3.4 KB ) - added by Itms 10 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by Itms, 10 years ago

Description: modified (diff)
Keywords: review patch added; spawn point removed
Milestone: BacklogAlpha 17
Owner: set to Itms

Hi everyone, this is a patch implementing this functionality. Please share your thoughts!

NB: This won't work for animals, because hunting orders are "gather-near-position" orders and do not target entities.

Last edited 10 years ago by Itms (previous) (diff)

comment:2 by Itms, 10 years ago

Summary: move the banner of spawn point along with the unit[PATCH] move the banner of spawn point along with the unit

comment:3 by Itms, 10 years ago

Added a TODO to reference a possible future improvement.

comment:4 by Itms, 10 years ago

Additional style fix

by Itms, 10 years ago

Attachment: moving_flag.patch added

comment:5 by leper, 10 years ago

Resolution: fixed
Status: newclosed

In 15288:

Recompute rally point lines when the rally point is set on a moving unit.
Does not account for setting rally points on units that can move into the FoW/SoD.
Recalculates paths even if the rally points are not displayed.
Refactors UpdateMarkers() to remove some indentation levels.
Based on patch by Itms. Fixes #1257.

comment:6 by leper, 10 years ago

Keywords: review removed

Thanks for the patch. I changed the recomputation of the rally point lines to only the current and (if existing) next line. (There are queued rally point lines (use shift to set them), and recomputing ones that don't change is useless and those call into the pathfinder)

It would be nice if you could take a look to not recompute those lines/markers if the rally point isn't displayed currently, but do so if the building is selected (and if that yields a noticable delay, which would be bad).

comment:7 by mimo, 10 years ago

I would add some test in RallyPoint.GetPositions to avoid useless calls to cmpRallyPointRenderer.UpdatePosition:

either if (!this.data[i].target) replaced by if (!this.data[i].target OR !Engine.QueryInterface(this.data[i].target, IID_UnitMotion))

or if (this.pos[i].x == targetPosition.x AND this.pos[i].z == targetPosition.y) continue; before this.pos[i] = {"x": targetPosition.x, "z": targetPosition.y};

comment:8 by leper, 10 years ago

In 15296:

Check if the position changed before updating it for rally points set on entities. Refs #1257.

comment:9 by Itms, 10 years ago

In 15511:

Fix OOS problems caused by an unwanted modification of the simulation state by the GUI.

Refs #1257

comment:10 by Itms, 10 years ago

In 15512:

Fix previous commit, refs #1257

Note: See TracTickets for help on using tickets.