adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] Loading / Saving


From: Kai Sterker
Subject: Re: [Adonthell-devel] Loading / Saving
Date: Tue, 12 Mar 2013 22:06:14 +0100

On Mon, Mar 11, 2013 at 10:31 PM, Kai Sterker <address@hidden> wrote:

> Figured out what it was and fixed it: character position is stored
> twice in the map data file: for one the actual integer coordinates
> where the character object sits on the map, and second the actual
> character position as a floating point value. But if after reloading
> the two did not match (due to rounding), movement became impossible.
> For now, I resorted to storing the same (integer) position twice.

Revised the code a bit, so that we store both the integer and exact
position. The integer position is restored when loading the map, the
exact position when loading the character state. That should help
avoiding issues with collision detection, which relies on the exact
position.

> Also noticed that the NPC schedule doesn't seem to run repeatedly
> after the reload. It no longer walks around (more than once). Will
> check that next.

Fixed. Turns out commit #774fd2f768d36d49db224971a559ab1231e603f3 had
broken it. Guess that after 10 years of development, you're bound to
forget how things work :-(.

> Also, when initiating dialogue, there's now a SEGFAULT on exit,
> somewhere in the surface_cacher. This appears to be regardless of
> loading a previous save. Also need to check what happens here.

Fixed. Using static objects is not so clever when they need to be
cleaned up in a specific order. Converted font cache to a dynamically
allocated object that gets created/destroyed  with the GUI module in
the correct order.

Probably going to work on saving screenshot next. Also going to do
some memory leak checks.

Kai



reply via email to

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