diff --git a/common/main/fwd-object.h b/common/main/fwd-object.h index ed4a7f579..0ca7dea4f 100644 --- a/common/main/fwd-object.h +++ b/common/main/fwd-object.h @@ -280,7 +280,7 @@ objptridx_t object_create_robot_egg(int type, int id, int num, const vms_vector // Interface to object_create_egg, puts count objects of type type, id // = id in objp and then drops them. -objptridx_t call_object_create_egg(const object_base &objp, int count, int type, int id); +objptridx_t call_object_create_egg(const object_base &objp, unsigned count, int id); void dead_player_end(); diff --git a/similar/main/collide.cpp b/similar/main/collide.cpp index bba9c1ecf..c8c28fc0d 100644 --- a/similar/main/collide.cpp +++ b/similar/main/collide.cpp @@ -1832,7 +1832,7 @@ static objptridx_t maybe_drop_primary_weapon_egg(const object &playerobj, int we const auto powerup_num = Primary_weapon_to_powerup[weapon_index]; auto &player_info = playerobj.ctype.player_info; if (player_info.primary_weapon_flags & weapon_flag) - return call_object_create_egg(playerobj, 1, OBJ_POWERUP, powerup_num); + return call_object_create_egg(playerobj, 1, powerup_num); else return object_none; } @@ -1842,7 +1842,7 @@ static void maybe_drop_secondary_weapon_egg(const object_base &playerobj, int we const auto powerup_num = Secondary_weapon_to_powerup[weapon_index]; int max_count = min(count, 3); for (int i=0; i 10) num_missiles = 10; - call_object_create_egg(playerobj, num_missiles/4, OBJ_POWERUP, powerup_id+1); - call_object_create_egg(playerobj, num_missiles%4, OBJ_POWERUP, powerup_id); + call_object_create_egg(playerobj, num_missiles / 4, powerup_id + 1); + call_object_create_egg(playerobj, num_missiles % 4, powerup_id); } namespace dsx { @@ -1943,36 +1943,36 @@ void drop_player_eggs(const vobjptridx_t playerobj) (plr_laser_level > MAX_LASER_LEVEL && (laser_level_and_id = {plr_laser_level - MAX_LASER_LEVEL, POW_SUPER_LASER}, true)) || #endif (plr_laser_level && (laser_level_and_id = {plr_laser_level, POW_LASER}, true))) - call_object_create_egg(playerobj, laser_level_and_id.first, OBJ_POWERUP, laser_level_and_id.second); + call_object_create_egg(playerobj, laser_level_and_id.first, laser_level_and_id.second); // Drop quad laser if appropos if (player_info.powerup_flags & PLAYER_FLAGS_QUAD_LASERS) - call_object_create_egg(playerobj, 1, OBJ_POWERUP, POW_QUAD_FIRE); + call_object_create_egg(playerobj, 1, POW_QUAD_FIRE); if (player_info.powerup_flags & PLAYER_FLAGS_CLOAKED) - call_object_create_egg(playerobj, 1, OBJ_POWERUP, POW_CLOAK); + call_object_create_egg(playerobj, 1, POW_CLOAK); #if defined(DXX_BUILD_DESCENT_II) if (player_info.powerup_flags & PLAYER_FLAGS_MAP_ALL) - call_object_create_egg(playerobj, 1, OBJ_POWERUP, POW_FULL_MAP); + call_object_create_egg(playerobj, 1, POW_FULL_MAP); if (player_info.powerup_flags & PLAYER_FLAGS_AFTERBURNER) - call_object_create_egg(playerobj, 1, OBJ_POWERUP, POW_AFTERBURNER); + call_object_create_egg(playerobj, 1, POW_AFTERBURNER); if (player_info.powerup_flags & PLAYER_FLAGS_AMMO_RACK) - call_object_create_egg(playerobj, 1, OBJ_POWERUP, POW_AMMO_RACK); + call_object_create_egg(playerobj, 1, POW_AMMO_RACK); if (player_info.powerup_flags & PLAYER_FLAGS_CONVERTER) - call_object_create_egg(playerobj, 1, OBJ_POWERUP, POW_CONVERTER); + call_object_create_egg(playerobj, 1, POW_CONVERTER); if (player_info.powerup_flags & PLAYER_FLAGS_HEADLIGHT) - call_object_create_egg(playerobj, 1, OBJ_POWERUP, POW_HEADLIGHT); + call_object_create_egg(playerobj, 1, POW_HEADLIGHT); // drop the other enemies flag if you have it if (game_mode_capture_flag() && (player_info.powerup_flags & PLAYER_FLAGS_FLAG)) { - call_object_create_egg(playerobj, 1, OBJ_POWERUP, get_team (get_player_id(playerobj)) == TEAM_RED ? POW_FLAG_BLUE : POW_FLAG_RED); + call_object_create_egg(playerobj, 1, get_team(get_player_id(playerobj)) == TEAM_RED ? POW_FLAG_BLUE : POW_FLAG_RED); } @@ -1981,7 +1981,7 @@ void drop_player_eggs(const vobjptridx_t playerobj) // Drop hoard orbs unsigned max_count = min(secondary_ammo[PROXIMITY_INDEX], static_cast(12)); for (int i=0; i 0) { - return object_create_player_egg(type, id, count, objp.mtype.phys_info.velocity, objp.pos, vsegptridx(objp.segnum)); + return object_create_player_egg(OBJ_POWERUP, id, count, objp.mtype.phys_info.velocity, objp.pos, vsegptridx(objp.segnum)); } return object_none; diff --git a/similar/main/multi.cpp b/similar/main/multi.cpp index 3c6f70736..d757cf7a9 100644 --- a/similar/main/multi.cpp +++ b/similar/main/multi.cpp @@ -2232,7 +2232,7 @@ static void multi_do_create_powerup(const playernum_t pnum, const ubyte *buf) } Net_create_loc = 0; - const auto &&my_objnum = call_object_create_egg(vobjptr(Players[pnum].objnum), 1, OBJ_POWERUP, powerup_type); + const auto &&my_objnum = call_object_create_egg(vobjptr(Players[pnum].objnum), 1, powerup_type); if (my_objnum == object_none) { return;