Simplify logic for robot to drop proximity and smart bombs

This commit is contained in:
Kp 2013-03-30 04:31:09 +00:00
parent e7dcbeecae
commit c87886c814

View file

@ -784,19 +784,17 @@ multi_do_robot_fire(char *buf)
{
// Drop proximity bombs
vm_vec_add(&gun_point, &Objects[botnum].pos, &fire);
if (gun_num == -1)
Laser_create_new_easy( &fire, &gun_point, botnum, PROXIMITY_ID, 1);
else
Laser_create_new_easy( &fire, &gun_point, botnum, SUPERPROX_ID, 1);
}
else
{
calc_gun_point(&gun_point, &Objects[botnum], gun_num);
}
robptr = &Robot_info[Objects[botnum].id];
if (gun_num == -1)
Laser_create_new_easy( &fire, &gun_point, botnum, PROXIMITY_ID, 1);
else if (gun_num == -2)
Laser_create_new_easy( &fire, &gun_point, botnum, SUPERPROX_ID, 1);
else
robptr = &Robot_info[Objects[botnum].id];
Laser_create_new_easy( &fire, &gun_point, botnum, robptr->weapon_type, 1);
}
}
extern void drop_stolen_items (object *);