Fed up with red plane having infinite bombs

Arthur Huillet arthur.huillet at free.fr
Fri Apr 23 12:43:27 EDT 2004


Hi there, 

I discovered airstrike yesterday, played it with a friend. The red plane has infinite bombs, this is not a good thing at all.

In case you had forgotten to correct this "bug", here are my modifications (full file at ah34.free.fr)



 case SIGNAL_NUM0: /* create bomb */
      if (sprite_timer_finished(((struct biplane*)s)->bomb_timer) &&	  
	  (!(s->state & BIPLANE_CRASHING)) && 
	  (((struct biplane*)s)->nr_bombs > 0))
	{
	  ((struct biplane*)s)->nr_bombs--;
	  p = sprite_create(&bomb);
	  p->anim_p = s->anim_p;
	  ((mech_sprite_t *)p)->angle = ((mech_sprite_t *)s)->angle;
	  r[0] = mech_heading((mech_sprite_t *)s)[0];
	  r[1] = mech_heading((mech_sprite_t *)s)[1];
	  vmul(r,14);
	  vrot(r,80);
	  sprite_set_pos(p,s->x + r[0],s->y + r[1]);
	  sprite_get_vel(s,v);
	  vmadd(v,5,r);
	  sprite_set_vel(p,v);
	  sprite_group_insert(mech_group,p);
	  sprite_timer_set(&(((struct biplane*)s)->bomb_timer),
			   bomb_delay);
	}
      break;


I still wonder why it was not corrected years ago ...


-- 
Greetings, 
A.H.



More information about the airstrike mailing list