[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pingu stuck and collision code
From: |
Ingo Ruhnke |
Subject: |
Re: Pingu stuck and collision code |
Date: |
20 Sep 2002 10:18:39 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Gervase Lam <address@hidden> writes:
> bool
> Bridger::way_is_free()
> {
> return (rel_getpixel(4,2) == Groundtype::GP_NOTHING)
> && !head_collision_on_walk(4, 2)
> && !head_collision_on_walk(8, 4);
> }
>
> The above code is called to check whether the Bridger can walk up on to
> the brick that has just been put down. The checking for (+4, +2) is
> obvious. But why is there a check for (+8, +4)?
Good question, no idea at the moment. Try to remove it and look around
what breaks.
BTW. This would be a good place to insert:
&& !head_collision_on_walk(1, 0)
&& !head_collision_on_walk(2, 1)
&& !head_collision_on_walk(3, 1)
That should most likly fix the problem.
--
WWW: http://pingus.seul.org/~grumbel/
Games: http://pingus.seul.org/~grumbel/gamedesigns/
JabberID: address@hidden
ICQ: 59461927
Re: Pingu stuck and collision code, Gervase Lam, 2002/09/29