[Ohrrpgce] vehicle sorting

James Paige Bob at hamsterrepublic.com
Wed Jun 8 07:35:07 PDT 2016


Ah! I like that.

I'll move the heroes to the end if the sibling list in
update_walkabout_npc_slices()

---
James


On Wed, Jun 8, 2016 at 2:45 AM, Ralph Versteegen <teeemcee at gmail.com> wrote:

> On 8 June 2016 at 21:44, Ralph Versteegen <teeemcee at gmail.com> wrote:
> > On 8 June 2016 at 06:19, James Paige <Bob at hamsterrepublic.com> wrote:
> >> So when Heroes and NPCs are in the same layer, and the player mounts a
> >> vehicle that does not hide the leader, the sorting order is only correct
> >> half the time.
> >>
> >> A currently mounted vehicle should always be behind a hero sprite with
> the
> >> same Y value.
> >>
> >> That layer is currently slAutoSortY
> >>
> >> I am wondering if it is better to set it to slAutoSortCustom, with a
> loop in
> >> refresh_walkabout_layer_sort() that manually sets the correct sort
> order for
> >> all walkabouts, or if I should create a new magical
> slAutoSortWalkabouts and
> >> code the special rules in there.
> >
> > I certainly wouldn't add a special sort mode for vehicles. The easy
> > way to special case the correct sorting behaviour: in
> > update_walkabout_npc_slices(), move the vehicle NPC slice to be the
> > last of its siblings (before sorting), or alternatively move the hero
> > slice(s) to the front (the latter may fix some other undesired
>
> Oops, I mixed up last/first. The last sibling gets drawn on top.
>
> > layering too). Doesn't this affect all heroes while
> > mounting/dismounting, not just the leader?
> >
> > This reminds me that we haven't yet added script commands to get or
> > set the slice autosort setting, although it's accessible in the slice
> > editor.
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20160608/72b0201d/attachment.htm>


More information about the Ohrrpgce mailing list