[Ohrrpgce] vehicle sorting

Ralph Versteegen teeemcee at gmail.com
Wed Jun 8 02:45:34 PDT 2016


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.


More information about the Ohrrpgce mailing list