Ball starts rolling as soon as it is dropped
Status: Beta
Brought to you by:
mbrx
After playing a few games, I notice that there is an
increased likelihood that the new ball will start
rolling as soon as it is dropped, i.e. before the mouse
is moved. It is as if there is a leftover vector from
the previous ball? This never happens on the first
ball, only on second, third, fourth balls.
Otherwise a really kicking game!
Logged In: YES
user_id=37219
I just had a deeper look at this, because in the MacOS X / fink port, this
happens all the time (In fact, I thought that there was some sort of
gravity factor making this a design feature).
It turns out that dx and dy in Player::tick are simply not initialized to 0,
and they don't get initialized in all paths. Therefore, depending on stack
conditions, they can easily pick up nonzero values when they shouldn't.
diff -ru trackballs-1.0.0-orig/src/player.cc trackballs-1.0.0/src/player.cc
--- trackballs-1.0.0-orig/src/player.cc Sat Mar 20 02:04:32 2004
+++ trackballs-1.0.0/src/player.cc Sat Mar 20 02:05:32 2004
@@ -68,6 +68,7 @@
if(!Game::current) return;
if(!playing) return;
+ dx = dy = 0.0;
Map *map = Game::current->map;
health+=t * 0.4; if(health > 1.0) health = 1.0;
Logged In: NO
Thanks neeri! I had the same problem. Every second game I
got this bug, and I couldn't figure out why. I thought it was
related to my system somehow.
your "huge" diff fixed it for me ;) Thanks!
Logged In: YES
user_id=1137131
I second this bug -Debian 3.0r2, trackballs version 1.0.0-3.
Really nice game though! Keep up the good work.