drop_robot_egg: return immediately if count-to-drop == 0

This suppresses a misleading warning when a robot is set to drop 0
objects of an invalid type.
This commit is contained in:
Kp 2020-12-27 22:03:09 +00:00
parent e4f8d02380
commit a45726d7e4

View file

@ -964,6 +964,8 @@ imobjptridx_t drop_powerup(const d_vclip_array &Vclip, int id, const unsigned nu
static imobjptridx_t drop_robot_egg(const int type, const int id, const unsigned num, const vms_vector &init_vel, const vms_vector &pos, const vmsegptridx_t segnum)
{
if (!num)
return object_none;
switch (type)
{
case OBJ_POWERUP: