adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Question about placeable


From: Kai Sterker
Subject: Re: [Adonthell-devel] Question about placeable
Date: Sat, 3 Apr 2010 19:52:38 +0200

On Sat, Apr 3, 2010 at 7:07 AM, Tyler Nielsen <address@hidden> wrote:

>> Basically there are two ways of fixing this.  One option is to change the
>> definition of EntireMinPos and SolidMinPos, so they are always relative to
>> the lowest values.  (In the case above, SolidMinPos would then be 0,0,0).
>> But I'm afraid that will have far reaching effects that I can't anticipate.

At one point I was hoping to get entirely rid of a placeables MinPos
and assume that it would always be the origin. But as you say, this
will affect a lot of places and so I did not follow through with this
idea. Later on, the pathfinding required the solid-only bits of a
placeable, and for those a MinPos is required anyway. All in all, I
don't know if it's worth the effort to change that now.


>> Two, I can subtract out entire_min when we are getting the solid_min and
>> solid_max from chunk_info.  We are already doing it in a few other places,
>> so maybe I can clean the whole thing up a bit as I go.
>
> Hmm as I wrote this I realized there was a simple fix for the jumping issue.
> We may still want to clean things up a bit though.  I don't like just
> subtracting EntireMinPos because it doesn't seem clear reading the code why
> that's happening.  I'll try to clear that up.

The whole area of placeable bboxes is in a sad shape, I fear. A year
or two back I tried to clear it up a bit, but without much success.
There are too many different places that deal with placeables (the map
structure, the renderer, collission detection and pathfinding), which
makes it hard to centralize all data and calculations.

I have been thinking whether we could make a placeable_bbox class that
might serve that purpose. Haven't looked at it closely, however, so
not sure if there would be any benefit or just more trouble ;-).

So whatever you can do to improve upon the current state is appreciated :-).

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]