adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] Jumping and sliding glitches


From: StyxD
Subject: Re: [Adonthell-devel] Jumping and sliding glitches
Date: Tue, 23 Aug 2011 20:08:30 +0200

I had no time whatsoever during this weekend and I may not have much
this week, but I tried to do something today.

> As for a fix ... either a more precise calculation of groundpos
> (although I thought it should already work for the stairs, at least!),
> or a better way to reset vspeed (independent of groundpos, perhaps).

Well, I added a check vz() == 0 in addition to GroundPos == 0 and it
seems to be fine now.

However, I can't notice that even if you can't stand on it, when you
jump on the stairs the shadow is set on thin air when you pass the
floor level. Just what object is there?

I tried to compile adonthell-tools to see the map in editor, but
autogen.sh doesn't even generate the configure script. Instead of
trying to force autotools to work, wouldn't it be better to make cmake
script for adonthell-tools? Is there a specific reason why it's not
there? I might try setting one up, though I'll need to learn cmake
first.


> I agree that when vspeed remains negative, this would break jumping.
> But I guess the real issue is to properly reset it, This might help
> with the getting stuck on top of an object issue above as well.

Should the gravity effect even be governed by VSpeed? Even if we allow
it to be negative, it means that a character will accumulate speed,
while for example a crate pushed down from a roof will not. Will we
allow players to push crates off thing?

I found a new bug: if you stand on a left or upper ledge of something
(the barrel is good for testing that), the character can't jump
because the game think they're standing on the ground beneath (i.e.
GroundPos is set to that), but collision detection (correctly)
prevents the character from actually falling there. The offending line
is src/world/moving.cc:367
----
// position of character relative to tile
s_int32 px = x() - (*ci)->center_min().x();
s_int32 py = y() - (*ci)->center_min().y();

// is this really the object below character?
if (px >= 0 && px <= (*ci)->get_object()->length() &&
py >= 0 && py <= (*ci)->get_object()->width())
{
    // calculate GroundPos ...
}
----
When standing on left or upper ledge, px or py are negative, which is
correct but makes no sense, because the character still is mostly
standing on the upper object. Moreover, when I commented out the if
clause, it seemingly broke nothing and fixed the bug. What exactly is
the point of that check?



reply via email to

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