[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BUG #1543 [Jumpers no longer bounche from walls]
From: |
Ingo Ruhnke |
Subject: |
Re: BUG #1543 [Jumpers no longer bounche from walls] |
Date: |
02 Nov 2002 18:26:45 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Gervase Lam <address@hidden> writes:
> I also looked at the old code, and I can't see how they could have
> bounced off walls. The old code never reflected/bounced the velocity
> of a Faller by updating it to the opposite direction if it hit a
> wall.
Revision 1.6 of faller.cxx got the bounce code added:
$ cvs diff -uw -r1.5 -r1.6 faller.cxx
[...]
@@ -131,10 +143,13 @@
}
}
// Reset the velocity
- pingu->velocity.x = 0;
+ pingu->velocity.x = -(pingu->velocity.x/3);
pingu->velocity.y = 0;
+
+ pingu->pos = last_pos;
> Regardless of this, I've included a patch for this. I'll see what you
> think of it.
I have added the /3 friction to your patch so that they don't bounche
around wildly. I also fixed the jumper tutorial, it didn't took
headbounce into account.
--
WWW: http://pingus.seul.org/~grumbel/
Games: http://pingus.seul.org/~grumbel/gamedesigns/
JabberID: address@hidden
ICQ: 59461927
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: BUG #1543 [Jumpers no longer bounche from walls],
Ingo Ruhnke <=