diff --git a/similar/main/multi.cpp b/similar/main/multi.cpp index 1474564fe..9353a54a5 100644 --- a/similar/main/multi.cpp +++ b/similar/main/multi.cpp @@ -338,7 +338,7 @@ int GetMyNetRanking() rank=static_cast((static_cast(PlayerCfg.NetlifeKills)/3000.0)*8.0); eff = static_cast( - static_cast( + ( static_cast(PlayerCfg.NetlifeKills) / ( static_cast(PlayerCfg.NetlifeKilled) + static_cast(PlayerCfg.NetlifeKills) ) @@ -2178,9 +2178,9 @@ static void multi_do_controlcen_fire(const ubyte *buf) memcpy(&to_target, buf+count, 12); count += 12; if (words_bigendian)// swap the vector to_target { - to_target.x = static_cast(INTEL_INT(static_cast(to_target.x))); - to_target.y = static_cast(INTEL_INT(static_cast(to_target.y))); - to_target.z = static_cast(INTEL_INT(static_cast(to_target.z))); + to_target.x = INTEL_INT(static_cast(to_target.x)); + to_target.y = INTEL_INT(static_cast(to_target.y)); + to_target.z = INTEL_INT(static_cast(to_target.z)); } gun_num = buf[count]; count += 1; objnum = GET_INTEL_SHORT(buf + count); count += 2; @@ -2206,9 +2206,9 @@ static void multi_do_create_powerup(const playernum_t pnum, const ubyte *buf) memcpy(&new_pos, buf+count, sizeof(vms_vector)); count+=sizeof(vms_vector); if (words_bigendian) { - new_pos.x = static_cast(SWAPINT(static_cast(new_pos.x))); - new_pos.y = static_cast(SWAPINT(static_cast(new_pos.y))); - new_pos.z = static_cast(SWAPINT(static_cast(new_pos.z))); + new_pos.x = SWAPINT(static_cast(new_pos.x)); + new_pos.y = SWAPINT(static_cast(new_pos.y)); + new_pos.z = SWAPINT(static_cast(new_pos.z)); } Net_create_loc = 0; @@ -2902,9 +2902,9 @@ void multi_send_controlcen_fire(const vms_vector &to_goal, int best_gun_num, obj if (words_bigendian) { vms_vector swapped_vec; - swapped_vec.x = static_cast(INTEL_INT(static_cast(to_goal.x))); - swapped_vec.y = static_cast(INTEL_INT(static_cast(to_goal.y))); - swapped_vec.z = static_cast(INTEL_INT(static_cast(to_goal.z))); + swapped_vec.x = INTEL_INT(static_cast(to_goal.x)); + swapped_vec.y = INTEL_INT(static_cast(to_goal.y)); + swapped_vec.z = INTEL_INT(static_cast(to_goal.z)); memcpy(&multibuf[count], &swapped_vec, 12); } else @@ -2937,9 +2937,9 @@ void multi_send_create_powerup(powerup_type_t powerup_type, segnum_t segnum, obj if (words_bigendian) { vms_vector swapped_vec; - swapped_vec.x = static_cast(INTEL_INT(static_cast(pos.x))); - swapped_vec.y = static_cast(INTEL_INT(static_cast(pos.y))); - swapped_vec.z = static_cast(INTEL_INT(static_cast(pos.z))); + swapped_vec.x = INTEL_INT(static_cast(pos.x)); + swapped_vec.y = INTEL_INT(static_cast(pos.y)); + swapped_vec.z = INTEL_INT(static_cast(pos.z)); memcpy(&multibuf[count], &swapped_vec, 12); count += 12; }