pingus-devel
[Top][All Lists]
Advanced

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

Re: Climber bug


From: Gervase Lam
Subject: Re: Climber bug
Date: Sun, 27 Oct 2002 15:31:50 +0000

> From: David Philippi <address@hidden>
> Subject: Re: Climber bug
> Date: Sat, 26 Oct 2002 11:14:38 +0200

> On Saturday 26 October 2002 04:45, Gervase Lam wrote:
> > Slight mistake in the patched climber.cxx file.  I should have really
> > put
> > the code that chose the correct sprite BEFORE actually updating the
> > sprite, not after.
>
> Why didn't you attach an updated patch then? Doesn't really matter since
> = I've=20
> just corrected the code after patching and before committing.

'Cos I thought that it was possible that the patch would not be committed 
as it didn't work perfectly.  Also, the change was quite simple.  If it 
was more complicated, I would have sent another diff.

> BTW why did you initialise the new caching values in the constructor
> body= ? I=20
> moved them into the member initialization list.

I've been brought up on the "leave it alone 'cos it might break if you 
don't" principle.  Not that I do this all of time, of course...

Anyway, I've finally found out why Climbers sometimes jumped from left 
facing to right facing Climbers after starting a climb.  The following 
summarises why my patch didn't work sometimes.

o  Update position of Climber, updating Climber to face left in left column
o  Draw Climber, which is facing left.
o  Have nothing to climb, so face right and Fall.
o  Have nothing to climb, so Walk/Fall.
o  Have nothing to climb, so Walk/Fall.
:
:
o  Have nothing to climb, so Walk/Fall.
o  Have something to climb, so draw Climber (which is still facing left).
o  Update position of Climber, updating Climber to face right.

In other words, sometimes the sprite was drawn BEFORE the direction of the 
sprite was updated.  Attached is the patch for this.

Thanks,
Gervase.

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


reply via email to

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