[airstrike] problem with bomb collisions

Erik Auerswald auerswal at unix-ag.uni-kl.de
Fri Sep 2 05:18:13 EDT 2005


> There must be something wrong with the rate limiting in the fuel
> generator, it immediately creates a new fuel sprite, so you actually
> catch two almost at once. I cannot immediately see how to fix it.

Yes, that is the problem. The delay timer is set when a new sprite is
created. This timer usually is expired when the fuel is picked up ->
another fuel sprite is created immediately. (This is picked up
immediately and the just set delay timer is not expired.)

One way to fix this is to update the timer every game frame (i.e. update
message received) if the "old" sprite still exists. Another way would be
to implement a message to notice the generator that the sprite has just
vanished and the generator sets the timer on arrival of this message
(the first method seems to be more in line with the way the generators

The time update could use the proposed delay_to_frames() function: ;-)
g->timer = frame_nr() + delay_to_frames(g->timeout);


More information about the airstrike mailing list