From: Mario Date: Fri, 24 Apr 2015 04:55:56 +0000 (+1000) Subject: Convert a load more floats into ints and bools X-Git-Tag: xonotic-v0.8.1~75 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1aac6cbd00e98ca537937fdc9490216a50cf3caa;p=xonotic%2Fxonotic-data.pk3dir.git Convert a load more floats into ints and bools --- diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 015c13f14..f84eb008b 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -128,12 +128,12 @@ float autocvar_g_balance_keyhunt_delay_tracking; float autocvar_g_balance_keyhunt_dropvelocity; float autocvar_g_balance_keyhunt_maxdist; float autocvar_g_balance_keyhunt_protecttime; -float autocvar_g_balance_keyhunt_score_capture; -float autocvar_g_balance_keyhunt_score_carrierfrag; -float autocvar_g_balance_keyhunt_score_collect; -float autocvar_g_balance_keyhunt_score_destroyed; -float autocvar_g_balance_keyhunt_score_destroyed_ownfactor; -float autocvar_g_balance_keyhunt_score_push; +int autocvar_g_balance_keyhunt_score_capture; +int autocvar_g_balance_keyhunt_score_carrierfrag; +int autocvar_g_balance_keyhunt_score_collect; +int autocvar_g_balance_keyhunt_score_destroyed; +int autocvar_g_balance_keyhunt_score_destroyed_ownfactor; +int autocvar_g_balance_keyhunt_score_push; float autocvar_g_balance_keyhunt_throwvelocity; float autocvar_g_balance_kill_delay; float autocvar_g_balance_kill_antispam; @@ -145,18 +145,18 @@ float autocvar_g_balance_nexball_secondary_force; float autocvar_g_balance_nexball_secondary_lifetime; float autocvar_g_balance_nexball_secondary_refire; float autocvar_g_balance_nexball_secondary_speed; -float autocvar_g_balance_nix_ammo_cells; -float autocvar_g_balance_nix_ammo_plasma; -float autocvar_g_balance_nix_ammo_fuel; -float autocvar_g_balance_nix_ammo_nails; -float autocvar_g_balance_nix_ammo_rockets; -float autocvar_g_balance_nix_ammo_shells; -float autocvar_g_balance_nix_ammoincr_cells; -float autocvar_g_balance_nix_ammoincr_plasma; -float autocvar_g_balance_nix_ammoincr_fuel; -float autocvar_g_balance_nix_ammoincr_nails; -float autocvar_g_balance_nix_ammoincr_rockets; -float autocvar_g_balance_nix_ammoincr_shells; +int autocvar_g_balance_nix_ammo_cells; +int autocvar_g_balance_nix_ammo_plasma; +int autocvar_g_balance_nix_ammo_fuel; +int autocvar_g_balance_nix_ammo_nails; +int autocvar_g_balance_nix_ammo_rockets; +int autocvar_g_balance_nix_ammo_shells; +int autocvar_g_balance_nix_ammoincr_cells; +int autocvar_g_balance_nix_ammoincr_plasma; +int autocvar_g_balance_nix_ammoincr_fuel; +int autocvar_g_balance_nix_ammoincr_nails; +int autocvar_g_balance_nix_ammoincr_rockets; +int autocvar_g_balance_nix_ammoincr_shells; float autocvar_g_balance_nix_incrtime; float autocvar_g_balance_nix_roundtime; float autocvar_g_balance_pause_armor_rot; @@ -179,8 +179,8 @@ float autocvar_g_balance_powerup_strength_selfforce; float autocvar_g_balance_powerup_strength_time; float autocvar_g_balance_superweapons_time; float autocvar_g_balance_selfdamagepercent; -float autocvar_g_balance_teams; -float autocvar_g_balance_teams_prevent_imbalance; +bool autocvar_g_balance_teams; +bool autocvar_g_balance_teams_prevent_imbalance; float autocvar_g_balance_teams_scorefactor; float autocvar_g_ballistics_density_corpse; float autocvar_g_ballistics_density_player; @@ -190,47 +190,47 @@ float autocvar_g_ban_default_masksize; float autocvar_g_ban_sync_interval; float autocvar_g_ban_sync_timeout; string autocvar_g_ban_sync_trusted_servers; -float autocvar_g_ban_sync_trusted_servers_verify; +bool autocvar_g_ban_sync_trusted_servers_verify; string autocvar_g_ban_sync_uri; string autocvar_g_banned_list; -float autocvar_g_banned_list_idmode; -float autocvar_g_bastet; -float autocvar_g_botclip_collisions; -float autocvar_g_bugrigs; +bool autocvar_g_banned_list_idmode; +bool autocvar_g_bastet; +bool autocvar_g_botclip_collisions; +bool autocvar_g_bugrigs; float autocvar_g_ca_damage2score_multiplier; -float autocvar_g_ca_point_leadlimit; -float autocvar_g_ca_point_limit; +int autocvar_g_ca_point_leadlimit; +int autocvar_g_ca_point_limit; float autocvar_g_ca_round_timelimit; -float autocvar_g_ca_spectate_enemies; -float autocvar_g_ca_teams; -float autocvar_g_ca_teams_override; -float autocvar_g_ca_team_spawns; +bool autocvar_g_ca_spectate_enemies; +int autocvar_g_ca_teams; +int autocvar_g_ca_teams_override; +bool autocvar_g_ca_team_spawns; float autocvar_g_ca_warmup; -float autocvar_g_campaign; +bool autocvar_g_campaign; #define autocvar_g_campaign_forceteam cvar("g_campaign_forceteam") -float autocvar_g_campaign_skill; -float autocvar_g_casings; -float autocvar_g_changeteam_banned; +int autocvar_g_campaign_skill; +int autocvar_g_casings; +bool autocvar_g_changeteam_banned; float autocvar_g_chat_flood_burst; float autocvar_g_chat_flood_burst_team; float autocvar_g_chat_flood_burst_tell; float autocvar_g_chat_flood_lmax; float autocvar_g_chat_flood_lmax_team; float autocvar_g_chat_flood_lmax_tell; -float autocvar_g_chat_flood_notify_flooder; +bool autocvar_g_chat_flood_notify_flooder; float autocvar_g_chat_flood_spl; float autocvar_g_chat_flood_spl_team; float autocvar_g_chat_flood_spl_tell; -float autocvar_g_chat_nospectators; -float autocvar_g_chat_teamcolors; -float autocvar_g_chat_tellprivacy; -float autocvar_g_ctf_allow_vehicle_carry; -float autocvar_g_ctf_allow_vehicle_touch; -float autocvar_g_ctf_allow_monster_touch; -float autocvar_g_ctf_throw; +int autocvar_g_chat_nospectators; +bool autocvar_g_chat_teamcolors; +bool autocvar_g_chat_tellprivacy; +bool autocvar_g_ctf_allow_vehicle_carry; +bool autocvar_g_ctf_allow_vehicle_touch; +bool autocvar_g_ctf_allow_monster_touch; +bool autocvar_g_ctf_throw; float autocvar_g_ctf_throw_angle_max; float autocvar_g_ctf_throw_angle_min; -float autocvar_g_ctf_throw_punish_count; +int autocvar_g_ctf_throw_punish_count; float autocvar_g_ctf_throw_punish_delay; float autocvar_g_ctf_throw_punish_time; float autocvar_g_ctf_throw_strengthmultiplier; @@ -238,31 +238,31 @@ float autocvar_g_ctf_throw_velocity_forward; float autocvar_g_ctf_throw_velocity_up; float autocvar_g_ctf_drop_velocity_up; float autocvar_g_ctf_drop_velocity_side; -float autocvar_g_ctf_portalteleport; -float autocvar_g_ctf_pass; +bool autocvar_g_ctf_portalteleport; +bool autocvar_g_ctf_pass; float autocvar_g_ctf_pass_arc; float autocvar_g_ctf_pass_arc_max; float autocvar_g_ctf_pass_directional_max; float autocvar_g_ctf_pass_directional_min; float autocvar_g_ctf_pass_radius; float autocvar_g_ctf_pass_wait; -float autocvar_g_ctf_pass_request; +bool autocvar_g_ctf_pass_request; float autocvar_g_ctf_pass_turnrate; float autocvar_g_ctf_pass_timelimit; float autocvar_g_ctf_pass_velocity; -float autocvar_g_ctf_dynamiclights; +bool autocvar_g_ctf_dynamiclights; string autocvar_g_ctf_flag_blue_model; -float autocvar_g_ctf_flag_blue_skin; +int autocvar_g_ctf_flag_blue_skin; float autocvar_g_ctf_flag_collect_delay; float autocvar_g_ctf_flag_damageforcescale; -float autocvar_g_ctf_flag_dropped_waypoint; +int autocvar_g_ctf_flag_dropped_waypoint; float autocvar_g_ctf_flag_dropped_floatinwater; -float autocvar_g_ctf_flag_glowtrails; +bool autocvar_g_ctf_flag_glowtrails; float autocvar_g_ctf_flag_health; string autocvar_g_ctf_flag_red_model; -float autocvar_g_ctf_flag_red_skin; +int autocvar_g_ctf_flag_red_skin; float autocvar_g_ctf_flag_return_time; -float autocvar_g_ctf_flag_return_when_unreachable; +bool autocvar_g_ctf_flag_return_when_unreachable; float autocvar_g_ctf_flag_return_damage; float autocvar_g_ctf_flag_return_dropped; float autocvar_g_ctf_flagcarrier_auto_helpme_damage; @@ -272,82 +272,82 @@ float autocvar_g_ctf_flagcarrier_selfforcefactor; float autocvar_g_ctf_flagcarrier_damagefactor; float autocvar_g_ctf_flagcarrier_forcefactor; //float autocvar_g_ctf_flagcarrier_waypointforenemy_spotting; -float autocvar_g_ctf_fullbrightflags; -float autocvar_g_ctf_ignore_frags; -float autocvar_g_ctf_score_capture; -float autocvar_g_ctf_score_capture_assist; -float autocvar_g_ctf_score_kill; -float autocvar_g_ctf_score_penalty_drop; -//float autocvar_g_ctf_score_penalty_suicidedrop; -float autocvar_g_ctf_score_penalty_returned; -float autocvar_g_ctf_score_pickup_base; -float autocvar_g_ctf_score_pickup_dropped_early; -float autocvar_g_ctf_score_pickup_dropped_late; -float autocvar_g_ctf_score_return; +bool autocvar_g_ctf_fullbrightflags; +bool autocvar_g_ctf_ignore_frags; +int autocvar_g_ctf_score_capture; +int autocvar_g_ctf_score_capture_assist; +int autocvar_g_ctf_score_kill; +int autocvar_g_ctf_score_penalty_drop; +//int autocvar_g_ctf_score_penalty_suicidedrop; +int autocvar_g_ctf_score_penalty_returned; +int autocvar_g_ctf_score_pickup_base; +int autocvar_g_ctf_score_pickup_dropped_early; +int autocvar_g_ctf_score_pickup_dropped_late; +int autocvar_g_ctf_score_return; float autocvar_g_ctf_shield_force; float autocvar_g_ctf_shield_max_ratio; -float autocvar_g_ctf_shield_min_negscore; -float autocvar_g_ctf_stalemate; -float autocvar_g_ctf_stalemate_endcondition; +int autocvar_g_ctf_shield_min_negscore; +bool autocvar_g_ctf_stalemate; +int autocvar_g_ctf_stalemate_endcondition; float autocvar_g_ctf_stalemate_time; -float autocvar_g_ctf_reverse; +bool autocvar_g_ctf_reverse; float autocvar_g_ctf_dropped_capture_delay; float autocvar_g_ctf_dropped_capture_radius; float autocvar_g_cts_finish_kill_delay; -float autocvar_g_cts_selfdamage; -float autocvar_g_debug_bot_commands; -float autocvar_g_domination_default_teams; -float autocvar_g_domination_disable_frags; -float autocvar_g_domination_point_amt; -float autocvar_g_domination_point_fullbright; -float autocvar_g_domination_point_leadlimit; -float autocvar_g_domination_roundbased; -float autocvar_g_domination_roundbased_point_limit; +bool autocvar_g_cts_selfdamage; +bool autocvar_g_debug_bot_commands; +int autocvar_g_domination_default_teams; +bool autocvar_g_domination_disable_frags; +int autocvar_g_domination_point_amt; +bool autocvar_g_domination_point_fullbright; +int autocvar_g_domination_point_leadlimit; +bool autocvar_g_domination_roundbased; +int autocvar_g_domination_roundbased_point_limit; float autocvar_g_domination_round_timelimit; float autocvar_g_domination_warmup; #define autocvar_g_domination_point_limit cvar("g_domination_point_limit") float autocvar_g_domination_point_rate; -float autocvar_g_domination_teams_override; -float autocvar_g_forced_respawn; +int autocvar_g_domination_teams_override; +bool autocvar_g_forced_respawn; string autocvar_g_forced_team_blue; string autocvar_g_forced_team_otherwise; string autocvar_g_forced_team_pink; string autocvar_g_forced_team_red; string autocvar_g_forced_team_yellow; -float autocvar_g_freezetag_frozen_damage_trigger; +bool autocvar_g_freezetag_frozen_damage_trigger; float autocvar_g_freezetag_frozen_force; float autocvar_g_freezetag_frozen_maxtime; float autocvar_g_freezetag_revive_falldamage; float autocvar_g_freezetag_revive_falldamage_health; -float autocvar_g_freezetag_revive_nade; +bool autocvar_g_freezetag_revive_nade; float autocvar_g_freezetag_revive_nade_health; -float autocvar_g_freezetag_point_leadlimit; -float autocvar_g_freezetag_point_limit; +int autocvar_g_freezetag_point_leadlimit; +int autocvar_g_freezetag_point_limit; float autocvar_g_freezetag_revive_extra_size; float autocvar_g_freezetag_revive_speed; float autocvar_g_freezetag_revive_clearspeed; float autocvar_g_freezetag_round_timelimit; -float autocvar_g_freezetag_teams; -float autocvar_g_freezetag_teams_override; -float autocvar_g_freezetag_team_spawns; +int autocvar_g_freezetag_teams; +int autocvar_g_freezetag_teams_override; +bool autocvar_g_freezetag_team_spawns; float autocvar_g_freezetag_warmup; #define autocvar_g_friendlyfire cvar("g_friendlyfire") #define autocvar_g_friendlyfire_virtual cvar("g_friendlyfire_virtual") #define autocvar_g_friendlyfire_virtual_force cvar("g_friendlyfire_virtual_force") -float autocvar_g_full_getstatus_responses; -float autocvar_g_fullbrightitems; -float autocvar_g_fullbrightplayers; +bool autocvar_g_full_getstatus_responses; +bool autocvar_g_fullbrightitems; +bool autocvar_g_fullbrightplayers; #define autocvar_g_grappling_hook cvar("g_grappling_hook") -float autocvar_g_grappling_hook_tarzan; -float autocvar_g_hitplots; +int autocvar_g_grappling_hook_tarzan; +bool autocvar_g_hitplots; string autocvar_g_hitplots_individuals; float autocvar_g_jetpack_acceleration_side; float autocvar_g_jetpack_acceleration_up; float autocvar_g_jetpack_antigravity; -float autocvar_g_jetpack_fuel; +int autocvar_g_jetpack_fuel; float autocvar_g_jetpack_maxspeed_side; float autocvar_g_jetpack_maxspeed_up; -float autocvar_g_keepaway_ballcarrier_effects; +int autocvar_g_keepaway_ballcarrier_effects; float autocvar_g_keepaway_ballcarrier_damage; float autocvar_g_keepaway_ballcarrier_force; float autocvar_g_keepaway_ballcarrier_highspeed; @@ -357,61 +357,61 @@ float autocvar_g_keepaway_noncarrier_damage; float autocvar_g_keepaway_noncarrier_force; float autocvar_g_keepaway_noncarrier_selfdamage; float autocvar_g_keepaway_noncarrier_selfforce; -float autocvar_g_keepaway_noncarrier_warn; -float autocvar_g_keepaway_score_bckill; -float autocvar_g_keepaway_score_killac; -float autocvar_g_keepaway_score_timepoints; +bool autocvar_g_keepaway_noncarrier_warn; +int autocvar_g_keepaway_score_bckill; +int autocvar_g_keepaway_score_killac; +int autocvar_g_keepaway_score_timepoints; float autocvar_g_keepaway_score_timeinterval; float autocvar_g_keepawayball_damageforcescale; -float autocvar_g_keepawayball_effects; +int autocvar_g_keepawayball_effects; float autocvar_g_keepawayball_respawntime; -float autocvar_g_keepawayball_trail_color; -float autocvar_g_keyhunt_point_leadlimit; +int autocvar_g_keepawayball_trail_color; +int autocvar_g_keyhunt_point_leadlimit; #define autocvar_g_keyhunt_point_limit cvar("g_keyhunt_point_limit") -float autocvar_g_keyhunt_teams; -float autocvar_g_keyhunt_teams_override; -float autocvar_g_lms_extra_lives; -float autocvar_g_lms_join_anytime; -float autocvar_g_lms_last_join; +int autocvar_g_keyhunt_teams; +int autocvar_g_keyhunt_teams_override; +int autocvar_g_lms_extra_lives; +bool autocvar_g_lms_join_anytime; +int autocvar_g_lms_last_join; #define autocvar_g_lms_lives_override cvar("g_lms_lives_override") -float autocvar_g_lms_regenerate; +bool autocvar_g_lms_regenerate; #define autocvar_g_maplist cvar_string("g_maplist") -float autocvar_g_maplist_check_waypoints; -float autocvar_g_maplist_index; +bool autocvar_g_maplist_check_waypoints; +int autocvar_g_maplist_index; string autocvar_g_maplist_mostrecent; -float autocvar_g_maplist_mostrecent_count; -float autocvar_g_maplist_selectrandom; +int autocvar_g_maplist_mostrecent_count; +bool autocvar_g_maplist_selectrandom; float autocvar_g_maplist_shuffle; #define autocvar_g_maplist_votable cvar("g_maplist_votable") -float autocvar_g_maplist_votable_abstain; +bool autocvar_g_maplist_votable_abstain; float autocvar_g_maplist_votable_keeptwotime; -float autocvar_g_maplist_votable_nodetail; +bool autocvar_g_maplist_votable_nodetail; string autocvar_g_maplist_votable_screenshot_dir; -float autocvar_g_maplist_votable_suggestions; -float autocvar_g_maplist_votable_suggestions_override_mostrecent; +bool autocvar_g_maplist_votable_suggestions; +bool autocvar_g_maplist_votable_suggestions_override_mostrecent; float autocvar_g_maplist_votable_timeout; -float autocvar_g_maxplayers; +int autocvar_g_maxplayers; float autocvar_g_maxplayers_spectator_blocktime; float autocvar_g_maxpushtime; float autocvar_g_maxspeed; float autocvar_g_midair_shieldtime; #define autocvar_g_instagib cvar("g_instagib") -float autocvar_g_instagib_ammo_drop; -float autocvar_g_instagib_extralives; +int autocvar_g_instagib_ammo_drop; +int autocvar_g_instagib_extralives; float autocvar_g_instagib_speed_highspeed; float autocvar_g_instagib_invis_alpha; #define autocvar_g_mirrordamage cvar("g_mirrordamage") #define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual") float autocvar_g_movement_highspeed = 1; -float autocvar_g_multijump; +int autocvar_g_multijump; float autocvar_g_multijump_add; float autocvar_g_multijump_speed; string autocvar_g_mutatormsg; float autocvar_g_nexball_basketball_bouncefactor; float autocvar_g_nexball_basketball_bouncestop; float autocvar_g_nexball_basketball_carrier_highspeed; -float autocvar_g_nexball_basketball_meter; +bool autocvar_g_nexball_basketball_meter; float autocvar_g_nexball_basketball_meter_maxpower; float autocvar_g_nexball_basketball_meter_minpower; float autocvar_g_nexball_delay_collect; @@ -419,79 +419,79 @@ float autocvar_g_nexball_delay_goal; float autocvar_g_nexball_delay_start; float autocvar_g_nexball_football_bouncefactor; float autocvar_g_nexball_football_bouncestop; -float autocvar_g_nexball_goalleadlimit; +int autocvar_g_nexball_goalleadlimit; #define autocvar_g_nexball_goallimit cvar("g_nexball_goallimit") -float autocvar_g_nexball_radar_showallplayers; -float autocvar_g_nexball_sound_bounce; -float autocvar_g_nexball_trail_color; +bool autocvar_g_nexball_radar_showallplayers; +bool autocvar_g_nexball_sound_bounce; +int autocvar_g_nexball_trail_color; //float autocvar_g_nick_flood_penalty; -float autocvar_g_nick_flood_penalty_red; -float autocvar_g_nick_flood_penalty_yellow; +int autocvar_g_nick_flood_penalty_red; +int autocvar_g_nick_flood_penalty_yellow; //float autocvar_g_nick_flood_timeout; -float autocvar_g_nix_with_healtharmor; -float autocvar_g_nix_with_blaster; -float autocvar_g_nix_with_powerups; -float autocvar_g_nodepthtestitems; -float autocvar_g_nodepthtestplayers; -float autocvar_g_norecoil; +bool autocvar_g_nix_with_healtharmor; +bool autocvar_g_nix_with_blaster; +bool autocvar_g_nix_with_powerups; +bool autocvar_g_nodepthtestitems; +bool autocvar_g_nodepthtestplayers; +bool autocvar_g_norecoil; float autocvar_g_onslaught_cp_buildhealth; float autocvar_g_onslaught_cp_buildtime; float autocvar_g_onslaught_cp_health; float autocvar_g_onslaught_cp_regen; float autocvar_g_onslaught_gen_health; -float autocvar_g_pickup_cells_max; -float autocvar_g_pickup_plasma_max; -float autocvar_g_pickup_fuel_max; -float autocvar_g_pickup_items; -float autocvar_g_pickup_nails_max; -float autocvar_g_pickup_rockets_max; -float autocvar_g_pickup_shells_max; +int autocvar_g_pickup_cells_max; +int autocvar_g_pickup_plasma_max; +int autocvar_g_pickup_fuel_max; +int autocvar_g_pickup_items; +int autocvar_g_pickup_nails_max; +int autocvar_g_pickup_rockets_max; +int autocvar_g_pickup_shells_max; float autocvar_g_player_alpha; float autocvar_g_player_brightness; -float autocvar_g_playerclip_collisions; -float autocvar_g_powerups; -float autocvar_g_projectiles_damage; -float autocvar_g_projectiles_keep_owner; -float autocvar_g_projectiles_newton_style; +bool autocvar_g_playerclip_collisions; +int autocvar_g_powerups; +int autocvar_g_projectiles_damage; +bool autocvar_g_projectiles_keep_owner; +int autocvar_g_projectiles_newton_style; float autocvar_g_projectiles_newton_style_2_maxfactor; float autocvar_g_projectiles_newton_style_2_minfactor; -float autocvar_g_projectiles_spread_style; +int autocvar_g_projectiles_spread_style; #define autocvar_g_race_laps_limit cvar("g_race_laps_limit") float autocvar_g_race_qualifying_timelimit; float autocvar_g_race_qualifying_timelimit_override; -float autocvar_g_race_teams; +int autocvar_g_race_teams; float autocvar_g_respawn_delay_small; -float autocvar_g_respawn_delay_small_count; +int autocvar_g_respawn_delay_small_count; float autocvar_g_respawn_delay_large; -float autocvar_g_respawn_delay_large_count; +int autocvar_g_respawn_delay_large_count; float autocvar_g_respawn_delay_max; -float autocvar_g_respawn_ghosts; +bool autocvar_g_respawn_ghosts; float autocvar_g_respawn_ghosts_maxtime; float autocvar_g_respawn_ghosts_speed; -float autocvar_g_respawn_waves; -float autocvar_g_running_guns; -float autocvar_g_shootfromcenter; -float autocvar_g_shootfromclient; -float autocvar_g_shootfromeye; +int autocvar_g_respawn_waves; +bool autocvar_g_running_guns; +bool autocvar_g_shootfromcenter; +int autocvar_g_shootfromclient; +bool autocvar_g_shootfromeye; string autocvar_g_shootfromfixedorigin; -float autocvar_g_showweaponspawns; -float autocvar_g_spawn_alloweffects; +int autocvar_g_showweaponspawns; +bool autocvar_g_spawn_alloweffects; float autocvar_g_spawn_furthest; -float autocvar_g_spawn_useallspawns; -float autocvar_g_spawnpoints_auto_move_out_of_solid; +bool autocvar_g_spawn_useallspawns; +bool autocvar_g_spawnpoints_auto_move_out_of_solid; #define autocvar_g_spawnshieldtime cvar("g_spawnshieldtime") -float autocvar_g_tdm_team_spawns; -float autocvar_g_tdm_point_limit; -float autocvar_g_tdm_point_leadlimit; -float autocvar_g_tdm_teams; -float autocvar_g_tdm_teams_override; +bool autocvar_g_tdm_team_spawns; +int autocvar_g_tdm_point_limit; +int autocvar_g_tdm_point_leadlimit; +int autocvar_g_tdm_teams; +int autocvar_g_tdm_teams_override; float autocvar_g_teamdamage_resetspeed; float autocvar_g_teamdamage_threshold; -float autocvar_g_telefrags; -float autocvar_g_telefrags_avoid; -float autocvar_g_telefrags_teamplay; +bool autocvar_g_telefrags; +bool autocvar_g_telefrags_avoid; +bool autocvar_g_telefrags_teamplay; float autocvar_g_teleport_maxspeed; -float autocvar_g_throughfloor_debug; +bool autocvar_g_throughfloor_debug; float autocvar_g_throughfloor_damage; float autocvar_g_throughfloor_force; float autocvar_g_throughfloor_damage_max_stddev; @@ -504,10 +504,10 @@ float autocvar_g_triggerimpulse_accel_multiplier; float autocvar_g_triggerimpulse_accel_power; float autocvar_g_triggerimpulse_directional_multiplier; float autocvar_g_triggerimpulse_radial_multiplier; -float autocvar_g_turrets; +bool autocvar_g_turrets; float autocvar_g_turrets_aimidle_delay; -float autocvar_g_turrets_nofire; -float autocvar_g_turrets_reloadcvars; +bool autocvar_g_turrets_nofire; +bool autocvar_g_turrets_reloadcvars; float autocvar_g_turrets_targetscan_maxdelay; float autocvar_g_turrets_targetscan_mindelay; float autocvar_g_turrets_unit_ewheel_speed_fast; @@ -545,10 +545,10 @@ float autocvar_g_turrets_unit_walker_turn_walk; float autocvar_g_turrets_unit_walker_turn_run; float autocvar_g_turrets_unit_walker_turn_strafe; float autocvar_g_turrets_unit_walker_turn_swim; -float autocvar_g_use_ammunition; -float autocvar_g_waypointeditor; -float autocvar_g_waypointeditor_auto; -float autocvar_g_waypoints_for_items; +bool autocvar_g_use_ammunition; +bool autocvar_g_waypointeditor; +int autocvar_g_waypointeditor_auto; +int autocvar_g_waypoints_for_items; float autocvar_g_weapon_charge_colormod_blue_full; float autocvar_g_weapon_charge_colormod_blue_half; float autocvar_g_weapon_charge_colormod_green_full; @@ -557,34 +557,34 @@ float autocvar_g_weapon_charge_colormod_hdrmultiplier; float autocvar_g_weapon_charge_colormod_red_full; float autocvar_g_weapon_charge_colormod_red_half; #define autocvar_g_weapon_stay cvar("g_weapon_stay") -float autocvar_g_weapon_throwable; +bool autocvar_g_weapon_throwable; #define autocvar_g_weaponarena cvar_string("g_weaponarena") string autocvar_g_xonoticversion; float autocvar_gameversion; float autocvar_gameversion_min; float autocvar_gameversion_max; string autocvar_hostname; -float autocvar_lastlevel; -float autocvar_leadlimit; -float autocvar_leadlimit_and_fraglimit; -float autocvar_leadlimit_override; -float autocvar_loddebug; -float autocvar_minplayers; +bool autocvar_lastlevel; +int autocvar_leadlimit; +int autocvar_leadlimit_and_fraglimit; +int autocvar_leadlimit_override; +int autocvar_loddebug; +int autocvar_minplayers; string autocvar_nextmap; -float autocvar_prvm_backtraceforwarnings; +bool autocvar_prvm_backtraceforwarnings; string autocvar_quit_and_redirect; float autocvar_quit_and_redirect_timer; -float autocvar_quit_when_empty; +bool autocvar_quit_when_empty; float autocvar_r_showbboxes; -float autocvar_rescan_pending; -float autocvar_samelevel; +int autocvar_rescan_pending; +bool autocvar_samelevel; string autocvar_sessionid; #define autocvar_skill cvar("skill") float autocvar_skill_auto; #define autocvar_slowmo cvar("slowmo") float autocvar_snd_soundradius; -float autocvar_spawn_debug; -float autocvar_speedmeter; +int autocvar_spawn_debug; +bool autocvar_speedmeter; float autocvar_sv_accelerate; float autocvar_sv_accuracy_data_share = 1; string autocvar_sv_adminnick; @@ -599,103 +599,103 @@ float autocvar_sv_airspeedlimit_nonqw; float autocvar_sv_airstopaccelerate; float autocvar_sv_airstrafeaccel_qw; float autocvar_sv_airstrafeaccelerate; -float autocvar_sv_autoscreenshot; -float autocvar_sv_cheats; +bool autocvar_sv_autoscreenshot; +int autocvar_sv_cheats; float autocvar_sv_clientcommand_antispam_time; -float autocvar_sv_clientcommand_antispam_count; -float autocvar_sv_curl_serverpackages_auto; -float autocvar_sv_db_saveasdump; -float autocvar_sv_defaultcharacter; +int autocvar_sv_clientcommand_antispam_count; +bool autocvar_sv_curl_serverpackages_auto; +bool autocvar_sv_db_saveasdump; +bool autocvar_sv_defaultcharacter; string autocvar_sv_defaultplayercolors; string autocvar_sv_defaultplayermodel; string autocvar_sv_defaultplayermodel_blue; string autocvar_sv_defaultplayermodel_pink; string autocvar_sv_defaultplayermodel_red; string autocvar_sv_defaultplayermodel_yellow; -float autocvar_sv_defaultplayerskin; +int autocvar_sv_defaultplayerskin; float autocvar_sv_dodging_delay; float autocvar_sv_dodging_height_threshold; float autocvar_sv_dodging_horiz_speed; float autocvar_sv_dodging_horiz_speed_frozen; float autocvar_sv_dodging_ramp_time; -float autocvar_sv_dodging_sound; +bool autocvar_sv_dodging_sound; float autocvar_sv_dodging_up_speed; float autocvar_sv_dodging_wall_distance_threshold; -float autocvar_sv_dodging_wall_dodging; -float autocvar_sv_dodging_frozen; -float autocvar_sv_dodging_frozen_doubletap; -float autocvar_sv_doublejump; -float autocvar_sv_eventlog; -float autocvar_sv_eventlog_console; -float autocvar_sv_eventlog_files; -float autocvar_sv_eventlog_files_counter; +bool autocvar_sv_dodging_wall_dodging; +bool autocvar_sv_dodging_frozen; +bool autocvar_sv_dodging_frozen_doubletap; +bool autocvar_sv_doublejump; +bool autocvar_sv_eventlog; +bool autocvar_sv_eventlog_console; +bool autocvar_sv_eventlog_files; +int autocvar_sv_eventlog_files_counter; string autocvar_sv_eventlog_files_nameprefix; string autocvar_sv_eventlog_files_namesuffix; -float autocvar_sv_eventlog_files_timestamps; +bool autocvar_sv_eventlog_files_timestamps; float autocvar_sv_friction; float autocvar_sv_friction_on_land; float autocvar_sv_gameplayfix_q2airaccelerate; -float autocvar_sv_gentle; +int autocvar_sv_gentle; #define autocvar_sv_gravity cvar("sv_gravity") string autocvar_sv_intermission_cdtrack; string autocvar_sv_jumpspeedcap_max; float autocvar_sv_jumpspeedcap_max_disable_on_ramps; string autocvar_sv_jumpspeedcap_min; float autocvar_sv_jumpvelocity; -float autocvar_sv_logscores_bots; -float autocvar_sv_logscores_console; -float autocvar_sv_logscores_file; +bool autocvar_sv_logscores_bots; +bool autocvar_sv_logscores_console; +bool autocvar_sv_logscores_file; string autocvar_sv_logscores_filename; float autocvar_sv_mapchange_delay; float autocvar_sv_maxairspeed; float autocvar_sv_maxairstrafespeed; float autocvar_sv_maxspeed; string autocvar_sv_motd; -float autocvar_sv_precacheplayermodels; +bool autocvar_sv_precacheplayermodels; //float autocvar_sv_precacheweapons; // WEAPONTODO? -float autocvar_sv_q3acompat_machineshotgunswap; -float autocvar_sv_ready_restart; -float autocvar_sv_ready_restart_after_countdown; -float autocvar_sv_ready_restart_repeatable; -float autocvar_sv_servermodelsonly; -float autocvar_sv_spectate; +bool autocvar_sv_q3acompat_machineshotgunswap; +bool autocvar_sv_ready_restart; +bool autocvar_sv_ready_restart_after_countdown; +bool autocvar_sv_ready_restart_repeatable; +bool autocvar_sv_servermodelsonly; +int autocvar_sv_spectate; float autocvar_sv_spectator_speed_multiplier; -float autocvar_sv_status_privacy; +bool autocvar_sv_status_privacy; float autocvar_sv_stepheight; float autocvar_sv_stopspeed; float autocvar_sv_strengthsound_antispam_refire_threshold; float autocvar_sv_strengthsound_antispam_time; -float autocvar_sv_teamnagger; -float autocvar_sv_timeout; +bool autocvar_sv_teamnagger; +bool autocvar_sv_timeout; float autocvar_sv_timeout_leadtime; float autocvar_sv_timeout_length; -float autocvar_sv_timeout_number; +int autocvar_sv_timeout_number; float autocvar_sv_timeout_resumetime; -float autocvar_sv_vote_call; -float autocvar_sv_vote_change; +bool autocvar_sv_vote_call; +bool autocvar_sv_vote_change; string autocvar_sv_vote_commands; -float autocvar_sv_vote_gametype; +bool autocvar_sv_vote_gametype; float autocvar_sv_vote_gametype_timeout; string autocvar_sv_vote_gametype_options; float autocvar_sv_vote_gametype_keeptwotime; -float autocvar_sv_vote_gametype_default_current; -float autocvar_sv_vote_limit; +bool autocvar_sv_vote_gametype_default_current; +int autocvar_sv_vote_limit; float autocvar_sv_vote_majority_factor; float autocvar_sv_vote_majority_factor_of_voted; -float autocvar_sv_vote_master; -float autocvar_sv_vote_master_callable; +bool autocvar_sv_vote_master; +bool autocvar_sv_vote_master_callable; string autocvar_sv_vote_master_commands; string autocvar_sv_vote_master_password; -float autocvar_sv_vote_master_playerlimit; -float autocvar_sv_vote_no_stops_vote; -float autocvar_sv_vote_nospectators; +int autocvar_sv_vote_master_playerlimit; +bool autocvar_sv_vote_no_stops_vote; +int autocvar_sv_vote_nospectators; //string autocvar_sv_vote_only_commands; -float autocvar_sv_vote_override_mostrecent; -float autocvar_sv_vote_singlecount; +bool autocvar_sv_vote_override_mostrecent; +bool autocvar_sv_vote_singlecount; float autocvar_sv_vote_stop; float autocvar_sv_vote_timeout; float autocvar_sv_vote_wait; -float autocvar_sv_vote_gamestart; +bool autocvar_sv_vote_gamestart; float autocvar_sv_warsowbunny_accel; float autocvar_sv_warsowbunny_airforwardaccel; float autocvar_sv_warsowbunny_backtosideratio; @@ -707,8 +707,8 @@ float autocvar_sv_waypointsprite_limitedrange; string autocvar_sv_weaponstats_file; float autocvar_sv_gibhealth; float autocvar_sys_ticrate; -float autocvar_teamplay_lockonrestart; -float autocvar_teamplay_mode; +bool autocvar_teamplay_lockonrestart; +int autocvar_teamplay_mode; #define autocvar_timelimit cvar("timelimit") #define autocvar_timelimit_override cvar("timelimit_override") float autocvar_timelimit_increment; @@ -716,66 +716,66 @@ float autocvar_timelimit_decrement; float autocvar_timelimit_min; float autocvar_timelimit_max; float autocvar_timelimit_overtime; -float autocvar_timelimit_overtimes; +int autocvar_timelimit_overtimes; float autocvar_timelimit_suddendeath; #define autocvar_utf8_enable cvar("utf8_enable") -float autocvar_waypoint_benchmark; -float autocvar_sv_gameplayfix_gravityunaffectedbyticrate; +bool autocvar_waypoint_benchmark; +bool autocvar_sv_gameplayfix_gravityunaffectedbyticrate; float autocvar_g_trueaim_minrange; -float autocvar_g_debug_defaultsounds; +bool autocvar_g_debug_defaultsounds; float autocvar_g_grab_range; -float autocvar_g_sandbox_info; -float autocvar_g_sandbox_readonly; +int autocvar_g_sandbox_info; +bool autocvar_g_sandbox_readonly; string autocvar_g_sandbox_storage_name; float autocvar_g_sandbox_storage_autosave; -float autocvar_g_sandbox_storage_autoload; +bool autocvar_g_sandbox_storage_autoload; float autocvar_g_sandbox_editor_flood; -float autocvar_g_sandbox_editor_maxobjects; -float autocvar_g_sandbox_editor_free; +int autocvar_g_sandbox_editor_maxobjects; +int autocvar_g_sandbox_editor_free; float autocvar_g_sandbox_editor_distance_spawn; float autocvar_g_sandbox_editor_distance_edit; float autocvar_g_sandbox_object_scale_min; float autocvar_g_sandbox_object_scale_max; float autocvar_g_sandbox_object_material_velocity_min; float autocvar_g_sandbox_object_material_velocity_factor; -float autocvar_g_max_info_autoscreenshot; -float autocvar_physics_ode; -float autocvar_g_physical_items; +int autocvar_g_max_info_autoscreenshot; +bool autocvar_physics_ode; +int autocvar_g_physical_items; float autocvar_g_physical_items_damageforcescale; float autocvar_g_physical_items_reset; float autocvar_g_monsters; -float autocvar_g_monsters_edit; -float autocvar_g_monsters_sounds; +bool autocvar_g_monsters_edit; +bool autocvar_g_monsters_sounds; float autocvar_g_monsters_think_delay; -float autocvar_g_monsters_max; -float autocvar_g_monsters_max_perplayer; +int autocvar_g_monsters_max; +int autocvar_g_monsters_max_perplayer; float autocvar_g_monsters_target_range; -float autocvar_g_monsters_target_infront; +bool autocvar_g_monsters_target_infront; float autocvar_g_monsters_attack_range; -float autocvar_g_monsters_score_kill; -float autocvar_g_monsters_score_spawned; -float autocvar_g_monsters_typefrag; -float autocvar_g_monsters_owners; +int autocvar_g_monsters_score_kill; +int autocvar_g_monsters_score_spawned; +bool autocvar_g_monsters_typefrag; +bool autocvar_g_monsters_owners; float autocvar_g_monsters_miniboss_chance; float autocvar_g_monsters_miniboss_healthboost; float autocvar_g_monsters_drop_time; float autocvar_g_monsters_spawnshieldtime; -float autocvar_g_monsters_teams; +bool autocvar_g_monsters_teams; float autocvar_g_monsters_respawn_delay; -float autocvar_g_monsters_respawn; +bool autocvar_g_monsters_respawn; float autocvar_g_monsters_armor_blockpercent; float autocvar_g_touchexplode_radius; float autocvar_g_touchexplode_damage; float autocvar_g_touchexplode_edgedamage; float autocvar_g_touchexplode_force; float autocvar_g_invasion_round_timelimit; -float autocvar_g_invasion_teams; -float autocvar_g_invasion_team_spawns; +int autocvar_g_invasion_teams; +bool autocvar_g_invasion_team_spawns; float autocvar_g_invasion_spawnpoint_spawn_delay; #define autocvar_g_invasion_point_limit cvar("g_invasion_point_limit") float autocvar_g_invasion_warmup; -float autocvar_g_invasion_monster_count; -float autocvar_g_invasion_zombies_only; +int autocvar_g_invasion_monster_count; +bool autocvar_g_invasion_zombies_only; float autocvar_g_invasion_spawn_delay; #define autocvar_g_bloodloss cvar("g_bloodloss") float autocvar_g_random_gravity_negative_chance; @@ -784,11 +784,11 @@ float autocvar_g_random_gravity_max; float autocvar_g_random_gravity_positive; float autocvar_g_random_gravity_negative; float autocvar_g_random_gravity_delay; -float autocvar_g_nades; +bool autocvar_g_nades; vector autocvar_g_nades_throw_offset; -float autocvar_g_nades_spawn; -float autocvar_g_nades_spawn_count; -float autocvar_g_nades_client_select; +bool autocvar_g_nades_spawn; +int autocvar_g_nades_spawn_count; +bool autocvar_g_nades_client_select; float autocvar_g_nades_nade_lifetime; float autocvar_g_nades_nade_minforce; float autocvar_g_nades_nade_maxforce; @@ -798,39 +798,39 @@ float autocvar_g_nades_nade_damage; float autocvar_g_nades_nade_edgedamage; float autocvar_g_nades_nade_radius; float autocvar_g_nades_nade_force; -float autocvar_g_nades_nade_newton_style; +int autocvar_g_nades_nade_newton_style; int autocvar_g_nades_napalm_ball_count; float autocvar_g_nades_napalm_ball_spread; float autocvar_g_nades_napalm_ball_damage; float autocvar_g_nades_napalm_ball_damageforcescale; float autocvar_g_nades_napalm_ball_lifetime; float autocvar_g_nades_napalm_ball_radius; -float autocvar_g_nades_napalm_blast; +bool autocvar_g_nades_napalm_blast; float autocvar_g_nades_napalm_fountain_lifetime; float autocvar_g_nades_napalm_fountain_delay; float autocvar_g_nades_napalm_fountain_radius; float autocvar_g_nades_napalm_fountain_damage; float autocvar_g_nades_napalm_fountain_edgedamage; float autocvar_g_nades_napalm_burntime; -float autocvar_g_nades_napalm_selfdamage; -float autocvar_g_nades_nade_type; -float autocvar_g_nades_bonus_type; -float autocvar_g_nades_bonus; -float autocvar_g_nades_bonus_onstrength; -float autocvar_g_nades_bonus_client_select; -float autocvar_g_nades_bonus_max; -float autocvar_g_nades_bonus_score_max; -float autocvar_g_nades_bonus_score_time; -float autocvar_g_nades_bonus_score_time_flagcarrier; -float autocvar_g_nades_bonus_score_minor; -float autocvar_g_nades_bonus_score_low; -float autocvar_g_nades_bonus_score_high; -float autocvar_g_nades_bonus_score_medium; -float autocvar_g_nades_bonus_score_spree; +bool autocvar_g_nades_napalm_selfdamage; +int autocvar_g_nades_nade_type; +int autocvar_g_nades_bonus_type; +bool autocvar_g_nades_bonus; +bool autocvar_g_nades_bonus_onstrength; +bool autocvar_g_nades_bonus_client_select; +int autocvar_g_nades_bonus_max; +int autocvar_g_nades_bonus_score_max; +int autocvar_g_nades_bonus_score_time; +int autocvar_g_nades_bonus_score_time_flagcarrier; +int autocvar_g_nades_bonus_score_minor; +int autocvar_g_nades_bonus_score_low; +int autocvar_g_nades_bonus_score_high; +int autocvar_g_nades_bonus_score_medium; +int autocvar_g_nades_bonus_score_spree; float autocvar_g_nades_ice_freeze_time; float autocvar_g_nades_ice_health; -float autocvar_g_nades_ice_explode; -float autocvar_g_nades_ice_teamcheck; +bool autocvar_g_nades_ice_explode; +bool autocvar_g_nades_ice_teamcheck; float autocvar_g_nades_heal_time; float autocvar_g_nades_heal_rate; float autocvar_g_nades_heal_friend; @@ -840,27 +840,27 @@ float autocvar_g_nades_pokenade_monster_lifetime; float autocvar_g_campcheck_damage; float autocvar_g_campcheck_distance; float autocvar_g_campcheck_interval; -float autocvar_g_jump_grunt; -float autocvar_g_overkill_powerups_replace; +bool autocvar_g_jump_grunt; +bool autocvar_g_overkill_powerups_replace; float autocvar_g_overkill_superguns_respawn_time; -float autocvar_g_overkill_100h_anyway; -float autocvar_g_overkill_100a_anyway; -float autocvar_g_overkill_ammo_charge; +bool autocvar_g_overkill_100h_anyway; +bool autocvar_g_overkill_100a_anyway; +bool autocvar_g_overkill_ammo_charge; float autocvar_g_overkill_ammo_charge_notice; float autocvar_g_overkill_ammo_charge_limit; float autocvar_g_spawn_near_teammate_distance; -float autocvar_g_spawn_near_teammate_ignore_spawnpoint; +bool autocvar_g_spawn_near_teammate_ignore_spawnpoint; float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay; float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death; -float autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health; -float autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath; +int autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health; +bool autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath; float autocvar_g_buffs_waypoint_distance; -float autocvar_g_buffs_randomize; +bool autocvar_g_buffs_randomize; float autocvar_g_buffs_random_lifetime; -float autocvar_g_buffs_random_location; -float autocvar_g_buffs_random_location_attempts; -float autocvar_g_buffs_spawn_count; -float autocvar_g_buffs_replace_powerups; +bool autocvar_g_buffs_random_location; +int autocvar_g_buffs_random_location_attempts; +int autocvar_g_buffs_spawn_count; +bool autocvar_g_buffs_replace_powerups; float autocvar_g_buffs_cooldown_activate; float autocvar_g_buffs_cooldown_respawn; float autocvar_g_buffs_resistance_blockpercent; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 74469b101..222e02913 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -301,7 +301,7 @@ void FixPlayermodel() defaultskin = 0; chmdl = false; - if(autocvar_sv_defaultcharacter == 1) + if(autocvar_sv_defaultcharacter) { if(teamplay) { diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 7c26399af..aa2648c08 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -519,7 +519,7 @@ string matchid; .float stat_leadlimit; -float radar_showennemies; +bool radar_showennemies; #ifdef PROFILING float client_cefc_accumulator; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index b4df2d06e..345bc5bc1 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -686,7 +686,7 @@ void spawnfunc_worldspawn (void) // character set: ASCII 33-126 without the following characters: : ; ' " \ $ if(autocvar_sv_eventlog) { - s = sprintf("%d.%s.%06d", ftos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000)); + s = sprintf("%d.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000)); matchid = strzone(s); GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s)); @@ -1964,7 +1964,7 @@ float WinningCondition_RanOutOfSpawns() if(have_team_spawns <= 0) return WINNING_NO; - if(autocvar_g_spawn_useallspawns <= 0) + if(!autocvar_g_spawn_useallspawns) return WINNING_NO; if(!some_spawn_has_been_used) diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 884fe04ed..c6e1a24e9 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -101,7 +101,7 @@ float DistributeEvenly_GetRandomized(float weight) void GameLogEcho(string s) { string fn; - float matches; + int matches; if (autocvar_sv_eventlog_files) { @@ -109,7 +109,7 @@ void GameLogEcho(string s) { logfile_open = true; matches = autocvar_sv_eventlog_files_counter + 1; - cvar_set("sv_eventlog_files_counter", ftos(matches)); + cvar_set("sv_eventlog_files_counter", itos(matches)); fn = ftos(matches); if (strlen(fn) < 8) fn = strcat(substring("00000000", 0, 8 - strlen(fn)), fn); diff --git a/qcsrc/server/mutators/mutator_dodging.qc b/qcsrc/server/mutators/mutator_dodging.qc index ad52d3e29..58d24a4d8 100644 --- a/qcsrc/server/mutators/mutator_dodging.qc +++ b/qcsrc/server/mutators/mutator_dodging.qc @@ -96,7 +96,7 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) { self.velocity + (autocvar_sv_dodging_up_speed * v_up); - if (autocvar_sv_dodging_sound == 1) + if (autocvar_sv_dodging_sound) PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND); animdecide_setaction(self, ANIMACTION_JUMP, true); @@ -118,9 +118,10 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) { // returns 1 if the player is close to a wall -float check_close_to_wall(float threshold) { - if (autocvar_sv_dodging_wall_dodging == 0) - return 0; +bool check_close_to_wall(float threshold) +{ + if(!autocvar_sv_dodging_wall_dodging) + return false; vector trace_start; vector trace_end; @@ -130,31 +131,32 @@ float check_close_to_wall(float threshold) { trace_end = self.origin + (1000*v_right); tracebox(trace_start, self.mins, self.maxs, trace_end, true, self); if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold) - return 1; + return true; trace_end = self.origin - (1000*v_right); tracebox(trace_start, self.mins, self.maxs, trace_end, true, self); if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold) - return 1; + return true; trace_end = self.origin + (1000*v_forward); tracebox(trace_start, self.mins, self.maxs, trace_end, true, self); if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold) - return 1; + return true; trace_end = self.origin - (1000*v_forward); tracebox(trace_start, self.mins, self.maxs, trace_end, true, self); if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold) - return 1; + return true; - return 0; + return false; } -float check_close_to_ground(float threshold) { +bool check_close_to_ground(float threshold) +{ if (self.flags & FL_ONGROUND) - return 1; + return true; - return 0; + return false; } diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator_nades.qc index a7c3b7ea7..8f7857b16 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator_nades.qc @@ -475,7 +475,7 @@ void nade_monster_boom() void nade_boom() { string expef; - float nade_blast = 1; + bool nade_blast = true; switch ( self.nade_type ) { @@ -484,16 +484,16 @@ void nade_boom() expef = "explosion_medium"; break; case NADE_TYPE_ICE: - nade_blast = 0; + nade_blast = false; expef = "electro_combo"; // hookbomb_explode electro_combo bigplasma_impact break; case NADE_TYPE_TRANSLOCATE: - nade_blast = 0; + nade_blast = false; expef = ""; break; case NADE_TYPE_MONSTER: case NADE_TYPE_SPAWN: - nade_blast = 0; + nade_blast = false; switch(self.realowner.team) { case NUM_TEAM_1: expef = "spawn_event_red"; break; @@ -504,7 +504,7 @@ void nade_boom() } break; case NADE_TYPE_HEAL: - nade_blast = 0; + nade_blast = false; expef = "spawn_event_red"; break; diff --git a/qcsrc/server/tturrets/system/system_main.qc b/qcsrc/server/tturrets/system/system_main.qc index 600edcc58..ad0b68521 100644 --- a/qcsrc/server/tturrets/system/system_main.qc +++ b/qcsrc/server/tturrets/system/system_main.qc @@ -931,7 +931,7 @@ void turret_think() void turret_fire() { - if (autocvar_g_turrets_nofire != 0) + if (autocvar_g_turrets_nofire) return; self.turret_firefunc(); @@ -991,7 +991,7 @@ void turrets_manager_think() self.nextthink = time + 1; entity e; - if (autocvar_g_turrets_reloadcvars == 1) + if (autocvar_g_turrets_reloadcvars) { e = nextent(world); while (e)