Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2047 closed defect (fixed)

[PATCH] Improve hunter behaviour.

Reported by: mimo Owned by: mimo
Priority: Should Have Milestone: Alpha 15
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

Hunting is quite broken presently when an animal can flee quite far (e.g. the giraffe which have high hitpoints). You may reproduce the problem for exemple with the Sahel Watering Hole map, creating a cavalry skirmisher and trying to hunt one of the giraffes. The hunter will usually stop following the animal after a short time, and even if we force it to follow its target and kill it, it will gather only once the food and then be unable to find back the dead animal to gather again. This is fixed in the attached patch.

Note that lines 26 to 40 of the patch are not directly connected to it, but gives to GatherNearPosition the same behaviour as Gather, i.e. go to nearest dropsite if nothing left to gather. They can be removed without impacting the patch.

Attachments (1)

hunt.diff (2.9 KB ) - added by mimo 11 years ago.

Download all attachments as: .zip

Change History (6)

by mimo, 11 years ago

Attachment: hunt.diff added

comment:1 by mimo, 11 years ago

Keywords: patch review added

comment:2 by historic_bruno, 11 years ago

Milestone: Alpha 14Alpha 15
Owner: set to mimo

comment:3 by sanderd17, 11 years ago

Summary: [PATCH] improve hunting[PATCH] Improve hunter behaviour.

comment:4 by leper, 11 years ago

Resolution: fixed
Status: newclosed

In 13803:

Save initial herd position and update the last known position of the hunted animal when hunting. Patch by mimo. Fixes #2047.

comment:5 by leper, 11 years ago

Component: Core engineUI & Simulation
Keywords: review removed

Thanks for the patch. Works nicely and should make hunting a lot easier.

Unrelated to the ticket, but related to the "good, substatial contributions" sentence in one forum topic about applications: Could you manage to join IRC a bit more often for some feedback on some patches and some discussion?

Note: See TracTickets for help on using tickets.