Ticket #865 (closed enhancement: fixed)
Stances
| Reported by: | Badmadblacksad | Owned by: | |
|---|---|---|---|
| Priority: | Must Have | Milestone: | Alpha 6 |
| Component: | UI & Simulation | Keywords: | |
| Cc: |
Description
I tried to implement stances recently. I give up for a few days as I've got boring school work to do..
I tried to match those requirements : http://www.wildfiregames.com/forum/index.php?showtopic=13725
so, I just attach a patch. If you have time, and a better way to do theses things, please comment.
Attachments
Change History
comment:2 Changed 2 years ago by k776
- Priority changed from Should Have to Must Have
- Milestone changed from Backlog to Alpha 6
Changed 2 years ago by Badmadblacksad
- Attachment diffStances-05-06-2011.patch added
a little more advanced stance implementation
comment:3 Changed 2 years ago by Badmadblacksad
I think I will stick to the current design, i.e. having only one rangeQuery per unit. We can still change that later if we need.
comment:4 Changed 2 years ago by k776
- Keywords review, patch added
- Summary changed from Stances to [PATCH] Stances
comment:6 Changed 2 years ago by Badmadblacksad
I discovered an issue in UnitAI: sometimes units don't detect any enemy in their LOS. Don't know why now. That's was just to tell this is not a feature..
comment:7 Changed 2 years ago by Badmadblacksad
- Keywords review, patch removed
- Summary changed from [PATCH] Stances to Stances
comment:10 Changed 2 years ago by Philip
Made some minor changes like:
- Instead of ModifyRangeActiveQuery, it just calls SetupRangeQuery to reset the query when the range changes - I think it's less confusing to keep range queries immutable, and to stick with a single function that updates the query.
- Instead of StanceSpecificQuery explicitly checking for targets after stance changes, it relies on the LosRangeUpdate in IDLE to trigger target-detection, to hopefully simplify the logic a bit.
- UnitMotion now follows units only while they're visible; if they disappear in FoW then it stops updating the target, and just continues on to the last known location, so scripts don't need to check the FoW visibility themselves (except when first issuing move commands - it's the caller's responsibility in that case).
- Changed some names (I prefer it when function names start with verbs, e.g. IsStanceSelected not StanceSelected), and rearranged some logic and updated comments etc a bit.
(I've tried to test this and it seems to still work, but I haven't tested it entirely thoroughly so I'm not entirely confident in that.)
I'm not sure what exactly is left to be done, though the GUI buttons definitely need moving into the right place (wherever that is).
comment:12 Changed 23 months ago by k776
- Status changed from new to closed
- Resolution set to fixed
Done for the most part. There are some reported issues/weirdness with stances, but new tickets should be made for them.
