Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3372 closed defect (fixed)

construction doesn't start if there is an animal on the construction area

Reported by: rogue-spectre Owned by: Itms
Priority: Must Have Milestone: Alpha 19
Component: Core engine Keywords:
Cc: Patch:

Description

Hi,

One can order to build a building where some living animals are present but the construction won't start. In the case of chicken they can be hidden in boxes of the construction site and are not easily visible. One must kill them or make them leave in order the construction can start. I think that two behaviours could avoid this :

1 - Don't allow building where there are some animals/people - assuming once the building area is defined, no one can go "inside" the construction site.

2 - "Order" animals to leave a construction site, this could be justified as they will be annoyed by the construction noises.

nice day.

Attachments (1)

commands_chicken_not_fleeing_r16923.txt (2.2 KB ) - added by elexis 9 years ago.
First try. Some chicken flee, others don't.

Download all attachments as: .zip

Change History (12)

comment:1 by Itms, 9 years ago

Keywords: pathfinding added; building animals removed
Owner: set to Itms

This is strange, 2) should be the current behavior. I'll take a look.

comment:2 by Itms, 9 years ago

I confirm that everything works here. Which version of the game are you playing on?

comment:3 by elexis, 9 years ago

Yes, the chicken are actually ordered to move off the foundation. However I also remember experiencing that chicken were stuck on an unbuilt CC. Maybe rogue-spectre or me can reproduce it and upload a commands.txt.

by elexis, 9 years ago

First try. Some chicken flee, others don't.

comment:4 by rogue-spectre, 9 years ago

last svn 16928. does it. It seems that in fact animals that are "near" the edges of the construction don't get the order to leave more often. If i try to put a construction with a chicken at the center, it will leave.

+ chicken that don't leave don't move around. Their movements are limited to getting food. The more workers are trying to build, the more noise they make.

Last edited 9 years ago by rogue-spectre (previous) (diff)

comment:5 by Itms, 9 years ago

Milestone: BacklogAlpha 19
Priority: Should HaveMust Have

comment:6 by elexis, 9 years ago

In the replayfile above, there were also chicken near the center that didn't leave.

comment:7 by rogue-spectre, 9 years ago

maybe it's a problem of the path finder, since i also noticed that units get stuck easily…

comment:8 by Itms, 9 years ago

Resolution: fixed
Status: newclosed

In 16973:

Fix the LeaveFoundation order in UnitAI in the case of animals. The code used was a hack using the fleeing tactics, so use the regular "Order.LeaveFoundation" code shared with non-animal units.

Fixes #3372

comment:9 by Itms, 9 years ago

Keywords: pathfinding removed

This bug was actually not a pathfinder problem, but a UnitAI one. It is fixed now :)

comment:10 by elexis, 9 years ago

Tested it and can't produce the bug anymore, thx!

comment:11 by Itms, 9 years ago

In 17013:

Support inverted goals with the long-range pathfinder. This allows units to flee and should fix problems with ranged units too close to their targets. Fixes #3405, refs #3372.

Now that units flee it's necessary to fix the unit chasing: this commit reintroduces some code from r14449 that disappeared with the committing of the new pathfinder. Refs #1537.

Also includes some style improvements to the UnitMotion code.

Note: See TracTickets for help on using tickets.