pingus-devel
[Top][All Lists]
Advanced

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

Re: Pingu stuck and collision code


From: Gervase Lam
Subject: Re: Pingu stuck and collision code
Date: Tue, 1 Oct 2002 00:54:22 +0100

> Subject: Re: Pingu stuck and collision code
> From: Ingo Ruhnke <address@hidden>
> Date: 30 Sep 2002 18:47:32 +0200
> Reply-To: address@hidden
>
> Gervase Lam <address@hidden> writes:
> > Just wondering what your solution to the problem caused by my fix to
> > stop Pingus getting stuck between Bridges and Ceilings is going to be?
> > :-)
>
> Quick workaround was to reduce the check range from the whole block to
> a single pixel, after all I just want avoid that a pingu get stuck in
> a one pixel gap, if it walks into a region from which he can't return,
> that might be ok, but depends on the situation of course.

I think it would be better to check not only (+4,+2) but also (+1,+2), 
(+2,+2) and (+3,+2).  In other words, put back the for loop in 
brick_placement_allowed() that checks along the brick, but making it only 
check up to (+4,+2) but not beyond.

I can't see this from stopping a Bridger too soon if there is a wall to 
the left or right, which is the problem you fixed.  Having things this way 
at least should not get the Walkers stuck on one half of a bridge brick.

Since I still have the for loop still in bridger.cxx, I might as well 
submit the change myself! :-)

Actually, this loop is needed because it sorts out the very first problem 
I was trying to solve in beginning.  A Bridger was able to build a bridge 
on the way up, but when it turned back to a Walker and went back down the 
bridge, it couldn't go all the way down because of the head collision 
problem.

Anyway, I think this new change should be sufficient to stop most if not 
all instances of Walkers getting stuck between the Ceiling and a Bridge.  
At least there is no need to think about having Walkers drift down bridges 
for the time being!

Thanks,
Gervase.

Attachment: pingus.200210010047.cvs.diff
Description: Text Data


reply via email to

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