From 845401fd312c66c059aaee1772ac5d79555ab4fc Mon Sep 17 00:00:00 2001 From: TimePath Date: Mon, 26 Jan 2015 10:48:07 +1100 Subject: [PATCH] Unify boolean constants TRUE -> true FALSE -> false --- qcsrc/client/Main.qc | 14 +- qcsrc/client/View.qc | 32 ++-- qcsrc/client/announcer.qc | 10 +- qcsrc/client/autocvars.qh | 4 +- qcsrc/client/bgmscript.qc | 8 +- qcsrc/client/command/cl_cmd.qc | 30 ++-- qcsrc/client/csqc_constants.qc | 4 +- qcsrc/client/csqcmodel_hooks.qc | 8 +- qcsrc/client/damage.qc | 4 +- qcsrc/client/hud.qc | 46 +++--- qcsrc/client/hud_config.qc | 2 +- qcsrc/client/main.qh | 2 +- qcsrc/client/mapvoting.qc | 2 +- qcsrc/client/miscfunctions.qc | 16 +- qcsrc/client/movetypes.qc | 30 ++-- qcsrc/client/prandom.qc | 2 +- qcsrc/client/scoreboard.qc | 36 ++--- qcsrc/client/shownames.qc | 10 +- qcsrc/client/teamradar.qc | 4 +- qcsrc/client/tturrets.qc | 20 +-- qcsrc/client/tuba.qc | 2 +- qcsrc/client/vehicles/vehicles.qc | 4 +- qcsrc/client/waypointsprites.qc | 4 +- qcsrc/common/command/generic.qc | 32 ++-- qcsrc/common/command/rpn.qc | 30 ++-- qcsrc/common/mapinfo.qc | 16 +- qcsrc/common/mapinfo.qh | 30 ++-- qcsrc/common/monsters/monster/mage.qc | 54 +++---- qcsrc/common/monsters/monster/shambler.qc | 34 ++-- qcsrc/common/monsters/monster/spider.qc | 30 ++-- qcsrc/common/monsters/monster/wyvern.qc | 20 +-- qcsrc/common/monsters/monster/zombie.qc | 20 +-- qcsrc/common/monsters/spawn.qc | 2 +- qcsrc/common/monsters/sv_monsters.qc | 128 +++++++-------- qcsrc/common/nades.qc | 2 +- qcsrc/common/net_notice.qc | 8 +- qcsrc/common/notifications.qc | 68 ++++---- qcsrc/common/notifications.qh | 26 +-- qcsrc/common/playerstats.qc | 12 +- qcsrc/common/test.qc | 2 +- qcsrc/common/util-pre.qh | 2 - qcsrc/common/util.qc | 50 +++--- qcsrc/common/weapons/w_arc.qc | 62 ++++---- qcsrc/common/weapons/w_blaster.qc | 36 ++--- qcsrc/common/weapons/w_crylink.qc | 50 +++--- qcsrc/common/weapons/w_devastator.qc | 76 ++++----- qcsrc/common/weapons/w_electro.qc | 52 +++--- qcsrc/common/weapons/w_fireball.qc | 52 +++--- qcsrc/common/weapons/w_hagar.qc | 74 ++++----- qcsrc/common/weapons/w_hlac.qc | 34 ++-- qcsrc/common/weapons/w_hmg.qc | 26 +-- qcsrc/common/weapons/w_hook.qc | 36 ++--- qcsrc/common/weapons/w_machinegun.qc | 32 ++-- qcsrc/common/weapons/w_minelayer.qc | 64 ++++---- qcsrc/common/weapons/w_mortar.qc | 54 +++---- qcsrc/common/weapons/w_porto.qc | 40 ++--- qcsrc/common/weapons/w_rifle.qc | 38 ++--- qcsrc/common/weapons/w_rpc.qc | 34 ++-- qcsrc/common/weapons/w_seeker.qc | 54 +++---- qcsrc/common/weapons/w_shockwave.qc | 50 +++--- qcsrc/common/weapons/w_shotgun.qc | 46 +++--- qcsrc/common/weapons/w_tuba.qc | 44 ++--- qcsrc/common/weapons/w_vaporizer.qc | 34 ++-- qcsrc/common/weapons/w_vortex.qc | 32 ++-- qcsrc/csqcmodellib/cl_model.qc | 4 +- qcsrc/csqcmodellib/cl_player.qc | 4 +- qcsrc/csqcmodellib/sv_model.qc | 2 +- qcsrc/dpdefs/dpextensions.qc | 16 +- qcsrc/dpdefs/progsdefs.qc | 4 +- qcsrc/menu/anim/animation.qc | 10 +- qcsrc/menu/draw.qc | 4 +- qcsrc/menu/item/dialog.qc | 2 +- qcsrc/menu/menu.qc | 38 ++--- qcsrc/menu/xonotic/campaign.qc | 2 +- qcsrc/menu/xonotic/demolist.qc | 14 +- qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc | 2 +- .../xonotic/dialog_hudpanel_centerprint.qc | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_chat.qc | 2 +- .../xonotic/dialog_hudpanel_engineinfo.qc | 2 +- .../xonotic/dialog_hudpanel_healtharmor.qc | 2 +- .../xonotic/dialog_hudpanel_infomessages.qc | 2 +- .../menu/xonotic/dialog_hudpanel_modicons.qc | 2 +- .../xonotic/dialog_hudpanel_notification.qc | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_physics.qc | 2 +- .../menu/xonotic/dialog_hudpanel_powerups.qc | 2 +- .../xonotic/dialog_hudpanel_pressedkeys.qc | 2 +- .../menu/xonotic/dialog_hudpanel_racetimer.qc | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_radar.qc | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_score.qc | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_timer.qc | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_vote.qc | 2 +- qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc | 2 +- qcsrc/menu/xonotic/dialog_hudsetup_exit.qc | 2 +- .../menu/xonotic/dialog_multiplayer_create.qc | 4 +- .../dialog_multiplayer_create_mutators.qc | 2 +- ...log_multiplayer_media_screenshot_viewer.qc | 6 +- .../xonotic/dialog_multiplayer_profile.qc | 2 +- qcsrc/menu/xonotic/dialog_sandboxtools.qc | 2 +- qcsrc/menu/xonotic/dialog_settings_audio.qc | 4 +- qcsrc/menu/xonotic/dialog_settings_effects.qc | 6 +- .../xonotic/dialog_settings_game_messages.qc | 6 +- qcsrc/menu/xonotic/dialog_settings_input.qc | 4 +- qcsrc/menu/xonotic/dialog_teamselect.qc | 2 +- qcsrc/menu/xonotic/gametypelist.qc | 2 +- qcsrc/menu/xonotic/languagelist.qc | 4 +- qcsrc/menu/xonotic/playermodel.qc | 10 +- qcsrc/menu/xonotic/playlist.qc | 4 +- qcsrc/menu/xonotic/screenshotimage.qc | 8 +- qcsrc/menu/xonotic/screenshotlist.qc | 18 +-- qcsrc/menu/xonotic/serverlist.qc | 10 +- qcsrc/menu/xonotic/skinlist.qc | 2 +- qcsrc/menu/xonotic/slider_resolution.qc | 6 +- qcsrc/menu/xonotic/soundlist.qc | 2 +- qcsrc/menu/xonotic/statslist.qc | 16 +- qcsrc/menu/xonotic/textlabel.qc | 2 +- qcsrc/menu/xonotic/util.qc | 10 +- qcsrc/menu/xonotic/weaponarenacheckbox.qc | 4 +- qcsrc/menu/xonotic/weaponslist.qc | 2 +- qcsrc/server/antilag.qc | 4 +- qcsrc/server/bot/aim.qc | 66 ++++---- qcsrc/server/bot/bot.qc | 30 ++-- qcsrc/server/bot/havocbot/havocbot.qc | 100 ++++++------ qcsrc/server/bot/havocbot/role_onslaught.qc | 30 ++-- qcsrc/server/bot/havocbot/roles.qc | 12 +- qcsrc/server/bot/navigation.qc | 96 +++++------ qcsrc/server/bot/scripting.qc | 88 +++++----- qcsrc/server/bot/waypoints.qc | 62 ++++---- qcsrc/server/cheats.qc | 68 ++++---- qcsrc/server/cl_client.qc | 92 +++++------ qcsrc/server/cl_impulse.qc | 26 +-- qcsrc/server/cl_physics.qc | 30 ++-- qcsrc/server/cl_player.qc | 32 ++-- qcsrc/server/command/banning.qc | 22 +-- qcsrc/server/command/cmd.qc | 36 ++--- qcsrc/server/command/common.qc | 18 +-- qcsrc/server/command/getreplies.qc | 2 +- qcsrc/server/command/radarmap.qc | 6 +- qcsrc/server/command/sv_cmd.qc | 26 +-- qcsrc/server/command/vote.qc | 62 ++++---- qcsrc/server/defs.qh | 6 +- qcsrc/server/ent_cs.qc | 14 +- qcsrc/server/func_breakable.qc | 4 +- qcsrc/server/g_casings.qc | 4 +- qcsrc/server/g_damage.qc | 48 +++--- qcsrc/server/g_hook.qc | 18 +-- qcsrc/server/g_models.qc | 4 +- qcsrc/server/g_subs.qc | 18 +-- qcsrc/server/g_tetris.qc | 6 +- qcsrc/server/g_triggers.qc | 22 +-- qcsrc/server/g_violence.qc | 4 +- qcsrc/server/g_world.qc | 106 ++++++------- qcsrc/server/ipban.qc | 60 +++---- qcsrc/server/item_key.qc | 16 +- qcsrc/server/item_key.qh | 2 +- qcsrc/server/mapvoting.qc | 58 +++---- qcsrc/server/miscfunctions.qc | 80 +++++----- qcsrc/server/mutators/base.qh | 6 +- qcsrc/server/mutators/gamemode_assault.qc | 22 +-- qcsrc/server/mutators/gamemode_ca.qc | 34 ++-- qcsrc/server/mutators/gamemode_ctf.qc | 104 ++++++------ qcsrc/server/mutators/gamemode_ctf.qh | 4 +- qcsrc/server/mutators/gamemode_cts.qc | 34 ++-- qcsrc/server/mutators/gamemode_domination.qc | 10 +- qcsrc/server/mutators/gamemode_freezetag.qc | 14 +- qcsrc/server/mutators/gamemode_invasion.qc | 46 +++--- qcsrc/server/mutators/gamemode_keepaway.qc | 20 +-- qcsrc/server/mutators/gamemode_keyhunt.qc | 44 ++--- qcsrc/server/mutators/gamemode_lms.qc | 32 ++-- qcsrc/server/mutators/gamemode_nexball.qc | 48 +++--- qcsrc/server/mutators/gamemode_onslaught.qc | 150 +++++++++--------- qcsrc/server/mutators/gamemode_race.qc | 28 ++-- qcsrc/server/mutators/gamemode_tdm.qc | 2 +- qcsrc/server/mutators/mutator_bloodloss.qc | 14 +- qcsrc/server/mutators/mutator_buffs.qc | 86 +++++----- qcsrc/server/mutators/mutator_campcheck.qc | 12 +- qcsrc/server/mutators/mutator_dodging.qc | 10 +- qcsrc/server/mutators/mutator_instagib.qc | 66 ++++---- qcsrc/server/mutators/mutator_melee_only.qc | 14 +- qcsrc/server/mutators/mutator_midair.qc | 14 +- qcsrc/server/mutators/mutator_multijump.qc | 20 +-- qcsrc/server/mutators/mutator_nades.qc | 94 +++++------ qcsrc/server/mutators/mutator_new_toys.qc | 4 +- qcsrc/server/mutators/mutator_nix.qc | 18 +-- qcsrc/server/mutators/mutator_overkill.qc | 60 +++---- .../server/mutators/mutator_physical_items.qc | 6 +- qcsrc/server/mutators/mutator_pinata.qc | 10 +- .../server/mutators/mutator_random_gravity.qc | 12 +- qcsrc/server/mutators/mutator_superspec.qc | 54 +++---- qcsrc/server/mutators/mutator_touchexplode.qc | 4 +- qcsrc/server/mutators/mutator_vampire.qc | 2 +- qcsrc/server/mutators/sandbox.qc | 122 +++++++------- qcsrc/server/pathlib.qc | 14 +- qcsrc/server/pathlib/main.qc | 12 +- qcsrc/server/pathlib/path_waypoint.qc | 18 +-- qcsrc/server/pathlib/utility.qc | 2 +- qcsrc/server/portals.qc | 2 +- qcsrc/server/race.qc | 14 +- qcsrc/server/round_handler.qc | 10 +- qcsrc/server/round_handler.qh | 2 +- qcsrc/server/scores.qc | 12 +- qcsrc/server/scores_rules.qc | 4 +- qcsrc/server/spawnpoints.qc | 12 +- qcsrc/server/sv_main.qc | 8 +- qcsrc/server/t_items.qc | 98 ++++++------ qcsrc/server/t_jumppads.qc | 8 +- qcsrc/server/t_plats.qc | 36 ++--- qcsrc/server/t_teleporters.qc | 2 +- qcsrc/server/target_music.qc | 2 +- qcsrc/server/teamplay.qc | 16 +- qcsrc/server/tturrets/system/system_main.qc | 10 +- qcsrc/server/tturrets/system/system_misc.qc | 18 +-- qcsrc/server/tturrets/units/unit_ewheel.qc | 8 +- qcsrc/server/tturrets/units/unit_flac.qc | 2 +- qcsrc/server/tturrets/units/unit_hellion.qc | 2 +- qcsrc/server/tturrets/units/unit_hk.qc | 14 +- qcsrc/server/tturrets/units/unit_mlrs.qc | 2 +- qcsrc/server/tturrets/units/unit_phaser.qc | 2 +- qcsrc/server/tturrets/units/unit_plasma.qc | 4 +- qcsrc/server/tturrets/units/unit_walker.qc | 12 +- qcsrc/server/vehicles/bumblebee.qc | 32 ++-- qcsrc/server/vehicles/racer.qc | 14 +- qcsrc/server/vehicles/raptor.qc | 30 ++-- qcsrc/server/vehicles/spiderbot.qc | 26 +-- qcsrc/server/vehicles/vehicles.qc | 50 +++--- qcsrc/server/waypointsprites.qc | 34 ++-- qcsrc/server/weapons/accuracy.qc | 14 +- qcsrc/server/weapons/common.qc | 10 +- qcsrc/server/weapons/selection.qc | 26 +-- qcsrc/server/weapons/selection.qh | 2 +- qcsrc/server/weapons/spawning.qc | 8 +- qcsrc/server/weapons/throwing.qc | 4 +- qcsrc/server/weapons/tracing.qc | 20 +-- qcsrc/server/weapons/tracing.qh | 14 +- qcsrc/server/weapons/weaponstats.qc | 4 +- qcsrc/server/weapons/weaponsystem.qc | 44 ++--- qcsrc/warpzonelib/common.qc | 6 +- qcsrc/warpzonelib/server.qc | 18 +-- qcsrc/warpzonelib/util_server.qc | 8 +- 239 files changed, 2731 insertions(+), 2733 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 2ce4e92d0..4ba741dfc 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -47,7 +47,7 @@ void CSQC_Init(void) compressShortVector_init(); draw_endBoldFont(); - menu_visible = FALSE; + menu_visible = false; menu_show = menu_show_error; menu_action = func_null; @@ -219,7 +219,7 @@ float SetTeam(entity o, float Team) tm = GetTeam(o.team, false); tm.team_size -= 1; o.has_team = 0; - return TRUE; + return true; } } else @@ -230,7 +230,7 @@ float SetTeam(entity o, float Team) tm = GetTeam(Team, true); tm.team_size += 1; o.has_team = 1; - return TRUE; + return true; } else if(Team != o.team) { @@ -239,10 +239,10 @@ float SetTeam(entity o, float Team) o.team = Team; tm = GetTeam(Team, true); tm.team_size += 1; - return TRUE; + return true; } } - return FALSE; + return false; } void Playerchecker_Think() @@ -321,7 +321,7 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) if(menu_visible && menu_action) if(menu_action(bInputType, nPrimary, nSecondary)) - return TRUE; + return true; return bSkipKey; } @@ -729,7 +729,7 @@ void Ent_ReadSpawnEvent(float is_new) if(autocvar_cl_unpress_zoom_on_spawn) { localcmd("-zoom\n"); - button_zoom = FALSE; + button_zoom = false; } } diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index b87cef402..70c9ae65e 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -34,7 +34,7 @@ void Porto_Draw() for(0;;) { dir = nextdir; - traceline(p, p + 65536 * dir, TRUE, porto); + traceline(p, p + 65536 * dir, true, porto); if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) return; nextdir = dir - 2 * (dir * trace_plane_normal) * trace_plane_normal; // mirror dir at trace_plane_normal @@ -394,25 +394,25 @@ float eventchase_running; float WantEventchase() { if(autocvar_cl_orthoview) - return FALSE; + return false; if(intermission) - return TRUE; + return true; if(spectatee_status >= 0) { if(autocvar_cl_eventchase_nexball && gametype == MAPINFO_TYPE_NEXBALL && !(WepSet_GetFromStat() & WepSet_FromWeapon(WEP_PORTO))) - return TRUE; + return true; if(autocvar_cl_eventchase_death && (getstati(STAT_HEALTH) <= 0)) { if(autocvar_cl_eventchase_death == 2) { // don't stop eventchase once it's started (even if velocity changes afterwards) if(self.velocity == '0 0 0' || eventchase_running) - return TRUE; + return true; } - else return TRUE; + else return true; } } - return FALSE; + return false; } vector damage_blurpostprocess, content_blurpostprocess; @@ -867,7 +867,7 @@ void UpdateCrosshair() f = (time - wcross_name_changestarttime) / autocvar_crosshair_effect_time; if (f >= 1) { - wcross_ring_prev = ((ring_image) ? TRUE : FALSE); + wcross_ring_prev = ((ring_image) ? true : false); } if(wcross_ring_prev) @@ -1045,7 +1045,7 @@ void CSQC_UpdateView(float w, float h) { // no zoom while dead or in intermission please localcmd("-zoom\n"); - button_zoom = FALSE; + button_zoom = false; } // event chase camera @@ -1053,7 +1053,7 @@ void CSQC_UpdateView(float w, float h) { if(WantEventchase()) { - eventchase_running = TRUE; + eventchase_running = true; // make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.) vector current_view_origin = (csqcplayer ? csqcplayer.origin : pmove_org); @@ -1095,7 +1095,7 @@ void CSQC_UpdateView(float w, float h) } else if(autocvar_chase_active < 0) // time to disable chase_active if it was set by this code { - eventchase_running = FALSE; + eventchase_running = false; cvar_set("chase_active", "0"); eventchase_current_distance = 0; // start from 0 next time } @@ -1273,13 +1273,13 @@ void CSQC_UpdateView(float w, float h) if(button_zoom && autocvar_cl_unpress_zoom_on_weapon_switch) { localcmd("-zoom\n"); - button_zoom = FALSE; + button_zoom = false; } if(autocvar_cl_unpress_attack_on_weapon_switch) { localcmd("-fire\n"); localcmd("-fire2\n"); - button_attack2 = FALSE; + button_attack2 = false; } } if(last_activeweapon != activeweapon) @@ -1324,7 +1324,7 @@ void CSQC_UpdateView(float w, float h) { cvar_set("chase_active", ftos(chase_active_backup)); cvar_set("cl_demo_mousegrab", "0"); - camera_active = FALSE; + camera_active = false; } } #ifdef CAMERATEST @@ -1337,8 +1337,8 @@ void CSQC_UpdateView(float w, float h) chase_active_backup = autocvar_chase_active; cvar_set("chase_active", "2"); cvar_set("cl_demo_mousegrab", "1"); - camera_active = TRUE; - camera_mode = FALSE; + camera_active = true; + camera_mode = false; } // Draw the Crosshair diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index e4fb87d24..9f74dacfa 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -13,7 +13,7 @@ void Announcer_Countdown() if(roundstarttime >= starttime) starttime = roundstarttime; if(starttime <= time && roundstarttime != starttime) // game start time has passed - announcer_5min = announcer_1min = FALSE; // reset maptime announcers now as well + announcer_5min = announcer_1min = false; // reset maptime announcers now as well float countdown = (starttime - time); float countdown_rounded = floor(0.5 + countdown); @@ -101,7 +101,7 @@ void Announcer_Time() { if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timeleft > 300) || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft > 300)) - announcer_5min = FALSE; + announcer_5min = false; } else { @@ -111,7 +111,7 @@ void Announcer_Time() //if we're in warmup mode, check whether there's a warmup timelimit if(!(autocvar_g_warmup_limit == -1 && warmup_stage)) { - announcer_5min = TRUE; + announcer_5min = true; Local_Notification(MSG_ANNCE, ANNCE_REMAINING_MIN_5); } } @@ -125,7 +125,7 @@ void Announcer_Time() { if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timeleft > 60) || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft > 60)) - announcer_1min = FALSE; + announcer_1min = false; } else if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timelimit > 0 && timeleft < 60) || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft < 60)) @@ -133,7 +133,7 @@ void Announcer_Time() // if we're in warmup mode, check whether there's a warmup timelimit if(!(autocvar_g_warmup_limit == -1 && warmup_stage)) { - announcer_1min = TRUE; + announcer_1min = true; Local_Notification(MSG_ANNCE, ANNCE_REMAINING_MIN_1); } } diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 9eccb0899..38178e2bd 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -176,9 +176,9 @@ float autocvar_g_waypointsprite_normdistance; float autocvar_g_waypointsprite_scale; int autocvar_g_waypointsprite_spam; float autocvar_g_waypointsprite_timealphaexponent; -var bool autocvar_g_waypointsprite_turrets = TRUE; +var bool autocvar_g_waypointsprite_turrets = true; var float autocvar_g_waypointsprite_turrets_maxdist = 5000; -var bool autocvar_hud_cursormode = TRUE; +var bool autocvar_hud_cursormode = true; float autocvar_hud_colorflash_alpha; bool autocvar_hud_configure_checkcollisions; bool autocvar_hud_configure_grid; diff --git a/qcsrc/client/bgmscript.qc b/qcsrc/client/bgmscript.qc index 800e89972..716696f79 100644 --- a/qcsrc/client/bgmscript.qc +++ b/qcsrc/client/bgmscript.qc @@ -176,7 +176,7 @@ float BGMScript(entity e) if(autocvar_bgmvolume <= 0) return -1; - e.just_toggled = FALSE; + e.just_toggled = false; if(bgmtime < 0) return -1; @@ -189,7 +189,7 @@ float BGMScript(entity e) e.bgmscripttime = bgmtime; // treat this as a stop event for all notes, to prevent sticking keys - e.bgmscriptstate = FALSE; + e.bgmscriptstate = false; e.bgmscriptvolume = 1; e.bgmscriptstatetime = bgmtime - GetTimeForAmplitude(e, amp); } @@ -214,11 +214,11 @@ float BGMScript(entity e) vel = stof(argv(2)); if(vel > 0) { - e.just_toggled = e.bgmscriptstate = TRUE; + e.just_toggled = e.bgmscriptstate = true; e.bgmscriptvolume = vel; } else - e.just_toggled = e.bgmscriptstate = FALSE; + e.just_toggled = e.bgmscriptstate = false; e.bgmscriptstatetime = e.bgmscripttime - GetTimeForAmplitude(e, amp); } diff --git a/qcsrc/client/command/cl_cmd.qc b/qcsrc/client/command/cl_cmd.qc index dbece27b3..e8f3600d4 100644 --- a/qcsrc/client/command/cl_cmd.qc +++ b/qcsrc/client/command/cl_cmd.qc @@ -425,23 +425,23 @@ void LocalCommand_macro_help() bool LocalCommand_macro_command(int argc) { #define CLIENT_COMMAND(name,function,description) \ - { if(name == strtolower(argv(0))) { function; return TRUE; } } + { if(name == strtolower(argv(0))) { function; return true; } } CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc) #undef CLIENT_COMMAND - return FALSE; + return false; } bool LocalCommand_macro_usage(int argc) { #define CLIENT_COMMAND(name,function,description) \ - { if(name == strtolower(argv(1))) { function; return TRUE; } } + { if(name == strtolower(argv(1))) { function; return true; } } CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc) #undef CLIENT_COMMAND - return FALSE; + return false; } void LocalCommand_macro_write_aliases(int fh) @@ -517,10 +517,10 @@ void GameCommand(string command) // These functions are here specifically to add special + - commands to the game, and are not really normal commands. // Please add client commands to the function above this, as this is only for special reasons. #define CONSOLE_COMMANDS_NORMAL \ - CONSOLE_COMMAND("+showscores", { scoreboard_showscores = TRUE; }) \ - CONSOLE_COMMAND("-showscores", { scoreboard_showscores = FALSE; }) \ - CONSOLE_COMMAND("+showaccuracy", { scoreboard_showaccuracy = TRUE; }) \ - CONSOLE_COMMAND("-showaccuracy", { scoreboard_showaccuracy = FALSE; }) \ + CONSOLE_COMMAND("+showscores", { scoreboard_showscores = true; }) \ + CONSOLE_COMMAND("-showscores", { scoreboard_showscores = false; }) \ + CONSOLE_COMMAND("+showaccuracy", { scoreboard_showaccuracy = true; }) \ + CONSOLE_COMMAND("-showaccuracy", { scoreboard_showaccuracy = false; }) \ /* nothing */ #define CONSOLE_COMMANDS_MOVEMENT \ @@ -571,12 +571,12 @@ void ConsoleCommand_macro_init() bool ConsoleCommand_macro_normal(int argc) { #define CONSOLE_COMMAND(name,execution) \ - { if(name == strtolower(argv(0))) { { execution } return TRUE; } } + { if(name == strtolower(argv(0))) { { execution } return true; } } CONSOLE_COMMANDS_NORMAL #undef CONSOLE_COMMAND - return FALSE; + return false; } bool ConsoleCommand_macro_movement(int argc) @@ -584,13 +584,13 @@ bool ConsoleCommand_macro_movement(int argc) if(camera_active) { #define CONSOLE_COMMAND(name,execution) \ - { if(name == strtolower(argv(0))) { { execution } return TRUE; } } + { if(name == strtolower(argv(0))) { { execution } return true; } } CONSOLE_COMMANDS_MOVEMENT #undef CONSOLE_COMMAND } - return FALSE; + return false; } @@ -605,14 +605,14 @@ bool CSQC_ConsoleCommand(string command) if(ConsoleCommand_macro_normal(argc)) { - return TRUE; + return true; } else if(ConsoleCommand_macro_movement(argc)) { - return TRUE; + return true; } // Return value should be 1 if CSQC handled the command, otherwise return 0 to have the engine handle it. - return FALSE; + return false; } diff --git a/qcsrc/client/csqc_constants.qc b/qcsrc/client/csqc_constants.qc index b568947bc..2cd6dc4d9 100644 --- a/qcsrc/client/csqc_constants.qc +++ b/qcsrc/client/csqc_constants.qc @@ -128,8 +128,8 @@ const int SOLID_SLIDEBOX = 3; // touch on edge, but not an onground const int SOLID_BSP = 4; // bsp clip, touch on edge, block const int SOLID_CORPSE = 5; // same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters) -const int MOVE_NORMAL = 0; // same as FALSE -const int MOVE_NOMONSTERS = 1; // same as TRUE +const int MOVE_NORMAL = 0; // same as false +const int MOVE_NOMONSTERS = 1; // same as true const int MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE const int MOVE_HITMODEL = 4; const int MOVE_WORLDONLY = 3; diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 715a05c52..e174429fe 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -267,7 +267,7 @@ void CSQCPlayer_ModelAppearance_Apply(bool islocalplayer) // GLOWMOD AND DEATH FADING if(self.colormap > 0) - self.glowmod = colormapPaletteColor(((self.colormap >= 1024) ? self.colormap : stof(getplayerkeyvalue(self.colormap - 1, "colors"))) & 0x0F, TRUE) * 2; + self.glowmod = colormapPaletteColor(((self.colormap >= 1024) ? self.colormap : stof(getplayerkeyvalue(self.colormap - 1, "colors"))) & 0x0F, true) * 2; else self.glowmod = '1 1 1'; @@ -638,9 +638,9 @@ void CSQCModel_Hook_PreDraw(bool isplayer) onground = 1; self.anim_prev_pmove_flags = self.pmove_flags; if(self.pmove_flags & PMF_DUCKED) - animdecide_setstate(self, self.anim_state | ANIMSTATE_DUCK, FALSE); + animdecide_setstate(self, self.anim_state | ANIMSTATE_DUCK, false); else if(self.anim_state & ANIMSTATE_DUCK) - animdecide_setstate(self, self.anim_state - ANIMSTATE_DUCK, FALSE); + animdecide_setstate(self, self.anim_state - ANIMSTATE_DUCK, false); } else { @@ -668,7 +668,7 @@ void CSQCModel_Hook_PreDraw(bool isplayer) self.frame1time = self.anim_frame1time; self.frame2 = self.anim_frame2; self.frame2time = self.anim_frame2time; - CSQCModel_InterpolateAnimation_2To4_Note(sf | CSQCMODEL_PROPERTY_LERPFRAC, FALSE); + CSQCModel_InterpolateAnimation_2To4_Note(sf | CSQCMODEL_PROPERTY_LERPFRAC, false); CSQCModel_InterpolateAnimation_2To4_Do(); if(doblend) { diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index 1d97ead13..544c365a9 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -106,7 +106,7 @@ void DamageEffect(vector hitorg, float dmg, int type, int specnum) void Ent_DamageInfo(float isNew) { float dmg, rad, edge, thisdmg; - bool hitplayer = FALSE; + bool hitplayer = false; int species, forcemul; vector force, thisforce; entity oldself; @@ -188,7 +188,7 @@ void Ent_DamageInfo(float isNew) DamageEffect(w_org, thisdmg, w_deathtype, species); if(self.isplayermodel) - hitplayer = TRUE; // this impact damaged a player + hitplayer = true; // this impact damaged a player } self = oldself; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index e189ff97d..ac1208d7e 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -134,12 +134,12 @@ vector HUD_Get_Num_Color (float x, float maxvalue) float stringwidth_colors(string s, vector theSize) { - return stringwidth(s, TRUE, theSize); + return stringwidth(s, true, theSize); } float stringwidth_nocolors(string s, vector theSize) { - return stringwidth(s, FALSE, theSize); + return stringwidth(s, false, theSize); } void drawstringright(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag) @@ -1040,7 +1040,7 @@ void HUD_Ammo(void) { if(autocvar__hud_configure) { - DrawAmmoItem(pos, ammo_size, ammo_rockets, TRUE, FALSE); + DrawAmmoItem(pos, ammo_size, ammo_rockets, true, false); } else { @@ -1048,7 +1048,7 @@ void HUD_Ammo(void) pos, ammo_size, (get_weaponinfo(switchweapon)).ammo_field, - TRUE, + true, infinite_ammo ); } @@ -1795,7 +1795,7 @@ void HUD_Notify(void) if (attacker != "") { attacker = textShortenToWidth(attacker, name_maxwidth, font_size, stringwidth_colors); - attacker_pos = pos + attacker_right - eX * stringwidth(attacker, TRUE, font_size) + name_top; + attacker_pos = pos + attacker_right - eX * stringwidth(attacker, true, font_size) + name_top; drawcolorcodedstring(attacker_pos, attacker, font_size, panel_fg_alpha * alpha, DRAWFLAG_NORMAL); } } @@ -2120,7 +2120,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me) if (team_count) score_color = Team_ColorRGB(ColorByTeam(floor((i - first_pl) / players_per_team))) * 0.8; s = textShortenToWidth(s, name_size, fontsize, stringwidth_colors); - drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, TRUE, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, true, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); drawstring(pos + eX * (name_size + spacing_size), ftos(score), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL); pos.y += fontsize.y; } @@ -2177,7 +2177,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me) if (team_count) score_color = Team_ColorRGB(pl.team) * 0.8; s = textShortenToWidth(GetPlayerName(pl.sv_entnum), name_size, fontsize, stringwidth_colors); - drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, TRUE, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, true, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); drawstring(pos + eX * (name_size + spacing_size), ftos(pl.(scores[ps_primary])), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL); pos.y += fontsize.y; ++i; @@ -2420,11 +2420,11 @@ void HUD_RaceTimer (void) if(autocvar__hud_configure) { s = "0:13:37"; - drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, FALSE, '0.60 0.60 0' * mySize.y), s, '0.60 0.60 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.60 0.60 0' * mySize.y), s, '0.60 0.60 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); s = _("^1Intermediate 1 (+15.42)"); - drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.20 * mySize.y) + eY * 0.60 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.20 * mySize.y) + eY * 0.60 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL); s = sprintf(_("^1PENALTY: %.1f (%s)"), 2, "missing a checkpoint"); - drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.20 * mySize.y) + eY * 0.80 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.20 * mySize.y) + eY * 0.80 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL); } else if(race_checkpointtime) { @@ -2457,7 +2457,7 @@ void HUD_RaceTimer (void) if(s != "" && a > 0) { - drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); } if(race_penaltytime) @@ -2466,14 +2466,14 @@ void HUD_RaceTimer (void) if(a > 0) { s = sprintf(_("^1PENALTY: %.1f (%s)"), race_penaltytime * 0.1, race_penaltyreason); - drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.8 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.8 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); } } if(forcetime != "") { a = bound(0, (time - race_checkpointtime) / 0.5, 1); - drawstring_expanding(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(forcetime, FALSE, '1 1 0' * 0.6 * mySize.y), forcetime, '1 1 0' * 0.6 * mySize.y, '1 1 1', panel_fg_alpha, 0, a); + drawstring_expanding(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(forcetime, false, '1 1 0' * 0.6 * mySize.y), forcetime, '1 1 0' * 0.6 * mySize.y, '1 1 1', panel_fg_alpha, 0, a); } else a = 1; @@ -2481,7 +2481,7 @@ void HUD_RaceTimer (void) if(race_laptime && race_checkpoint != 255) { s = TIME_ENCODED_TOSTRING(TIME_ENCODE(time + TIME_DECODE(race_penaltyaccumulator) - race_laptime)); - drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, FALSE, '0.6 0.6 0' * mySize.y), s, '0.6 0.6 0' * mySize.y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.6 0.6 0' * mySize.y), s, '0.6 0.6 0' * mySize.y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL); } } else @@ -2490,13 +2490,13 @@ void HUD_RaceTimer (void) { a = bound(0, 2 - (time - race_mycheckpointtime), 1); s = MakeRaceString(race_mycheckpoint, TIME_DECODE(race_mycheckpointdelta), -(race_mycheckpointenemy == ""), race_mycheckpointlapsdelta, race_mycheckpointenemy); - drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); } if(race_othercheckpointtime && race_othercheckpointenemy != "") { a = bound(0, 2 - (time - race_othercheckpointtime), 1); s = MakeRaceString(race_othercheckpoint, -TIME_DECODE(race_othercheckpointdelta), -(race_othercheckpointenemy == ""), race_othercheckpointlapsdelta, race_othercheckpointenemy); - drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); } if(race_penaltytime && !race_penaltyaccumulator) @@ -2509,7 +2509,7 @@ void HUD_RaceTimer (void) s = sprintf(_("^1PENALTY: %.1f (%s)"), (t - time) * 0.1, race_penaltyreason); else s = sprintf(_("^2PENALTY: %.1f (%s)"), 0, race_penaltyreason); - drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, TRUE, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL); } } } @@ -3626,7 +3626,7 @@ void HUD_EngineInfo(void) // #define drawInfoMessage(s)\ if(autocvar_hud_panel_infomessages_flip)\ - o_x = pos.x + mySize.x - stringwidth(s, TRUE, fontsize);\ + o_x = pos.x + mySize.x - stringwidth(s, true, fontsize);\ drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);\ o.y += fontsize.y; void HUD_InfoMessages(void) @@ -4115,7 +4115,7 @@ void centerprint_generic(float new_id, string strMessage, float duration, float return; if (!centerprint_showing) - centerprint_showing = TRUE; + centerprint_showing = true; for (i=0, j=cpm_index; i 0.5/255.0) // Otherwise guaranteed invisible - don't show. This is checked a second time after some multiplications with other factors were done so temporary changes of these cannot cause flicker. drawcolorcodedstring(pos + eY * 0.5 * (1 - sz) * fontsize.y, ts, fontsize, a, DRAWFLAG_NORMAL); pos.y += fontsize.y; @@ -4387,7 +4387,7 @@ void HUD_CenterPrint (void) drawfontscale = '1 1 0'; if (all_messages_expired) { - centerprint_showing = FALSE; + centerprint_showing = false; reset_centerprint_messages(); } } diff --git a/qcsrc/client/hud_config.qc b/qcsrc/client/hud_config.qc index 43e8e578e..31e865ff0 100644 --- a/qcsrc/client/hud_config.qc +++ b/qcsrc/client/hud_config.qc @@ -1173,7 +1173,7 @@ void HUD_Panel_Mouse() if(menu_enabled == 2) mouse_over_panel = 0; else - mouse_over_panel = HUD_Panel_Check_Mouse_Pos(TRUE); + mouse_over_panel = HUD_Panel_Check_Mouse_Pos(true); if (mouse_over_panel && !tab_panel) drawfill(panel_pos - '1 1 0' * panel_bg_border, panel_size + '2 2 0' * panel_bg_border, '1 1 1', .1, DRAWFLAG_NORMAL); } diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index d69a718b4..8b6cbac12 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -118,7 +118,7 @@ float current_zoomfraction; float cs_project_is_b0rked; float vid_width, vid_height, vid_pixelheight; -float camera_active; // Demo camera is active if set to TRUE +float camera_active; // Demo camera is active if set to true float chase_active_backup; float camera_roll; vector camera_direction; diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 8e4ede204..e82961e20 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -42,7 +42,7 @@ string MapVote_FormatMapItem(int id, string map, float count, float maxwidth, ve } else post = ""; - maxwidth -= stringwidth(pre, FALSE, fontsize) + stringwidth(post, FALSE, fontsize); + maxwidth -= stringwidth(pre, false, fontsize) + stringwidth(post, false, fontsize); map = textShortenToWidth(map, maxwidth, fontsize, stringwidth_nocolors); return strcat(pre, map, post); } diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index 41c64b806..71dfdeff2 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -335,13 +335,13 @@ void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theSc // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag) { - SET_POS_AND_SZ_Y_ASPECT(FALSE) + SET_POS_AND_SZ_Y_ASPECT(false) drawstring(pos, text, '1 1 0' * sz.y, color, theAlpha, drawflag); } // drawstring wrapper to draw a colorcodedstring as large as possible with preserved aspect ratio into a box void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float theAlpha, float drawflag) { - SET_POS_AND_SZ_Y_ASPECT(TRUE) + SET_POS_AND_SZ_Y_ASPECT(true) drawcolorcodedstring(pos, text, '1 1 0' * sz.y, theAlpha, drawflag); } @@ -353,7 +353,7 @@ void drawstring_expanding(vector position, string text, vector theScale, vector drawfontscale = sz * '1 1 0'; dummyfunction(0, 0, 0, 0, 0, 0, 0, 0); - drawstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, FALSE, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), rgb, theAlpha * (1 - fadelerp), flag); + drawstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, false, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), rgb, theAlpha * (1 - fadelerp), flag); // width parameter: // (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz) // SIZE1 @@ -362,7 +362,7 @@ void drawstring_expanding(vector position, string text, vector theScale, vector // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box void drawstring_aspect_expanding(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag, float fadelerp) { - SET_POS_AND_SZ_Y_ASPECT(FALSE) + SET_POS_AND_SZ_Y_ASPECT(false) drawstring_expanding(pos, text, '1 1 0' * sz.y, color, theAlpha, drawflag, fadelerp); } @@ -373,12 +373,12 @@ void drawcolorcodedstring_expanding(vector position, string text, vector theScal drawfontscale = sz * '1 1 0'; dummyfunction(0, 0, 0, 0, 0, 0, 0, 0); - drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, TRUE, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), theAlpha * (1 - fadelerp), flag); + drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, true, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), theAlpha * (1 - fadelerp), flag); drawfontscale = '1 1 0'; } void drawcolorcodedstring_aspect_expanding(vector pos, string text, vector sz, float theAlpha, float drawflag, float fadelerp) { - SET_POS_AND_SZ_Y_ASPECT(TRUE) + SET_POS_AND_SZ_Y_ASPECT(true) drawcolorcodedstring_expanding(pos, text, '1 1 0' * sz.y, theAlpha, drawflag, fadelerp); } @@ -597,7 +597,7 @@ vector getcsqcplayercolor(float pl) if(e) { if(e.colormap > 0) - return colormapPaletteColor(((e.colormap >= 1024) ? e.colormap : stof(getplayerkeyvalue(e.colormap - 1, "colors"))) & 0x0F, TRUE); + return colormapPaletteColor(((e.colormap >= 1024) ? e.colormap : stof(getplayerkeyvalue(e.colormap - 1, "colors"))) & 0x0F, true); } return '1 1 1'; @@ -611,7 +611,7 @@ float getplayerisdead(float pl) if(e) return e.csqcmodel_isdead; - return FALSE; + return false; } void URI_Get_Callback(float id, float status, string data) diff --git a/qcsrc/client/movetypes.qc b/qcsrc/client/movetypes.qc index e08c7244e..a85ca13c2 100644 --- a/qcsrc/client/movetypes.qc +++ b/qcsrc/client/movetypes.qc @@ -125,11 +125,11 @@ void _Movetype_LinkEdict_TouchAreaGrid() // SV_LinkEdict_TouchAreaGrid self = e; other = oldself; - trace_allsolid = FALSE; - trace_startsolid = FALSE; + trace_allsolid = false; + trace_startsolid = false; trace_fraction = 1; - trace_inwater = FALSE; - trace_inopen = TRUE; + trace_inwater = false; + trace_inopen = true; trace_endpos = e.origin; trace_plane_normal = '0 0 1'; trace_plane_dist = 0; @@ -198,17 +198,17 @@ float _Movetype_TestEntityPosition(vector ofs) // SV_TestEntityPosition self.dphitcontentsmask = cont; if(trace_startsolid) - return TRUE; + return true; if(vlen(trace_endpos - self.move_origin) > 0.0001) self.move_origin = trace_endpos; - return FALSE; + return false; } float _Movetype_UnstickEntity() // SV_UnstickEntity { if(!_Movetype_TestEntityPosition('0 0 0')) - return TRUE; + return true; if(!_Movetype_TestEntityPosition('-1 0 0')) goto success; if(!_Movetype_TestEntityPosition('1 0 0')) goto success; if(!_Movetype_TestEntityPosition('0 -1 0')) goto success; @@ -224,11 +224,11 @@ float _Movetype_UnstickEntity() // SV_UnstickEntity if(!_Movetype_TestEntityPosition('0 0 1' * i)) goto success; } dprintf("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n", num_for_edict(self), self.classname, vtos(self.move_origin)); - return FALSE; + return false; :success dprintf("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n", num_for_edict(self), self.classname, vtos(self.move_origin)); - _Movetype_LinkEdict(TRUE); - return TRUE; + _Movetype_LinkEdict(true); + return true; } vector _Movetype_ClipVelocity(vector vel, vector norm, float f) // SV_ClipVelocity @@ -293,7 +293,7 @@ void _Movetype_Physics_Toss(float dt) // SV_Physics_Toss } } - self.move_suspendedinair = FALSE; + self.move_suspendedinair = false; _Movetype_CheckVelocity(); @@ -324,14 +324,14 @@ void _Movetype_Physics_Toss(float dt) // SV_Physics_Toss { vector move; move = self.move_velocity * movetime; - _Movetype_PushEntity(move, TRUE); + _Movetype_PushEntity(move, true); if(wasfreed(self)) return; if(trace_startsolid) { _Movetype_UnstickEntity(); - _Movetype_PushEntity(move, FALSE); + _Movetype_PushEntity(move, false); if(wasfreed(self)) return; } @@ -378,7 +378,7 @@ void _Movetype_Physics_Toss(float dt) // SV_Physics_Toss self.move_flags |= FL_ONGROUND; self.move_groundentity = trace_ent; if(trace_ent.solid == SOLID_BSP) - self.move_suspendedinair = TRUE; + self.move_suspendedinair = true; self.move_velocity = '0 0 0'; self.move_avelocity = '0 0 0'; } @@ -426,7 +426,7 @@ void _Movetype_Physics_Frame(float movedt) _Movetype_CheckWater(self); self.move_origin = self.move_origin + ticrate * self.move_velocity; self.move_angles = self.move_angles + ticrate * self.move_avelocity; - _Movetype_LinkEdict(FALSE); + _Movetype_LinkEdict(false); break; case MOVETYPE_STEP: error("SV_Physics_Step not implemented"); diff --git a/qcsrc/client/prandom.qc b/qcsrc/client/prandom.qc index 1132d06a3..9bca7b097 100644 --- a/qcsrc/client/prandom.qc +++ b/qcsrc/client/prandom.qc @@ -5,7 +5,7 @@ float prandom_seed; float prandom() { float c; - c = crc16(FALSE, strcat(ftos(prandom_seed), ftos(prandom_seed + M_PI))); + c = crc16(false, strcat(ftos(prandom_seed), ftos(prandom_seed + M_PI))); prandom_seed = c; #ifdef USE_PRANDOM_DEBUG diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 69bdd018c..40ee14d5f 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -354,10 +354,10 @@ void Cmd_HUD_SetFields(float argc) float nocomplain; str = argv(i+1); - nocomplain = FALSE; + nocomplain = false; if(substring(str, 0, 1) == "?") { - nocomplain = TRUE; + nocomplain = true; str = substring(str, 1, strlen(str) - 1); } @@ -367,13 +367,13 @@ void Cmd_HUD_SetFields(float argc) pattern = substring(str, 0, slash); str = substring(str, slash + 1, strlen(str) - (slash + 1)); - if (!isGametypeInFilter(gametype, teamplay, FALSE, pattern)) + if (!isGametypeInFilter(gametype, teamplay, false, pattern)) continue; } strunzone(hud_title[hud_num_fields]); hud_title[hud_num_fields] = strzone(TranslateScoresLabel(str)); - hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], FALSE, hud_fontsize); + hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], false, hud_fontsize); str = strtolower(str); if(str == "ping") { @@ -452,7 +452,7 @@ void Cmd_HUD_SetFields(float argc) } hud_title[1] = strzone("|"); hud_field[1] = SP_SEPARATOR; - hud_size[1] = stringwidth("|", FALSE, hud_fontsize); + hud_size[1] = stringwidth("|", false, hud_fontsize); ++hud_num_fields; print("fixed missing field '|'\n"); } @@ -461,7 +461,7 @@ void Cmd_HUD_SetFields(float argc) { strunzone(hud_title[hud_num_fields]); hud_title[hud_num_fields] = strzone("|"); - hud_size[hud_num_fields] = stringwidth("|", FALSE, hud_fontsize); + hud_size[hud_num_fields] = stringwidth("|", false, hud_fontsize); hud_field[hud_num_fields] = SP_SEPARATOR; ++hud_num_fields; print("fixed missing field '|'\n"); @@ -470,7 +470,7 @@ void Cmd_HUD_SetFields(float argc) { strunzone(hud_title[hud_num_fields]); hud_title[hud_num_fields] = strzone(TranslateScoresLabel(scores_label[ps_secondary])); - hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], FALSE, hud_fontsize); + hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], false, hud_fontsize); hud_field[hud_num_fields] = ps_secondary; ++hud_num_fields; printf("fixed missing field '%s'\n", scores_label[ps_secondary]); @@ -479,7 +479,7 @@ void Cmd_HUD_SetFields(float argc) { strunzone(hud_title[hud_num_fields]); hud_title[hud_num_fields] = strzone(TranslateScoresLabel(scores_label[ps_primary])); - hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], FALSE, hud_fontsize); + hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], false, hud_fontsize); hud_field[hud_num_fields] = ps_primary; ++hud_num_fields; printf("fixed missing field '%s'\n", scores_label[ps_primary]); @@ -646,7 +646,7 @@ string HUD_FixScoreboardColumnWidth(int i, string str) hud_fixscoreboardcolumnwidth_iconlen *= hud_fontsize.y / hud_fontsize.x; // fix icon aspect if(hud_fixscoreboardcolumnwidth_iconlen != 0) - hud_fixscoreboardcolumnwidth_marginlen = stringwidth(" ", FALSE, hud_fontsize); + hud_fixscoreboardcolumnwidth_marginlen = stringwidth(" ", false, hud_fontsize); else hud_fixscoreboardcolumnwidth_marginlen = 0; @@ -665,10 +665,10 @@ string HUD_FixScoreboardColumnWidth(int i, string str) if (hud_fixscoreboardcolumnwidth_iconlen != 0) namesize -= hud_fixscoreboardcolumnwidth_marginlen + hud_fixscoreboardcolumnwidth_iconlen; str = textShortenToWidth(str, namesize, hud_fontsize, stringwidth_colors); - hud_fixscoreboardcolumnwidth_len = stringwidth(str, TRUE, hud_fontsize); + hud_fixscoreboardcolumnwidth_len = stringwidth(str, true, hud_fontsize); } else - hud_fixscoreboardcolumnwidth_len = stringwidth(str, FALSE, hud_fontsize); + hud_fixscoreboardcolumnwidth_len = stringwidth(str, false, hud_fontsize); f = hud_fixscoreboardcolumnwidth_len + hud_fixscoreboardcolumnwidth_marginlen + hud_fixscoreboardcolumnwidth_iconlen; if(hud_size[i] < f) @@ -904,7 +904,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz } } - tmp_x = stringwidth(hud_title[i], FALSE, hud_fontsize); + tmp_x = stringwidth(hud_title[i], false, hud_fontsize); tmp_x = (hud_size[i] - tmp.x); drawstring(pos + tmp, hud_title[i], hud_fontsize, rgb * 1.5, scoreboard_alpha_fg, DRAWFLAG_NORMAL); pos.x -= hud_fontsize.x; @@ -1046,7 +1046,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) s = sprintf("%d%%", weapon_stats*100); float padding; - padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value + padding = (weapon_width - stringwidth(s, false, '1 0 0' * fontsize)) / 2; // center the accuracy value if(!autocvar_scoreboard_accuracy_nocolors) rgb = Accuracy_GetColor(weapon_stats); @@ -1076,7 +1076,7 @@ vector HUD_DrawKeyValue(vector pos, string key, string value) { float px = pos.x; pos.x += hud_fontsize.x * 0.25; drawstring(pos, key, hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL); - pos_x = xmax - stringwidth(value, FALSE, hud_fontsize) - hud_fontsize.x * 0.25; + pos_x = xmax - stringwidth(value, false, hud_fontsize) - hud_fontsize.x * 0.25; drawstring(pos, value, hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL); pos_x = px; pos.y+= hud_fontsize.y; @@ -1278,12 +1278,12 @@ void HUD_DrawScoreboard() draw_beginBoldFont(); rgb = Team_ColorRGB(tm.team); str = ftos(tm.(teamscores[ts_primary])); - drawstring(pos + team_score_baseoffset - eX * stringwidth(str, FALSE, hud_fontsize * 1.5), str, hud_fontsize * 1.5, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL); + drawstring(pos + team_score_baseoffset - eX * stringwidth(str, false, hud_fontsize * 1.5), str, hud_fontsize * 1.5, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL); if(ts_primary != ts_secondary) { str = ftos(tm.(teamscores[ts_secondary])); - drawstring(pos + team_score_baseoffset - eX * stringwidth(str, FALSE, hud_fontsize) + eY * hud_fontsize.y * 1.5, str, hud_fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL); + drawstring(pos + team_score_baseoffset - eX * stringwidth(str, false, hud_fontsize) + eY * hud_fontsize.y * 1.5, str, hud_fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL); } draw_endBoldFont(); @@ -1413,7 +1413,7 @@ void HUD_DrawScoreboard() } pos.y += 1.2 * hud_fontsize.y; - drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, true, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL); // print information about respawn status float respawn_time = getstatf(STAT_RESPAWN_TIME); @@ -1448,7 +1448,7 @@ void HUD_DrawScoreboard() str = sprintf(_("You are dead, press ^2%s^7 to respawn"), getcommandkey("jump", "+jump")); pos.y += 1.2 * hud_fontsize.y; - drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, true, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL); } scoreboard_bottom = pos.y + 2 * hud_fontsize.y; diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 779898608..5f40b2688 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -37,7 +37,7 @@ void Draw_ShowNames(entity ent) } // handle tag fading - float overlap = FALSE, onscreen, crosshairdistance; + float overlap = false, onscreen, crosshairdistance; vector o, eo; o = project_3d_to_2d(ent.origin); @@ -56,7 +56,7 @@ void Draw_ShowNames(entity ent) eo_z = 0; if(vlen((eX * o.x + eY * o.y) - eo) < autocvar_hud_shownames_antioverlap_distance && vlen(ent.origin - view_origin) > vlen(e.origin - view_origin)) { - overlap = TRUE; + overlap = true; break; } } @@ -72,9 +72,9 @@ void Draw_ShowNames(entity ent) ent.pointtime = time; if (!(ent.pointtime + autocvar_hud_shownames_crosshairdistance_time > time)) - overlap = TRUE; + overlap = true; else - overlap = (autocvar_hud_shownames_crosshairdistance_antioverlap ? overlap : FALSE); // override what antioverlap says unless allowed by cvar. + overlap = (autocvar_hud_shownames_crosshairdistance_antioverlap ? overlap : false); // override what antioverlap says unless allowed by cvar. } if(!ent.fadedelay) @@ -167,7 +167,7 @@ void Draw_ShowNames(entity ent) s = textShortenToWidth(s, namewidth, '1 1 0' * autocvar_hud_shownames_fontsize, stringwidth_colors); float width; - width = stringwidth(s, TRUE, '1 1 0' * autocvar_hud_shownames_fontsize); + width = stringwidth(s, true, '1 1 0' * autocvar_hud_shownames_fontsize); if (width != namewidth) namepos.x += (namewidth - width) / 2; diff --git a/qcsrc/client/teamradar.qc b/qcsrc/client/teamradar.qc index 9cf5aa0ae..2456ee804 100644 --- a/qcsrc/client/teamradar.qc +++ b/qcsrc/client/teamradar.qc @@ -156,8 +156,8 @@ void draw_teamradar_link(vector start, vector end, int colors) norm_y = norm.z; norm_z = 0; - c0 = colormapPaletteColor(colors & 0x0F, FALSE); - c1 = colormapPaletteColor((colors & 0xF0) / 0x10, FALSE); + c0 = colormapPaletteColor(colors & 0x0F, false); + c1 = colormapPaletteColor((colors & 0xF0) / 0x10, false); R_BeginPolygon("", 0); R_PolygonVertex(start - norm, '0 0 0', c0, panel_fg_alpha); diff --git a/qcsrc/client/tturrets.qc b/qcsrc/client/tturrets.qc index aaa43bd80..440067ada 100644 --- a/qcsrc/client/tturrets.qc +++ b/qcsrc/client/tturrets.qc @@ -80,7 +80,7 @@ void turret_precache(float _tid) precache_sound ("weapons/uzi_fire.wav"); break; } - turret_is_precache[_tid] = TRUE; + turret_is_precache[_tid] = true; } void turret_tid2info(float _tid) @@ -513,7 +513,7 @@ void turret_gibboom() pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1); for (i = 1; i < 5; i = i + 1) - turret_gibtoss(strcat("models/turrets/head-gib", ftos(i), ".md3"), self.origin + '0 0 2', self.velocity + randomvec() * 700, '0 0 0', FALSE); + turret_gibtoss(strcat("models/turrets/head-gib", ftos(i), ".md3"), self.origin + '0 0 2', self.velocity + randomvec() * 700, '0 0 0', false); } entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, float _explode) @@ -563,23 +563,23 @@ void turret_die() { // Base if(self.turret_type == TID_EWHEEL) - turret_gibtoss(tid2info_base, self.origin + '0 0 18', self.velocity + '0 0 400' + '0.1 0.1 1' * (random() * 400), '-1 -1 -1', TRUE); + turret_gibtoss(tid2info_base, self.origin + '0 0 18', self.velocity + '0 0 400' + '0.1 0.1 1' * (random() * 400), '-1 -1 -1', true); else if (self.turret_type == TID_WALKER) - turret_gibtoss(tid2info_base, self.origin + '0 0 18', self.velocity + '0 0 300' + '0.1 0.1 1' * (random() * 200), '-1 -1 -1', TRUE); + turret_gibtoss(tid2info_base, self.origin + '0 0 18', self.velocity + '0 0 300' + '0.1 0.1 1' * (random() * 200), '-1 -1 -1', true); else if (self.turret_type == TID_TESLA) - turret_gibtoss(tid2info_base, self.origin + '0 0 18', '0 0 200', '-1 -1 -1', FALSE); + turret_gibtoss(tid2info_base, self.origin + '0 0 18', '0 0 200', '-1 -1 -1', false); else { if (random() > 0.5) { - turret_gibtoss("models/turrets/base-gib2.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE); - turret_gibtoss("models/turrets/base-gib3.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE); - turret_gibtoss("models/turrets/base-gib4.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE); + turret_gibtoss("models/turrets/base-gib2.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', false); + turret_gibtoss("models/turrets/base-gib3.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', false); + turret_gibtoss("models/turrets/base-gib4.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', false); } else - turret_gibtoss("models/turrets/base-gib1.md3", self.origin + '0 0 8', '0 0 0', '0 0 0', TRUE); + turret_gibtoss("models/turrets/base-gib1.md3", self.origin + '0 0 8', '0 0 0', '0 0 0', true); - entity headgib = turret_gibtoss(tid2info_head, self.origin + '0 0 32', '0 0 200' + randomvec() * 200, '-1 -1 -1', TRUE); + entity headgib = turret_gibtoss(tid2info_head, self.origin + '0 0 32', '0 0 200' + randomvec() * 200, '-1 -1 -1', true); if(headgib) { headgib.angles = headgib.move_angles = self.tur_head.angles; diff --git a/qcsrc/client/tuba.qc b/qcsrc/client/tuba.qc index b1eaab3aa..8d2ba7fa6 100644 --- a/qcsrc/client/tuba.qc +++ b/qcsrc/client/tuba.qc @@ -145,7 +145,7 @@ void Ent_TubaNote(float bIsNew) self.enemy.enemy = spawn(); self.enemy.enemy.classname = "tuba_note_2"; } - bIsNew = TRUE; + bIsNew = true; } self.enemy.attenuate = att; diff --git a/qcsrc/client/vehicles/vehicles.qc b/qcsrc/client/vehicles/vehicles.qc index c8cb149b4..04f13af14 100644 --- a/qcsrc/client/vehicles/vehicles.qc +++ b/qcsrc/client/vehicles/vehicles.qc @@ -325,7 +325,7 @@ void CSQC_BUMBLE_HUD() // Right gunner slot occupied? if(!AuxiliaryXhair[1].draw2d) { - shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No right gunner!"), FALSE, '1 0 0' * picsize.y + '0 1 0' * picsize.y)); + shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No right gunner!"), false, '1 0 0' * picsize.y + '0 1 0' * picsize.y)); drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL); drawstring(hudloc + picloc + '1 0 0' * shield, _("No right gunner!"), '1 0 0' * picsize.y + '0 1 0' * picsize.y, '1 0 0' + '0 1 1' * sin(time * 10), 1, DRAWFLAG_NORMAL); } @@ -347,7 +347,7 @@ void CSQC_BUMBLE_HUD() // Left gunner slot occupied? if(!AuxiliaryXhair[2].draw2d) { - shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No left gunner!"), FALSE, '1 0 0' * picsize.y + '0 1 0' * picsize.y)); + shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No left gunner!"), false, '1 0 0' * picsize.y + '0 1 0' * picsize.y)); drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL); drawstring(hudloc + picloc + '1 0 0' * shield, _("No left gunner!"), '1 0 0' * picsize.y + '0 1 0' * picsize.y, '1 0 0' + '0 1 1' * sin(time * 10), 1, DRAWFLAG_NORMAL); } diff --git a/qcsrc/client/waypointsprites.qc b/qcsrc/client/waypointsprites.qc index 9390396b8..de6970b38 100644 --- a/qcsrc/client/waypointsprites.qc +++ b/qcsrc/client/waypointsprites.qc @@ -149,7 +149,7 @@ vector drawspritetext(vector o, float ang, float minwidth, vector rgb, float a, float sw, w, h; float aspect, sa, ca; - sw = stringwidth(s, FALSE, fontsize); + sw = stringwidth(s, false, fontsize); if(sw > minwidth) w = sw; else @@ -720,7 +720,7 @@ void WaypointSprite_Load_Frames(string ext) { float dh, n, i, o, f; string s, sname, sframes; - dh = search_begin(strcat("models/sprites/*_frame*", ext), FALSE, FALSE); + dh = search_begin(strcat("models/sprites/*_frame*", ext), false, false); if (dh < 0) return; float ext_len = strlen(ext); diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index eae512af5..3c388a873 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -94,7 +94,7 @@ void GenericCommand_qc_curl(float request, float argc) { case CMD_REQUEST_COMMAND: { - bool do_exec = FALSE; + bool do_exec = false; string do_cvar = string_null; float key = -1; int i; @@ -108,7 +108,7 @@ void GenericCommand_qc_curl(float request, float argc) } if(argv(i) == "--exec") { - do_exec = TRUE; + do_exec = true; continue; } if(argv(i) == "--key" && i+2 < argc) @@ -222,18 +222,18 @@ void GenericCommand_dumpnotifs(float request) case CMD_REQUEST_COMMAND: { #ifndef MENUQC - float fh, alsoprint = FALSE; + float fh, alsoprint = false; string filename = argv(1); if(filename == "") { filename = "notifications_dump.cfg"; - alsoprint = FALSE; + alsoprint = false; } else if(filename == "-") { filename = "notifications_dump.cfg"; - alsoprint = TRUE; + alsoprint = true; } fh = fopen(filename, FILE_WRITE); @@ -279,12 +279,12 @@ void GenericCommand_dumpweapons(float request) // WEAPONTODO: make this work wit if(filename == "") { filename = "weapons_dump.cfg"; - wep_config_alsoprint = FALSE; + wep_config_alsoprint = false; } else if(filename == "-") { filename = "weapons_dump.cfg"; - wep_config_alsoprint = TRUE; + wep_config_alsoprint = true; } wep_config_file = fopen(filename, FILE_WRITE); @@ -652,23 +652,23 @@ void GenericCommand_macro_help() float GenericCommand_macro_command(float argc, string command) { #define GENERIC_COMMAND(name,function,description) \ - { if(name == strtolower(argv(0))) { function; return TRUE; } } + { if(name == strtolower(argv(0))) { function; return true; } } GENERIC_COMMANDS(CMD_REQUEST_COMMAND, argc, command) #undef GENERIC_COMMAND - return FALSE; + return false; } float GenericCommand_macro_usage(float argc) { #define GENERIC_COMMAND(name,function,description) \ - { if(name == strtolower(argv(1))) { function; return TRUE; } } + { if(name == strtolower(argv(1))) { function; return true; } } GENERIC_COMMANDS(CMD_REQUEST_USAGE, argc, "") #undef GENERIC_COMMAND - return FALSE; + return false; } void GenericCommand_macro_write_aliases(float fh) @@ -702,13 +702,13 @@ float GenericCommand(string command) if(GenericCommand_macro_command(argc, command)) // continue as usual and scan for normal commands { - return TRUE; // handled by one of the above GenericCommand_* functions + return true; // handled by one of the above GenericCommand_* functions } else if(argc >= 3 && argv(0) == "red") { s = substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)); localcmd(strcat(argv(1), " ", GenericCommand_markup(s))); - return TRUE; + return true; } else if(argc >= 3 && crc16(0, argv(0)) == 38566 && crc16(0, strcat(argv(0), argv(0), argv(0))) == 59830) { @@ -748,7 +748,7 @@ float GenericCommand(string command) localcmd(strcat(argv(1), " ", s)); - return TRUE; + return true; } else if(argc >= 3 && crc16(0, argv(0)) == 3826 && crc16(0, strcat(argv(0), argv(0), argv(0))) == 55790) { @@ -783,8 +783,8 @@ float GenericCommand(string command) localcmd(strcat(argv(1), " ", s2)); - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/qcsrc/common/command/rpn.qc b/qcsrc/common/command/rpn.qc index 223d3264d..480bac3c5 100644 --- a/qcsrc/common/command/rpn.qc +++ b/qcsrc/common/command/rpn.qc @@ -10,7 +10,7 @@ string rpn_pop() return rpn_stack[rpn_sp]; } else { print("rpn: stack underflow\n"); - rpn_error = TRUE; + rpn_error = true; return ""; } } @@ -21,7 +21,7 @@ void rpn_push(string s) ++rpn_sp; } else { print("rpn: stack overflow\n"); - rpn_error = TRUE; + rpn_error = true; } } string rpn_get() @@ -30,7 +30,7 @@ string rpn_get() return rpn_stack[rpn_sp - 1]; } else { print("rpn: empty stack\n"); - rpn_error = TRUE; + rpn_error = true; return ""; } } @@ -40,7 +40,7 @@ void rpn_set(string s) rpn_stack[rpn_sp - 1] = s; } else { print("rpn: empty stack\n"); - rpn_error = TRUE; + rpn_error = true; } } @@ -69,7 +69,7 @@ void GenericCommand_rpn(float request, float argc, string command) if(argc >= 2) { rpn_sp = 0; - rpn_error = FALSE; + rpn_error = false; for(rpnpos = 1; rpnpos < argc; ++rpnpos) { rpncmd = argv(rpnpos); @@ -104,7 +104,7 @@ void GenericCommand_rpn(float request, float argc, string command) else { print("rpn: empty cvar name for 'def'\n"); - rpn_error = TRUE; + rpn_error = true; } } else if(rpncmd == "defs" || rpncmd == "@") { s = ""; @@ -129,7 +129,7 @@ void GenericCommand_rpn(float request, float argc, string command) else { print("rpn: empty cvar name for 'defs'\n"); - rpn_error = TRUE; + rpn_error = true; } } else if(rpncmd == "load") { rpn_set(cvar_string(rpn_get())); @@ -249,7 +249,7 @@ void GenericCommand_rpn(float request, float argc, string command) } else if(rpncmd == "rand") { rpn_setf(ceil(random() * rpn_getf()) - 1); } else if(rpncmd == "crc16") { - rpn_setf(crc16(FALSE, rpn_get())); + rpn_setf(crc16(false, rpn_get())); } else if(rpncmd == "put") { s2 = rpn_pop(); if (!rpn_error) @@ -342,7 +342,7 @@ void GenericCommand_rpn(float request, float argc, string command) i = stof(db_get(rpn_db, "stack.pos")); if(!j) { - rpn_error = TRUE; + rpn_error = true; print("rpn: empty database\n"); } else { --j; @@ -381,7 +381,7 @@ void GenericCommand_rpn(float request, float argc, string command) if(i < 0 || i >= j) { print("rpn: database cursor out of bounds\n"); - rpn_error = TRUE; + rpn_error = true; } if(!rpn_error) { @@ -393,7 +393,7 @@ void GenericCommand_rpn(float request, float argc, string command) j = stof(db_get(rpn_db, "stack.pointer")); if(!j) { - rpn_error = TRUE; + rpn_error = true; print("rpn: empty database, cannot move cursor\n"); } if(!rpn_error) @@ -409,7 +409,7 @@ void GenericCommand_rpn(float request, float argc, string command) if(i < 0 || i >= j) { print("rpn: database cursor destination out of bounds\n"); - rpn_error = TRUE; + rpn_error = true; } if(!rpn_error) { @@ -511,7 +511,7 @@ void GenericCommand_rpn(float request, float argc, string command) if (!fexists(s)) { print("rpn: ERROR: ", s, " does not exist!\n"); - rpn_error = TRUE; + rpn_error = true; } } } else if(rpncmd == "fexists") { @@ -524,9 +524,9 @@ void GenericCommand_rpn(float request, float argc, string command) rpn_setf(0); } } else if(rpncmd == "localtime") { - rpn_set(strftime(TRUE, rpn_get())); + rpn_set(strftime(true, rpn_get())); } else if(rpncmd == "gmtime") { - rpn_set(strftime(FALSE, rpn_get())); + rpn_set(strftime(false, rpn_get())); } else if(rpncmd == "time") { rpn_pushf(time); } else if(rpncmd == "digest") { diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 98a22e493..7299b285d 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -103,7 +103,7 @@ void MapInfo_Enumerate() _MapInfo_globopen = 0; } MapInfo_Cache_Invalidate(); - _MapInfo_globhandle = search_begin("maps/*.bsp", TRUE, TRUE); + _MapInfo_globhandle = search_begin("maps/*.bsp", true, true); if(_MapInfo_globhandle >= 0) { _MapInfo_globcount = search_getsize(_MapInfo_globhandle); @@ -442,7 +442,7 @@ void _MapInfo_Map_ApplyGametype(string s, int pWantedType, int pThisType, int lo return; if(load_default) - _MapInfo_Map_ApplyGametype(_MapInfo_GetDefault(pThisType), pWantedType, pThisType, FALSE); + _MapInfo_Map_ApplyGametype(_MapInfo_GetDefault(pThisType), pWantedType, pThisType, false); if(pWantedType == MAPINFO_TYPE_ASSAULT || pWantedType == MAPINFO_TYPE_ONSLAUGHT || pWantedType == MAPINFO_TYPE_RACE || pWantedType == MAPINFO_TYPE_CTS) // these modes don't use fraglimit { @@ -572,7 +572,7 @@ float _MapInfo_GetTeamPlayBool(float t) for(e = MapInfo_Type_first; e; e = e.enemy) if(t == e.items) return e.team; - return FALSE; + return false; } void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType) @@ -860,16 +860,16 @@ float MapInfo_isRedundant(string fn, string t) t = strreplace("'", "-", t); if(!strcasecmp(fn, t)) - return TRUE; + return true; // we allow the visible title to have punctuation the file name does // not, but not vice versa t = strreplace("-", "", t); if(!strcasecmp(fn, t)) - return TRUE; + return true; - return FALSE; + return false; } // load info about a map by name into the MapInfo_Map_* globals @@ -1039,7 +1039,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p f = MapInfo_Type_FromString(t); dprint("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n"); if(f) - _MapInfo_Map_ApplyGametype (s, pGametypeToSet, f, TRUE); + _MapInfo_Map_ApplyGametype (s, pGametypeToSet, f, true); else dprint("Map ", pFilename, " supports unknown game type ", t, ", ignored\n"); } @@ -1394,7 +1394,7 @@ void MapInfo_Shutdown() { search_end(_MapInfo_globhandle); _MapInfo_globhandle = -1; - _MapInfo_globopen = FALSE; + _MapInfo_globopen = false; } } diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 8bd0871e2..1f7b7adfc 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -37,49 +37,49 @@ entity MapInfo_Type_last; #define IS_GAMETYPE(NAME) \ (MapInfo_LoadedGametype == MAPINFO_TYPE_##NAME) -REGISTER_GAMETYPE(_("Deathmatch"),dm,g_dm,DEATHMATCH,FALSE,"timelimit=20 pointlimit=30 leadlimit=0",_("Kill all enemies")); +REGISTER_GAMETYPE(_("Deathmatch"),dm,g_dm,DEATHMATCH,false,"timelimit=20 pointlimit=30 leadlimit=0",_("Kill all enemies")); #define g_dm IS_GAMETYPE(DEATHMATCH) -REGISTER_GAMETYPE(_("Last Man Standing"),lms,g_lms,LMS,FALSE,"timelimit=20 lives=9 leadlimit=0",_("Survive and kill until the enemies have no lives left")); +REGISTER_GAMETYPE(_("Last Man Standing"),lms,g_lms,LMS,false,"timelimit=20 lives=9 leadlimit=0",_("Survive and kill until the enemies have no lives left")); #define g_lms IS_GAMETYPE(LMS) -REGISTER_GAMETYPE(_("Race"),rc,g_race,RACE,FALSE,"timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0",_("Race against other players to the finish line")); +REGISTER_GAMETYPE(_("Race"),rc,g_race,RACE,false,"timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0",_("Race against other players to the finish line")); #define g_race IS_GAMETYPE(RACE) -REGISTER_GAMETYPE(_("Race CTS"),cts,g_cts,CTS,FALSE,"timelimit=20 skill=-1",_("Race for fastest time")); +REGISTER_GAMETYPE(_("Race CTS"),cts,g_cts,CTS,false,"timelimit=20 skill=-1",_("Race for fastest time")); #define g_cts IS_GAMETYPE(CTS) -REGISTER_GAMETYPE(_("Team Deathmatch"),tdm,g_tdm,TEAM_DEATHMATCH,TRUE,"timelimit=20 pointlimit=50 teams=2 leadlimit=0",_("Kill all enemy teammates")); +REGISTER_GAMETYPE(_("Team Deathmatch"),tdm,g_tdm,TEAM_DEATHMATCH,true,"timelimit=20 pointlimit=50 teams=2 leadlimit=0",_("Kill all enemy teammates")); #define g_tdm IS_GAMETYPE(TEAM_DEATHMATCH) -REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,TRUE,"timelimit=20 caplimit=10 leadlimit=6",_("Find and bring the enemy flag to your base to capture it")); +REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,true,"timelimit=20 caplimit=10 leadlimit=6",_("Find and bring the enemy flag to your base to capture it")); #define g_ctf IS_GAMETYPE(CTF) -REGISTER_GAMETYPE(_("Clan Arena"),ca,g_ca,CA,TRUE,"timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill all enemy teammates to win the round")); +REGISTER_GAMETYPE(_("Clan Arena"),ca,g_ca,CA,true,"timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill all enemy teammates to win the round")); #define g_ca IS_GAMETYPE(CA) -REGISTER_GAMETYPE(_("Domination"),dom,g_domination,DOMINATION,TRUE,"timelimit=20 pointlimit=200 teams=2 leadlimit=0",_("Capture all the control points to win")); +REGISTER_GAMETYPE(_("Domination"),dom,g_domination,DOMINATION,true,"timelimit=20 pointlimit=200 teams=2 leadlimit=0",_("Capture all the control points to win")); #define g_domination IS_GAMETYPE(DOMINATION) -REGISTER_GAMETYPE(_("Key Hunt"),kh,g_keyhunt,KEYHUNT,TRUE,"timelimit=20 pointlimit=1000 teams=3 leadlimit=0",_("Gather all the keys to win the round")); +REGISTER_GAMETYPE(_("Key Hunt"),kh,g_keyhunt,KEYHUNT,true,"timelimit=20 pointlimit=1000 teams=3 leadlimit=0",_("Gather all the keys to win the round")); #define g_keyhunt IS_GAMETYPE(KEYHUNT) -REGISTER_GAMETYPE(_("Assault"),as,g_assault,ASSAULT,TRUE,"timelimit=20",_("Destroy obstacles to find and destroy the enemy power core before time runs out")); +REGISTER_GAMETYPE(_("Assault"),as,g_assault,ASSAULT,true,"timelimit=20",_("Destroy obstacles to find and destroy the enemy power core before time runs out")); #define g_assault IS_GAMETYPE(ASSAULT) -REGISTER_GAMETYPE(_("Onslaught"),ons,g_onslaught,ONSLAUGHT,TRUE,"timelimit=20",_("Capture control points to reach and destroy the enemy generator")); +REGISTER_GAMETYPE(_("Onslaught"),ons,g_onslaught,ONSLAUGHT,true,"timelimit=20",_("Capture control points to reach and destroy the enemy generator")); #define g_onslaught IS_GAMETYPE(ONSLAUGHT) -REGISTER_GAMETYPE(_("Nexball"),nb,g_nexball,NEXBALL,TRUE,"timelimit=20 pointlimit=5 leadlimit=0",_("XonSports")); +REGISTER_GAMETYPE(_("Nexball"),nb,g_nexball,NEXBALL,true,"timelimit=20 pointlimit=5 leadlimit=0",_("XonSports")); #define g_nexball IS_GAMETYPE(NEXBALL) -REGISTER_GAMETYPE(_("Freeze Tag"),ft,g_freezetag,FREEZETAG,TRUE,"timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill enemies to freeze them, stand next to teammates to revive them")); +REGISTER_GAMETYPE(_("Freeze Tag"),ft,g_freezetag,FREEZETAG,true,"timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill enemies to freeze them, stand next to teammates to revive them")); #define g_freezetag IS_GAMETYPE(FREEZETAG) -REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,TRUE,"timelimit=20 pointlimit=30",_("Hold the ball to get points for kills")); +REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,true,"timelimit=20 pointlimit=30",_("Hold the ball to get points for kills")); #define g_keepaway IS_GAMETYPE(KEEPAWAY) -REGISTER_GAMETYPE(_("Invasion"),inv,g_invasion,INVASION,FALSE,"pointlimit=50 teams=0",_("Survive against waves of monsters")); +REGISTER_GAMETYPE(_("Invasion"),inv,g_invasion,INVASION,false,"pointlimit=50 teams=0",_("Survive against waves of monsters")); #define g_invasion IS_GAMETYPE(INVASION) const int MAPINFO_FEATURE_WEAPONS = 1; // not defined for instagib-only maps diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index 3adc59a30..1aab262fd 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -55,17 +55,17 @@ void() mage_shield; float friend_needshelp(entity e) { if(e == world) - return FALSE; + return false; if(e.health <= 0) - return FALSE; + return false; if(DIFF_TEAM(e, self) && e != self.monster_owner) - return FALSE; + return false; if(e.frozen) - return FALSE; + return false; if(!IS_PLAYER(e)) return ((e.flags & FL_MONSTER) && e.health < e.max_health); if(e.items & IT_INVINCIBLE) - return FALSE; + return false; switch(self.skin) { @@ -75,7 +75,7 @@ float friend_needshelp(entity e) case 3: return (e.health > 0); } - return FALSE; + return false; } void mage_spike_explode() @@ -139,9 +139,9 @@ void mage_spike_think() { // Is it a better idea (shorter distance) to trace to the target itself? if ( vlen(self.origin + olddir * self.wait) < dist) - traceline(self.origin, self.origin + olddir * self.wait, FALSE, self); + traceline(self.origin, self.origin + olddir * self.wait, false, self); else - traceline(self.origin, eorg, FALSE, self); + traceline(self.origin, eorg, false, self); // Setup adaptive tracelength self.wait = bound((autocvar_g_monster_mage_attack_spike_smart_trace_min), vlen(self.origin - trace_endpos), self.wait = (autocvar_g_monster_mage_attack_spike_smart_trace_max)); @@ -187,17 +187,17 @@ void mage_attack_spike() self.mage_spike = missile; - CSQCProjectile(missile, TRUE, PROJECTILE_MAGE_SPIKE, TRUE); + CSQCProjectile(missile, true, PROJECTILE_MAGE_SPIKE, true); } void mage_heal() { entity head; - float washealed = FALSE; + float washealed = false; for(head = findradius(self.origin, (autocvar_g_monster_mage_heal_range)); head; head = head.chain) if(friend_needshelp(head)) { - washealed = TRUE; + washealed = true; string fx = ""; if(IS_PLAYER(head)) { @@ -300,10 +300,10 @@ float mage_attack(float attack_type) if(random() <= 0.7) { mage_push(); - return TRUE; + return true; } - return FALSE; + return false; } case MONSTER_ATTACK_RANGED: { @@ -312,25 +312,25 @@ float mage_attack(float attack_type) if(random() <= 0.4) { mage_teleport(); - return TRUE; + return true; } else { self.frame = mage_anim_attack; self.attack_finished_single = time + (autocvar_g_monster_mage_attack_spike_delay); defer(0.2, mage_attack_spike); - return TRUE; + return true; } } if(self.mage_spike) - return TRUE; + return true; else - return FALSE; + return false; } } - return FALSE; + return false; } void spawnfunc_monster_mage() @@ -350,13 +350,13 @@ float m_mage(float req) case MR_THINK: { entity head; - float need_help = FALSE; + float need_help = false; for(head = findradius(self.origin, (autocvar_g_monster_mage_heal_range)); head; head = head.chain) if(head != self) if(friend_needshelp(head)) { - need_help = TRUE; + need_help = true; break; } @@ -375,12 +375,12 @@ float m_mage(float req) mage_shield(); monster_move((autocvar_g_monster_mage_speed_run), (autocvar_g_monster_mage_speed_walk), (autocvar_g_monster_mage_speed_stop), mage_anim_walk, mage_anim_run, mage_anim_idle); - return TRUE; + return true; } case MR_DEATH: { self.frame = mage_anim_death; - return TRUE; + return true; } case MR_SETUP: { @@ -390,18 +390,18 @@ float m_mage(float req) self.monster_attackfunc = mage_attack; self.frame = mage_anim_walk; - return TRUE; + return true; } case MR_PRECACHE: { precache_model("models/monsters/mage.dpm"); precache_sound ("weapons/grenade_impact.wav"); precache_sound ("weapons/tagexp1.wav"); - return TRUE; + return true; } } - return TRUE; + return true; } #endif // SVQC @@ -412,11 +412,11 @@ float m_mage(float req) { case MR_PRECACHE: { - return TRUE; + return true; } } - return TRUE; + return true; } #endif // CSQC diff --git a/qcsrc/common/monsters/monster/shambler.qc b/qcsrc/common/monsters/monster/shambler.qc index 17f75c280..12ff5dc89 100644 --- a/qcsrc/common/monsters/monster/shambler.qc +++ b/qcsrc/common/monsters/monster/shambler.qc @@ -51,7 +51,7 @@ void shambler_smash() void shambler_swing() { float r = (random() < 0.5); - monster_melee(self.enemy, (autocvar_g_monster_shambler_attack_claw_damage), ((r) ? shambler_anim_swingr : shambler_anim_swingl), self.attack_range, 0.8, DEATH_MONSTER_SHAMBLER_CLAW, TRUE); + monster_melee(self.enemy, (autocvar_g_monster_shambler_attack_claw_damage), ((r) ? shambler_anim_swingr : shambler_anim_swingl), self.attack_range, 0.8, DEATH_MONSTER_SHAMBLER_CLAW, true); if(r) { defer(0.5, shambler_swing); @@ -127,7 +127,7 @@ void shambler_lightning() gren = spawn (); gren.owner = gren.realowner = self; gren.classname = "grenade"; - gren.bot_dodge = TRUE; + gren.bot_dodge = true; gren.bot_dodgerating = (autocvar_g_monster_shambler_attack_lightning_damage); gren.movetype = MOVETYPE_BOUNCE; PROJECTILE_MAKETRIGGER(gren); @@ -146,14 +146,14 @@ void shambler_lightning() gren.health = 50; gren.damageforcescale = 0; gren.event_damage = shambler_lightning_damage; - gren.damagedbycontents = TRUE; + gren.damagedbycontents = true; gren.missile_flags = MIF_SPLASH | MIF_ARC; - W_SetupProjVelocity_Explicit(gren, v_forward, v_up, (autocvar_g_monster_shambler_attack_lightning_speed), (autocvar_g_monster_shambler_attack_lightning_speed_up), 0, 0, FALSE); + W_SetupProjVelocity_Explicit(gren, v_forward, v_up, (autocvar_g_monster_shambler_attack_lightning_speed), (autocvar_g_monster_shambler_attack_lightning_speed_up), 0, 0, false); gren.angles = vectoangles (gren.velocity); gren.flags = FL_PROJECTILE; - CSQCProjectile(gren, TRUE, PROJECTILE_SHAMBLER_LIGHTNING, TRUE); + CSQCProjectile(gren, true, PROJECTILE_SHAMBLER_LIGHTNING, true); } float shambler_attack(float attack_type) @@ -163,7 +163,7 @@ float shambler_attack(float attack_type) case MONSTER_ATTACK_MELEE: { shambler_swing(); - return TRUE; + return true; } case MONSTER_ATTACK_RANGED: { @@ -175,7 +175,7 @@ float shambler_attack(float attack_type) defer(0.7, shambler_smash); self.attack_finished_single = time + 1.1; self.shambler_lastattack = time + 3; - return TRUE; + return true; } else if(random() <= 0.1) // small chance, don't want this spammed { @@ -183,14 +183,14 @@ float shambler_attack(float attack_type) self.attack_finished_single = time + 1.1; self.shambler_lastattack = time + 3; defer(0.6, shambler_lightning); - return TRUE; + return true; } - return FALSE; + return false; } } - return FALSE; + return false; } void spawnfunc_monster_shambler() @@ -207,12 +207,12 @@ float m_shambler(float req) case MR_THINK: { monster_move((autocvar_g_monster_shambler_speed_run), (autocvar_g_monster_shambler_speed_walk), (autocvar_g_monster_shambler_speed_stop), shambler_anim_run, shambler_anim_walk, shambler_anim_stand); - return TRUE; + return true; } case MR_DEATH: { self.frame = shambler_anim_death; - return TRUE; + return true; } case MR_SETUP: { @@ -224,16 +224,16 @@ float m_shambler(float req) self.frame = shambler_anim_stand; self.weapon = WEP_VORTEX; - return TRUE; + return true; } case MR_PRECACHE: { precache_model("models/monsters/shambler.mdl"); - return TRUE; + return true; } } - return TRUE; + return true; } #endif // SVQC @@ -244,11 +244,11 @@ float m_shambler(float req) { case MR_PRECACHE: { - return TRUE; + return true; } } - return TRUE; + return true; } #endif // CSQC diff --git a/qcsrc/common/monsters/monster/spider.qc b/qcsrc/common/monsters/monster/spider.qc index c6c454547..427f63107 100644 --- a/qcsrc/common/monsters/monster/spider.qc +++ b/qcsrc/common/monsters/monster/spider.qc @@ -62,7 +62,7 @@ void spider_shootweb() proj.owner = proj.realowner = self; proj.use = spider_web_touch; proj.think = adaptor_think2use_hittype_splash; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = 0; proj.nextthink = time + 5; PROJECTILE_MAKETRIGGER(proj); @@ -72,7 +72,7 @@ void spider_shootweb() //proj.glow_size = 50; //proj.glow_color = 45; proj.movetype = MOVETYPE_BOUNCE; - W_SetupProjVelocity_Explicit(proj, v_forward, v_up, (autocvar_g_monster_spider_attack_web_speed), (autocvar_g_monster_spider_attack_web_speed_up), 0, 0, FALSE); + W_SetupProjVelocity_Explicit(proj, v_forward, v_up, (autocvar_g_monster_spider_attack_web_speed), (autocvar_g_monster_spider_attack_web_speed_up), 0, 0, false); proj.touch = spider_web_touch; setsize(proj, '-4 -4 -4', '4 4 4'); proj.takedamage = DAMAGE_NO; @@ -80,13 +80,13 @@ void spider_shootweb() proj.health = 500; proj.event_damage = func_null; proj.flags = FL_PROJECTILE; - proj.damagedbycontents = TRUE; + proj.damagedbycontents = true; proj.bouncefactor = 0.3; proj.bouncestop = 0.05; proj.missile_flags = MIF_SPLASH | MIF_ARC; - CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO, TRUE); + CSQCProjectile(proj, true, PROJECTILE_ELECTRO, true); } float spider_attack(float attack_type) @@ -95,7 +95,7 @@ float spider_attack(float attack_type) { case MONSTER_ATTACK_MELEE: { - return monster_melee(self.enemy, (autocvar_g_monster_spider_attack_bite_damage), ((random() > 0.5) ? spider_anim_attack : spider_anim_attack2), self.attack_range, (autocvar_g_monster_spider_attack_bite_delay), DEATH_MONSTER_SPIDER, TRUE); + return monster_melee(self.enemy, (autocvar_g_monster_spider_attack_bite_damage), ((random() > 0.5) ? spider_anim_attack : spider_anim_attack2), self.attack_range, (autocvar_g_monster_spider_attack_bite_delay), DEATH_MONSTER_SPIDER, true); } case MONSTER_ATTACK_RANGED: { @@ -105,14 +105,14 @@ float spider_attack(float attack_type) self.attack_finished_single = time + (autocvar_g_monster_spider_attack_web_delay); spider_shootweb(); self.spider_web_delay = time + 3; - return TRUE; + return true; } - return FALSE; + return false; } } - return FALSE; + return false; } void spawnfunc_monster_spider() @@ -129,13 +129,13 @@ float m_spider(float req) case MR_THINK: { monster_move((autocvar_g_monster_spider_speed_run), (autocvar_g_monster_spider_speed_walk), (autocvar_g_monster_spider_speed_stop), spider_anim_walk, spider_anim_walk, spider_anim_idle); - return TRUE; + return true; } case MR_DEATH: { self.frame = spider_anim_attack; self.angles_x = 180; - return TRUE; + return true; } case MR_SETUP: { @@ -145,17 +145,17 @@ float m_spider(float req) self.monster_attackfunc = spider_attack; self.frame = spider_anim_idle; - return TRUE; + return true; } case MR_PRECACHE: { precache_model("models/monsters/spider.dpm"); precache_sound ("weapons/electro_fire2.wav"); - return TRUE; + return true; } } - return TRUE; + return true; } #endif // SVQC @@ -166,11 +166,11 @@ float m_spider(float req) { case MR_PRECACHE: { - return TRUE; + return true; } } - return TRUE; + return true; } #endif // CSQC diff --git a/qcsrc/common/monsters/monster/wyvern.qc b/qcsrc/common/monsters/monster/wyvern.qc index a44f6d9c7..b6736caa4 100644 --- a/qcsrc/common/monsters/monster/wyvern.qc +++ b/qcsrc/common/monsters/monster/wyvern.qc @@ -71,7 +71,7 @@ void wyvern_fireball() missile.think = wyvern_fireball_explode; missile.enemy = self.enemy; missile.touch = wyvern_fireball_touch; - CSQCProjectile(missile, TRUE, PROJECTILE_FIREMINE, TRUE); + CSQCProjectile(missile, true, PROJECTILE_FIREMINE, true); } float wyvern_attack(float attack_type) @@ -85,11 +85,11 @@ float wyvern_attack(float attack_type) wyvern_fireball(); - return TRUE; + return true; } } - return FALSE; + return false; } void spawnfunc_monster_wyvern() @@ -109,7 +109,7 @@ float m_wyvern(float req) case MR_THINK: { monster_move((autocvar_g_monster_wyvern_speed_run), (autocvar_g_monster_wyvern_speed_walk), (autocvar_g_monster_wyvern_speed_stop), wyvern_anim_fly, wyvern_anim_hover, wyvern_anim_hover); - return TRUE; + return true; } case MR_DEATH: { @@ -117,7 +117,7 @@ float m_wyvern(float req) self.velocity_x = -200 + 400 * random(); self.velocity_y = -200 + 400 * random(); self.velocity_z = 100 + 100 * random(); - return TRUE; + return true; } case MR_SETUP: { @@ -127,16 +127,16 @@ float m_wyvern(float req) self.monster_attackfunc = wyvern_attack; self.frame = wyvern_anim_hover; - return TRUE; + return true; } case MR_PRECACHE: { precache_model("models/monsters/wizard.mdl"); - return TRUE; + return true; } } - return TRUE; + return true; } #endif // SVQC @@ -147,11 +147,11 @@ float m_wyvern(float req) { case MR_PRECACHE: { - return TRUE; + return true; } } - return TRUE; + return true; } #endif // CSQC diff --git a/qcsrc/common/monsters/monster/zombie.qc b/qcsrc/common/monsters/monster/zombie.qc index 25afaf76f..411e1c686 100644 --- a/qcsrc/common/monsters/monster/zombie.qc +++ b/qcsrc/common/monsters/monster/zombie.qc @@ -93,7 +93,7 @@ float zombie_block() defer(2, zombie_blockend); - return TRUE; + return true; } float zombie_attack(float attack_type) @@ -114,7 +114,7 @@ float zombie_attack(float attack_type) if(random() < 0.3 && self.health < 75 && self.enemy.health > 10) return zombie_block(); - return monster_melee(self.enemy, (autocvar_g_monster_zombie_attack_melee_damage), chosen_anim, self.attack_range, (autocvar_g_monster_zombie_attack_melee_delay), DEATH_MONSTER_ZOMBIE_MELEE, TRUE); + return monster_melee(self.enemy, (autocvar_g_monster_zombie_attack_melee_damage), chosen_anim, self.attack_range, (autocvar_g_monster_zombie_attack_melee_delay), DEATH_MONSTER_ZOMBIE_MELEE, true); } case MONSTER_ATTACK_RANGED: { @@ -123,7 +123,7 @@ float zombie_attack(float attack_type) } } - return FALSE; + return false; } void spawnfunc_monster_zombie() @@ -140,14 +140,14 @@ float m_zombie(float req) case MR_THINK: { monster_move((autocvar_g_monster_zombie_speed_run), (autocvar_g_monster_zombie_speed_walk), (autocvar_g_monster_zombie_speed_stop), zombie_anim_runforward, zombie_anim_runforward, zombie_anim_idle); - return TRUE; + return true; } case MR_DEATH: { self.armorvalue = 0; self.m_armor_blockpercent = autocvar_g_monsters_armor_blockpercent; self.frame = ((random() > 0.5) ? zombie_anim_deathback1 : zombie_anim_deathfront1); - return TRUE; + return true; } case MR_SETUP: { @@ -165,16 +165,16 @@ float m_zombie(float req) self.spawnshieldtime = self.spawn_time; self.respawntime = 0.2; - return TRUE; + return true; } case MR_PRECACHE: { precache_model("models/monsters/zombie.dpm"); - return TRUE; + return true; } } - return TRUE; + return true; } #endif // SVQC @@ -185,11 +185,11 @@ float m_zombie(float req) { case MR_PRECACHE: { - return TRUE; + return true; } } - return TRUE; + return true; } #endif // CSQC diff --git a/qcsrc/common/monsters/spawn.qc b/qcsrc/common/monsters/spawn.qc index be5accf5e..e6b5db8e3 100644 --- a/qcsrc/common/monsters/spawn.qc +++ b/qcsrc/common/monsters/spawn.qc @@ -34,7 +34,7 @@ entity spawnmonster (string monster, float monster_id, entity spawnedby, entity mon = get_monsterinfo(i); if(mon.netname == monster) { - found = TRUE; + found = true; monster_id = mon.monsterid; // we have the monster, old monster id is no longer required break; } diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index b8c47d00a..d5cd1f3e4 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -20,7 +20,7 @@ void monster_dropitem() if(e && e.monster_loot) { self = e; - e.noalign = TRUE; + e.noalign = true; e.monster_loot(); e.gravity = 1; e.movetype = MOVETYPE_TOSS; @@ -44,58 +44,58 @@ float Monster_SkillModifier() float monster_isvalidtarget (entity targ, entity ent) { if(!targ || !ent) - return FALSE; // someone doesn't exist + return false; // someone doesn't exist if(targ == ent) - return FALSE; // don't attack ourselves + return false; // don't attack ourselves //traceline(ent.origin, targ.origin, MOVE_NORMAL, ent); //if(trace_ent != targ) - //return FALSE; + //return false; if(targ.vehicle_flags & VHF_ISVEHICLE) if(!((get_monsterinfo(ent.monsterid)).spawnflags & MON_FLAG_RANGED)) - return FALSE; // melee attacks are useless against vehicles + return false; // melee attacks are useless against vehicles if(time < game_starttime) - return FALSE; // monsters do nothing before the match has started + return false; // monsters do nothing before the match has started if(targ.takedamage == DAMAGE_NO) - return FALSE; // enemy can't be damaged + return false; // enemy can't be damaged if(targ.items & IT_INVISIBILITY) - return FALSE; // enemy is invisible + return false; // enemy is invisible if(substring(targ.classname, 0, 10) == "onslaught_") - return FALSE; // don't attack onslaught targets + return false; // don't attack onslaught targets if(IS_SPEC(targ) || IS_OBSERVER(targ)) - return FALSE; // enemy is a spectator + return false; // enemy is a spectator if(!(targ.vehicle_flags & VHF_ISVEHICLE)) if(targ.deadflag != DEAD_NO || ent.deadflag != DEAD_NO || targ.health <= 0 || ent.health <= 0) - return FALSE; // enemy/self is dead + return false; // enemy/self is dead if(ent.monster_owner == targ) - return FALSE; // don't attack our master + return false; // don't attack our master if(targ.monster_owner == ent) - return FALSE; // don't attack our pet + return false; // don't attack our pet if(!(targ.vehicle_flags & VHF_ISVEHICLE)) if(targ.flags & FL_NOTARGET) - return FALSE; // enemy can't be targeted + return false; // enemy can't be targeted if(!autocvar_g_monsters_typefrag) if(targ.BUTTON_CHAT) - return FALSE; // no typefragging! + return false; // no typefragging! if(SAME_TEAM(targ, ent)) - return FALSE; // enemy is on our team + return false; // enemy is on our team if (targ.frozen) - return FALSE; // ignore frozen + return false; // ignore frozen if(autocvar_g_monsters_target_infront || (ent.spawnflags & MONSTERFLAG_INFRONT)) if(ent.enemy != targ) @@ -106,10 +106,10 @@ float monster_isvalidtarget (entity targ, entity ent) dot = normalize (targ.origin - ent.origin) * v_forward; if(dot <= 0.3) - return FALSE; + return false; } - return TRUE; + return true; } entity FindTarget (entity ent) @@ -118,7 +118,7 @@ entity FindTarget (entity ent) entity head, closest_target = world; head = findradius(ent.origin, ent.target_range); - //head = WarpZone_FindRadius(ent.origin, ent.target_range, TRUE); + //head = WarpZone_FindRadius(ent.origin, ent.target_range, true); while(head) // find the closest acceptable target to pass to { @@ -198,7 +198,7 @@ void precache_monstersounds() float globhandle, n, i; string f; - globhandle = search_begin(strcat(m, "_*.sounds"), TRUE, FALSE); + globhandle = search_begin(strcat(m, "_*.sounds"), true, false); if (globhandle < 0) return; n = search_getsize(globhandle); @@ -298,7 +298,7 @@ void monster_makevectors(entity e) float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, float deathtype, float dostop) { if (self.health <= 0) - return FALSE; // attacking while dead?! + return false; // attacking while dead?! if(dostop) { @@ -319,7 +319,7 @@ float monster_melee(entity targ, float damg, float anim, float er, float anim_fi if(trace_ent.takedamage) Damage(trace_ent, self, self, damg * Monster_SkillModifier(), deathtype, trace_ent.origin, normalize(trace_ent.origin - self.origin)); - return TRUE; + return true; } void Monster_CheckMinibossFlag () @@ -344,15 +344,15 @@ float Monster_CanRespawn(entity ent) other = ent; if(ent.deadflag == DEAD_DEAD) // don't call when monster isn't dead if(MUTATOR_CALLHOOK(MonsterRespawn)) - return TRUE; // enabled by a mutator + return true; // enabled by a mutator if(ent.spawnflags & MONSTERFLAG_NORESPAWN) - return FALSE; + return false; if(!autocvar_g_monsters_respawn) - return FALSE; + return false; - return TRUE; + return true; } float monster_initialize(float mon_id); @@ -395,13 +395,13 @@ void Monster_Fade () float Monster_CanJump (vector vel) { if(self.state) - return FALSE; // already attacking + return false; // already attacking if(!(self.flags & FL_ONGROUND)) - return FALSE; // not on the ground + return false; // not on the ground if(self.health <= 0) - return FALSE; // called when dead? + return false; // called when dead? if(time < self.attack_finished_single) - return FALSE; // still attacking + return false; // still attacking vector old = self.velocity; @@ -409,15 +409,15 @@ float Monster_CanJump (vector vel) tracetoss(self, self); self.velocity = old; if (trace_ent != self.enemy) - return FALSE; + return false; - return TRUE; + return true; } float monster_leap (float anm, void() touchfunc, vector vel, float anim_finished) { if(!Monster_CanJump(vel)) - return FALSE; + return false; self.frame = anm; self.state = MONSTER_STATE_ATTACK_LEAP; @@ -428,7 +428,7 @@ float monster_leap (float anm, void() touchfunc, vector vel, float anim_finished self.attack_finished_single = time + anim_finished; - return TRUE; + return true; } void monster_checkattack(entity e, entity targ) @@ -447,14 +447,14 @@ void monster_checkattack(entity e, entity targ) if(vlen(targ.origin - e.origin) <= e.attack_range) if(e.monster_attackfunc(MONSTER_ATTACK_MELEE)) { - MonsterSound(monstersound_melee, 0, FALSE, CH_VOICE); + MonsterSound(monstersound_melee, 0, false, CH_VOICE); return; } if(vlen(targ.origin - e.origin) > e.attack_range) if(e.monster_attackfunc(MONSTER_ATTACK_RANGED)) { - MonsterSound(monstersound_ranged, 0, FALSE, CH_VOICE); + MonsterSound(monstersound_ranged, 0, false, CH_VOICE); return; } } @@ -656,7 +656,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ { if(time >= self.last_trace) { - self.fish_wasdrowning = TRUE; + self.fish_wasdrowning = true; self.last_trace = time + 0.4; Damage (self, world, world, 2, DEATH_DROWN, self.origin, '0 0 0'); @@ -682,7 +682,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ } else if(self.fish_wasdrowning) { - self.fish_wasdrowning = FALSE; + self.fish_wasdrowning = false; self.angles_x = 0; self.movetype = MOVETYPE_WALK; } @@ -730,7 +730,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ self.moveto = WarpZone_RefSys_TransformOrigin(self.enemy, self, (0.5 * (self.enemy.absmin + self.enemy.absmax))); self.pass_distance = vlen((('1 0 0' * self.enemy.origin.x) + ('0 1 0' * self.enemy.origin.y)) - (('1 0 0' * self.origin.x) + ('0 1 0' * self.origin.y))); - MonsterSound(monstersound_sight, 0, FALSE, CH_VOICE); + MonsterSound(monstersound_sight, 0, false, CH_VOICE); } } @@ -745,7 +745,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ self.moveto = monster_pickmovetarget(targ); if(!self.enemy) - MonsterSound(monstersound_idle, 7, TRUE, CH_VOICE); + MonsterSound(monstersound_idle, 7, true, CH_VOICE); if(self.state == MONSTER_STATE_ATTACK_LEAP && (self.flags & FL_ONGROUND)) { @@ -767,7 +767,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ if(vlen(self.origin - self.moveto) > 64) { if((self.flags & FL_ONGROUND) || ((self.flags & FL_FLY) || (self.flags & FL_SWIM))) - monster_CalculateVelocity(self, self.moveto, self.origin, TRUE, ((self.enemy) ? runspeed : walkspeed)); + monster_CalculateVelocity(self, self.moveto, self.origin, true, ((self.enemy) ? runspeed : walkspeed)); /*&if(self.flags & FL_FLY || self.flags & FL_SWIM) movelib_move_simple(v_forward, ((self.enemy) ? runspeed : walkspeed), 0.6); @@ -859,7 +859,7 @@ void Monster_Appear() float Monster_CheckAppearFlags(entity ent, float monster_id) { if(!(ent.spawnflags & MONSTERFLAG_APPEAR)) - return FALSE; + return false; ent.think = func_null; ent.monsterid = monster_id; // set so this monster is properly registered (otherwise, normal initialization is used) @@ -867,7 +867,7 @@ float Monster_CheckAppearFlags(entity ent, float monster_id) ent.use = Monster_Appear; ent.flags = FL_MONSTER; // set so this monster can get butchered - return TRUE; + return true; } void monsters_reset() @@ -918,7 +918,7 @@ void monster_die(entity attacker, float gibbed) monster_dropitem(); - MonsterSound(monstersound_death, 0, FALSE, CH_VOICE); + MonsterSound(monstersound_death, 0, false, CH_VOICE); if(!(self.spawnflags & MONSTERFLAG_SPAWNED) && !(self.spawnflags & MONSTERFLAG_RESPAWNED)) monsters_killed += 1; @@ -1001,7 +1001,7 @@ void monsters_damage (entity inflictor, entity attacker, float damage, float dea if(self.health <= 0) { if(deathtype == DEATH_KILL) - self.candrop = FALSE; // killed by mobkill command + self.candrop = false; // killed by mobkill command // TODO: fix this? activator = attacker; @@ -1055,7 +1055,7 @@ void monster_changeteam(entity ent, float newteam) if(!teamplay) { return; } ent.team = newteam; - ent.monster_attack = TRUE; // new team, activate attacking + ent.monster_attack = true; // new team, activate attacking monster_setupcolors(ent); if(ent.sprite) @@ -1114,11 +1114,11 @@ float monster_spawn() UpdateMonsterSounds(); if(teamplay) - self.monster_attack = TRUE; // we can have monster enemies in team games + self.monster_attack = true; // we can have monster enemies in team games - MonsterSound(monstersound_spawn, 0, FALSE, CH_VOICE); + MonsterSound(monstersound_spawn, 0, false, CH_VOICE); - WaypointSprite_Spawn(M_NAME(self.monsterid), 0, 1024, self, '0 0 1' * (self.maxs.z + 15), world, self.team, self, sprite, TRUE, RADARICON_DANGER, ((self.team) ? Team_ColorRGB(self.team) : '1 0 0')); + WaypointSprite_Spawn(M_NAME(self.monsterid), 0, 1024, self, '0 0 1' * (self.maxs.z + 15), world, self.team, self, sprite, true, RADARICON_DANGER, ((self.team) ? Team_ColorRGB(self.team) : '1 0 0')); if(!(self.spawnflags & MONSTERFLAG_INVINCIBLE)) { WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health); @@ -1129,16 +1129,16 @@ float monster_spawn() self.nextthink = time + self.ticrate; if(MUTATOR_CALLHOOK(MonsterSpawn)) - return FALSE; + return false; - return TRUE; + return true; } float monster_initialize(float mon_id) { - if(!autocvar_g_monsters) { return FALSE; } + if(!autocvar_g_monsters) { return false; } if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) { MON_ACTION(mon_id, MR_PRECACHE); } - if(Monster_CheckAppearFlags(self, mon_id)) { return TRUE; } // return true so the monster isn't removed + if(Monster_CheckAppearFlags(self, mon_id)) { return true; } // return true so the monster isn't removed entity mon = get_monsterinfo(mon_id); @@ -1146,9 +1146,9 @@ float monster_initialize(float mon_id) self.monster_skill = cvar("g_monsters_skill"); // support for quake style removing monsters based on skill - if(self.monster_skill == MONSTER_SKILL_EASY) if(self.spawnflags & MONSTERSKILL_NOTEASY) { return FALSE; } - if(self.monster_skill == MONSTER_SKILL_MEDIUM) if(self.spawnflags & MONSTERSKILL_NOTMEDIUM) { return FALSE; } - if(self.monster_skill == MONSTER_SKILL_HARD) if(self.spawnflags & MONSTERSKILL_NOTHARD) { return FALSE; } + if(self.monster_skill == MONSTER_SKILL_EASY) if(self.spawnflags & MONSTERSKILL_NOTEASY) { return false; } + if(self.monster_skill == MONSTER_SKILL_MEDIUM) if(self.spawnflags & MONSTERSKILL_NOTMEDIUM) { return false; } + if(self.monster_skill == MONSTER_SKILL_HARD) if(self.spawnflags & MONSTERSKILL_NOTHARD) { return false; } if(self.team && !teamplay) self.team = 0; @@ -1161,10 +1161,10 @@ float monster_initialize(float mon_id) //setsize(self, mon.mins, mon.maxs); self.flags = FL_MONSTER; self.takedamage = DAMAGE_AIM; - self.bot_attack = TRUE; - self.iscreature = TRUE; - self.teleportable = TRUE; - self.damagedbycontents = TRUE; + self.bot_attack = true; + self.iscreature = true; + self.teleportable = true; + self.damagedbycontents = true; self.monsterid = mon_id; self.damageforcescale = 0; self.event_damage = monsters_damage; @@ -1181,7 +1181,7 @@ float monster_initialize(float mon_id) self.reset = monsters_reset; self.netname = mon.netname; self.monster_name = M_NAME(mon_id); - self.candrop = TRUE; + self.candrop = true; self.view_ofs = '0 0 1' * (self.maxs.z * 0.5); self.oldtarget2 = self.target2; self.pass_distance = 0; @@ -1244,12 +1244,12 @@ float monster_initialize(float mon_id) } if(!monster_spawn()) - return FALSE; + return false; if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) monster_setupcolors(self); CSQCMODEL_AUTOINIT(); - return TRUE; + return true; } diff --git a/qcsrc/common/nades.qc b/qcsrc/common/nades.qc index 5d67ef34e..e0d5cbc81 100644 --- a/qcsrc/common/nades.qc +++ b/qcsrc/common/nades.qc @@ -20,7 +20,7 @@ float healer_send(entity to, float sf) WriteByte(MSG_ENTITY, (self.ltime - time)*10.0+0.5); } - return TRUE; + return true; } #endif // SVQC diff --git a/qcsrc/common/net_notice.qc b/qcsrc/common/net_notice.qc index caaae8b49..084c83c22 100644 --- a/qcsrc/common/net_notice.qc +++ b/qcsrc/common/net_notice.qc @@ -7,7 +7,7 @@ void sv_notice_join_think() { float i; for(i = argc - 1; i >= 0; --i) - sv_notice_to(self.owner, argv(i), autocvar_sv_join_notices_time, FALSE); + sv_notice_to(self.owner, argv(i), autocvar_sv_join_notices_time, false); } remove(self); } @@ -64,11 +64,11 @@ float cl_notice_run() { entity _notes; string _notice; - float m = FALSE; + float m = false; _notes = findchain(classname, "sv_notice"); if(!_notes) - return FALSE; + return false; #define M1 30 #define M2 10 @@ -96,7 +96,7 @@ float cl_notice_run() OUT(_notice, 16); if(_notes.skin) - m = TRUE; + m = true; if(_notes.alpha <= time) { diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 5bb9fcdd5..dbe01f40f 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -139,12 +139,12 @@ float Notification_ShouldSend(float broadcast, entity to_client, entity other_cl && (to_client.enemy == other_client) ) - ) { return TRUE; } + ) { return true; } break; } case NOTIF_ONE_ONLY: // send ONLY to one client { - if(to_client == other_client) { return TRUE; } + if(to_client == other_client) { return true; } break; } case NOTIF_TEAM: // send only to X team and their spectators @@ -157,7 +157,7 @@ float Notification_ShouldSend(float broadcast, entity to_client, entity other_cl && (to_client.enemy.team == other_client.team) ) - ) { return TRUE; } + ) { return true; } break; } case NOTIF_TEAM_EXCEPT: // send only to X team and their spectators, except for Y person and their spectators @@ -178,12 +178,12 @@ float Notification_ShouldSend(float broadcast, entity to_client, entity other_cl ) ) ) - ) { return TRUE; } + ) { return true; } break; } case NOTIF_ALL: // send to everyone { - return TRUE; + return true; } case NOTIF_ALL_EXCEPT: // send to everyone except X person and their spectators { @@ -195,11 +195,11 @@ float Notification_ShouldSend(float broadcast, entity to_client, entity other_cl && (to_client.enemy == other_client) ) - ) { return TRUE; } + ) { return true; } break; } } - return FALSE; + return false; } #endif @@ -290,7 +290,7 @@ string Process_Notif_Line( notifname, stringtype ); - notif_error = TRUE; + notif_error = true; input = substring(input, 1, (strlen(input) - 1)); } @@ -325,7 +325,7 @@ string Process_Notif_Args( notifname, NOTIF_MAX_ARGS ); - notif_error = TRUE; + notif_error = true; break; } @@ -357,7 +357,7 @@ string Process_Notif_Args( notifname, selected ); - notif_error = TRUE; + notif_error = true; break; } } @@ -376,7 +376,7 @@ string Process_Notif_Args( notifname, NOTIF_MAX_HUDARGS ); - notif_error = TRUE; + notif_error = true; break; } @@ -408,7 +408,7 @@ string Process_Notif_Args( notifname, selected ); - notif_error = TRUE; + notif_error = true; break; } } @@ -427,7 +427,7 @@ string Process_Notif_Args( notifname, NOTIF_MAX_DURCNT ); - notif_error = TRUE; + notif_error = true; break; } @@ -462,7 +462,7 @@ string Process_Notif_Args( notifname, selected ); - notif_error = TRUE; + notif_error = true; } break; } @@ -565,7 +565,7 @@ void Create_Notification_Entity( string typestring = Get_Notif_TypeName(typeId); // Other pre-notif-setup requisites - notif_error = FALSE; + notif_error = false; // ==================== // Notification Setup @@ -599,12 +599,12 @@ void Create_Notification_Entity( typestring, namestring ); - notif_error = TRUE; + notif_error = true; } } - else { notif.nent_enabled = FALSE; } + else { notif.nent_enabled = false; } #else - notif.nent_enabled = FALSE; + notif.nent_enabled = false; #endif break; @@ -621,7 +621,7 @@ void Create_Notification_Entity( #ifdef SVQC float should_process_args = server_is_dedicated; #else - float should_process_args = TRUE; + float should_process_args = true; #endif if(should_process_args) @@ -648,7 +648,7 @@ void Create_Notification_Entity( strnum, flnum ); - notif_error = TRUE; + notif_error = true; } } else if(args != "") @@ -680,7 +680,7 @@ void Create_Notification_Entity( typestring, namestring ); - notif_error = TRUE; + notif_error = true; } } else if(icon != "") @@ -693,7 +693,7 @@ void Create_Notification_Entity( typestring, namestring ); - notif_error = TRUE; + notif_error = true; } if(durcnt != "") @@ -712,7 +712,7 @@ void Create_Notification_Entity( typestring, namestring ); - notif_error = TRUE; + notif_error = true; } } else if(cpid != NO_MSG) { notif.nent_cpid = cpid; } @@ -754,7 +754,7 @@ void Create_Notification_Entity( typestring, namestring ); - notif_error = TRUE; + notif_error = true; } } @@ -774,7 +774,7 @@ void Create_Notification_Entity( typestring, namestring ); - notif_error = TRUE; + notif_error = true; } else { @@ -818,7 +818,7 @@ void Create_Notification_Entity( typestring, namestring ); - notif_error = TRUE; + notif_error = true; } else { @@ -865,7 +865,7 @@ void Create_Notification_Entity( typeId, namestring ); - notif_error = TRUE; + notif_error = true; break; } } @@ -908,7 +908,7 @@ void Create_Notification_Entity( typeId, namestring ); - notif_error = TRUE; + notif_error = true; break; } } @@ -916,8 +916,8 @@ void Create_Notification_Entity( // now check to see if any errors happened if(notif_error) { - notif.nent_enabled = FALSE; // disable the notification so it can't cause trouble - notif_global_error = TRUE; // throw the red flag that an error happened on init + notif.nent_enabled = false; // disable the notification so it can't cause trouble + notif_global_error = true; // throw the red flag that an error happened on init } } @@ -1764,9 +1764,9 @@ float Net_Write_Notification(entity client, float sf) WriteShort(MSG_ENTITY, self.nent_net_name); for(i = 0; i < self.nent_stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); } for(i = 0; i < self.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[i]); } - return TRUE; + return true; } - else { return FALSE; } + else { return false; } } void Kill_Notification( @@ -1831,7 +1831,7 @@ void Kill_Notification( net_notif.nent_client = client; net_notif.nent_net_type = MSG_CENTER_CPID; net_notif.nent_net_name = killed_cpid; - Net_LinkEntity(net_notif, FALSE, autocvar_notification_lifetime_runtime, Net_Write_Notification); + Net_LinkEntity(net_notif, false, autocvar_notification_lifetime_runtime, Net_Write_Notification); } for(notif = world; (notif = find(notif, classname, "net_notification"));) @@ -2092,7 +2092,7 @@ void Send_Notification( autocvar_notification_lifetime_mapload ); - Net_LinkEntity(net_notif, FALSE, 0, Net_Write_Notification); + Net_LinkEntity(net_notif, false, 0, Net_Write_Notification); } } diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index e414ef25d..71b10c4c6 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -936,16 +936,16 @@ void Send_Notification_WOCOVA( #define NOTIF_ADD_AUTOCVAR(name,default) var float autocvar_notification_##name = default; -var float autocvar_notification_show_location = FALSE; +var float autocvar_notification_show_location = false; var string autocvar_notification_show_location_string = ""; //_(" at the %s"); -var float autocvar_notification_show_sprees = TRUE; +var float autocvar_notification_show_sprees = true; var float autocvar_notification_show_sprees_info = 3; // 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker -var float autocvar_notification_show_sprees_info_newline = TRUE; -var float autocvar_notification_show_sprees_info_specialonly = TRUE; -var float autocvar_notification_errors_are_fatal = TRUE; +var float autocvar_notification_show_sprees_info_newline = true; +var float autocvar_notification_show_sprees_info_specialonly = true; +var float autocvar_notification_errors_are_fatal = true; var float autocvar_notification_lifetime_runtime = 0.5; var float autocvar_notification_lifetime_mapload = 10; -var float autocvar_notification_debug = FALSE; +var float autocvar_notification_debug = false; #ifdef SVQC .float FRAG_VERBOSE; @@ -958,8 +958,8 @@ var float autocvar_notification_item_centerprinttime = 1.5; // DISABLED IN CODE, BUT ENABLED IN CONFIG FOR COMPATIBILITY WITH OLD CLIENTS var float autocvar_notification_allow_chatboxprint = 0; -var float autocvar_notification_show_sprees_center = TRUE; -var float autocvar_notification_show_sprees_center_specialonly = TRUE; +var float autocvar_notification_show_sprees_center = true; +var float autocvar_notification_show_sprees_center_specialonly = true; #endif @@ -1054,7 +1054,7 @@ const float ARG_DC = 6; // unique result to durcnt/centerprint ARG_CASE(ARG_CS_SV, "race_diff", ((f2 > f3) ? sprintf(CCR("^1[+%s]"), mmssss(f2 - f3)) : sprintf(CCR("^2[-%s]"), mmssss(f3 - f2)))) \ ARG_CASE(ARG_CS, "missing_teams", notif_arg_missing_teams(f1)) \ ARG_CASE(ARG_CS, "pass_key", ((((tmp_s = getcommandkey("pass", "+use")) != "pass") && !(strstrofs(tmp_s, "not bound", 0) >= 0)) ? sprintf(CCR(_(" ^F1(Press %s)")), tmp_s) : "")) \ - ARG_CASE(ARG_CS, "frag_ping", notif_arg_frag_ping(TRUE, f2)) \ + ARG_CASE(ARG_CS, "frag_ping", notif_arg_frag_ping(true, f2)) \ ARG_CASE(ARG_CS, "frag_stats", notif_arg_frag_stats(f2, f3, f4)) \ /*ARG_CASE(ARG_CS, "frag_pos", ((Should_Print_Score_Pos(f1)) ? sprintf("\n^BG%s", Read_Score_Pos(f1)) : ""))*/ \ ARG_CASE(ARG_CS, "spree_cen", (autocvar_notification_show_sprees ? notif_arg_spree_cen(f1) : "")) \ @@ -1092,9 +1092,9 @@ string notif_arg_frag_ping(float newline, float fping) string notif_arg_frag_stats(float fhealth, float farmor, float fping) { if (!(fhealth < 1)) - return sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), fhealth, farmor, notif_arg_frag_ping(FALSE, fping)); + return sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), fhealth, farmor, notif_arg_frag_ping(false, fping)); else - return sprintf(CCR(_("\n(^F4Dead^BG)%s")), notif_arg_frag_ping(FALSE, fping)); + return sprintf(CCR(_("\n(^F4Dead^BG)%s")), notif_arg_frag_ping(false, fping)); } string notif_arg_missing_teams(float f1) @@ -1558,7 +1558,7 @@ float notif_global_error; void RegisterNotifications_First() { - notif_global_error = FALSE; + notif_global_error = false; #ifdef SVQC #define dedi (server_is_dedicated ? "a dedicated " : "") @@ -1577,7 +1577,7 @@ void RegisterNotifications_First() #else if(autocvar_notification_version_mismatch_server_error) #endif - notif_global_error = TRUE; + notif_global_error = true; printf("^1NOTIFICATION VERSION MISMATCH: ^7program = %s, config = %d, code = %d.\n", PROGNAME, autocvar_notification_version, NOTIF_VERSION); diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 2c4a355e0..60af8294f 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -191,7 +191,7 @@ void PlayerStats_GameReport(float finished) if(autocvar_g_playerstats_gamereport_uri != "") { - PlayerStats_GameReport_DelayMapVote = TRUE; + PlayerStats_GameReport_DelayMapVote = true; url_multi_fopen( autocvar_g_playerstats_gamereport_uri, FILE_APPEND, @@ -201,7 +201,7 @@ void PlayerStats_GameReport(float finished) } else { - PlayerStats_GameReport_DelayMapVote = FALSE; + PlayerStats_GameReport_DelayMapVote = false; db_close(PS_GR_OUT_DB); PS_GR_OUT_DB = -1; } @@ -215,7 +215,7 @@ void PlayerStats_GameReport_Init() // initiated before InitGameplayMode so that if(PS_GR_OUT_DB >= 0) { - PlayerStats_GameReport_DelayMapVote = TRUE; + PlayerStats_GameReport_DelayMapVote = true; serverflags |= SERVERFLAG_PLAYERSTATS; @@ -252,7 +252,7 @@ void PlayerStats_GameReport_Init() // initiated before InitGameplayMode so that PlayerStats_GameReport_AddEvent(PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD); PlayerStats_GameReport_AddEvent(PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM); } - else { PlayerStats_GameReport_DelayMapVote = FALSE; } + else { PlayerStats_GameReport_DelayMapVote = false; } } void PlayerStats_GameReport_Handler(entity fh, entity pass, float status) @@ -392,7 +392,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status) { // url_fclose has finished dprint("Player stats written\n"); - PlayerStats_GameReport_DelayMapVote = FALSE; + PlayerStats_GameReport_DelayMapVote = false; if(PS_GR_OUT_DB >= 0) { db_close(PS_GR_OUT_DB); @@ -405,7 +405,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status) default: { print("Player stats writing failed: ", ftos(status), "\n"); - PlayerStats_GameReport_DelayMapVote = FALSE; + PlayerStats_GameReport_DelayMapVote = false; if(PS_GR_OUT_DB >= 0) { db_close(PS_GR_OUT_DB); diff --git a/qcsrc/common/test.qc b/qcsrc/common/test.qc index ac792a387..53b4476ae 100644 --- a/qcsrc/common/test.qc +++ b/qcsrc/common/test.qc @@ -10,7 +10,7 @@ void TEST_Fail(string cond) void TEST_OK() { - TEST_ok = TRUE; + TEST_ok = true; } float TEST_RunAll() diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index 09aec2d3e..8b35ed9e1 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -15,6 +15,4 @@ // Boolean Constants const bool true = 1; const bool false = 0; -const bool TRUE = 1; -const bool FALSE = 0; #endif diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index beb27aa28..85d75a0c5 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -253,9 +253,9 @@ float fexists(string f) float fh; fh = fopen(f, FILE_READ); if (fh < 0) - return FALSE; + return false; fclose(fh); - return TRUE; + return true; } // Databases (hash tables) @@ -346,14 +346,14 @@ void db_close(float db) string db_get(float db, string pKey) { float h; - h = crc16(FALSE, pKey) % DB_BUCKETS; + h = crc16(false, pKey) % DB_BUCKETS; return uri_unescape(infoget(bufstr_get(db, h), pKey)); } void db_put(float db, string pKey, string pValue) { float h; - h = crc16(FALSE, pKey) % DB_BUCKETS; + h = crc16(false, pKey) % DB_BUCKETS; bufstr_set(db, h, infoadd(bufstr_get(db, h), pKey, uri_escape(pValue))); } @@ -628,18 +628,18 @@ void compressShortVector_init() #ifndef MENUQC float CheckWireframeBox(entity forent, vector v0, vector dvx, vector dvy, vector dvz) { - traceline(v0, v0 + dvx, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0, v0 + dvy, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0, v0 + dvz, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0 + dvx, v0 + dvx + dvy, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0 + dvx, v0 + dvx + dvz, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0 + dvy, v0 + dvy + dvx, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0 + dvy, v0 + dvy + dvz, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0 + dvz, v0 + dvz + dvx, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0 + dvz, v0 + dvz + dvy, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0 + dvx + dvy, v0 + dvx + dvy + dvz, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0 + dvx + dvz, v0 + dvx + dvy + dvz, TRUE, forent); if(trace_fraction < 1) return 0; - traceline(v0 + dvy + dvz, v0 + dvx + dvy + dvz, TRUE, forent); if(trace_fraction < 1) return 0; + traceline(v0, v0 + dvx, true, forent); if(trace_fraction < 1) return 0; + traceline(v0, v0 + dvy, true, forent); if(trace_fraction < 1) return 0; + traceline(v0, v0 + dvz, true, forent); if(trace_fraction < 1) return 0; + traceline(v0 + dvx, v0 + dvx + dvy, true, forent); if(trace_fraction < 1) return 0; + traceline(v0 + dvx, v0 + dvx + dvz, true, forent); if(trace_fraction < 1) return 0; + traceline(v0 + dvy, v0 + dvy + dvx, true, forent); if(trace_fraction < 1) return 0; + traceline(v0 + dvy, v0 + dvy + dvz, true, forent); if(trace_fraction < 1) return 0; + traceline(v0 + dvz, v0 + dvz + dvx, true, forent); if(trace_fraction < 1) return 0; + traceline(v0 + dvz, v0 + dvz + dvy, true, forent); if(trace_fraction < 1) return 0; + traceline(v0 + dvx + dvy, v0 + dvx + dvy + dvz, true, forent); if(trace_fraction < 1) return 0; + traceline(v0 + dvx + dvz, v0 + dvx + dvy + dvz, true, forent); if(trace_fraction < 1) return 0; + traceline(v0 + dvy + dvz, v0 + dvx + dvy + dvz, true, forent); if(trace_fraction < 1) return 0; return 1; } #endif @@ -937,8 +937,8 @@ float almost_equals(float a, float b) float eps; eps = (max(a, -a) + max(b, -b)) * 0.001; if(a - b < eps && b - a < eps) - return TRUE; - return FALSE; + return true; + return false; } float almost_in_bounds(float a, float b, float c) @@ -2326,12 +2326,12 @@ float InterpretBoolean(string input) case "yes": case "true": case "on": - return TRUE; + return true; case "no": case "false": case "off": - return FALSE; + return false; default: return stof(input); } @@ -2458,25 +2458,25 @@ float cubic_speedfunc(float startspeedfactor, float endspeedfactor, float x) float cubic_speedfunc_is_sane(float startspeedfactor, float endspeedfactor) { if(startspeedfactor < 0 || endspeedfactor < 0) - return FALSE; + return false; /* // if this is the case, the possible zeros of the first derivative are outside // 0..1 We can calculate this condition as condition if(se <= 3) - return TRUE; + return true; */ // better, see below: if(startspeedfactor <= 3 && endspeedfactor <= 3) - return TRUE; + return true; // if this is the case, the first derivative has no zeros at all float se = startspeedfactor + endspeedfactor; float s_e = startspeedfactor - endspeedfactor; if(3 * (se - 4) * (se - 4) + s_e * s_e <= 12) // an ellipse - return TRUE; + return true; // Now let s <= 3, s <= 3, s+e >= 3 (triangle) then we get se <= 6 (top right corner). // we also get s_e <= 6 - se @@ -2484,7 +2484,7 @@ float cubic_speedfunc_is_sane(float startspeedfactor, float endspeedfactor) // is quadratic, has value 12 at 3 and 6, and value < 12 in between. // Therefore, above "better" check works! - return FALSE; + return false; // known good cases: // (0, [0..3]) diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index f233cae3b..25cc17daa 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -174,7 +174,7 @@ float W_Arc_Beam_Send(entity to, float sf) WriteByte(MSG_ENTITY, self.beam_type); } - return TRUE; + return true; } void Reset_ArcBeam(entity player, vector forward) @@ -224,7 +224,7 @@ void W_Arc_Beam_Think(void) if( self.owner.BUTTON_ATCK2 || self.beam_bursting) { if(!self.beam_bursting) - self.beam_bursting = TRUE; + self.beam_bursting = true; burst = ARC_BT_BURSTMASK; } @@ -304,7 +304,7 @@ void W_Arc_Beam_Think(void) W_SetupShot_Range( self.owner, - TRUE, + true, 0, "", 0, @@ -332,7 +332,7 @@ void W_Arc_Beam_Think(void) if(!self.beam_initialized) { self.beam_dir = w_shotdir; - self.beam_initialized = TRUE; + self.beam_initialized = true; } // WEAPONTODO: Detect player velocity so that the beam curves when moving too @@ -586,10 +586,10 @@ void W_Arc_Beam(float burst) beam.think = W_Arc_Beam_Think; beam.owner = self; beam.movetype = MOVETYPE_NONE; - beam.bot_dodge = TRUE; + beam.bot_dodge = true; beam.bot_dodgerating = WEP_CVAR(arc, beam_damage); beam.beam_bursting = burst; - Net_LinkEntity(beam, FALSE, 0, W_Arc_Beam_Send); + Net_LinkEntity(beam, false, 0, W_Arc_Beam_Send); entity oldself = self; self = beam; @@ -600,7 +600,7 @@ void W_Arc_Beam(float burst) void Arc_Smoke() { makevectors(self.v_angle); - W_SetupShot_Range(self,TRUE,0,"",0,0,0); + W_SetupShot_Range(self,true,0,"",0,0,0); vector smoke_origin = w_shotorg + self.velocity*frametime; if ( self.arc_overheat > time ) @@ -645,7 +645,7 @@ float W_Arc(float req) WEP_CVAR(arc, beam_botaimspeed), 0, WEP_CVAR(arc, beam_botaimlifetime), - FALSE + false ); } else @@ -654,10 +654,10 @@ float W_Arc(float req) 1000000, 0, 0.001, - FALSE + false ); } - return TRUE; + return true; } case WR_THINK: { @@ -692,7 +692,7 @@ float W_Arc(float req) } } - return TRUE; + return true; } if(self.arc_BUTTON_ATCK_prev != 0) @@ -714,7 +714,7 @@ float W_Arc(float req) } #endif - return TRUE; + return true; } case WR_INIT: { @@ -727,13 +727,13 @@ float W_Arc(float req) precache_sound("weapons/arc_loop_overheat.wav"); if(!arc_shotorigin[0]) { - arc_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 1); - arc_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 2); - arc_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 3); - arc_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 4); + arc_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), false, false, 1); + arc_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), false, false, 2); + arc_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), false, false, 3); + arc_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), false, false, 4); } ARC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -747,7 +747,7 @@ float W_Arc(float req) case WR_CONFIG: { ARC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_KILLMESSAGE: { @@ -759,20 +759,20 @@ float W_Arc(float req) weapon_dropevent_item.arc_cooldown = self.arc_cooldown; self.arc_overheat = 0; self.arc_cooldown = 0; - return TRUE; + return true; } case WR_PICKUP: { - if ( !client_hasweapon(self, WEP_ARC, FALSE, FALSE) && + if ( !client_hasweapon(self, WEP_ARC, false, false) && weapon_dropevent_item.arc_overheat > time ) { self.arc_overheat = weapon_dropevent_item.arc_overheat; self.arc_cooldown = weapon_dropevent_item.arc_cooldown; } - return TRUE; + return true; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -860,10 +860,10 @@ void Reset_ArcBeam(void) { entity e; for (e = world; (e = findfloat(e, beam_usevieworigin, 1)); ) { - e.beam_initialized = FALSE; + e.beam_initialized = false; } for (e = world; (e = findfloat(e, beam_usevieworigin, 2)); ) { - e.beam_initialized = FALSE; + e.beam_initialized = false; } } @@ -939,7 +939,7 @@ void Draw_ArcBeam(void) if(!self.beam_initialized) { self.beam_dir = wantdir; - self.beam_initialized = TRUE; + self.beam_initialized = true; } if(self.beam_dir != wantdir) @@ -1488,8 +1488,8 @@ void Ent_ReadArcBeam(float isnew) self.beam_color = randomvec(); self.beam_alpha = 1; self.beam_thickness = 8; - self.beam_traileffect = FALSE; - self.beam_hiteffect = FALSE; + self.beam_traileffect = false; + self.beam_hiteffect = false; self.beam_hitlight[0] = 0; self.beam_hitlight[1] = 1; self.beam_hitlight[2] = 1; @@ -1525,20 +1525,20 @@ float W_Arc(float req) case WR_IMPACTEFFECT: { // todo - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/arc_loop.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_blaster.qc b/qcsrc/common/weapons/w_blaster.qc index aa8d0a89b..8b1b6ba98 100644 --- a/qcsrc/common/weapons/w_blaster.qc +++ b/qcsrc/common/weapons/w_blaster.qc @@ -77,7 +77,7 @@ void W_Blaster_Think(void) self.movetype = MOVETYPE_FLY; self.think = SUB_Remove; self.nextthink = time + self.blaster_lifetime; - CSQCProjectile(self, TRUE, PROJECTILE_BLASTER, TRUE); + CSQCProjectile(self, true, PROJECTILE_BLASTER, true); } void W_Blaster_Attack( @@ -94,13 +94,13 @@ void W_Blaster_Attack( { vector s_forward = v_forward * cos(atk_shotangle * DEG2RAD) + v_up * sin(atk_shotangle * DEG2RAD); - W_SetupShot_Dir(self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, atk_damage); + W_SetupShot_Dir(self, s_forward, false, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, atk_damage); pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); entity missile = spawn(); missile.owner = missile.realowner = self; missile.classname = "blasterbolt"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = atk_damage; PROJECTILE_MAKETRIGGER(missile); @@ -121,7 +121,7 @@ void W_Blaster_Attack( 0, 0, atk_spread, - FALSE + false ); missile.angles = vectoangles(missile.velocity); @@ -156,14 +156,14 @@ float W_Blaster(float request) if(WEP_CVAR(blaster, secondary)) { if((random() * (WEP_CVAR_PRI(blaster, damage) + WEP_CVAR_SEC(blaster, damage))) > WEP_CVAR_PRI(blaster, damage)) - { self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(blaster, speed), 0, WEP_CVAR_SEC(blaster, lifetime), FALSE); } + { self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(blaster, speed), 0, WEP_CVAR_SEC(blaster, lifetime), false); } else - { self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(blaster, speed), 0, WEP_CVAR_PRI(blaster, lifetime), FALSE); } + { self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(blaster, speed), 0, WEP_CVAR_PRI(blaster, lifetime), false); } } else - { self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(blaster, speed), 0, WEP_CVAR_PRI(blaster, lifetime), FALSE); } + { self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(blaster, speed), 0, WEP_CVAR_PRI(blaster, lifetime), false); } - return TRUE; + return true; } case WR_THINK: @@ -221,7 +221,7 @@ float W_Blaster(float request) } } } - return TRUE; + return true; } case WR_INIT: @@ -231,25 +231,25 @@ float W_Blaster(float request) precache_model("models/weapons/h_laser.iqm"); precache_sound("weapons/lasergun_fire.wav"); BLASTER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_SETUP: { self.ammo_field = ammo_none; - return TRUE; + return true; } case WR_CHECKAMMO1: case WR_CHECKAMMO2: { - return TRUE; // laser has infinite ammo + return true; // laser has infinite ammo } case WR_CONFIG: { BLASTER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_SUICIDEMESSAGE: @@ -262,7 +262,7 @@ float W_Blaster(float request) return WEAPON_BLASTER_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -276,21 +276,21 @@ float W_Blaster(float request) org2 = w_org + w_backoff * 6; pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1); if(!w_issilent) { sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM); } - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/laserimpact.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_crylink.qc b/qcsrc/common/weapons/w_crylink.qc index 392c45223..70efdc0e2 100644 --- a/qcsrc/common/weapons/w_crylink.qc +++ b/qcsrc/common/weapons/w_crylink.qc @@ -266,7 +266,7 @@ void W_Crylink_LinkJoinEffect_Think(void) float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad) { - entity head = WarpZone_FindRadius((projectile.origin + (projectile.mins + projectile.maxs) * 0.5), rad + MAX_DAMAGEEXTRARADIUS, FALSE); + entity head = WarpZone_FindRadius((projectile.origin + (projectile.mins + projectile.maxs) * 0.5), rad + MAX_DAMAGEEXTRARADIUS, false); float hit_friendly = 0; float hit_enemy = 0; @@ -283,7 +283,7 @@ float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad) head = head.chain; } - return (hit_enemy ? FALSE : hit_friendly); + return (hit_enemy ? false : hit_friendly); } // NO bounce protection, as bounces are limited! @@ -329,7 +329,7 @@ void W_Crylink_Touch(void) self.projectiledeathtype |= HITTYPE_BOUNCE; // commented out as it causes a little hitch... //if(proj.cnt == 0) - // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE); + // CSQCProjectile(proj, true, PROJECTILE_CRYLINK, true); } void W_Crylink_Fadethink(void) @@ -353,7 +353,7 @@ void W_Crylink_Attack(void) if(WEP_CVAR_PRI(crylink, joinexplode)) maxdmg += WEP_CVAR_PRI(crylink, joinexplode_damage); - W_SetupShot(self, FALSE, 2, "weapons/crylink_fire.wav", CH_WEAPON_A, maxdmg); + W_SetupShot(self, false, 2, "weapons/crylink_fire.wav", CH_WEAPON_A, maxdmg); forward = v_forward; right = v_right; up = v_up; @@ -367,7 +367,7 @@ void W_Crylink_Attack(void) proj.reset = W_Crylink_Reset; proj.realowner = proj.owner = self; proj.classname = "spike"; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = WEP_CVAR_PRI(crylink, damage); if(shots == 1) { proj.queuenext = proj; @@ -408,7 +408,7 @@ void W_Crylink_Attack(void) s_z = v_forward.y; } s = s * WEP_CVAR_PRI(crylink, spread) * g_weaponspreadfactor; - W_SetupProjVelocity_Explicit(proj, w_shotdir + right * s.y + up * s.z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, FALSE); + W_SetupProjVelocity_Explicit(proj, w_shotdir + right * s.y + up * s.z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, false); proj.touch = W_Crylink_Touch; proj.think = W_Crylink_Fadethink; @@ -435,7 +435,7 @@ void W_Crylink_Attack(void) proj.flags = FL_PROJECTILE; proj.missile_flags = MIF_SPLASH; - CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE); + CSQCProjectile(proj, true, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), true); other = proj; MUTATOR_CALLHOOK(EditProjectile); } @@ -462,7 +462,7 @@ void W_Crylink_Attack2(void) if(WEP_CVAR_SEC(crylink, joinexplode)) maxdmg += WEP_CVAR_SEC(crylink, joinexplode_damage); - W_SetupShot(self, FALSE, 2, "weapons/crylink_fire2.wav", CH_WEAPON_A, maxdmg); + W_SetupShot(self, false, 2, "weapons/crylink_fire2.wav", CH_WEAPON_A, maxdmg); forward = v_forward; right = v_right; up = v_up; @@ -476,7 +476,7 @@ void W_Crylink_Attack2(void) proj.reset = W_Crylink_Reset; proj.realowner = proj.owner = self; proj.classname = "spike"; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = WEP_CVAR_SEC(crylink, damage); if(shots == 1) { proj.queuenext = proj; @@ -525,7 +525,7 @@ void W_Crylink_Attack2(void) s = (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor); } - W_SetupProjVelocity_Explicit(proj, s, v_up, WEP_CVAR_SEC(crylink, speed), 0, 0, 0, FALSE); + W_SetupProjVelocity_Explicit(proj, s, v_up, WEP_CVAR_SEC(crylink, speed), 0, 0, 0, false); proj.touch = W_Crylink_Touch; proj.think = W_Crylink_Fadethink; if(counter == (shots - 1) / 2) @@ -551,7 +551,7 @@ void W_Crylink_Attack2(void) proj.flags = FL_PROJECTILE; proj.missile_flags = MIF_SPLASH; - CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE); + CSQCProjectile(proj, true, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), true); other = proj; MUTATOR_CALLHOOK(EditProjectile); } @@ -571,11 +571,11 @@ float W_Crylink(float req) case WR_AIM: { if(random() < 0.10) - self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), FALSE); + self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), false); else - self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), FALSE); + self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), false); - return TRUE; + return true; } case WR_THINK: { @@ -633,7 +633,7 @@ float W_Crylink(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -644,13 +644,13 @@ float W_Crylink(float req) precache_sound("weapons/crylink_fire2.wav"); precache_sound("weapons/crylink_linkjoin.wav"); CRYLINK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { // don't "run out of ammo" and switch weapons while waiting for release if(self.crylink_lastgroup && self.crylink_waitrelease) - return TRUE; + return true; ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_PRI(crylink, ammo); ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_PRI(crylink, ammo); @@ -660,7 +660,7 @@ float W_Crylink(float req) { // don't "run out of ammo" and switch weapons while waiting for release if(self.crylink_lastgroup && self.crylink_waitrelease) - return TRUE; + return true; ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_SEC(crylink, ammo); ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_SEC(crylink, ammo); @@ -669,12 +669,12 @@ float W_Crylink(float req) case WR_CONFIG: { CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RELOAD: { W_Reload(min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -685,7 +685,7 @@ float W_Crylink(float req) return WEAPON_CRYLINK_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -710,21 +710,21 @@ float W_Crylink(float req) sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM); } - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/crylink_impact2.wav"); precache_sound("weapons/crylink_impact.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_devastator.qc b/qcsrc/common/weapons/w_devastator.qc index 617beed18..e49eb60ac 100644 --- a/qcsrc/common/weapons/w_devastator.qc +++ b/qcsrc/common/weapons/w_devastator.qc @@ -119,12 +119,12 @@ void W_Devastator_DoRemoteExplode(void) self.event_damage = func_null; self.takedamage = DAMAGE_NO; - float handled_as_rocketjump = FALSE; + float handled_as_rocketjump = false; entity head = WarpZone_FindRadius( self.origin, WEP_CVAR(devastator, remote_jump_radius), - FALSE + false ); while(head) @@ -135,7 +135,7 @@ void W_Devastator_DoRemoteExplode(void) if(distance_to_head <= WEP_CVAR(devastator, remote_jump_radius)) { // we handled this as a rocketjump :) - handled_as_rocketjump = TRUE; + handled_as_rocketjump = true; // modify velocity head.velocity_x *= 0.9; @@ -339,7 +339,7 @@ void W_Devastator_Attack(void) W_DecreaseAmmo(WEP_CVAR(devastator, ammo)); - W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", CH_WEAPON_A, WEP_CVAR(devastator, damage)); + W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 5, "weapons/rocket_fire.wav", CH_WEAPON_A, WEP_CVAR(devastator, damage)); pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = WarpZone_RefSys_SpawnSameRefSys(self); @@ -351,14 +351,14 @@ void W_Devastator_Attack(void) missile.spawnshieldtime = -1; missile.pushltime = time + WEP_CVAR(devastator, guidedelay); missile.classname = "rocket"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = WEP_CVAR(devastator, damage) * 2; // * 2 because it can be detonated inflight which makes it even more dangerous missile.takedamage = DAMAGE_YES; missile.damageforcescale = WEP_CVAR(devastator, damageforcescale); missile.health = WEP_CVAR(devastator, health); missile.event_damage = W_Devastator_Damage; - missile.damagedbycontents = TRUE; + missile.damagedbycontents = true; missile.movetype = MOVETYPE_FLY; PROJECTILE_MAKETRIGGER(missile); @@ -376,7 +376,7 @@ void W_Devastator_Attack(void) missile.flags = FL_PROJECTILE; missile.missile_flags = MIF_SPLASH; - CSQCProjectile(missile, WEP_CVAR(devastator, guiderate) == 0 && WEP_CVAR(devastator, speedaccel) == 0, PROJECTILE_ROCKET, FALSE); // because of fly sound + CSQCProjectile(missile, WEP_CVAR(devastator, guiderate) == 0 && WEP_CVAR(devastator, speedaccel) == 0, PROJECTILE_ROCKET, false); // because of fly sound // muzzle flash for 1st person view flash = spawn(); @@ -400,12 +400,12 @@ float W_Devastator(float req) case WR_AIM: { // aim and decide to fire if appropriate - self.BUTTON_ATCK = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), FALSE); + self.BUTTON_ATCK = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false); if(skill >= 2) // skill 0 and 1 bots won't detonate rockets! { // decide whether to detonate rockets entity missile, targetlist, targ; - targetlist = findchainfloat(bot_attack, TRUE); + targetlist = findchainfloat(bot_attack, true); for(missile = world; (missile = find(missile, classname, "rocket")); ) if(missile.realowner == self) { targ = targetlist; @@ -413,23 +413,23 @@ float W_Devastator(float req) { if(targ != missile.realowner && vlen(targ.origin - missile.origin) < WEP_CVAR(devastator, radius)) { - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; break; } targ = targ.chain; } } - if(self.BUTTON_ATCK2) self.BUTTON_ATCK = FALSE; + if(self.BUTTON_ATCK2) self.BUTTON_ATCK = false; } - return TRUE; + return true; } #else case WR_AIM: { // aim and decide to fire if appropriate - self.BUTTON_ATCK = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), FALSE); + self.BUTTON_ATCK = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false); if(skill >= 2) // skill 0 and 1 bots won't detonate rockets! { // decide whether to detonate rockets @@ -443,7 +443,7 @@ float W_Devastator(float req) selfdamage = 0; teamdamage = 0; enemydamage = 0; - targetlist = findchainfloat(bot_attack, TRUE); + targetlist = findchainfloat(bot_attack, true); missile = find(world, classname, "rocket"); while(missile) { @@ -493,7 +493,7 @@ float W_Devastator(float req) if( (v_forward * normalize(missile.origin - targ.origin)< 0.1) && desirabledamage > 0.1*coredamage - )self.BUTTON_ATCK2 = TRUE; + )self.BUTTON_ATCK2 = true; targ = targ.chain; } }else{ @@ -504,7 +504,7 @@ float W_Devastator(float req) if(IS_PLAYER(self.enemy)) if(desirabledamage >= 0.1*coredamage) if(random()/distance*300 > frametime*bound(0,(10-skill)*0.2,1)) - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; // dprint(ftos(random()/distance*300),">");dprint(ftos(frametime*bound(0,(10-skill)*0.2,1)),"\n"); } @@ -513,15 +513,15 @@ float W_Devastator(float req) // if we would be doing at X percent of the core damage, detonate it // but don't fire a new shot at the same time! if(desirabledamage >= 0.75 * coredamage) //this should do group damage in rare fortunate events - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; if((skill > 6.5) && (selfdamage > self.health)) - self.BUTTON_ATCK2 = FALSE; - //if(self.BUTTON_ATCK2 == TRUE) + self.BUTTON_ATCK2 = false; + //if(self.BUTTON_ATCK2 == true) // dprint(ftos(desirabledamage),"\n"); - if(self.BUTTON_ATCK2 == TRUE) self.BUTTON_ATCK = FALSE; + if(self.BUTTON_ATCK2 == true) self.BUTTON_ATCK = false; } - return TRUE; + return true; } #endif case WR_THINK: @@ -551,7 +551,7 @@ float W_Devastator(float req) { if(!rock.rl_detonate_later) { - rock.rl_detonate_later = TRUE; + rock.rl_detonate_later = true; rockfound = 1; } } @@ -560,7 +560,7 @@ float W_Devastator(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -575,12 +575,12 @@ float W_Devastator(float req) precache_sound("weapons/rocket_mode.wav"); //} DEVASTATOR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_SETUP: { self.rl_release = 1; - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -588,14 +588,14 @@ float W_Devastator(float req) // don't switch while guiding a missile if(ATTACK_FINISHED(self) <= time || self.weapon != WEP_DEVASTATOR) { - ammo_amount = FALSE; + ammo_amount = false; if(WEP_CVAR(devastator, reload_ammo)) { if(self.WEP_AMMO(DEVASTATOR) < WEP_CVAR(devastator, ammo) && self.(weapon_load[WEP_DEVASTATOR]) < WEP_CVAR(devastator, ammo)) - ammo_amount = TRUE; + ammo_amount = true; } else if(self.WEP_AMMO(DEVASTATOR) < WEP_CVAR(devastator, ammo)) - ammo_amount = TRUE; + ammo_amount = true; return !ammo_amount; } #endif @@ -603,7 +603,7 @@ float W_Devastator(float req) if(self.rl_release == 0) { printf("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: TRUE\n", self.rl_release, self.WEP_AMMO(DEVASTATOR), WEP_CVAR(devastator, ammo)); - return TRUE; + return true; } else { @@ -620,22 +620,22 @@ float W_Devastator(float req) } case WR_CHECKAMMO2: { - return FALSE; + return false; } case WR_CONFIG: { DEVASTATOR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RESETPLAYER: { self.rl_release = 0; - return TRUE; + return true; } case WR_RELOAD: { W_Reload(WEP_CVAR(devastator, ammo), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -649,7 +649,7 @@ float W_Devastator(float req) return WEAPON_DEVASTATOR_MURDER_DIRECT; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -665,20 +665,20 @@ float W_Devastator(float req) if(!w_issilent) sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM); - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/rocket_impact.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_electro.qc b/qcsrc/common/weapons/w_electro.qc index 3ec86c782..2c0267d95 100644 --- a/qcsrc/common/weapons/w_electro.qc +++ b/qcsrc/common/weapons/w_electro.qc @@ -201,7 +201,7 @@ void W_Electro_Bolt_Think(void) if(WEP_CVAR_PRI(electro, midaircombo_radius)) { float found = 0; - entity e = WarpZone_FindRadius(self.origin, WEP_CVAR_PRI(electro, midaircombo_radius), TRUE); + entity e = WarpZone_FindRadius(self.origin, WEP_CVAR_PRI(electro, midaircombo_radius), true); // loop through nearby orbs and trigger them while(e) @@ -252,7 +252,7 @@ void W_Electro_Attack_Bolt(void) self, '0 0 -3', '0 0 -3', - FALSE, + false, 2, "weapons/electro_fire.wav", CH_WEAPON_A, @@ -264,7 +264,7 @@ void W_Electro_Attack_Bolt(void) proj = spawn(); proj.classname = "electro_bolt"; proj.owner = proj.realowner = self; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = WEP_CVAR_PRI(electro, damage); proj.use = W_Electro_Explode; proj.think = W_Electro_Bolt_Think; @@ -282,7 +282,7 @@ void W_Electro_Attack_Bolt(void) proj.flags = FL_PROJECTILE; proj.missile_flags = MIF_SPLASH; - CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO_BEAM, TRUE); + CSQCProjectile(proj, true, PROJECTILE_ELECTRO_BEAM, true); other = proj; MUTATOR_CALLHOOK(EditProjectile); } @@ -350,7 +350,7 @@ void W_Electro_Attack_Orb(void) self, '0 0 -4', '0 0 -4', - FALSE, + false, 2, "weapons/electro_fire2.wav", CH_WEAPON_A, @@ -366,7 +366,7 @@ void W_Electro_Attack_Orb(void) proj.owner = proj.realowner = self; proj.use = W_Electro_Explode; proj.think = adaptor_think2use_hittype_splash; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = WEP_CVAR_SEC(electro, damage); proj.nextthink = time + WEP_CVAR_SEC(electro, lifetime); PROJECTILE_MAKETRIGGER(proj); @@ -398,7 +398,7 @@ void W_Electro_Attack_Orb(void) setsize(p2, proj.mins, proj.maxs); #endif - CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO, FALSE); // no culling, it has sound + CSQCProjectile(proj, true, PROJECTILE_ELECTRO, false); // no culling, it has sound other = proj; MUTATOR_CALLHOOK(EditProjectile); } @@ -426,33 +426,33 @@ float W_Electro(float req) { case WR_AIM: { - self.BUTTON_ATCK = self.BUTTON_ATCK2 = FALSE; + self.BUTTON_ATCK = self.BUTTON_ATCK2 = false; if(vlen(self.origin-self.enemy.origin) > 1000) { self.bot_secondary_electromooth = 0; } if(self.bot_secondary_electromooth == 0) { float shoot; if(WEP_CVAR_PRI(electro, speed)) - shoot = bot_aim(WEP_CVAR_PRI(electro, speed), 0, WEP_CVAR_PRI(electro, lifetime), FALSE); + shoot = bot_aim(WEP_CVAR_PRI(electro, speed), 0, WEP_CVAR_PRI(electro, lifetime), false); else - shoot = bot_aim(1000000, 0, 0.001, FALSE); + shoot = bot_aim(1000000, 0, 0.001, false); if(shoot) { - self.BUTTON_ATCK = TRUE; + self.BUTTON_ATCK = true; if(random() < 0.01) self.bot_secondary_electromooth = 1; } } else { - if(bot_aim(WEP_CVAR_SEC(electro, speed), WEP_CVAR_SEC(electro, speed_up), WEP_CVAR_SEC(electro, lifetime), TRUE)) + if(bot_aim(WEP_CVAR_SEC(electro, speed), WEP_CVAR_SEC(electro, speed_up), WEP_CVAR_SEC(electro, lifetime), true)) { - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; if(random() < 0.03) self.bot_secondary_electromooth = 0; } } - return TRUE; + return true; } case WR_THINK: { @@ -467,10 +467,10 @@ float W_Electro(float req) if(!ammo_amount) { WEP_ACTION(self.weapon, WR_RELOAD); - return FALSE; + return false; } - return TRUE; + return true; } if(self.BUTTON_ATCK) @@ -493,7 +493,7 @@ float W_Electro(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -506,7 +506,7 @@ float W_Electro(float req) precache_sound("weapons/electro_impact.wav"); precache_sound("weapons/electro_impact_combo.wav"); ELECTRO_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -531,17 +531,17 @@ float W_Electro(float req) case WR_CONFIG: { ELECTRO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RESETPLAYER: { self.electro_secondarytime = time; - return TRUE; + return true; } case WR_RELOAD: { W_Reload(min(WEP_CVAR_PRI(electro, ammo), WEP_CVAR_SEC(electro, ammo)), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -565,7 +565,7 @@ float W_Electro(float req) } } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -600,21 +600,21 @@ float W_Electro(float req) } } - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/electro_impact.wav"); precache_sound("weapons/electro_impact_combo.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_fireball.qc b/qcsrc/common/weapons/w_fireball.qc index f4542040a..39d5832f1 100644 --- a/qcsrc/common/weapons/w_fireball.qc +++ b/qcsrc/common/weapons/w_fireball.qc @@ -122,7 +122,7 @@ void W_Fireball_LaserPlay(float dt, float dist, float damage, float edgedamage, return; RandomSelection_Init(); - for(e = WarpZone_FindRadius(self.origin, dist, TRUE); e; e = e.chain) + for(e = WarpZone_FindRadius(self.origin, dist, true); e; e = e.chain) if(e != self.realowner) if(e.takedamage == DAMAGE_AIM) if(!IS_PLAYER(e) || !self.realowner || DIFF_TEAM(e, self)) { p = e.origin; @@ -181,14 +181,14 @@ void W_Fireball_Attack1(void) { entity proj; - W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', FALSE, 2, "weapons/fireball_fire2.wav", CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage)); + W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 2, "weapons/fireball_fire2.wav", CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage)); pointparticles(particleeffectnum("fireball_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); proj = spawn(); proj.classname = "plasma_prim"; proj.owner = proj.realowner = self; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = WEP_CVAR_PRI(fireball, damage); proj.pushltime = time + WEP_CVAR_PRI(fireball, lifetime); proj.use = W_Fireball_Explode; @@ -211,14 +211,14 @@ void W_Fireball_Attack1(void) proj.flags = FL_PROJECTILE; proj.missile_flags = MIF_SPLASH | MIF_PROXY; - CSQCProjectile(proj, TRUE, PROJECTILE_FIREBALL, TRUE); + CSQCProjectile(proj, true, PROJECTILE_FIREBALL, true); other = proj; MUTATOR_CALLHOOK(EditProjectile); } void W_Fireball_AttackEffect(float i, vector f_diff) { - W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', FALSE, 0, "", 0, 0); + W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 0, "", 0, 0); w_shotorg += f_diff.x * v_up + f_diff.y * v_right; pointparticles(particleeffectnum("fireball_preattack_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); } @@ -315,7 +315,7 @@ void W_Fireball_Attack2(void) f_diff = '+1.25 +3.75 0'; break; } - W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', FALSE, 2, "weapons/fireball_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(fireball, damage)); + W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', false, 2, "weapons/fireball_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(fireball, damage)); traceline(w_shotorg, w_shotorg + f_diff.x * v_up + f_diff.y * v_right, MOVE_NORMAL, self); w_shotorg = trace_endpos; @@ -324,7 +324,7 @@ void W_Fireball_Attack2(void) proj = spawn(); proj.owner = proj.realowner = self; proj.classname = "grenade"; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = WEP_CVAR_SEC(fireball, damage); proj.movetype = MOVETYPE_BOUNCE; proj.projectiledeathtype = WEP_FIREBALL | HITTYPE_SECONDARY; @@ -342,7 +342,7 @@ void W_Fireball_Attack2(void) proj.flags = FL_PROJECTILE; proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC; - CSQCProjectile(proj, TRUE, PROJECTILE_FIREMINE, TRUE); + CSQCProjectile(proj, true, PROJECTILE_FIREMINE, true); other = proj; MUTATOR_CALLHOOK(EditProjectile); } @@ -353,26 +353,26 @@ float W_Fireball(float req) { case WR_AIM: { - self.BUTTON_ATCK = FALSE; - self.BUTTON_ATCK2 = FALSE; + self.BUTTON_ATCK = false; + self.BUTTON_ATCK2 = false; if(self.bot_primary_fireballmooth == 0) { - if(bot_aim(WEP_CVAR_PRI(fireball, speed), 0, WEP_CVAR_PRI(fireball, lifetime), FALSE)) + if(bot_aim(WEP_CVAR_PRI(fireball, speed), 0, WEP_CVAR_PRI(fireball, lifetime), false)) { - self.BUTTON_ATCK = TRUE; + self.BUTTON_ATCK = true; if(random() < 0.02) self.bot_primary_fireballmooth = 0; } } else { - if(bot_aim(WEP_CVAR_SEC(fireball, speed), WEP_CVAR_SEC(fireball, speed_up), WEP_CVAR_SEC(fireball, lifetime), TRUE)) + if(bot_aim(WEP_CVAR_SEC(fireball, speed), WEP_CVAR_SEC(fireball, speed_up), WEP_CVAR_SEC(fireball, lifetime), true)) { - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; if(random() < 0.01) self.bot_primary_fireballmooth = 1; } } - return TRUE; + return true; } case WR_THINK: { @@ -394,7 +394,7 @@ float W_Fireball(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -406,27 +406,27 @@ float W_Fireball(float req) precache_sound("weapons/fireball_fire2.wav"); precache_sound("weapons/fireball_prefire2.wav"); FIREBALL_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_SETUP: { self.ammo_field = ammo_none; - return TRUE; + return true; } case WR_CHECKAMMO1: case WR_CHECKAMMO2: { - return TRUE; // fireball has infinite ammo + return true; // fireball has infinite ammo } case WR_CONFIG: { FIREBALL_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RESETPLAYER: { self.fireball_primarytime = time; - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -443,7 +443,7 @@ float W_Fireball(float req) return WEAPON_FIREBALL_MURDER_BLAST; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -466,20 +466,20 @@ float W_Fireball(float req) sound(self, CH_SHOTS, "weapons/fireball_impact2.wav", VOL_BASE, ATTEN_NORM * 0.25); // long range boom } - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/fireball_impact2.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_hagar.qc b/qcsrc/common/weapons/w_hagar.qc index 0435dbfd6..26bc5dbe0 100644 --- a/qcsrc/common/weapons/w_hagar.qc +++ b/qcsrc/common/weapons/w_hagar.qc @@ -80,7 +80,7 @@ void W_Hagar_Damage(entity inflictor, entity attacker, float damage, float death if(self.health <= 0) return; - float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == self.owner) : TRUE) + float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == self.owner) : true) && (inflictor.projectiledeathtype & HITTYPE_SECONDARY) && (self.projectiledeathtype & HITTYPE_SECONDARY)); @@ -126,21 +126,21 @@ void W_Hagar_Attack(void) W_DecreaseAmmo(WEP_CVAR_PRI(hagar, ammo)); - W_SetupShot(self, FALSE, 2, "weapons/hagar_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(hagar, damage)); + W_SetupShot(self, false, 2, "weapons/hagar_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(hagar, damage)); pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn(); missile.owner = missile.realowner = self; missile.classname = "missile"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = WEP_CVAR_PRI(hagar, damage); missile.takedamage = DAMAGE_YES; missile.health = WEP_CVAR_PRI(hagar, health); missile.damageforcescale = WEP_CVAR_PRI(hagar, damageforcescale); missile.event_damage = W_Hagar_Damage; - missile.damagedbycontents = TRUE; + missile.damagedbycontents = true; missile.touch = W_Hagar_Touch; missile.use = W_Hagar_Explode; @@ -158,7 +158,7 @@ void W_Hagar_Attack(void) missile.flags = FL_PROJECTILE; missile.missile_flags = MIF_SPLASH; - CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE); + CSQCProjectile(missile, true, PROJECTILE_HAGAR, true); other = missile; MUTATOR_CALLHOOK(EditProjectile); } @@ -169,21 +169,21 @@ void W_Hagar_Attack2(void) W_DecreaseAmmo(WEP_CVAR_SEC(hagar, ammo)); - W_SetupShot(self, FALSE, 2, "weapons/hagar_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage)); + W_SetupShot(self, false, 2, "weapons/hagar_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage)); pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn(); missile.owner = missile.realowner = self; missile.classname = "missile"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = WEP_CVAR_SEC(hagar, damage); missile.takedamage = DAMAGE_YES; missile.health = WEP_CVAR_SEC(hagar, health); missile.damageforcescale = WEP_CVAR_SEC(hagar, damageforcescale); missile.event_damage = W_Hagar_Damage; - missile.damagedbycontents = TRUE; + missile.damagedbycontents = true; missile.touch = W_Hagar_Touch2; missile.cnt = 0; @@ -202,7 +202,7 @@ void W_Hagar_Attack2(void) missile.flags = FL_PROJECTILE; missile.missile_flags = MIF_SPLASH; - CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR_BOUNCING, TRUE); + CSQCProjectile(missile, true, PROJECTILE_HAGAR_BOUNCING, true); other = missile; MUTATOR_CALLHOOK(EditProjectile); } @@ -222,7 +222,7 @@ void W_Hagar_Attack2_Load_Release(void) weapon_prepareattack_do(1, WEP_CVAR_SEC(hagar, refire)); - W_SetupShot(self, FALSE, 2, "weapons/hagar_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage)); + W_SetupShot(self, false, 2, "weapons/hagar_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage)); pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); forward = v_forward; @@ -236,14 +236,14 @@ void W_Hagar_Attack2_Load_Release(void) missile = spawn(); missile.owner = missile.realowner = self; missile.classname = "missile"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = WEP_CVAR_SEC(hagar, damage); missile.takedamage = DAMAGE_YES; missile.health = WEP_CVAR_SEC(hagar, health); missile.damageforcescale = WEP_CVAR_SEC(hagar, damageforcescale); missile.event_damage = W_Hagar_Damage; - missile.damagedbycontents = TRUE; + missile.damagedbycontents = true; missile.touch = W_Hagar_Touch; // not bouncy missile.use = W_Hagar_Explode2; @@ -273,12 +273,12 @@ void W_Hagar_Attack2_Load_Release(void) } s = s * WEP_CVAR_SEC(hagar, load_spread) * g_weaponspreadfactor; - W_SetupProjVelocity_Explicit(missile, w_shotdir + right * s.y + up * s.z, v_up, WEP_CVAR_SEC(hagar, speed), 0, 0, spread_pershot, FALSE); + W_SetupProjVelocity_Explicit(missile, w_shotdir + right * s.y + up * s.z, v_up, WEP_CVAR_SEC(hagar, speed), 0, 0, spread_pershot, false); missile.angles = vectoangles(missile.velocity); missile.flags = FL_PROJECTILE; - CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE); + CSQCProjectile(missile, true, PROJECTILE_HAGAR, true); other = missile; MUTATOR_CALLHOOK(EditProjectile); } @@ -320,7 +320,7 @@ void W_Hagar_Attack2_Load(void) self.hagar_loadstep = time + WEP_CVAR_SEC(hagar, load_speed) * W_WeaponRateFactor(); // require letting go of the alt fire button before we can load again - self.hagar_loadblock = TRUE; + self.hagar_loadblock = true; } } else @@ -345,14 +345,14 @@ void W_Hagar_Attack2_Load(void) { // if this is the last rocket we can load, play a beep sound to notify the player sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM); - self.hagar_loadbeep = TRUE; + self.hagar_loadbeep = true; } } } else if(self.hagar_loadblock) { // the alt fire button has been released, so re-enable loading if blocked - self.hagar_loadblock = FALSE; + self.hagar_loadblock = false; } if(self.hagar_load) @@ -364,7 +364,7 @@ void W_Hagar_Attack2_Load(void) { // we're about to automatically release after holding time, play a beep sound to notify the player sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM); - self.hagar_warning = TRUE; + self.hagar_warning = true; } } @@ -377,8 +377,8 @@ void W_Hagar_Attack2_Load(void) } else { - self.hagar_loadbeep = FALSE; - self.hagar_warning = FALSE; + self.hagar_loadbeep = false; + self.hagar_warning = false; } // we aren't checking ammo during an attack, so we must do it here @@ -398,11 +398,11 @@ float W_Hagar(float req) case WR_AIM: { if(random()>0.15) - self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), FALSE); + self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), false); else // not using secondary_speed since these are only 15% and should cause some ricochets without re-aiming - self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), FALSE); + self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), false); - return TRUE; + return true; } case WR_THINK: { @@ -430,7 +430,7 @@ float W_Hagar(float req) } } - return TRUE; + return true; } case WR_GONETHINK: { @@ -441,7 +441,7 @@ float W_Hagar(float req) W_Hagar_Attack2_Load_Release(); } - return TRUE; + return true; } case WR_INIT: { @@ -452,11 +452,11 @@ float W_Hagar(float req) precache_sound("weapons/hagar_load.wav"); precache_sound("weapons/hagar_beep.wav"); HAGAR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_SETUP: { - self.hagar_loadblock = FALSE; + self.hagar_loadblock = false; if(self.hagar_load) { @@ -464,7 +464,7 @@ float W_Hagar(float req) self.hagar_load = 0; } - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -481,12 +481,12 @@ float W_Hagar(float req) case WR_CONFIG: { HAGAR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RESETPLAYER: { self.hagar_load = 0; - return TRUE; + return true; } case WR_PLAYERDEATH: { @@ -494,14 +494,14 @@ float W_Hagar(float req) if(self.hagar_load && WEP_CVAR_SEC(hagar, load_releasedeath)) W_Hagar_Attack2_Load_Release(); - return TRUE; + return true; } case WR_RELOAD: { if(!self.hagar_load) // require releasing loaded rockets first W_Reload(min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo)), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -515,7 +515,7 @@ float W_Hagar(float req) return WEAPON_HAGAR_MURDER_SPRAY; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -538,22 +538,22 @@ float W_Hagar(float req) sound(self, CH_SHOTS, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM); } - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/hagexp1.wav"); precache_sound("weapons/hagexp2.wav"); precache_sound("weapons/hagexp3.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_hlac.qc b/qcsrc/common/weapons/w_hlac.qc index d3dbed2f9..8fdefd32a 100644 --- a/qcsrc/common/weapons/w_hlac.qc +++ b/qcsrc/common/weapons/w_hlac.qc @@ -76,7 +76,7 @@ void W_HLAC_Attack(void) if(self.crouch) spread = spread * WEP_CVAR_PRI(hlac, spread_crouchmod); - W_SetupShot(self, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(hlac, damage)); + W_SetupShot(self, false, 3, "weapons/lasergun_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(hlac, damage)); pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); if(!autocvar_g_norecoil) { @@ -87,7 +87,7 @@ void W_HLAC_Attack(void) missile = spawn(); missile.owner = missile.realowner = self; missile.classname = "hlacbolt"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = WEP_CVAR_PRI(hlac, damage); @@ -108,7 +108,7 @@ void W_HLAC_Attack(void) missile.flags = FL_PROJECTILE; missile.projectiledeathtype = WEP_HLAC; - CSQCProjectile(missile, TRUE, PROJECTILE_HLAC, TRUE); + CSQCProjectile(missile, true, PROJECTILE_HLAC, true); other = missile; MUTATOR_CALLHOOK(EditProjectile); } @@ -124,13 +124,13 @@ void W_HLAC_Attack2(void) if(self.crouch) spread = spread * WEP_CVAR_SEC(hlac, spread_crouchmod); - W_SetupShot(self, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage)); + W_SetupShot(self, false, 3, "weapons/lasergun_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage)); pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn(); missile.owner = missile.realowner = self; missile.classname = "hlacbolt"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = WEP_CVAR_SEC(hlac, damage); @@ -152,7 +152,7 @@ void W_HLAC_Attack2(void) missile.missile_flags = MIF_SPLASH; missile.projectiledeathtype = WEP_HLAC | HITTYPE_SECONDARY; - CSQCProjectile(missile, TRUE, PROJECTILE_HLAC, TRUE); + CSQCProjectile(missile, true, PROJECTILE_HLAC, true); other = missile; MUTATOR_CALLHOOK(EditProjectile); } @@ -210,8 +210,8 @@ float W_HLAC(float req) { case WR_AIM: { - self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(hlac, speed), 0, WEP_CVAR_PRI(hlac, lifetime), FALSE); - return TRUE; + self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(hlac, speed), 0, WEP_CVAR_PRI(hlac, lifetime), false); + return true; } case WR_THINK: { @@ -236,7 +236,7 @@ float W_HLAC(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -245,7 +245,7 @@ float W_HLAC(float req) precache_model("models/weapons/h_hlac.iqm"); precache_sound("weapons/lasergun_fire.wav"); HLAC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -262,12 +262,12 @@ float W_HLAC(float req) case WR_CONFIG: { HLAC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RELOAD: { W_Reload(min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo)), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -278,7 +278,7 @@ float W_HLAC(float req) return WEAPON_HLAC_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -294,20 +294,20 @@ float W_HLAC(float req) if(!w_issilent) sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM); - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/laserimpact.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_hmg.qc b/qcsrc/common/weapons/w_hmg.qc index 69777c4c2..ac4ec39a3 100644 --- a/qcsrc/common/weapons/w_hmg.qc +++ b/qcsrc/common/weapons/w_hmg.qc @@ -60,7 +60,7 @@ void W_HeavyMachineGun_Attack_Auto() W_DecreaseAmmo(WEP_CVAR(hmg, ammo)); - W_SetupShot (self, TRUE, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, WEP_CVAR(hmg, damage)); + W_SetupShot (self, true, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, WEP_CVAR(hmg, damage)); if(!autocvar_g_norecoil) { @@ -93,11 +93,11 @@ float W_HeavyMachineGun(float req) case WR_AIM: { if(vlen(self.origin-self.enemy.origin) < 3000 - bound(0, skill, 10) * 200) - self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE); + self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false); else - self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, FALSE); + self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false); - return TRUE; + return true; } case WR_THINK: { @@ -113,7 +113,7 @@ float W_HeavyMachineGun(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -123,7 +123,7 @@ float W_HeavyMachineGun(float req) precache_model ("models/weapons/h_ok_hmg.iqm"); precache_sound ("weapons/uzi_fire.wav"); HMG_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -146,12 +146,12 @@ float W_HeavyMachineGun(float req) case WR_CONFIG: { HMG_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RELOAD: { W_Reload(WEP_CVAR(hmg, ammo), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -165,7 +165,7 @@ float W_HeavyMachineGun(float req) return WEAPON_HMG_MURDER_SPRAY; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -186,22 +186,22 @@ float W_HeavyMachineGun(float req) else if(w_random < 0.2) sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTEN_NORM); - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/ric1.wav"); precache_sound("weapons/ric2.wav"); precache_sound("weapons/ric3.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_hook.qc b/qcsrc/common/weapons/w_hook.qc index 3713ca9c7..8ea84912a 100644 --- a/qcsrc/common/weapons/w_hook.qc +++ b/qcsrc/common/weapons/w_hook.qc @@ -62,7 +62,7 @@ void spawnfunc_weapon_hook(void) { if(g_grappling_hook) // offhand hook { - startitem_failed = TRUE; + startitem_failed = true; remove(self); return; } @@ -133,12 +133,12 @@ void W_Hook_Attack2(void) entity gren; //W_DecreaseAmmo(WEP_CVAR_SEC(hook, ammo)); // WEAPONTODO: Figure out how to handle ammo with hook secondary (gravitybomb) - W_SetupShot(self, FALSE, 4, "weapons/hookbomb_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hook, damage)); + W_SetupShot(self, false, 4, "weapons/hookbomb_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hook, damage)); gren = spawn(); gren.owner = gren.realowner = self; gren.classname = "hookbomb"; - gren.bot_dodge = TRUE; + gren.bot_dodge = true; gren.bot_dodgerating = WEP_CVAR_SEC(hook, damage); gren.movetype = MOVETYPE_TOSS; PROJECTILE_MAKETRIGGER(gren); @@ -155,7 +155,7 @@ void W_Hook_Attack2(void) gren.health = WEP_CVAR_SEC(hook, health); gren.damageforcescale = WEP_CVAR_SEC(hook, damageforcescale); gren.event_damage = W_Hook_Damage; - gren.damagedbycontents = TRUE; + gren.damagedbycontents = true; gren.missile_flags = MIF_SPLASH | MIF_ARC; gren.velocity = '0 0 1' * WEP_CVAR_SEC(hook, speed); @@ -168,7 +168,7 @@ void W_Hook_Attack2(void) gren.angles = '0 0 0'; gren.flags = FL_PROJECTILE; - CSQCProjectile(gren, TRUE, PROJECTILE_HOOKBOMB, TRUE); + CSQCProjectile(gren, true, PROJECTILE_HOOKBOMB, true); other = gren; MUTATOR_CALLHOOK(EditProjectile); } @@ -182,7 +182,7 @@ float W_Hook(float req) case WR_AIM: { // no bot AI for hook (yet?) - return TRUE; + return true; } case WR_THINK: { @@ -283,7 +283,7 @@ float W_Hook(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -294,12 +294,12 @@ float W_Hook(float req) precache_sound("weapons/hook_fire.wav"); precache_sound("weapons/hookbomb_fire.wav"); HOOK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_SETUP: { self.hook_state &= ~HOOK_WAITING_FOR_RELEASE; - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -311,28 +311,28 @@ float W_Hook(float req) case WR_CHECKAMMO2: { // infinite ammo for now - return TRUE; // self.ammo_cells >= WEP_CVAR_SEC(hook, ammo); // WEAPONTODO: see above + return true; // self.ammo_cells >= WEP_CVAR_SEC(hook, ammo); // WEAPONTODO: see above } case WR_CONFIG: { HOOK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RESETPLAYER: { self.hook_refire = time; - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { - return FALSE; + return false; } case WR_KILLMESSAGE: { return WEAPON_HOOK_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -348,20 +348,20 @@ float W_Hook(float req) if(!w_issilent) sound(self, CH_SHOTS, "weapons/hookbomb_impact.wav", VOL_BASE, ATTN_NORM); - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/hookbomb_impact.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_machinegun.qc b/qcsrc/common/weapons/w_machinegun.qc index 9c69c8d82..4494e3ed3 100644 --- a/qcsrc/common/weapons/w_machinegun.qc +++ b/qcsrc/common/weapons/w_machinegun.qc @@ -103,7 +103,7 @@ void W_MachineGun_MuzzleFlash(void) void W_MachineGun_Attack(float deathtype) { - W_SetupShot(self, TRUE, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, ((self.misc_bulletcounter == 1) ? WEP_CVAR(machinegun, first_damage) : WEP_CVAR(machinegun, sustained_damage))); + W_SetupShot(self, true, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, ((self.misc_bulletcounter == 1) ? WEP_CVAR(machinegun, first_damage) : WEP_CVAR(machinegun, sustained_damage))); if(!autocvar_g_norecoil) { self.punchangle_x = random() - 0.5; @@ -179,7 +179,7 @@ void W_MachineGun_Attack_Auto(void) W_DecreaseAmmo(WEP_CVAR(machinegun, sustained_ammo)); - W_SetupShot(self, TRUE, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, WEP_CVAR(machinegun, sustained_damage)); + W_SetupShot(self, true, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, WEP_CVAR(machinegun, sustained_damage)); if(!autocvar_g_norecoil) { self.punchangle_x = random() - 0.5; @@ -205,7 +205,7 @@ void W_MachineGun_Attack_Auto(void) void W_MachineGun_Attack_Burst(void) { - W_SetupShot(self, TRUE, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, WEP_CVAR(machinegun, sustained_damage)); + W_SetupShot(self, true, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, WEP_CVAR(machinegun, sustained_damage)); if(!autocvar_g_norecoil) { self.punchangle_x = random() - 0.5; @@ -243,11 +243,11 @@ float W_MachineGun(float req) case WR_AIM: { if(vlen(self.origin-self.enemy.origin) < 3000 - bound(0, skill, 10) * 200) - self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE); + self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false); else - self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, FALSE); + self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false); - return TRUE; + return true; } case WR_THINK: { @@ -270,7 +270,7 @@ float W_MachineGun(float req) { W_SwitchWeapon_Force(self, w_getbestweapon(self)); w_ready(); - return FALSE; + return false; } W_DecreaseAmmo(WEP_CVAR(machinegun, burst_ammo)); @@ -299,7 +299,7 @@ float W_MachineGun(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -309,7 +309,7 @@ float W_MachineGun(float req) precache_model("models/weapons/h_uzi.iqm"); precache_sound("weapons/uzi_fire.wav"); MACHINEGUN_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -346,12 +346,12 @@ float W_MachineGun(float req) case WR_CONFIG: { MACHINEGUN_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RELOAD: { W_Reload(min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo)), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -365,7 +365,7 @@ float W_MachineGun(float req) return WEAPON_MACHINEGUN_MURDER_SPRAY; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -386,22 +386,22 @@ float W_MachineGun(float req) else if(w_random < 0.2) sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM); - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/ric1.wav"); precache_sound("weapons/ric2.wav"); precache_sound("weapons/ric3.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_minelayer.qc b/qcsrc/common/weapons/w_minelayer.qc index 2dac41e1b..b410898d5 100644 --- a/qcsrc/common/weapons/w_minelayer.qc +++ b/qcsrc/common/weapons/w_minelayer.qc @@ -85,7 +85,7 @@ void W_MineLayer_Stick(entity to) newmine.health = self.health; newmine.event_damage = self.event_damage; newmine.spawnshieldtime = self.spawnshieldtime; - newmine.damagedbycontents = TRUE; + newmine.damagedbycontents = true; newmine.movetype = MOVETYPE_NONE; // lock the mine in place newmine.projectiledeathtype = self.projectiledeathtype; @@ -326,7 +326,7 @@ void W_MineLayer_Attack(void) W_DecreaseAmmo(WEP_CVAR(minelayer, ammo)); - W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', FALSE, 5, "weapons/mine_fire.wav", CH_WEAPON_A, WEP_CVAR(minelayer, damage)); + W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', false, 5, "weapons/mine_fire.wav", CH_WEAPON_A, WEP_CVAR(minelayer, damage)); pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); mine = WarpZone_RefSys_SpawnSameRefSys(self); @@ -336,14 +336,14 @@ void W_MineLayer_Attack(void) else mine.spawnshieldtime = -1; mine.classname = "mine"; - mine.bot_dodge = TRUE; + mine.bot_dodge = true; mine.bot_dodgerating = WEP_CVAR(minelayer, damage) * 2; // * 2 because it can detonate inflight which makes it even more dangerous mine.takedamage = DAMAGE_YES; mine.damageforcescale = WEP_CVAR(minelayer, damageforcescale); mine.health = WEP_CVAR(minelayer, health); mine.event_damage = W_MineLayer_Damage; - mine.damagedbycontents = TRUE; + mine.damagedbycontents = true; mine.movetype = MOVETYPE_TOSS; PROJECTILE_MAKETRIGGER(mine); @@ -363,7 +363,7 @@ void W_MineLayer_Attack(void) if(mine.cnt > 0) { mine.cnt += time; } - CSQCProjectile(mine, TRUE, PROJECTILE_MINE, TRUE); + CSQCProjectile(mine, true, PROJECTILE_MINE, true); // muzzle flash for 1st person view flash = spawn(); @@ -390,7 +390,7 @@ float W_MineLayer_PlacedMines(float detonate) { if(!mine.minelayer_detonate) { - mine.minelayer_detonate = TRUE; + mine.minelayer_detonate = true; minfound = 1; } } @@ -410,9 +410,9 @@ float W_MineLayer(float req) { // aim and decide to fire if appropriate if(self.minelayer_mines >= WEP_CVAR(minelayer, limit)) - self.BUTTON_ATCK = FALSE; + self.BUTTON_ATCK = false; else - self.BUTTON_ATCK = bot_aim(WEP_CVAR(minelayer, speed), 0, WEP_CVAR(minelayer, lifetime), FALSE); + self.BUTTON_ATCK = bot_aim(WEP_CVAR(minelayer, speed), 0, WEP_CVAR(minelayer, lifetime), false); if(skill >= 2) // skill 0 and 1 bots won't detonate mines! { // decide whether to detonate mines @@ -426,7 +426,7 @@ float W_MineLayer(float req) selfdamage = 0; teamdamage = 0; enemydamage = 0; - targetlist = findchainfloat(bot_attack, TRUE); + targetlist = findchainfloat(bot_attack, true); mine = find(world, classname, "mine"); while(mine) { @@ -476,7 +476,7 @@ float W_MineLayer(float req) if( (v_forward * normalize(mine.origin - targ.origin)< 0.1) && desirabledamage > 0.1*coredamage - )self.BUTTON_ATCK2 = TRUE; + )self.BUTTON_ATCK2 = true; targ = targ.chain; } }else{ @@ -487,7 +487,7 @@ float W_MineLayer(float req) if(IS_PLAYER(self.enemy)) if(desirabledamage >= 0.1*coredamage) if(random()/distance*300 > frametime*bound(0,(10-skill)*0.2,1)) - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; // dprint(ftos(random()/distance*300),">");dprint(ftos(frametime*bound(0,(10-skill)*0.2,1)),"\n"); } @@ -496,22 +496,22 @@ float W_MineLayer(float req) // if we would be doing at X percent of the core damage, detonate it // but don't fire a new shot at the same time! if(desirabledamage >= 0.75 * coredamage) //this should do group damage in rare fortunate events - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; if((skill > 6.5) && (selfdamage > self.health)) - self.BUTTON_ATCK2 = FALSE; - //if(self.BUTTON_ATCK2 == TRUE) + self.BUTTON_ATCK2 = false; + //if(self.BUTTON_ATCK2 == true) // dprint(ftos(desirabledamage),"\n"); - if(self.BUTTON_ATCK2 == TRUE) self.BUTTON_ATCK = FALSE; + if(self.BUTTON_ATCK2 == true) self.BUTTON_ATCK = false; } - return TRUE; + return true; } case WR_THINK: { if(autocvar_g_balance_minelayer_reload_ammo && self.clip_load < WEP_CVAR(minelayer, ammo)) // forced reload { // not if we're holding the minelayer without enough ammo, but can detonate existing mines - if(!(W_MineLayer_PlacedMines(FALSE) && self.WEP_AMMO(MINE_LAYER) < WEP_CVAR(minelayer, ammo))) + if(!(W_MineLayer_PlacedMines(false) && self.WEP_AMMO(MINE_LAYER) < WEP_CVAR(minelayer, ammo))) WEP_ACTION(self.weapon, WR_RELOAD); } else if(self.BUTTON_ATCK) @@ -525,11 +525,11 @@ float W_MineLayer(float req) if(self.BUTTON_ATCK2) { - if(W_MineLayer_PlacedMines(TRUE)) + if(W_MineLayer_PlacedMines(true)) sound(self, CH_WEAPON_B, "weapons/mine_det.wav", VOL_BASE, ATTN_NORM); } - return TRUE; + return true; } case WR_INIT: { @@ -543,7 +543,7 @@ float W_MineLayer(float req) precache_sound("weapons/mine_stick.wav"); precache_sound("weapons/mine_trigger.wav"); MINELAYER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -554,29 +554,29 @@ float W_MineLayer(float req) ammo_amount += self.(weapon_load[WEP_MINE_LAYER]) >= WEP_CVAR(minelayer, ammo); return ammo_amount; } - return TRUE; + return true; } case WR_CHECKAMMO2: { - if(W_MineLayer_PlacedMines(FALSE)) - return TRUE; + if(W_MineLayer_PlacedMines(false)) + return true; else - return FALSE; + return false; } case WR_CONFIG: { MINELAYER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RESETPLAYER: { self.minelayer_mines = 0; - return TRUE; + return true; } case WR_RELOAD: { W_Reload(WEP_CVAR(minelayer, ammo), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -587,7 +587,7 @@ float W_MineLayer(float req) return WEAPON_MINELAYER_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -603,20 +603,20 @@ float W_MineLayer(float req) if(!w_issilent) sound(self, CH_SHOTS, "weapons/mine_exp.wav", VOL_BASE, ATTN_NORM); - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/mine_exp.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_mortar.qc b/qcsrc/common/weapons/w_mortar.qc index de40fcb39..669ffbe7c 100644 --- a/qcsrc/common/weapons/w_mortar.qc +++ b/qcsrc/common/weapons/w_mortar.qc @@ -227,7 +227,7 @@ void W_Mortar_Attack(void) W_DecreaseAmmo(WEP_CVAR_PRI(mortar, ammo)); - W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage)); + W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 4, "weapons/grenade_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage)); w_shotdir = v_forward; // no TrueAim for grenades please pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); @@ -235,7 +235,7 @@ void W_Mortar_Attack(void) gren = spawn(); gren.owner = gren.realowner = self; gren.classname = "grenade"; - gren.bot_dodge = TRUE; + gren.bot_dodge = true; gren.bot_dodgerating = WEP_CVAR_PRI(mortar, damage); gren.movetype = MOVETYPE_BOUNCE; gren.bouncefactor = WEP_CVAR(mortar, bouncefactor); @@ -255,7 +255,7 @@ void W_Mortar_Attack(void) gren.health = WEP_CVAR_PRI(mortar, health); gren.damageforcescale = WEP_CVAR_PRI(mortar, damageforcescale); gren.event_damage = W_Mortar_Grenade_Damage; - gren.damagedbycontents = TRUE; + gren.damagedbycontents = true; gren.missile_flags = MIF_SPLASH | MIF_ARC; W_SetupProjVelocity_UP_PRI(gren, mortar); @@ -263,9 +263,9 @@ void W_Mortar_Attack(void) gren.flags = FL_PROJECTILE; if(WEP_CVAR_PRI(mortar, type) == 0 || WEP_CVAR_PRI(mortar, type) == 2) - CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE, TRUE); + CSQCProjectile(gren, true, PROJECTILE_GRENADE, true); else - CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE_BOUNCING, TRUE); + CSQCProjectile(gren, true, PROJECTILE_GRENADE_BOUNCING, true); other = gren; MUTATOR_CALLHOOK(EditProjectile); } @@ -276,7 +276,7 @@ void W_Mortar_Attack2(void) W_DecreaseAmmo(WEP_CVAR_SEC(mortar, ammo)); - W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage)); + W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 4, "weapons/grenade_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage)); w_shotdir = v_forward; // no TrueAim for grenades please pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); @@ -284,7 +284,7 @@ void W_Mortar_Attack2(void) gren = spawn(); gren.owner = gren.realowner = self; gren.classname = "grenade"; - gren.bot_dodge = TRUE; + gren.bot_dodge = true; gren.bot_dodgerating = WEP_CVAR_SEC(mortar, damage); gren.movetype = MOVETYPE_BOUNCE; gren.bouncefactor = WEP_CVAR(mortar, bouncefactor); @@ -303,7 +303,7 @@ void W_Mortar_Attack2(void) gren.health = WEP_CVAR_SEC(mortar, health); gren.damageforcescale = WEP_CVAR_SEC(mortar, damageforcescale); gren.event_damage = W_Mortar_Grenade_Damage; - gren.damagedbycontents = TRUE; + gren.damagedbycontents = true; gren.missile_flags = MIF_SPLASH | MIF_ARC; W_SetupProjVelocity_UP_SEC(gren, mortar); @@ -311,9 +311,9 @@ void W_Mortar_Attack2(void) gren.flags = FL_PROJECTILE; if(WEP_CVAR_SEC(mortar, type) == 0 || WEP_CVAR_SEC(mortar, type) == 2) - CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE, TRUE); + CSQCProjectile(gren, true, PROJECTILE_GRENADE, true); else - CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE_BOUNCING, TRUE); + CSQCProjectile(gren, true, PROJECTILE_GRENADE_BOUNCING, true); other = gren; MUTATOR_CALLHOOK(EditProjectile); } @@ -328,26 +328,26 @@ float W_Mortar(float req) { case WR_AIM: { - self.BUTTON_ATCK = FALSE; - self.BUTTON_ATCK2 = FALSE; + self.BUTTON_ATCK = false; + self.BUTTON_ATCK2 = false; if(self.bot_secondary_grenademooth == 0) // WEAPONTODO: merge this into using WEP_CVAR_BOTH { - if(bot_aim(WEP_CVAR_PRI(mortar, speed), WEP_CVAR_PRI(mortar, speed_up), WEP_CVAR_PRI(mortar, lifetime), TRUE)) + if(bot_aim(WEP_CVAR_PRI(mortar, speed), WEP_CVAR_PRI(mortar, speed_up), WEP_CVAR_PRI(mortar, lifetime), true)) { - self.BUTTON_ATCK = TRUE; + self.BUTTON_ATCK = true; if(random() < 0.01) self.bot_secondary_grenademooth = 1; } } else { - if(bot_aim(WEP_CVAR_SEC(mortar, speed), WEP_CVAR_SEC(mortar, speed_up), WEP_CVAR_SEC(mortar, lifetime), TRUE)) + if(bot_aim(WEP_CVAR_SEC(mortar, speed), WEP_CVAR_SEC(mortar, speed_up), WEP_CVAR_SEC(mortar, lifetime), true)) { - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; if(random() < 0.02) self.bot_secondary_grenademooth = 0; } } - return TRUE; + return true; } /*case WR_CALCINFO: { @@ -386,7 +386,7 @@ float W_Mortar(float req) { if(!nade.gl_detonate_later) { - nade.gl_detonate_later = TRUE; + nade.gl_detonate_later = true; nadefound = 1; } } @@ -400,7 +400,7 @@ float W_Mortar(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -416,7 +416,7 @@ float W_Mortar(float req) precache_sound("weapons/grenade_stick.wav"); precache_sound("weapons/grenade_fire.wav"); MORTAR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -433,12 +433,12 @@ float W_Mortar(float req) case WR_CONFIG: { MORTAR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RELOAD: { W_Reload(min(WEP_CVAR_PRI(mortar, ammo), WEP_CVAR_SEC(mortar, ammo)), "weapons/reload.wav"); // WEAPONTODO - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -455,7 +455,7 @@ float W_Mortar(float req) return WEAPON_MORTAR_MURDER_EXPLODE; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -471,20 +471,20 @@ float W_Mortar(float req) if(!w_issilent) sound(self, CH_SHOTS, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM); - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/grenade_impact.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_porto.qc b/qcsrc/common/weapons/w_porto.qc index e1fb82f8f..7011d80de 100644 --- a/qcsrc/common/weapons/w_porto.qc +++ b/qcsrc/common/weapons/w_porto.qc @@ -194,7 +194,7 @@ void W_Porto_Touch(void) Send_Notification(NOTIF_ONE, self.realowner, MSG_CENTER, CENTER_PORTO_CREATED_IN); self.right_vector = self.right_vector - 2 * trace_plane_normal * (self.right_vector * norm); self.angles = vectoangles(self.velocity - 2 * trace_plane_normal * (self.velocity * norm)); - CSQCProjectile(self, TRUE, PROJECTILE_PORTO_BLUE, TRUE); // change type + CSQCProjectile(self, true, PROJECTILE_PORTO_BLUE, true); // change type } else { @@ -235,7 +235,7 @@ void W_Porto_Attack(float type) { entity gren; - W_SetupShot(self, FALSE, 4, "porto/fire.wav", CH_WEAPON_A, 0); + W_SetupShot(self, false, 4, "porto/fire.wav", CH_WEAPON_A, 0); // always shoot from the eye w_shotdir = v_forward; w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward; @@ -247,7 +247,7 @@ void W_Porto_Attack(float type) gren.owner = gren.realowner = self; gren.playerid = self.playerid; gren.classname = "porto"; - gren.bot_dodge = TRUE; + gren.bot_dodge = true; gren.bot_dodgerating = 200; gren.movetype = MOVETYPE_BOUNCEMISSILE; PROJECTILE_MAKETRIGGER(gren); @@ -277,9 +277,9 @@ void W_Porto_Attack(float type) gren.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP; if(type > 0) - CSQCProjectile(gren, TRUE, PROJECTILE_PORTO_BLUE, TRUE); + CSQCProjectile(gren, true, PROJECTILE_PORTO_BLUE, true); else - CSQCProjectile(gren, TRUE, PROJECTILE_PORTO_RED, TRUE); + CSQCProjectile(gren, true, PROJECTILE_PORTO_RED, true); other = gren; MUTATOR_CALLHOOK(EditProjectile); } @@ -295,18 +295,18 @@ float W_Porto(float req) { case WR_AIM: { - self.BUTTON_ATCK = FALSE; - self.BUTTON_ATCK2 = FALSE; + self.BUTTON_ATCK = false; + self.BUTTON_ATCK2 = false; if(!WEP_CVAR(porto, secondary)) - if(bot_aim(WEP_CVAR_PRI(porto, speed), 0, WEP_CVAR_PRI(porto, lifetime), FALSE)) - self.BUTTON_ATCK = TRUE; + if(bot_aim(WEP_CVAR_PRI(porto, speed), 0, WEP_CVAR_PRI(porto, lifetime), false)) + self.BUTTON_ATCK = true; - return TRUE; + return true; } case WR_CONFIG: { PORTO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_THINK: { @@ -364,7 +364,7 @@ float W_Porto(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -379,20 +379,20 @@ float W_Porto(float req) precache_sound("porto/fire.wav"); precache_sound("porto/unsupported.wav"); PORTO_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_SETUP: { self.ammo_field = ammo_none; - return TRUE; + return true; } case WR_RESETPLAYER: { self.porto_current = world; - return TRUE; + return true; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -403,20 +403,20 @@ float W_Porto(float req) case WR_IMPACTEFFECT: { print("Since when does Porto send DamageInfo?\n"); - return TRUE; + return true; } case WR_INIT: { // nothing to do - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_rifle.qc b/qcsrc/common/weapons/w_rifle.qc index 03c396ceb..0424b16dd 100644 --- a/qcsrc/common/weapons/w_rifle.qc +++ b/qcsrc/common/weapons/w_rifle.qc @@ -56,7 +56,7 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolid W_DecreaseAmmo(pAmmo); - W_SetupShot(self, TRUE, 2, pSound, CH_WEAPON_A, pDamage * pShots); + W_SetupShot(self, true, 2, pSound, CH_WEAPON_A, pDamage * pShots); pointparticles(particleeffectnum("rifle_muzzleflash"), w_shotorg, w_shotdir * 2000, 1); @@ -141,28 +141,28 @@ float W_Rifle(float req) { case WR_AIM: { - self.BUTTON_ATCK=FALSE; - self.BUTTON_ATCK2=FALSE; + self.BUTTON_ATCK=false; + self.BUTTON_ATCK2=false; if(vlen(self.origin-self.enemy.origin) > 1000) self.bot_secondary_riflemooth = 0; if(self.bot_secondary_riflemooth == 0) { - if(bot_aim(1000000, 0, 0.001, FALSE)) + if(bot_aim(1000000, 0, 0.001, false)) { - self.BUTTON_ATCK = TRUE; + self.BUTTON_ATCK = true; if(random() < 0.01) self.bot_secondary_riflemooth = 1; } } else { - if(bot_aim(1000000, 0, 0.001, FALSE)) + if(bot_aim(1000000, 0, 0.001, false)) { - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; if(random() < 0.03) self.bot_secondary_riflemooth = 0; } } - return TRUE; + return true; } case WR_THINK: { @@ -199,7 +199,7 @@ float W_Rifle(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -209,7 +209,7 @@ float W_Rifle(float req) precache_sound("weapons/campingrifle_fire.wav"); precache_sound("weapons/campingrifle_fire2.wav"); RIFLE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -226,17 +226,17 @@ float W_Rifle(float req) case WR_CONFIG: { RIFLE_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RESETPLAYER: { self.rifle_accumulator = time - WEP_CVAR(rifle, bursttime); - return TRUE; + return true; } case WR_RELOAD: { W_Reload(min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo)), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -260,7 +260,7 @@ float W_Rifle(float req) } } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -283,7 +283,7 @@ float W_Rifle(float req) sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM); } - return TRUE; + return true; } case WR_INIT: { @@ -294,23 +294,23 @@ float W_Rifle(float req) { precache_pic("gfx/reticle_nex"); } - return TRUE; + return true; } case WR_ZOOMRETICLE: { if(button_zoom || zoomscript_caught) { reticle_image = "gfx/reticle_nex"; - return TRUE; + return true; } else { // no weapon specific image for this weapon - return FALSE; + return false; } } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_rpc.qc b/qcsrc/common/weapons/w_rpc.qc index 81e114443..9cba90f68 100644 --- a/qcsrc/common/weapons/w_rpc.qc +++ b/qcsrc/common/weapons/w_rpc.qc @@ -107,19 +107,19 @@ void W_RocketPropelledChainsaw_Attack (void) entity flash = spawn (); W_DecreaseAmmo(WEP_CVAR(rpc, ammo)); - W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", CH_WEAPON_A, WEP_CVAR(rpc, damage)); + W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', false, 5, "weapons/rocket_fire.wav", CH_WEAPON_A, WEP_CVAR(rpc, damage)); pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); PROJECTILE_MAKETRIGGER(missile); missile.owner = missile.realowner = self; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = WEP_CVAR(rpc, damage) * 2; missile.takedamage = DAMAGE_YES; missile.damageforcescale = WEP_CVAR(rpc, damageforcescale); missile.health = WEP_CVAR(rpc, health); missile.event_damage = W_RocketPropelledChainsaw_Damage; - missile.damagedbycontents = TRUE; + missile.damagedbycontents = true; missile.movetype = MOVETYPE_FLY; missile.projectiledeathtype = WEP_RPC; @@ -135,7 +135,7 @@ void W_RocketPropelledChainsaw_Attack (void) missile.nextthink = time; missile.flags = FL_PROJECTILE; - CSQCProjectile(missile, TRUE, PROJECTILE_RPC, FALSE); + CSQCProjectile(missile, true, PROJECTILE_RPC, false); setmodel(flash, "models/flash.md3"); // precision set below SUB_SetFade (flash, time, 0.1); @@ -148,13 +148,13 @@ void W_RocketPropelledChainsaw_Attack (void) float W_RocketPropelledChainsaw(float req) { - float ammo_amount = FALSE; + float ammo_amount = false; switch(req) { case WR_AIM: { - self.BUTTON_ATCK = bot_aim(WEP_CVAR(rpc, speed), 0, WEP_CVAR(rpc, lifetime), FALSE); - return TRUE; + self.BUTTON_ATCK = bot_aim(WEP_CVAR(rpc, speed), 0, WEP_CVAR(rpc, lifetime), false); + return true; } case WR_THINK: { @@ -177,7 +177,7 @@ float W_RocketPropelledChainsaw(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -187,7 +187,7 @@ float W_RocketPropelledChainsaw(float req) precache_model("models/weapons/g_ok_rl.md3"); precache_sound ("weapons/rocket_fire.wav"); RPC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -197,17 +197,17 @@ float W_RocketPropelledChainsaw(float req) } case WR_CHECKAMMO2: { - return FALSE; + return false; } case WR_CONFIG: { RPC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RELOAD: { W_Reload(WEP_CVAR(rpc, ammo), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -227,7 +227,7 @@ float W_RocketPropelledChainsaw(float req) } } - return FALSE; + return false; } #endif @@ -244,21 +244,21 @@ float W_RocketPropelledChainsaw(float req) if(!w_issilent) sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM); - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/rocket_impact.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_seeker.qc b/qcsrc/common/weapons/w_seeker.qc index d4c4d3394..8af147f29 100644 --- a/qcsrc/common/weapons/w_seeker.qc +++ b/qcsrc/common/weapons/w_seeker.qc @@ -142,9 +142,9 @@ void W_Seeker_Missile_Think(void) { // Is it a better idea (shorter distance) to trace to the target itself? if( vlen(self.origin + olddir * self.wait) < dist) - traceline(self.origin, self.origin + olddir * self.wait, FALSE, self); + traceline(self.origin, self.origin + olddir * self.wait, false, self); else - traceline(self.origin, eorg, FALSE, self); + traceline(self.origin, eorg, false, self); // Setup adaptive tracelength self.wait = bound(WEP_CVAR(seeker, missile_smart_trace_min), vlen(self.origin - trace_endpos), self.wait = WEP_CVAR(seeker, missile_smart_trace_max)); @@ -249,16 +249,16 @@ void W_Seeker_Fire_Missile(vector f_diff, entity m_target) W_DecreaseAmmo(WEP_CVAR(seeker, missile_ammo)); makevectors(self.v_angle); - W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", CH_WEAPON_A, 0); + W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, "weapons/seeker_fire.wav", CH_WEAPON_A, 0); w_shotorg += f_diff; pointparticles(particleeffectnum("seeker_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); - //self.detornator = FALSE; + //self.detornator = false; missile = spawn(); missile.owner = missile.realowner = self; missile.classname = "seeker_missile"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = WEP_CVAR(seeker, missile_damage); missile.think = W_Seeker_Missile_Think; @@ -272,7 +272,7 @@ void W_Seeker_Fire_Missile(vector f_diff, entity m_target) missile.takedamage = DAMAGE_YES; missile.health = WEP_CVAR(seeker, missile_health); missile.damageforcescale = WEP_CVAR(seeker, missile_damageforcescale); - missile.damagedbycontents = TRUE; + missile.damagedbycontents = true; //missile.think = W_Seeker_Missile_Animate; // csqc projectiles. if(missile.enemy != world) @@ -291,7 +291,7 @@ void W_Seeker_Fire_Missile(vector f_diff, entity m_target) missile.angles = vectoangles(missile.velocity); - CSQCProjectile(missile, FALSE, PROJECTILE_SEEKER, TRUE); + CSQCProjectile(missile, false, PROJECTILE_SEEKER, true); other = missile; MUTATOR_CALLHOOK(EditProjectile); } @@ -340,7 +340,7 @@ void W_Seeker_Fire_Flac(void) f_diff = '+1.25 +3.75 0'; break; } - W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/flac_fire.wav", CH_WEAPON_A, WEP_CVAR(seeker, flac_damage)); + W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, "weapons/flac_fire.wav", CH_WEAPON_A, WEP_CVAR(seeker, flac_damage)); w_shotorg += f_diff; pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); @@ -348,7 +348,7 @@ void W_Seeker_Fire_Flac(void) missile = spawn(); missile.owner = missile.realowner = self; missile.classname = "missile"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = WEP_CVAR(seeker, flac_damage); missile.touch = W_Seeker_Flac_Explode; missile.use = W_Seeker_Flac_Explode; @@ -369,7 +369,7 @@ void W_Seeker_Fire_Flac(void) setsize(missile, '-2 -2 -2', '2 2 2'); W_SetupProjVelocity_UP_PRE(missile, seeker, flac_); - CSQCProjectile(missile, TRUE, PROJECTILE_FLAC, TRUE); + CSQCProjectile(missile, true, PROJECTILE_FLAC, true); other = missile; MUTATOR_CALLHOOK(EditProjectile); } @@ -545,7 +545,7 @@ void W_Seeker_Tag_Touch(void) if(WEP_CVAR(seeker, type) == 1) { - WaypointSprite_Spawn("tagged-target", WEP_CVAR(seeker, tag_tracker_lifetime), 0, other, '0 0 64', self.realowner, 0, other, wps_tag_tracker, TRUE, RADARICON_TAGGED, '0.5 1 0'); + WaypointSprite_Spawn("tagged-target", WEP_CVAR(seeker, tag_tracker_lifetime), 0, other, '0 0 64', self.realowner, 0, other, wps_tag_tracker, true, RADARICON_TAGGED, '0.5 1 0'); WaypointSprite_UpdateRule(other.wps_tag_tracker, 0, SPRITERULE_DEFAULT); } } @@ -559,12 +559,12 @@ void W_Seeker_Fire_Tag(void) entity missile; W_DecreaseAmmo(WEP_CVAR(seeker, tag_ammo)); - W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", CH_WEAPON_A, WEP_CVAR(seeker, missile_damage) * WEP_CVAR(seeker, missile_count)); + W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, "weapons/tag_fire.wav", CH_WEAPON_A, WEP_CVAR(seeker, missile_damage) * WEP_CVAR(seeker, missile_count)); missile = spawn(); missile.owner = missile.realowner = self; missile.classname = "seeker_tag"; - missile.bot_dodge = TRUE; + missile.bot_dodge = true; missile.bot_dodgerating = 50; missile.touch = W_Seeker_Tag_Touch; missile.think = SUB_Remove; @@ -587,7 +587,7 @@ void W_Seeker_Fire_Tag(void) W_SetupProjVelocity_PRE(missile, seeker, tag_); missile.angles = vectoangles(missile.velocity); - CSQCProjectile(missile, TRUE, PROJECTILE_TAG, FALSE); // has sound + CSQCProjectile(missile, true, PROJECTILE_TAG, false); // has sound other = missile; MUTATOR_CALLHOOK(EditProjectile); } @@ -606,12 +606,12 @@ float W_Seeker(float req) { if(WEP_CVAR(seeker, type) == 1) if(W_Seeker_Tagged_Info(self, self.enemy) != world) - self.BUTTON_ATCK = bot_aim(WEP_CVAR(seeker, missile_speed_max), 0, WEP_CVAR(seeker, missile_lifetime), FALSE); + self.BUTTON_ATCK = bot_aim(WEP_CVAR(seeker, missile_speed_max), 0, WEP_CVAR(seeker, missile_lifetime), false); else - self.BUTTON_ATCK2 = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), FALSE); + self.BUTTON_ATCK2 = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false); else - self.BUTTON_ATCK = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), FALSE); - return TRUE; + self.BUTTON_ATCK = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false); + return true; } case WR_THINK: { @@ -658,7 +658,7 @@ float W_Seeker(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -669,7 +669,7 @@ float W_Seeker(float req) precache_sound("weapons/flac_fire.wav"); precache_sound("weapons/seeker_fire.wav"); SEEKER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -702,12 +702,12 @@ float W_Seeker(float req) case WR_CONFIG: { SEEKER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RELOAD: { W_Reload(min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -721,7 +721,7 @@ float W_Seeker(float req) return WEAPON_SEEKER_MURDER_SPRAY; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -767,7 +767,7 @@ float W_Seeker(float req) sound(self, CH_SHOTS, "weapons/seekerexp3.wav", 1, ATTEN_NORM); } } - return TRUE; + return true; } case WR_INIT: { @@ -778,15 +778,15 @@ float W_Seeker(float req) precache_sound("weapons/tagexp2.wav"); precache_sound("weapons/tagexp3.wav"); precache_sound("weapons/tag_impact.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_shockwave.qc b/qcsrc/common/weapons/w_shockwave.qc index a051ec735..e6653f7fa 100644 --- a/qcsrc/common/weapons/w_shockwave.qc +++ b/qcsrc/common/weapons/w_shockwave.qc @@ -147,7 +147,7 @@ void W_Shockwave_Melee_Think(void) self.realowner, (self.realowner.origin + self.realowner.view_ofs), targpos, - FALSE, + false, self.realowner, ANTILAG_LATENCY(self.realowner) ); @@ -236,7 +236,7 @@ void W_Shockwave_Melee(void) meleetemp.owner = meleetemp.realowner = self; meleetemp.think = W_Shockwave_Melee_Think; meleetemp.nextthink = time + WEP_CVAR(shockwave, melee_delay) * W_WeaponRateFactor(); - W_SetupShot_Range(self, TRUE, 0, "", 0, WEP_CVAR(shockwave, melee_damage), WEP_CVAR(shockwave, melee_range)); + W_SetupShot_Range(self, true, 0, "", 0, WEP_CVAR(shockwave, melee_damage), WEP_CVAR(shockwave, melee_range)); } // SHOCKWAVE ATTACK MODE @@ -265,7 +265,7 @@ float W_Shockwave_Attack_CheckSpread( ) { return bound(0, (distance_from_line / spreadlimit), 1); } else - { return FALSE; } + { return false; } } float W_Shockwave_Attack_IsVisible( @@ -283,14 +283,14 @@ float W_Shockwave_Attack_IsVisible( if(W_Shockwave_Attack_CheckSpread(nearest_to_attacker, nearest_on_line, sw_shotorg, attack_endpos)) { WarpZone_TraceLine(sw_shotorg, nearest_to_attacker, MOVE_NOMONSTERS, self); - if(trace_fraction == 1) { return TRUE; } // yes, the nearest point is clear and we can allow the damage + if(trace_fraction == 1) { return true; } // yes, the nearest point is clear and we can allow the damage } // STEP TWO: Check if shotorg to center point is clear if(W_Shockwave_Attack_CheckSpread(center, nearest_on_line, sw_shotorg, attack_endpos)) { WarpZone_TraceLine(sw_shotorg, center, MOVE_NOMONSTERS, self); - if(trace_fraction == 1) { return TRUE; } // yes, the center point is clear and we can allow the damage + if(trace_fraction == 1) { return true; } // yes, the center point is clear and we can allow the damage } // STEP THREE: Check each corner to see if they are clear @@ -300,11 +300,11 @@ float W_Shockwave_Attack_IsVisible( if(W_Shockwave_Attack_CheckSpread(corner, nearest_on_line, sw_shotorg, attack_endpos)) { WarpZone_TraceLine(sw_shotorg, corner, MOVE_NOMONSTERS, self); - if(trace_fraction == 1) { return TRUE; } // yes, this corner is clear and we can allow the damage + if(trace_fraction == 1) { return true; } // yes, this corner is clear and we can allow the damage } } - return FALSE; + return false; } float W_Shockwave_Attack_CheckHit( @@ -313,7 +313,7 @@ float W_Shockwave_Attack_CheckHit( vector final_force, float final_damage) { - if(!head) { return FALSE; } + if(!head) { return false; } float i; for(i = 0; i <= queue; ++i) @@ -322,14 +322,14 @@ float W_Shockwave_Attack_CheckHit( { if(vlen(final_force) > vlen(shockwave_hit_force[i])) { shockwave_hit_force[i] = final_force; } if(final_damage > shockwave_hit_damage[i]) { shockwave_hit_damage[i] = final_damage; } - return FALSE; + return false; } } shockwave_hit[queue] = head; shockwave_hit_force[queue] = final_force; shockwave_hit_damage[queue] = final_damage; - return TRUE; + return true; } void W_Shockwave_Send(void) @@ -359,7 +359,7 @@ void W_Shockwave_Attack(void) float i, queue = 0; // set up the shot direction - W_SetupShot(self, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, WEP_CVAR(shockwave, blast_damage)); + W_SetupShot(self, false, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, WEP_CVAR(shockwave, blast_damage)); vector attack_endpos = (w_shotorg + (w_shotdir * WEP_CVAR(shockwave, blast_distance))); WarpZone_TraceLine(w_shotorg, attack_endpos, MOVE_NOMONSTERS, self); vector attack_hitpos = trace_endpos; @@ -387,7 +387,7 @@ void W_Shockwave_Attack(void) WEP_CVAR(shockwave, blast_splash_radius), WEP_CVAR(shockwave, blast_jump_radius) ), - FALSE + false ); while(head) @@ -540,7 +540,7 @@ void W_Shockwave_Attack(void) } // cone damage trace - head = WarpZone_FindRadius(w_shotorg, WEP_CVAR(shockwave, blast_distance), FALSE); + head = WarpZone_FindRadius(w_shotorg, WEP_CVAR(shockwave, blast_distance), false); while(head) { if((head != self) && head.takedamage) @@ -674,11 +674,11 @@ float W_Shockwave(float req) case WR_AIM: { if(vlen(self.origin - self.enemy.origin) <= WEP_CVAR(shockwave, melee_range)) - { self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, FALSE); } + { self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false); } else - { self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE); } + { self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false); } - return TRUE; + return true; } case WR_THINK: { @@ -705,7 +705,7 @@ float W_Shockwave(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -717,18 +717,18 @@ float W_Shockwave(float req) precache_sound("weapons/lasergun_fire.wav"); precache_sound("weapons/shotgun_melee.wav"); SHOCKWAVE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: case WR_CHECKAMMO2: { // shockwave has infinite ammo - return TRUE; + return true; } case WR_CONFIG: { SHOCKWAVE_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -742,7 +742,7 @@ float W_Shockwave(float req) return WEAPON_SHOCKWAVE_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -876,22 +876,22 @@ float W_Shockwave(float req) //vector org2; //org2 = w_org + w_backoff * 2; //pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1); - return FALSE; + return false; } case WR_INIT: { //precache_sound("weapons/ric1.wav"); //precache_sound("weapons/ric2.wav"); //precache_sound("weapons/ric3.wav"); - return FALSE; + return false; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_shotgun.qc b/qcsrc/common/weapons/w_shotgun.qc index 9227cdab4..67b3d2652 100644 --- a/qcsrc/common/weapons/w_shotgun.qc +++ b/qcsrc/common/weapons/w_shotgun.qc @@ -60,7 +60,7 @@ void W_Shotgun_Attack(float isprimary) W_DecreaseAmmo(WEP_CVAR_PRI(shotgun, ammo)); - W_SetupShot(self, TRUE, 5, "weapons/shotgun_fire.wav", ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), WEP_CVAR_PRI(shotgun, damage) * WEP_CVAR_PRI(shotgun, bullets)); + W_SetupShot(self, true, 5, "weapons/shotgun_fire.wav", ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), WEP_CVAR_PRI(shotgun, damage) * WEP_CVAR_PRI(shotgun, bullets)); for(sc = 0;sc < WEP_CVAR_PRI(shotgun, bullets);sc = sc + 1) fireBullet(w_shotorg, w_shotdir, WEP_CVAR_PRI(shotgun, spread), WEP_CVAR_PRI(shotgun, solidpenetration), WEP_CVAR_PRI(shotgun, damage), WEP_CVAR_PRI(shotgun, force), WEP_SHOTGUN, 0); @@ -119,7 +119,7 @@ void W_Shotgun_Melee_Think(void) + (v_up * swing_factor * WEP_CVAR_SEC(shotgun, melee_swing_up)) + (v_right * swing_factor * WEP_CVAR_SEC(shotgun, melee_swing_side))); - WarpZone_traceline_antilag(self, self.realowner.origin + self.realowner.view_ofs, targpos, FALSE, self, ANTILAG_LATENCY(self.realowner)); + WarpZone_traceline_antilag(self, self.realowner.origin + self.realowner.view_ofs, targpos, false, self, ANTILAG_LATENCY(self.realowner)); // draw lightning beams for debugging //te_lightning2(world, targpos, self.realowner.origin + self.realowner.view_ofs + v_forward * 5 - v_up * 5); @@ -188,7 +188,7 @@ void W_Shotgun_Attack2(void) meleetemp.realowner = self; meleetemp.think = W_Shotgun_Melee_Think; meleetemp.nextthink = time + WEP_CVAR_SEC(shotgun, melee_delay) * W_WeaponRateFactor(); - W_SetupShot_Range(self, TRUE, 0, "", 0, WEP_CVAR_SEC(shotgun, damage), WEP_CVAR_SEC(shotgun, melee_range)); + W_SetupShot_Range(self, true, 0, "", 0, WEP_CVAR_SEC(shotgun, damage), WEP_CVAR_SEC(shotgun, melee_range)); } // alternate secondary weapon frames @@ -203,7 +203,7 @@ void W_Shotgun_Attack3_Frame2() } sound(self, CH_WEAPON_SINGLE, "misc/null.wav", VOL_BASE, ATTN_NORM); // kill previous sound - W_Shotgun_Attack(TRUE); // actually is secondary, but we trick the last shot into playing full reload sound + W_Shotgun_Attack(true); // actually is secondary, but we trick the last shot into playing full reload sound weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_SEC(shotgun, alt_animtime), w_ready); } void W_Shotgun_Attack3_Frame1() @@ -216,7 +216,7 @@ void W_Shotgun_Attack3_Frame1() return; } - W_Shotgun_Attack(FALSE); + W_Shotgun_Attack(false); weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_SEC(shotgun, alt_animtime), W_Shotgun_Attack3_Frame2); } @@ -230,11 +230,11 @@ float W_Shotgun(float req) case WR_AIM: { if(vlen(self.origin-self.enemy.origin) <= WEP_CVAR_SEC(shotgun, melee_range)) - self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, FALSE); + self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false); else - self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, FALSE); + self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false); - return TRUE; + return true; } case WR_THINK: { @@ -252,7 +252,7 @@ float W_Shotgun(float req) { if(weapon_prepareattack(0, WEP_CVAR_PRI(shotgun, animtime))) { - W_Shotgun_Attack(TRUE); + W_Shotgun_Attack(true); self.shotgun_primarytime = time + WEP_CVAR_PRI(shotgun, refire) * W_WeaponRateFactor(); weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(shotgun, animtime), w_ready); } @@ -264,7 +264,7 @@ float W_Shotgun(float req) { if(weapon_prepareattack(0, WEP_CVAR_SEC(shotgun, alt_animtime))) { - W_Shotgun_Attack(FALSE); + W_Shotgun_Attack(false); self.shotgun_primarytime = time + WEP_CVAR_SEC(shotgun, alt_refire) * W_WeaponRateFactor(); weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_SEC(shotgun, alt_animtime), W_Shotgun_Attack3_Frame1); } @@ -281,7 +281,7 @@ float W_Shotgun(float req) weapon_thinkf(WFRAME_FIRE1, 0, W_Shotgun_Attack2); } - return TRUE; + return true; } case WR_INIT: { @@ -293,12 +293,12 @@ float W_Shotgun(float req) precache_sound("weapons/shotgun_fire.wav"); precache_sound("weapons/shotgun_melee.wav"); SHOTGUN_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_SETUP: { self.ammo_field = ammo_none; - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -310,28 +310,28 @@ float W_Shotgun(float req) { if(IS_BOT_CLIENT(self)) if(vlen(self.origin-self.enemy.origin) > WEP_CVAR_SEC(shotgun, melee_range)) - return FALSE; // bots cannot use secondary out of range (fixes constant melee when out of ammo) + return false; // bots cannot use secondary out of range (fixes constant melee when out of ammo) switch(WEP_CVAR(shotgun, secondary)) { - case 1: return TRUE; // melee does not use ammo + case 1: return true; // melee does not use ammo case 2: // secondary triple shot { ammo_amount = self.WEP_AMMO(SHOTGUN) >= WEP_CVAR_PRI(shotgun, ammo); ammo_amount += self.(weapon_load[WEP_SHOTGUN]) >= WEP_CVAR_PRI(shotgun, ammo); return ammo_amount; } - default: return FALSE; // secondary unavailable + default: return false; // secondary unavailable } } case WR_CONFIG: { SHOTGUN_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RELOAD: { W_Reload(WEP_CVAR_PRI(shotgun, ammo), "weapons/reload.wav"); // WEAPONTODO - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -345,7 +345,7 @@ float W_Shotgun(float req) return WEAPON_SHOTGUN_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -370,22 +370,22 @@ float W_Shotgun(float req) self.prevric = time; } - return TRUE; + return true; } case WR_INIT: { precache_sound("weapons/ric1.wav"); precache_sound("weapons/ric2.wav"); precache_sound("weapons/ric3.wav"); - return TRUE; + return true; } case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_tuba.qc b/qcsrc/common/weapons/w_tuba.qc index 92bdf4f8f..6806bf133 100644 --- a/qcsrc/common/weapons/w_tuba.qc +++ b/qcsrc/common/weapons/w_tuba.qc @@ -60,22 +60,22 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep float i, j, mmin, mmax, nolength; float n = tokenize_console(melody); if(n > pl.tuba_lastnotes_cnt) - return FALSE; + return false; float pitchshift = 0; if(instrument >= 0) if(pl.tuba_instrument != instrument) - return FALSE; + return false; // verify notes... - nolength = FALSE; + nolength = false; for(i = 0; i < n; ++i) { vector v = pl.(tuba_lastnotes[(pl.tuba_lastnotes_last - i + MAX_TUBANOTES) % MAX_TUBANOTES]); float ai = stof(argv(n - i - 1)); float np = floor(ai); if(ai == np) - nolength = TRUE; + nolength = true; // n counts the last played notes BACKWARDS // _x is start // _y is end @@ -87,7 +87,7 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep else { if(v.z + pitchshift != np) - return FALSE; + return false; } } @@ -138,12 +138,12 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep } if(mmin > mmax) // rhythm fail - return FALSE; + return false; } pl.tuba_lastnotes_cnt = 0; - return TRUE; + return true; } void W_Tuba_NoteOff(void) @@ -256,7 +256,7 @@ float W_Tuba_NoteSendEntity(entity to, float sf) msg_entity = to; if(!sound_allowed(MSG_ONE, self.realowner)) - return FALSE; + return false; WriteByte(MSG_ENTITY, ENT_CLIENT_TUBANOTE); WriteByte(MSG_ENTITY, sf); @@ -275,7 +275,7 @@ float W_Tuba_NoteSendEntity(entity to, float sf) WriteCoord(MSG_ENTITY, self.origin.y); WriteCoord(MSG_ENTITY, self.origin.z); } - return TRUE; + return true; } void W_Tuba_NoteThink(void) @@ -321,7 +321,7 @@ void W_Tuba_NoteOn(float hittype) vector o; float n; - W_SetupShot(self, FALSE, 2, "", 0, WEP_CVAR(tuba, damage)); + W_SetupShot(self, false, 2, "", 0, WEP_CVAR(tuba, damage)); n = W_Tuba_GetNote(self, hittype); @@ -351,7 +351,7 @@ void W_Tuba_NoteOn(float hittype) self.tuba_note.think = W_Tuba_NoteThink; self.tuba_note.nextthink = time; self.tuba_note.spawnshieldtime = time; - Net_LinkEntity(self.tuba_note, FALSE, 0, W_Tuba_NoteSendEntity); + Net_LinkEntity(self.tuba_note, false, 0, W_Tuba_NoteSendEntity); } self.tuba_note.teleport_time = time + WEP_CVAR(tuba, refire) * 2 * W_WeaponRateFactor(); // so it can get prolonged safely @@ -383,7 +383,7 @@ float W_Tuba(float req) self.BUTTON_ATCK2 = 1; } - return TRUE; + return true; } case WR_THINK: { @@ -412,7 +412,7 @@ float W_Tuba(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -424,13 +424,13 @@ float W_Tuba(float req) precache_model("models/weapons/v_kleinbottle.md3"); precache_model("models/weapons/h_kleinbottle.iqm"); TUBA_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_SETUP: { self.ammo_field = ammo_none; self.tuba_instrument = 0; - return TRUE; + return true; } case WR_RELOAD: { @@ -452,23 +452,23 @@ float W_Tuba(float req) self.weaponname = "tuba"; break; } - W_SetupShot(self, FALSE, 0, "", 0, 0); + W_SetupShot(self, false, 0, "", 0, 0); pointparticles(particleeffectnum("teleport"), w_shotorg, '0 0 0', 1); self.weaponentity.state = WS_INUSE; weapon_thinkf(WFRAME_RELOAD, 0.5, w_ready); } - return TRUE; + return true; } case WR_CHECKAMMO1: case WR_CHECKAMMO2: { - return TRUE; // tuba has infinite ammo + return true; // tuba has infinite ammo } case WR_CONFIG: { TUBA_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -489,7 +489,7 @@ float W_Tuba(float req) return WEAPON_TUBA_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -503,11 +503,11 @@ float W_Tuba(float req) case WR_ZOOMRETICLE: { // no weapon specific image for this weapon - return FALSE; + return false; } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_vaporizer.qc b/qcsrc/common/weapons/w_vaporizer.qc index 90ea15d5c..9472e8011 100644 --- a/qcsrc/common/weapons/w_vaporizer.qc +++ b/qcsrc/common/weapons/w_vaporizer.qc @@ -56,7 +56,7 @@ void W_Vaporizer_Attack(void) float flying; flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last - W_SetupShot(self, TRUE, 0, "", CH_WEAPON_A, 10000); + W_SetupShot(self, true, 0, "", CH_WEAPON_A, 10000); // handle sound separately so we can change the volume // added bonus: no longer plays the strength sound (strength gives no bonus to instakill anyway) sound (self, CH_WEAPON_A, "weapons/minstanexfire.wav", VOL_BASE * 0.8, ATTEN_NORM); @@ -130,11 +130,11 @@ float W_Vaporizer(float req) case WR_AIM: { if(self.WEP_AMMO(VAPORIZER) > 0) - self.BUTTON_ATCK = bot_aim(1000000, 0, 1, FALSE); + self.BUTTON_ATCK = bot_aim(1000000, 0, 1, false); else - self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(vaporizer, speed), 0, WEP_CVAR_SEC(vaporizer, lifetime), FALSE); // WEAPONTODO: replace with proper vaporizer cvars + self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(vaporizer, speed), 0, WEP_CVAR_SEC(vaporizer, lifetime), false); // WEAPONTODO: replace with proper vaporizer cvars - return TRUE; + return true; } case WR_THINK: { @@ -182,7 +182,7 @@ float W_Vaporizer(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -196,13 +196,13 @@ float W_Vaporizer(float req) precache_sound("weapons/nexwhoosh3.wav"); //W_Blaster(WR_INIT); // Samual: Is this really the proper thing to do? Didn't we already run this previously? VAPORIZER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_SETUP: { self.ammo_field = WEP_AMMO(VAPORIZER); self.vaporizer_lasthit = 0; - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -213,7 +213,7 @@ float W_Vaporizer(float req) case WR_CHECKAMMO2: { if(!WEP_CVAR_SEC(vaporizer, ammo)) - return TRUE; + return true; ammo_amount = self.WEP_AMMO(VAPORIZER) >= WEP_CVAR_SEC(vaporizer, ammo); ammo_amount += self.(weapon_load[WEP_VAPORIZER]) >= WEP_CVAR_SEC(vaporizer, ammo); return ammo_amount; @@ -221,12 +221,12 @@ float W_Vaporizer(float req) case WR_CONFIG: { VAPORIZER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RESETPLAYER: { self.vaporizer_lasthit = 0; - return TRUE; + return true; } case WR_RELOAD: { @@ -237,7 +237,7 @@ float W_Vaporizer(float req) used_ammo = vaporizer_ammo; W_Reload(used_ammo, "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -248,7 +248,7 @@ float W_Vaporizer(float req) return WEAPON_VAPORIZER_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -270,7 +270,7 @@ float W_Vaporizer(float req) pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1); if(!w_issilent) { sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM); } } - return TRUE; + return true; } case WR_INIT: { @@ -280,23 +280,23 @@ float W_Vaporizer(float req) { precache_pic("gfx/reticle_nex"); } - return TRUE; + return true; } case WR_ZOOMRETICLE: { if(button_zoom || zoomscript_caught) { reticle_image = "gfx/reticle_nex"; - return TRUE; + return true; } else { // no weapon specific image for this weapon - return FALSE; + return false; } } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/common/weapons/w_vortex.qc b/qcsrc/common/weapons/w_vortex.qc index c880e7dee..b7cdc85a2 100644 --- a/qcsrc/common/weapons/w_vortex.qc +++ b/qcsrc/common/weapons/w_vortex.qc @@ -100,7 +100,7 @@ void W_Vortex_Attack(float issecondary) mydmg *= charge; myforce *= charge; - W_SetupShot(self, TRUE, 5, "weapons/nexfire.wav", CH_WEAPON_A, mydmg); + W_SetupShot(self, true, 5, "weapons/nexfire.wav", CH_WEAPON_A, mydmg); if(charge > WEP_CVAR(vortex, charge_animlimit) && WEP_CVAR(vortex, charge_animlimit)) // if the Vortex is overcharged, we play an extra sound { sound(self, CH_WEAPON_B, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * WEP_CVAR(vortex, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(vortex, charge_animlimit)), ATTN_NORM); @@ -129,14 +129,14 @@ float W_Vortex(float req) { case WR_AIM: { - if(bot_aim(1000000, 0, 1, FALSE)) - self.BUTTON_ATCK = TRUE; + if(bot_aim(1000000, 0, 1, false)) + self.BUTTON_ATCK = true; else { if(WEP_CVAR(vortex, charge)) - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; } - return TRUE; + return true; } case WR_THINK: { @@ -238,7 +238,7 @@ float W_Vortex(float req) } } - return TRUE; + return true; } case WR_INIT: { @@ -252,7 +252,7 @@ float W_Vortex(float req) precache_sound("weapons/nexwhoosh2.wav"); precache_sound("weapons/nexwhoosh3.wav"); VORTEX_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) - return TRUE; + return true; } case WR_CHECKAMMO1: { @@ -271,18 +271,18 @@ float W_Vortex(float req) } else { - return FALSE; // zoom is not a fire mode + return false; // zoom is not a fire mode } } case WR_CONFIG: { VORTEX_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) - return TRUE; + return true; } case WR_RELOAD: { W_Reload(min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo)), "weapons/reload.wav"); - return TRUE; + return true; } case WR_SUICIDEMESSAGE: { @@ -293,7 +293,7 @@ float W_Vortex(float req) return WEAPON_VORTEX_MURDER; } } - return FALSE; + return false; } #endif #ifdef CSQC @@ -310,7 +310,7 @@ float W_Vortex(float req) if(!w_issilent) sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM); - return TRUE; + return true; } case WR_INIT: { @@ -319,23 +319,23 @@ float W_Vortex(float req) { precache_pic("gfx/reticle_nex"); } - return TRUE; + return true; } case WR_ZOOMRETICLE: { if(button_zoom || zoomscript_caught || (!WEP_CVAR(vortex, secondary) && button_attack2)) { reticle_image = "gfx/reticle_nex"; - return TRUE; + return true; } else { // no weapon specific image for this weapon - return FALSE; + return false; } } } - return FALSE; + return false; } #endif #endif diff --git a/qcsrc/csqcmodellib/cl_model.qc b/qcsrc/csqcmodellib/cl_model.qc index 6cf2ced39..fdf36f9c0 100644 --- a/qcsrc/csqcmodellib/cl_model.qc +++ b/qcsrc/csqcmodellib/cl_model.qc @@ -94,9 +94,9 @@ void CSQCModel_InterpolateAnimation_1To2_Note(int sf, float set_times) void CSQCModel_InterpolateAnimation_Note(float sf) { #ifdef CSQCMODEL_HAVE_TWO_FRAMES - CSQCModel_InterpolateAnimation_2To4_Note(sf, TRUE); + CSQCModel_InterpolateAnimation_2To4_Note(sf, true); #else - CSQCModel_InterpolateAnimation_1To2_Note(sf, TRUE); + CSQCModel_InterpolateAnimation_1To2_Note(sf, true); #endif } diff --git a/qcsrc/csqcmodellib/cl_player.qc b/qcsrc/csqcmodellib/cl_player.qc index 0bb5cec42..9ed8ed630 100644 --- a/qcsrc/csqcmodellib/cl_player.qc +++ b/qcsrc/csqcmodellib/cl_player.qc @@ -220,7 +220,7 @@ void CSQCPlayer_SetCamera() o = self.origin; v = v0; csqcplayer_status = CSQCPLAYERSTATUS_PREDICTED; - CSQCPlayer_PredictTo(servercommandframe + 1, FALSE); + CSQCPlayer_PredictTo(servercommandframe + 1, false); CSQCPlayer_SetPredictionError(self.origin - o, self.velocity - v, pmove_onground - !!(self.pmove_flags & PMF_ONGROUND)); self.origin = o; self.velocity = v; @@ -239,7 +239,7 @@ void CSQCPlayer_SetCamera() CSQCPlayer_SavePrediction(); } - CSQCPlayer_PredictTo(clientcommandframe + 1, TRUE); + CSQCPlayer_PredictTo(clientcommandframe + 1, true); #ifdef CSQCMODEL_SERVERSIDE_CROUCH // get crouch state from the server (LAG) diff --git a/qcsrc/csqcmodellib/sv_model.qc b/qcsrc/csqcmodellib/sv_model.qc index ef47a54da..cbc26213c 100644 --- a/qcsrc/csqcmodellib/sv_model.qc +++ b/qcsrc/csqcmodellib/sv_model.qc @@ -50,7 +50,7 @@ float CSQCModel_Send(entity to, float sf) #undef CSQCMODEL_ENDIF #undef CSQCMODEL_IF - return TRUE; + return true; } #ifdef CSQCPLAYER_FORCE_UPDATES diff --git a/qcsrc/dpdefs/dpextensions.qc b/qcsrc/dpdefs/dpextensions.qc index a9b953883..44b81b01f 100644 --- a/qcsrc/dpdefs/dpextensions.qc +++ b/qcsrc/dpdefs/dpextensions.qc @@ -5,8 +5,8 @@ //definitions that id Software left out: //these are passed as the 'nomonsters' parameter to traceline/tracebox (yes really this was supported in all quake engines, nomonsters is misnamed) -float MOVE_NORMAL = 0; // same as FALSE -float MOVE_NOMONSTERS = 1; // same as TRUE +float MOVE_NORMAL = 0; // same as false +float MOVE_NOMONSTERS = 1; // same as true float MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE //checkextension function @@ -21,7 +21,7 @@ float(string s) checkextension = #99; //// (it is recommended this code be placed in worldspawn or a worldspawn called function somewhere) //if (cvar("pr_checkextension")) //if (checkextension("DP_SV_SETCOLOR")) -// ext_setcolor = TRUE; +// ext_setcolor = true; //from then on you can check ext_setcolor to know if that extension is available //BX_WAL_SUPPORT @@ -1052,7 +1052,7 @@ string(float uselocaltime, string format, ...) strftime = #478; //for more format codes please do a web search for strftime 3 and you should find the man(3) pages for this standard C function. // //practical uses: -//changing day/night cycle (shops closing, monsters going on the prowl) in an RPG, for this you probably want to use s = strftime(TRUE, "%H");hour = stof(s); +//changing day/night cycle (shops closing, monsters going on the prowl) in an RPG, for this you probably want to use s = strftime(true, "%H");hour = stof(s); //printing current date/time for competitive multiplayer games, such as the beginning/end of each round in real world time. //activating eastereggs in singleplayer games on certain dates. // @@ -1470,13 +1470,13 @@ float(entity clent) clienttype = #455; // returns one of the CLIENTTYPE_* consta //field definitions: .float() customizeentityforclient; // self = this entity, other = client entity //description: -//allows qc to modify an entity before it is sent to each client, the function returns TRUE if it should send, FALSE if it should not, and is fully capable of editing the entity's fields, this allows cloaked players to appear less transparent to their teammates, navigation markers to only show to their team, etc +//allows qc to modify an entity before it is sent to each client, the function returns true if it should send, false if it should not, and is fully capable of editing the entity's fields, this allows cloaked players to appear less transparent to their teammates, navigation markers to only show to their team, etc //tips on writing customize functions: -//it is a good idea to return FALSE early in the function if possible to reduce cpu usage, because this function may be called many thousands of times per frame if there are many customized entities on a 64+ player server. +//it is a good idea to return false early in the function if possible to reduce cpu usage, because this function may be called many thousands of times per frame if there are many customized entities on a 64+ player server. //you are free to change anything in self, but please do not change any other entities (the results may be very inconsistent). //example ideas for use of this extension: //making icons over teammates' heads which are only visible to teammates. for exasmple: float() playericon_customizeentityforclient = {return self.owner.team == other.team;}; -//making cloaked players more visible to their teammates than their enemies. for example: float() player_customizeentityforclient = {if (self.items & IT_CLOAKING) {if (self.team == other.team) self.alpha = 0.6;else self.alpha = 0.1;} return TRUE;}; +//making cloaked players more visible to their teammates than their enemies. for example: float() player_customizeentityforclient = {if (self.items & IT_CLOAKING) {if (self.team == other.team) self.alpha = 0.6;else self.alpha = 0.1;} return true;}; //making explosion models that face the viewer (does not work well with chase_active). for example: float() explosion_customizeentityforclient = {self.angles = vectoangles(other.origin + other.view_ofs - self.origin);self.angles_x = 0 - self.angles_x;}; //implementation notes: //entity customization is done before per-client culling (visibility for instance) because the entity may be doing setorigin to display itself in different locations on different clients, may be altering its .modelindex, .effects and other fields important to culling, so customized entities increase cpu usage (non-customized entities can use all the early culling they want however, as they are not changing on a per client basis). @@ -1914,7 +1914,7 @@ void(vector mincorner, vector maxcorner, vector vel, float howmany, float color, //vector velocity //short count //byte color (palette color) -//byte gravity (TRUE or FALSE, FIXME should this be a scaler instead?) +//byte gravity (true or false, FIXME should this be a scaler instead?) //coord randomvel (how much to jitter the velocity) //description: //creates a cloud of particles, useful for forcefields but quite customizable. diff --git a/qcsrc/dpdefs/progsdefs.qc b/qcsrc/dpdefs/progsdefs.qc index c25d4ef45..02616873c 100644 --- a/qcsrc/dpdefs/progsdefs.qc +++ b/qcsrc/dpdefs/progsdefs.qc @@ -432,9 +432,9 @@ void() coredump = #28; // prints all edicts void() traceon = #29; // turns statment trace on void() traceoff = #30; void(entity e) eprint = #31; // prints an entire edict -float(float yaw, float dist) walkmove = #32; // returns TRUE or FALSE +float(float yaw, float dist) walkmove = #32; // returns true or false // #33 was removed -float() droptofloor= #34; // TRUE if landed on floor +float() droptofloor= #34; // true if landed on floor void(float style, string value) lightstyle = #35; float(float v) rint = #36; // round to nearest int float(float v) floor = #37; // largest integer <= v diff --git a/qcsrc/menu/anim/animation.qc b/qcsrc/menu/anim/animation.qc index 99ccc7896..26b01d718 100644 --- a/qcsrc/menu/anim/animation.qc +++ b/qcsrc/menu/anim/animation.qc @@ -20,8 +20,8 @@ CLASS(Animation) EXTENDS(Object) ATTRIB(Animation, duration, float, 0) ATTRIB(Animation, startValue, float, 0) ATTRIB(Animation, delta, float, 0) - ATTRIB(Animation, stopped, float, FALSE) - ATTRIB(Animation, finished, float, FALSE) + ATTRIB(Animation, stopped, float, false) + ATTRIB(Animation, finished, float, false) ENDCLASS(Animation) void setterDummy(entity, float); #endif @@ -89,12 +89,12 @@ float Animation_isStopped(entity me) void Animation_stopAnim(entity me) { - me.stopped = TRUE; + me.stopped = true; } void Animation_resumeAnim(entity me) { - me.stopped = FALSE; + me.stopped = false; } float Animation_isFinished(entity me) @@ -105,7 +105,7 @@ float Animation_isFinished(entity me) void Animation_finishAnim(entity me) { me.value = me.delta + me.startValue; - me.finished = TRUE; + me.finished = true; me.setter(me.object, me.value); } diff --git a/qcsrc/menu/draw.qc b/qcsrc/menu/draw.qc index 7596c0c3a..ff9d9590d 100644 --- a/qcsrc/menu/draw.qc +++ b/qcsrc/menu/draw.qc @@ -362,12 +362,12 @@ string draw_TextShortenToWidth(string theText, float maxWidth, float ICanHasKall float draw_TextWidth_WithColors(string s, vector theFontSize) { - return draw_TextWidth(s, TRUE, theFontSize); + return draw_TextWidth(s, true, theFontSize); } float draw_TextWidth_WithoutColors(string s, vector theFontSize) { - return draw_TextWidth(s, FALSE, theFontSize); + return draw_TextWidth(s, false, theFontSize); } float draw_TextLengthUpToWidth(string theText, float maxWidth, float allowColorCodes, vector theFontSize) diff --git a/qcsrc/menu/item/dialog.qc b/qcsrc/menu/item/dialog.qc index fed110f6f..62c74406e 100644 --- a/qcsrc/menu/item/dialog.qc +++ b/qcsrc/menu/item/dialog.qc @@ -58,7 +58,7 @@ CLASS(Dialog) EXTENDS(InputContainer) ATTRIB(Dialog, zoomedOutTitleBarPosition, float, 0) ATTRIB(Dialog, zoomedOutTitleBar, float, 0) - ATTRIB(Dialog, requiresConnection, float, 0) // set to TRUE if the dialog requires a connection to be opened + ATTRIB(Dialog, requiresConnection, float, 0) // set to true if the dialog requires a connection to be opened ATTRIB(Dialog, backgroundImage, string, string_null) ATTRIB(Dialog, borderLines, float, 1) diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index 446f1d0d2..94446bd3f 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -194,7 +194,7 @@ void m_init_delayed() } fclose(fh); - glob = search_begin(strcat(draw_currentSkin, "/*.tga"), TRUE, TRUE); + glob = search_begin(strcat(draw_currentSkin, "/*.tga"), true, true); if(glob >= 0) { n = search_getsize(glob); @@ -406,21 +406,21 @@ float m_testmousetooltipbox(vector pos) { if(pos.x >= menuTooltipOrigin.x && pos.x < menuTooltipOrigin.x + menuTooltipSize.x) if(pos.y >= menuTooltipOrigin.y && pos.y < menuTooltipOrigin.y + menuTooltipSize.y) - return FALSE; - return TRUE; + return false; + return true; } float m_testtooltipbox(vector tooltippos) { if(tooltippos.x < 0) - return FALSE; + return false; if(tooltippos.y < 0) - return FALSE; + return false; if(tooltippos.x + menuTooltipSize.x > 1) - return FALSE; + return false; if(tooltippos.y + menuTooltipSize.y > 1) - return FALSE; + return false; menuTooltipOrigin = tooltippos; - return TRUE; + return true; } float m_allocatetooltipbox(vector pos) { @@ -438,34 +438,34 @@ float m_allocatetooltipbox(vector pos) // bottom right v = pos + avoidplus; if(m_testtooltipbox(v)) - return TRUE; + return true; // bottom center v_x = pos.x - menuTooltipSize.x * 0.5; if(m_testtooltipbox(v)) - return TRUE; + return true; // bottom left v_x = pos.x - avoidminus.x; if(m_testtooltipbox(v)) - return TRUE; + return true; // top left v_y = pos.y - avoidminus.y; if(m_testtooltipbox(v)) - return TRUE; + return true; // top center v_x = pos.x - menuTooltipSize.x * 0.5; if(m_testtooltipbox(v)) - return TRUE; + return true; // top right v_x = pos.x + avoidplus.x; if(m_testtooltipbox(v)) - return TRUE; + return true; - return FALSE; + return false; } entity m_findtooltipitem(entity root, vector pos) { @@ -586,7 +586,7 @@ void m_tooltip(vector pos) { s = getWrappedLine(SKINWIDTH_TOOLTIP, fontsize, draw_TextWidth_WithoutColors); ++i; - f = draw_TextWidth(s, FALSE, fontsize); + f = draw_TextWidth(s, false, fontsize); if(f > w) w = f; } @@ -662,7 +662,7 @@ void m_tooltip(vector pos) while(getWrappedLine_remaining) { s = getWrappedLine(SKINWIDTH_TOOLTIP, fontsize, draw_TextWidth_WithoutColors); - draw_Text(p, s, fontsize, SKINCOLOR_TOOLTIP, SKINALPHA_TOOLTIP * menuTooltipAlpha, FALSE); + draw_Text(p, s, fontsize, SKINCOLOR_TOOLTIP, SKINALPHA_TOOLTIP * menuTooltipAlpha, false); p.y += fontsize.y; } } @@ -756,7 +756,7 @@ void m_draw(float width, float height) { draw_reset_full(); draw_Fill('0 0 0', '1 1 0', SKINCOLOR_BACKGROUND, 1); - drawBackground(SKINGFX_BACKGROUND, bound(0, menuLogoAlpha, 1), SKINALIGN_BACKGROUND, TRUE); + drawBackground(SKINGFX_BACKGROUND, bound(0, menuLogoAlpha, 1), SKINALIGN_BACKGROUND, true); draw_reset_cropped(); if(menuAlpha <= 0 && SKINALPHA_CURSOR_INTRO > 0) { @@ -771,7 +771,7 @@ void m_draw(float width, float height) if(menuAlpha > 0) { draw_reset_full(); - drawBackground(SKINGFX_BACKGROUND_INGAME, menuAlpha * SKINALPHA_BACKGROUND_INGAME, SKINALIGN_BACKGROUND_INGAME, FALSE); + drawBackground(SKINGFX_BACKGROUND_INGAME, menuAlpha * SKINALPHA_BACKGROUND_INGAME, SKINALIGN_BACKGROUND_INGAME, false); draw_reset_cropped(); } } diff --git a/qcsrc/menu/xonotic/campaign.qc b/qcsrc/menu/xonotic/campaign.qc index de9715354..75844340e 100644 --- a/qcsrc/menu/xonotic/campaign.qc +++ b/qcsrc/menu/xonotic/campaign.qc @@ -96,7 +96,7 @@ entity makeXonoticCampaignList() void XonoticCampaignList_configureXonoticCampaignList(entity me) { me.configureXonoticListBox(me); - me.campaignGlob = search_begin("maps/campaign*.txt", TRUE, TRUE); + me.campaignGlob = search_begin("maps/campaign*.txt", true, true); me.loadCvars(me); me.campaignGo(me, 0); // takes care of enabling/disabling buttons too } diff --git a/qcsrc/menu/xonotic/demolist.qc b/qcsrc/menu/xonotic/demolist.qc index ff9f1241f..3b6467421 100644 --- a/qcsrc/menu/xonotic/demolist.qc +++ b/qcsrc/menu/xonotic/demolist.qc @@ -57,7 +57,7 @@ string XonoticDemoList_demoName(entity me, float i) return s; } -// if subdir is TRUE look in subdirectories too (1 level) +// if subdir is true look in subdirectories too (1 level) void getDemos_for_ext(entity me, string ext, float subdir) { string s; @@ -71,7 +71,7 @@ void getDemos_for_ext(entity me, string ext, float subdir) s=strcat(s, "*", ext); float list, i, n; - list = search_begin(s, FALSE, TRUE); + list = search_begin(s, false, true); if(list >= 0) { n = search_getsize(list); @@ -84,15 +84,15 @@ void getDemos_for_ext(entity me, string ext, float subdir) { s = strreplace("/", "^7/", s); // clear colors at the forward slash s = strcat("/", rgb_to_hexcolor(SKINCOLOR_DEMOLIST_SUBDIR), s); // add a forward slash for sorting, then color - bufstr_add(me.listDemo, s, TRUE); + bufstr_add(me.listDemo, s, true); } - else { bufstr_add(me.listDemo, s, TRUE); } + else { bufstr_add(me.listDemo, s, true); } } search_end(list); } if (subdir) - getDemos_for_ext(me, ext, FALSE); + getDemos_for_ext(me, ext, false); } void XonoticDemoList_getDemos(entity me) @@ -105,10 +105,10 @@ void XonoticDemoList_getDemos(entity me) me.nItems = 0; return; } - getDemos_for_ext(me, ".dem", TRUE); + getDemos_for_ext(me, ".dem", true); me.nItems = buf_getsize(me.listDemo); if(me.nItems > 0) - buf_sort(me.listDemo, 128, FALSE); + buf_sort(me.listDemo, 128, false); } void XonoticDemoList_destroy(entity me) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc index 15095b2ba..307efdec0 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDAmmoDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDAmmoDialog, rows, float, 15) ATTRIB(XonoticHUDAmmoDialog, columns, float, 4) ATTRIB(XonoticHUDAmmoDialog, name, string, "HUDammo") - ATTRIB(XonoticHUDAmmoDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDAmmoDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDAmmoDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc b/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc index ac1033cd5..226bd9724 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDBuffsDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDBuffsDialog, rows, float, 15) ATTRIB(XonoticHUDBuffsDialog, columns, float, 4) ATTRIB(XonoticHUDBuffsDialog, name, string, "HUDbuffs") - ATTRIB(XonoticHUDBuffsDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDBuffsDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDBuffsDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc index dce687a0d..bb7312f13 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDCenterprintDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDCenterprintDialog, rows, float, 15) ATTRIB(XonoticHUDCenterprintDialog, columns, float, 4) ATTRIB(XonoticHUDCenterprintDialog, name, string, "HUDcenterprint") - ATTRIB(XonoticHUDCenterprintDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDCenterprintDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDCenterprintDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc b/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc index eb6ced2c4..e16f76ac3 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDChatDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDChatDialog, rows, float, 15) ATTRIB(XonoticHUDChatDialog, columns, float, 4) ATTRIB(XonoticHUDChatDialog, name, string, "HUDchat") - ATTRIB(XonoticHUDChatDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDChatDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDChatDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc index bbc3f8cf3..534f1ebfe 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDEngineInfoDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDEngineInfoDialog, rows, float, 15) ATTRIB(XonoticHUDEngineInfoDialog, columns, float, 4) ATTRIB(XonoticHUDEngineInfoDialog, name, string, "HUDengineinfo") - ATTRIB(XonoticHUDEngineInfoDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDEngineInfoDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDEngineInfoDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc index 976139c8e..dc864203b 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDHealthArmorDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 15) ATTRIB(XonoticHUDHealthArmorDialog, columns, float, 4) ATTRIB(XonoticHUDHealthArmorDialog, name, string, "HUDhealtharmor") - ATTRIB(XonoticHUDHealthArmorDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDHealthArmorDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDHealthArmorDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc b/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc index 5bd8846c5..b70553120 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDInfoMessagesDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDInfoMessagesDialog, rows, float, 15) ATTRIB(XonoticHUDInfoMessagesDialog, columns, float, 4) ATTRIB(XonoticHUDInfoMessagesDialog, name, string, "HUDinfomessages") - ATTRIB(XonoticHUDInfoMessagesDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDInfoMessagesDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDInfoMessagesDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc b/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc index 4c9e64c2a..3133a7e83 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDModIconsDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDModIconsDialog, rows, float, 15) ATTRIB(XonoticHUDModIconsDialog, columns, float, 4) ATTRIB(XonoticHUDModIconsDialog, name, string, "HUDmodicons") - ATTRIB(XonoticHUDModIconsDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDModIconsDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDModIconsDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc index 1239bd316..722b5d539 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDNotificationDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDNotificationDialog, rows, float, 15) ATTRIB(XonoticHUDNotificationDialog, columns, float, 4) ATTRIB(XonoticHUDNotificationDialog, name, string, "HUDnotify") - ATTRIB(XonoticHUDNotificationDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDNotificationDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDNotificationDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc index 0144d6649..6e4917d93 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc @@ -8,7 +8,7 @@ CLASS(XonoticHUDPhysicsDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDPhysicsDialog, columns, float, 4) ATTRIB(XonoticHUDPhysicsDialog, name, string, "HUDphysics") ATTRIB(XonoticHUDPhysicsDialog, sliderTopspeedTime, entity, NULL) - ATTRIB(XonoticHUDPhysicsDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDPhysicsDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDPhysicsDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc index 17bfe04aa..3449e0604 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDPowerupsDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDPowerupsDialog, rows, float, 15) ATTRIB(XonoticHUDPowerupsDialog, columns, float, 4) ATTRIB(XonoticHUDPowerupsDialog, name, string, "HUDpowerups") - ATTRIB(XonoticHUDPowerupsDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDPowerupsDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDPowerupsDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc b/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc index 2e301cc37..79f581d13 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDPressedKeysDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15) ATTRIB(XonoticHUDPressedKeysDialog, columns, float, 4) ATTRIB(XonoticHUDPressedKeysDialog, name, string, "HUDpressedkeys") - ATTRIB(XonoticHUDPressedKeysDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDPressedKeysDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDPressedKeysDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc b/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc index 6b2badf1c..b8ecbee59 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDRaceTimerDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDRaceTimerDialog, rows, float, 15) ATTRIB(XonoticHUDRaceTimerDialog, columns, float, 4) ATTRIB(XonoticHUDRaceTimerDialog, name, string, "HUDracetimer") - ATTRIB(XonoticHUDRaceTimerDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDRaceTimerDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDRaceTimerDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc index 6ad57fa13..bdff50cb5 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDRadarDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDRadarDialog, rows, float, 15) ATTRIB(XonoticHUDRadarDialog, columns, float, 4) ATTRIB(XonoticHUDRadarDialog, name, string, "HUDradar") - ATTRIB(XonoticHUDRadarDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDRadarDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDRadarDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_score.qc b/qcsrc/menu/xonotic/dialog_hudpanel_score.qc index 676830f80..edd4da66e 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_score.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_score.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDScoreDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDScoreDialog, rows, float, 15) ATTRIB(XonoticHUDScoreDialog, columns, float, 4) ATTRIB(XonoticHUDScoreDialog, name, string, "HUDscore") - ATTRIB(XonoticHUDScoreDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDScoreDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDScoreDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc index 2624a7ecd..754a5f100 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDTimerDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDTimerDialog, rows, float, 15) ATTRIB(XonoticHUDTimerDialog, columns, float, 4) ATTRIB(XonoticHUDTimerDialog, name, string, "HUDtimer") - ATTRIB(XonoticHUDTimerDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDTimerDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDTimerDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc b/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc index 4e4931e15..e2b398ef2 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDVoteDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDVoteDialog, rows, float, 15) ATTRIB(XonoticHUDVoteDialog, columns, float, 4) ATTRIB(XonoticHUDVoteDialog, name, string, "HUDvote") - ATTRIB(XonoticHUDVoteDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDVoteDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDVoteDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc index 64c9cf43a..ce1479cb1 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDWeaponsDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDWeaponsDialog, rows, float, 19) ATTRIB(XonoticHUDWeaponsDialog, columns, float, 4) ATTRIB(XonoticHUDWeaponsDialog, name, string, "HUDweapons") - ATTRIB(XonoticHUDWeaponsDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDWeaponsDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDWeaponsDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc b/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc index 09e6c5339..7cf0ea6da 100644 --- a/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc +++ b/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc @@ -7,7 +7,7 @@ CLASS(XonoticHUDExitDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticHUDExitDialog, rows, float, 18) ATTRIB(XonoticHUDExitDialog, columns, float, 4) ATTRIB(XonoticHUDExitDialog, name, string, "HUDExit") - ATTRIB(XonoticHUDExitDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticHUDExitDialog, requiresConnection, float, true) ENDCLASS(XonoticHUDExitDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc index bbffb5276..a9e57b537 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc @@ -26,7 +26,7 @@ void GameType_ConfigureSliders(entity e, entity l, string pLabel, float pMin, fl { e.configureXonoticTextSlider(e, string_null); l.setText(l, pLabel); - e.disabled = l.disabled = TRUE; + e.disabled = l.disabled = true; } else { @@ -49,7 +49,7 @@ void GameType_ConfigureSliders(entity e, entity l, string pLabel, float pMin, fl // set text field l.setText(l, pLabel); - e.disabled = l.disabled = FALSE; + e.disabled = l.disabled = false; } } diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc index a4e052f45..6bca47f05 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc @@ -232,7 +232,7 @@ void XonoticMutatorsDialog_fill(entity me) me.TD(me, 1, 2, e = makeXonoticRadioButton(1, string_null, string_null, _("Regular (no arena)"))); me.TR(me); me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_weaponarena", "menu_weaponarena", _("Weapon arenas:"))); - e.getCvarValueFromCvar = TRUE; + e.getCvarValueFromCvar = true; e.cvarOffValue = "0"; for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i) { diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc index 146f496be..bcf168a93 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc @@ -54,15 +54,15 @@ void nextScreenshot_Click(entity btn, entity me) } void increaseZoom_Click(entity btn, entity me) { - me.screenshotImage.setZoom(me.screenshotImage, -2, FALSE); + me.screenshotImage.setZoom(me.screenshotImage, -2, false); } void decreaseZoom_Click(entity btn, entity me) { - me.screenshotImage.setZoom(me.screenshotImage, -1/2, FALSE); + me.screenshotImage.setZoom(me.screenshotImage, -1/2, false); } void resetZoom_Click(entity btn, entity me) { - me.screenshotImage.setZoom(me.screenshotImage, 0, FALSE); + me.screenshotImage.setZoom(me.screenshotImage, 0, false); } void toggleSlideShow_Click(entity btn, entity me) { diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc index a316be73b..73b5e3344 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc @@ -44,7 +44,7 @@ void XonoticProfileTab_fill(entity me) label.allowCut = 1; label.allowColors = 1; label.alpha = 1; - label.isBold = TRUE; + label.isBold = true; label.fontSize = SKINFONTSIZE_TITLE; me.gotoRC(me, 2.5, 0); diff --git a/qcsrc/menu/xonotic/dialog_sandboxtools.qc b/qcsrc/menu/xonotic/dialog_sandboxtools.qc index 033336dc9..fa7f40aea 100644 --- a/qcsrc/menu/xonotic/dialog_sandboxtools.qc +++ b/qcsrc/menu/xonotic/dialog_sandboxtools.qc @@ -7,7 +7,7 @@ CLASS(XonoticSandboxToolsDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticSandboxToolsDialog, rows, float, 16) ATTRIB(XonoticSandboxToolsDialog, columns, float, 4) ATTRIB(XonoticSandboxToolsDialog, name, string, "SandboxTools") - ATTRIB(XonoticSandboxToolsDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticSandboxToolsDialog, requiresConnection, float, true) ENDCLASS(XonoticSandboxToolsDialog) #endif diff --git a/qcsrc/menu/xonotic/dialog_settings_audio.qc b/qcsrc/menu/xonotic/dialog_settings_audio.qc index 39bee3242..81624fdef 100644 --- a/qcsrc/menu/xonotic/dialog_settings_audio.qc +++ b/qcsrc/menu/xonotic/dialog_settings_audio.qc @@ -132,7 +132,7 @@ void XonoticAudioSettingsTab_fill(entity me) me.TR(me); me.TR(me); me.TD(me, 1, 3, makeXonoticCheckBox(0, "cl_hitsound", _("Hit indication sound"))); - e.sendCvars = TRUE; + e.sendCvars = true; me.TR(me); me.TD(me, 1, 3, makeXonoticCheckBox(0, "con_chatsound", _("Chat message sound"))); me.TR(me); @@ -154,7 +154,7 @@ void XonoticAudioSettingsTab_fill(entity me) e.addValue(e, _("Often"), "0.65"); e.addValue(e, _("Always"), "1"); e.configureXonoticTextSliderValues(e); - e.sendCvars = TRUE; + e.sendCvars = true; me.TR(me); me.TR(me); if(cvar("developer")) diff --git a/qcsrc/menu/xonotic/dialog_settings_effects.qc b/qcsrc/menu/xonotic/dialog_settings_effects.qc index 59b4860af..7ec7ba027 100644 --- a/qcsrc/menu/xonotic/dialog_settings_effects.qc +++ b/qcsrc/menu/xonotic/dialog_settings_effects.qc @@ -23,11 +23,11 @@ float someShadowCvarIsEnabled(entity box) { if(cvar("r_shadow_realtime_dlight")) if(cvar("r_shadow_realtime_dlight_shadows")) - return TRUE; + return true; if(cvar("r_shadow_realtime_world")) if(cvar("r_shadow_realtime_world_shadows")) - return TRUE; - return FALSE; + return true; + return false; } void XonoticEffectsSettingsTab_fill(entity me) diff --git a/qcsrc/menu/xonotic/dialog_settings_game_messages.qc b/qcsrc/menu/xonotic/dialog_settings_game_messages.qc index 6f605ccbc..4f1ac65c5 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_messages.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_messages.qc @@ -66,7 +66,7 @@ void XonoticGameMessageSettingsTab_fill(entity me) me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_FRAG", _("Add extra frag information to centerprint when available"))); makeMulti(e, "notification_CHOICE_FRAGGED notification_CHOICE_TYPEFRAG notification_CHOICE_TYPEFRAGGED"); - e.sendCvars = TRUE; + e.sendCvars = true; me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_location", _("Add frag location to death messages when available"))); @@ -75,11 +75,11 @@ void XonoticGameMessageSettingsTab_fill(entity me) me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_CTF_CAPTURE_TIME_RED", _("Display capture times in Capture The Flag"))); makeMulti(e, "notification_CHOICE_CTF_CAPTURE_TIME_BLUE notification_CHOICE_CTF_CAPTURE_BROKEN_RED notification_CHOICE_CTF_CAPTURE_BROKEN_BLUE notification_CHOICE_CTF_CAPTURE_UNBROKEN_RED notification_CHOICE_CTF_CAPTURE_UNBROKEN_BLUE "); - e.sendCvars = TRUE; + e.sendCvars = true; me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_CTF_PICKUP_ENEMY", _("Display name of flag stealer in Capture The Flag"))); makeMulti(e, "notification_CHOICE_CTF_PICKUP_TEAM"); - e.sendCvars = TRUE; + e.sendCvars = true; me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other"))); diff --git a/qcsrc/menu/xonotic/dialog_settings_input.qc b/qcsrc/menu/xonotic/dialog_settings_input.qc index 57b6cef63..0c454d3bc 100644 --- a/qcsrc/menu/xonotic/dialog_settings_input.qc +++ b/qcsrc/menu/xonotic/dialog_settings_input.qc @@ -87,7 +87,7 @@ void XonoticInputSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_movement_track_canjump", _("Automatically repeat jumping if holding jump"))); - e.sendCvars = TRUE; + e.sendCvars = true; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Jetpack on jump:"))); me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_jetpack_jump")); @@ -95,7 +95,7 @@ void XonoticInputSettingsTab_fill(entity me) e.addValue(e, _("Air only"), "1"); e.addValue(e, _("All"), "2"); e.configureXonoticTextSliderValues(e); - e.sendCvars = TRUE; + e.sendCvars = true; me.TR(me); if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE) { diff --git a/qcsrc/menu/xonotic/dialog_teamselect.qc b/qcsrc/menu/xonotic/dialog_teamselect.qc index 10efc3c25..1ab68c3fb 100644 --- a/qcsrc/menu/xonotic/dialog_teamselect.qc +++ b/qcsrc/menu/xonotic/dialog_teamselect.qc @@ -12,7 +12,7 @@ CLASS(XonoticTeamSelectDialog) EXTENDS(XonoticRootDialog) ATTRIB(XonoticTeamSelectDialog, team2, entity, NULL) ATTRIB(XonoticTeamSelectDialog, team3, entity, NULL) ATTRIB(XonoticTeamSelectDialog, team4, entity, NULL) - ATTRIB(XonoticTeamSelectDialog, requiresConnection, float, TRUE) + ATTRIB(XonoticTeamSelectDialog, requiresConnection, float, true) ENDCLASS(XonoticTeamSelectDialog) #endif diff --git a/qcsrc/menu/xonotic/gametypelist.qc b/qcsrc/menu/xonotic/gametypelist.qc index 6471a1a74..a3b79631e 100644 --- a/qcsrc/menu/xonotic/gametypelist.qc +++ b/qcsrc/menu/xonotic/gametypelist.qc @@ -90,7 +90,7 @@ void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, flo s2 = _("free for all"); vector save_fontscale = draw_fontscale; - float f = draw_CondensedFontFactor(strcat(s1, " ", s2), FALSE, me.realFontSize, 1); + float f = draw_CondensedFontFactor(strcat(s1, " ", s2), false, me.realFontSize, 1); draw_fontscale.x *= f; vector fs = me.realFontSize; fs.x *= f; diff --git a/qcsrc/menu/xonotic/languagelist.qc b/qcsrc/menu/xonotic/languagelist.qc index 5345e6313..2d43a47e3 100644 --- a/qcsrc/menu/xonotic/languagelist.qc +++ b/qcsrc/menu/xonotic/languagelist.qc @@ -64,7 +64,7 @@ void XonoticLanguageList_drawListBoxItem(entity me, float i, vector absSize, flo s = me.languageParameter(me, i, LANGPARM_NAME_LOCALIZED); vector save_fontscale = draw_fontscale; - float f = draw_CondensedFontFactor(s, FALSE, me.realFontSize, 1); + float f = draw_CondensedFontFactor(s, false, me.realFontSize, 1); draw_fontscale.x *= f; vector fs = me.realFontSize; fs.x *= f; @@ -75,7 +75,7 @@ void XonoticLanguageList_drawListBoxItem(entity me, float i, vector absSize, flo if(p != "") { vector save_fontscale = draw_fontscale; - float f = draw_CondensedFontFactor(p, FALSE, me.realFontSize, 1); + float f = draw_CondensedFontFactor(p, false, me.realFontSize, 1); draw_fontscale.x *= f; vector fs = me.realFontSize; fs.x *= f; diff --git a/qcsrc/menu/xonotic/playermodel.qc b/qcsrc/menu/xonotic/playermodel.qc index 72edf6a45..f498f8d21 100644 --- a/qcsrc/menu/xonotic/playermodel.qc +++ b/qcsrc/menu/xonotic/playermodel.qc @@ -50,7 +50,7 @@ void XonoticPlayerModelSelector_configureXonoticPlayerModelSelector(entity me) float sortbuf, glob, i; string fn; - glob = search_begin(language_filename(get_model_datafilename(string_null, -1, "txt")), TRUE, TRUE); + glob = search_begin(language_filename(get_model_datafilename(string_null, -1, "txt")), true, true); if (glob < 0) return; @@ -184,7 +184,7 @@ void XonoticPlayerModelSelector_draw(entity me) if (me.numModels <= 0) { - draw_CenterText('0.5 0.5 0', _(""), me.realFontSize, SKINCOLOR_TEXT, 0.6, FALSE); + draw_CenterText('0.5 0.5 0', _(""), me.realFontSize, SKINCOLOR_TEXT, 0.6, false); return; } @@ -194,9 +194,9 @@ void XonoticPlayerModelSelector_draw(entity me) draw_beginBoldFont(); #if XONVOTE186 // (nyov) lower name display looks better when there is no description text - draw_CenterText('0.5 0.8 0', me.currentModelTitle, me.realFontSize * (me.titleFontSize / me.fontSize), SKINCOLOR_MODELTITLE, SKINALPHA_MODELTITLE, FALSE); + draw_CenterText('0.5 0.8 0', me.currentModelTitle, me.realFontSize * (me.titleFontSize / me.fontSize), SKINCOLOR_MODELTITLE, SKINALPHA_MODELTITLE, false); #else - draw_CenterText('0.5 0 0', me.currentModelTitle, me.realFontSize * (me.titleFontSize / me.fontSize), SKINCOLOR_MODELTITLE, SKINALPHA_MODELTITLE, FALSE); + draw_CenterText('0.5 0 0', me.currentModelTitle, me.realFontSize * (me.titleFontSize / me.fontSize), SKINCOLOR_MODELTITLE, SKINALPHA_MODELTITLE, false); #endif draw_endBoldFont(); @@ -204,7 +204,7 @@ void XonoticPlayerModelSelector_draw(entity me) o = '0.5 1 0' - eY * me.realFontSize.y * ((n = tokenizebyseparator(me.currentModelDescription, "\n")) + 0.5); for(i = 0; i < n; ++i) { - draw_CenterText(o, argv(i), me.realFontSize, SKINCOLOR_TEXT, 1, FALSE); + draw_CenterText(o, argv(i), me.realFontSize, SKINCOLOR_TEXT, 1, false); o += eY * me.realFontSize.y; } } diff --git a/qcsrc/menu/xonotic/playlist.qc b/qcsrc/menu/xonotic/playlist.qc index 18b4fc3fa..fbe3c92c6 100644 --- a/qcsrc/menu/xonotic/playlist.qc +++ b/qcsrc/menu/xonotic/playlist.qc @@ -88,7 +88,7 @@ void XonoticPlayList_addToPlayList(entity me, string track) void XonoticPlayList_removeSelectedFromPlayList(entity me) { - float i, cpt = FALSE; + float i, cpt = false; string s = ""; me.nItems = tokenize_console(cvar_string("music_playlist_list0")); if(me.nItems == 0) @@ -102,7 +102,7 @@ void XonoticPlayList_removeSelectedFromPlayList(entity me) if(cvar("music_playlist_index") == 0 || cvar("music_playlist_index") == 999) { if(cvar("music_playlist_current0") == i) - cpt = TRUE; // current playing track (we can't start next track here because startSound calls tokenize_console) + cpt = true; // current playing track (we can't start next track here because startSound calls tokenize_console) else if(cvar("music_playlist_current0") > i) cvar_set("music_playlist_current0", ftos(cvar("music_playlist_current0") - 1)); } diff --git a/qcsrc/menu/xonotic/screenshotimage.qc b/qcsrc/menu/xonotic/screenshotimage.qc index 9b69e46c3..a800a8494 100644 --- a/qcsrc/menu/xonotic/screenshotimage.qc +++ b/qcsrc/menu/xonotic/screenshotimage.qc @@ -29,8 +29,8 @@ entity makeXonoticScreenshotImage() void XonoticScreenshotImage_configureXonoticScreenshotImage(entity me) { me.configureXonoticImage(me, string_null, -2); - me.zoomLimitedByTheBox = FALSE; // enable this to forbid enlarging the image more than the containing box (if making use of draw_SetClip is a too bad thing) - me.zoomSnapToTheBox = FALSE; // disabled: it's cooler + me.zoomLimitedByTheBox = false; // enable this to forbid enlarging the image more than the containing box (if making use of draw_SetClip is a too bad thing) + me.zoomSnapToTheBox = false; // disabled: it's cooler } void XonoticScreenshotImage_load(entity me, string theImage) @@ -69,7 +69,7 @@ void XonoticScreenshotImage_draw(entity me) if (me.showTitle && time < me.screenshotTime + 4) // 3 seconds at full alpha, 1 second fading out { theAlpha = (4 - (time - me.screenshotTime)); - draw_CenterText('0.5 0 0', me.screenshotTitle, me.realFontSize, '1 1 1', theAlpha, FALSE); + draw_CenterText('0.5 0 0', me.screenshotTitle, me.realFontSize, '1 1 1', theAlpha, false); } if (time < me.zoomTime + 2) // 1 seconds at full alpha, 1 second fading out { @@ -81,7 +81,7 @@ void XonoticScreenshotImage_draw(entity me) else zoomString = sprintf("%.2f%%", z); theAlpha = (2 - (time - me.zoomTime)); - draw_Text('0.05 0.95 0', zoomString, me.realFontSize, '1 1 1', theAlpha, FALSE); + draw_Text('0.05 0.95 0', zoomString, me.realFontSize, '1 1 1', theAlpha, false); } } } diff --git a/qcsrc/menu/xonotic/screenshotlist.qc b/qcsrc/menu/xonotic/screenshotlist.qc index 5801d3be7..225eefb24 100644 --- a/qcsrc/menu/xonotic/screenshotlist.qc +++ b/qcsrc/menu/xonotic/screenshotlist.qc @@ -71,7 +71,7 @@ string XonoticScreenshotList_screenshotName(entity me, float i) return s; } -// if subdir is TRUE look in subdirectories too (1 level) +// if subdir is true look in subdirectories too (1 level) void getScreenshots_for_ext(entity me, string ext, float subdir) { string s; @@ -85,7 +85,7 @@ void getScreenshots_for_ext(entity me, string ext, float subdir) s=strcat(s, "*", ext); float list, i, n; - list = search_begin(s, FALSE, TRUE); + list = search_begin(s, false, true); if(list >= 0) { n = search_getsize(list); @@ -98,15 +98,15 @@ void getScreenshots_for_ext(entity me, string ext, float subdir) { s = strreplace("/", "^7/", s); // clear colors at the forward slash s = strcat("/", rgb_to_hexcolor(SKINCOLOR_SCREENSHOTLIST_SUBDIR), s); // add a forward slash for sorting, then color - bufstr_add(me.listScreenshot, s, TRUE); + bufstr_add(me.listScreenshot, s, true); } - else { bufstr_add(me.listScreenshot, s, TRUE); } + else { bufstr_add(me.listScreenshot, s, true); } } search_end(list); } if (subdir) - getScreenshots_for_ext(me, ext, FALSE); + getScreenshots_for_ext(me, ext, false); } void XonoticScreenshotList_getScreenshots(entity me) @@ -119,12 +119,12 @@ void XonoticScreenshotList_getScreenshots(entity me) me.nItems = 0; return; } - getScreenshots_for_ext(me, ".jpg", TRUE); - getScreenshots_for_ext(me, ".tga", TRUE); - getScreenshots_for_ext(me, ".png", TRUE); + getScreenshots_for_ext(me, ".jpg", true); + getScreenshots_for_ext(me, ".tga", true); + getScreenshots_for_ext(me, ".png", true); me.nItems = buf_getsize(me.listScreenshot); if(me.nItems > 0) - buf_sort(me.listScreenshot, 128, FALSE); + buf_sort(me.listScreenshot, 128, false); } void XonoticScreenshotList_destroy(entity me) diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 3af6ff6d4..301e27cff 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -237,10 +237,10 @@ float IsServerInList(string list, string srv) string p; float i, n; if(srv == "") - return FALSE; + return false; srv = netaddress_resolve(srv, 26000); if(srv == "") - return FALSE; + return false; p = crypto_getidfp(srv); n = tokenize_console(list); for(i = 0; i < n; ++i) @@ -249,15 +249,15 @@ float IsServerInList(string list, string srv) { if(p) if(argv(i) == p) - return TRUE; + return true; } else { if(srv == netaddress_resolve(argv(i), 26000)) - return TRUE; + return true; } } - return FALSE; + return false; } float CheckCategoryOverride(float cat) diff --git a/qcsrc/menu/xonotic/skinlist.qc b/qcsrc/menu/xonotic/skinlist.qc index 8a75ee206..c0c05a805 100644 --- a/qcsrc/menu/xonotic/skinlist.qc +++ b/qcsrc/menu/xonotic/skinlist.qc @@ -86,7 +86,7 @@ void XonoticSkinList_getSkins(entity me) string s; buf = buf_create(); - glob = search_begin("gfx/menu/*/skinvalues.txt", TRUE, TRUE); + glob = search_begin("gfx/menu/*/skinvalues.txt", true, true); if(glob < 0) { me.skinlist = buf; diff --git a/qcsrc/menu/xonotic/slider_resolution.qc b/qcsrc/menu/xonotic/slider_resolution.qc index 926de7956..476c441ed 100644 --- a/qcsrc/menu/xonotic/slider_resolution.qc +++ b/qcsrc/menu/xonotic/slider_resolution.qc @@ -68,7 +68,7 @@ float updateConwidths(float width, float height, float pixelheight) c_y = rint(c.y); // Please reload resolutions list and such stuff. - XonoticResolutionSlider_DataHasChanged = TRUE; + XonoticResolutionSlider_DataHasChanged = true; if (c.x != cvar("vid_conwidth") || c.y != cvar("vid_conheight")) { @@ -208,11 +208,11 @@ void XonoticResolutionSlider_draw(entity me) if (cvar("vid_fullscreen") != me.vid_fullscreen) { me.loadResolutions(me, cvar("vid_fullscreen")); - XonoticResolutionSlider_DataHasChanged = TRUE; + XonoticResolutionSlider_DataHasChanged = true; } if (XonoticResolutionSlider_DataHasChanged) { - XonoticResolutionSlider_DataHasChanged = FALSE; + XonoticResolutionSlider_DataHasChanged = false; me.loadCvars(me); } SUPER(XonoticResolutionSlider).draw(me); diff --git a/qcsrc/menu/xonotic/soundlist.qc b/qcsrc/menu/xonotic/soundlist.qc index 21fd2e663..e443a53ef 100644 --- a/qcsrc/menu/xonotic/soundlist.qc +++ b/qcsrc/menu/xonotic/soundlist.qc @@ -71,7 +71,7 @@ void XonoticSoundList_getSounds(entity me) if(me.listSound >= 0) search_end(me.listSound); - me.listSound = search_begin(s, FALSE, TRUE); + me.listSound = search_begin(s, false, true); if(me.listSound < 0) me.nItems=0; diff --git a/qcsrc/menu/xonotic/statslist.qc b/qcsrc/menu/xonotic/statslist.qc index d905ac3c7..39653df23 100644 --- a/qcsrc/menu/xonotic/statslist.qc +++ b/qcsrc/menu/xonotic/statslist.qc @@ -168,13 +168,13 @@ void XonoticStatsList_getStats(entity me) if((order == -1) && (out_total_matches >= 0) && (out_total_wins >= 0)) { - bufstr_add(me.listStats, sprintf("003Matches: %d", out_total_matches), TRUE); + bufstr_add(me.listStats, sprintf("003Matches: %d", out_total_matches), true); if(out_total_matches > 0) // don't show extra info if there are no matches played { out_total_losses = max(0, (out_total_matches - out_total_wins)); - bufstr_add(me.listStats, sprintf("003Wins/Losses: %d/%d", out_total_wins, out_total_losses), TRUE); - bufstr_add(me.listStats, sprintf("004Win_Percentage: %d%%", ((out_total_wins / out_total_matches) * 100)), TRUE); + bufstr_add(me.listStats, sprintf("003Wins/Losses: %d/%d", out_total_wins, out_total_losses), true); + bufstr_add(me.listStats, sprintf("004Win_Percentage: %d%%", ((out_total_wins / out_total_matches) * 100)), true); } out_total_matches = -1; @@ -185,13 +185,13 @@ void XonoticStatsList_getStats(entity me) if((order == -1) && (out_total_kills >= 0) && (out_total_deaths >= 0)) { - bufstr_add(me.listStats, sprintf("005Kills/Deaths: %d/%d", out_total_kills, out_total_deaths), TRUE); + bufstr_add(me.listStats, sprintf("005Kills/Deaths: %d/%d", out_total_kills, out_total_deaths), true); // if there are no deaths, just show kill count if(out_total_deaths > 0) - bufstr_add(me.listStats, sprintf("006Kill_Ratio: %.2f", (out_total_kills / out_total_deaths)), TRUE); + bufstr_add(me.listStats, sprintf("006Kill_Ratio: %.2f", (out_total_kills / out_total_deaths)), true); else - bufstr_add(me.listStats, sprintf("006Kill_Ratio: %.2f", out_total_kills), TRUE); + bufstr_add(me.listStats, sprintf("006Kill_Ratio: %.2f", out_total_kills), true); out_total_kills = -1; out_total_deaths = -1; @@ -273,12 +273,12 @@ void XonoticStatsList_getStats(entity me) else { continue; } } - bufstr_add(me.listStats, sprintf("%s%s %s", orderstr, outstr, data), TRUE); + bufstr_add(me.listStats, sprintf("%s%s %s", orderstr, outstr, data), true); } me.nItems = buf_getsize(me.listStats); if(me.nItems > 0) - buf_sort(me.listStats, 128, FALSE); + buf_sort(me.listStats, 128, false); } void XonoticStatsList_destroy(entity me) diff --git a/qcsrc/menu/xonotic/textlabel.qc b/qcsrc/menu/xonotic/textlabel.qc index c0e0806d8..cb54da19e 100644 --- a/qcsrc/menu/xonotic/textlabel.qc +++ b/qcsrc/menu/xonotic/textlabel.qc @@ -23,7 +23,7 @@ entity makeXonoticHeaderLabel(string theText) me = makeXonoticTextLabel(0.5, theText); me.colorL = SKINCOLOR_HEADER; me.alpha = SKINALPHA_HEADER; - me.isBold = TRUE; + me.isBold = true; return me; } void XonoticTextLabel_configureXonoticTextLabel(entity me, float theAlign, string theText) diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index e5919fb7a..ba5da4fca 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -403,7 +403,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data) { if(un_compatexpire != "") { - string curdate = strftime(FALSE, "%Y%m%d%H%M%S"); + string curdate = strftime(false, "%Y%m%d%H%M%S"); if (strcmp(curdate, un_compatexpire) >= 0) DisableServerBackwardsCompatibility(); } @@ -455,12 +455,12 @@ void updateCheck() float n, i; float allgood; n = tokenize_console(_Nex_ExtResponseSystem_Packs); - allgood = TRUE; + allgood = true; for(i = 0; i+1 < n; i += 2) { if(fexists(argv(i+1))) continue; - allgood = FALSE; + allgood = false; if(_Nex_ExtResponseSystem_PacksStep == 1) // first run localcmd("\ncurl --pak \"", argv(i), "\"\n"); } @@ -508,9 +508,9 @@ float preMenuInit() boxB_x = boxA_x * (1 - MapInfo_progress) + boxB_x * MapInfo_progress; draw_Fill(boxA, boxB - boxA, '0 0 1', 1); - return FALSE; + return false; } - return TRUE; + return true; } string campaign_name_previous; diff --git a/qcsrc/menu/xonotic/weaponarenacheckbox.qc b/qcsrc/menu/xonotic/weaponarenacheckbox.qc index 163f9c63b..a7d71f0d2 100644 --- a/qcsrc/menu/xonotic/weaponarenacheckbox.qc +++ b/qcsrc/menu/xonotic/weaponarenacheckbox.qc @@ -23,7 +23,7 @@ entity makeXonoticWeaponarenaCheckBox(string theWeapon, string theText) void XonoticWeaponarenaCheckBox_configureXonoticWeaponarenaCheckBox(entity me, string theWeapon, string theText) { me.netname = theWeapon; - me.checked = FALSE; + me.checked = false; me.loadCvars(me); me.configureCheckBox(me, theText, me.fontSize, me.image); } @@ -40,7 +40,7 @@ void XonoticWeaponarenaCheckBox_loadCvars(entity me) { if(argv(i) == me.netname) { - me.checked = TRUE; + me.checked = true; break; } } diff --git a/qcsrc/menu/xonotic/weaponslist.qc b/qcsrc/menu/xonotic/weaponslist.qc index 0a6f38f18..1d3b897fc 100644 --- a/qcsrc/menu/xonotic/weaponslist.qc +++ b/qcsrc/menu/xonotic/weaponslist.qc @@ -102,7 +102,7 @@ void XonoticWeaponsList_drawListBoxItem(entity me, float i, vector absSize, floa msg = sprintf(_("%s (mutator weapon)"), msg); vector save_fontscale = draw_fontscale; - float f = draw_CondensedFontFactor(msg, FALSE, me.realFontSize, 1); + float f = draw_CondensedFontFactor(msg, false, me.realFontSize, 1); draw_fontscale.x *= f; vector fs = me.realFontSize; fs.x *= f; diff --git a/qcsrc/server/antilag.qc b/qcsrc/server/antilag.qc index f95afc7a3..5dfce7513 100644 --- a/qcsrc/server/antilag.qc +++ b/qcsrc/server/antilag.qc @@ -100,7 +100,7 @@ void antilag_takeback(entity e, float t) e.antilag_saved_origin = e.origin; setorigin(e, antilag_takebackorigin(e, t)); - e.antilag_takenback = TRUE; + e.antilag_takenback = true; } void antilag_restore(entity e) @@ -115,7 +115,7 @@ void antilag_restore(entity e) return; setorigin(e, e.antilag_saved_origin); - e.antilag_takenback = FALSE; + e.antilag_takenback = false; } void antilag_clear(entity e) diff --git a/qcsrc/server/bot/aim.qc b/qcsrc/server/bot/aim.qc index f4974157c..3bf81587c 100644 --- a/qcsrc/server/bot/aim.qc +++ b/qcsrc/server/bot/aim.qc @@ -2,16 +2,16 @@ entity ka_ball; // traces multiple trajectories to find one that will impact the target // 'end' vector is the place it aims for, -// returns TRUE only if it hit targ (don't target non-solid entities) +// returns true only if it hit targ (don't target non-solid entities) float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, float shotspeed, float shotspeedupward, float maxtime, float shotdelay, entity ignore) { float c, savesolid, shottime; vector dir, end, v, o; if (shotspeed < 1) - return FALSE; // could cause division by zero if calculated + return false; // could cause division by zero if calculated if (targ.solid < SOLID_BBOX) // SOLID_NOT and SOLID_TRIGGER - return FALSE; // could never hit it + return false; // could never hit it if (!tracetossent) tracetossent = spawn(); tracetossent.owner = ignore; @@ -21,14 +21,14 @@ float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, f o = (targ.absmin + targ.absmax) * 0.5; shottime = ((vlen(o - org) / shotspeed) + shotdelay); v = targ.velocity * shottime + o; - tracebox(o, targ.mins, targ.maxs, v, FALSE, targ); + tracebox(o, targ.mins, targ.maxs, v, false, targ); v = trace_endpos; end = v + (targ.mins + targ.maxs) * 0.5; if ((vlen(end - org) / shotspeed + 0.2) > maxtime) { // out of range targ.solid = savesolid; - return FALSE; + return false; } if (!tracetossfaketarget) @@ -60,7 +60,7 @@ float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, f // relink to remove it from physics considerations setorigin(tracetossfaketarget, v); - return TRUE; + return true; } dir_z = dir.z + 0.1; // aim up a little more c = c + 1; @@ -77,7 +77,7 @@ float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, f // leave a valid one even if it won't reach findtrajectory_velocity = normalize(end - org) * shotspeed + shotspeedupward * '0 0 1'; - return FALSE; + return false; } void lag_update() @@ -91,13 +91,13 @@ void lag_update() float lag_additem(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4) { - if (self.lag1_time == 0) {self.lag1_time = t;self.lag1_float1 = f1;self.lag1_float2 = f2;self.lag1_entity1 = e1;self.lag1_vec1 = v1;self.lag1_vec2 = v2;self.lag1_vec3 = v3;self.lag1_vec4 = v4;return TRUE;} - if (self.lag2_time == 0) {self.lag2_time = t;self.lag2_float1 = f1;self.lag2_float2 = f2;self.lag2_entity1 = e1;self.lag2_vec1 = v1;self.lag2_vec2 = v2;self.lag2_vec3 = v3;self.lag2_vec4 = v4;return TRUE;} - if (self.lag3_time == 0) {self.lag3_time = t;self.lag3_float1 = f1;self.lag3_float2 = f2;self.lag3_entity1 = e1;self.lag3_vec1 = v1;self.lag3_vec2 = v2;self.lag3_vec3 = v3;self.lag3_vec4 = v4;return TRUE;} - if (self.lag4_time == 0) {self.lag4_time = t;self.lag4_float1 = f1;self.lag4_float2 = f2;self.lag4_entity1 = e1;self.lag4_vec1 = v1;self.lag4_vec2 = v2;self.lag4_vec3 = v3;self.lag4_vec4 = v4;return TRUE;} - if (self.lag5_time == 0) {self.lag5_time = t;self.lag5_float1 = f1;self.lag5_float2 = f2;self.lag5_entity1 = e1;self.lag5_vec1 = v1;self.lag5_vec2 = v2;self.lag5_vec3 = v3;self.lag5_vec4 = v4;return TRUE;} + if (self.lag1_time == 0) {self.lag1_time = t;self.lag1_float1 = f1;self.lag1_float2 = f2;self.lag1_entity1 = e1;self.lag1_vec1 = v1;self.lag1_vec2 = v2;self.lag1_vec3 = v3;self.lag1_vec4 = v4;return true;} + if (self.lag2_time == 0) {self.lag2_time = t;self.lag2_float1 = f1;self.lag2_float2 = f2;self.lag2_entity1 = e1;self.lag2_vec1 = v1;self.lag2_vec2 = v2;self.lag2_vec3 = v3;self.lag2_vec4 = v4;return true;} + if (self.lag3_time == 0) {self.lag3_time = t;self.lag3_float1 = f1;self.lag3_float2 = f2;self.lag3_entity1 = e1;self.lag3_vec1 = v1;self.lag3_vec2 = v2;self.lag3_vec3 = v3;self.lag3_vec4 = v4;return true;} + if (self.lag4_time == 0) {self.lag4_time = t;self.lag4_float1 = f1;self.lag4_float2 = f2;self.lag4_entity1 = e1;self.lag4_vec1 = v1;self.lag4_vec2 = v2;self.lag4_vec3 = v3;self.lag4_vec4 = v4;return true;} + if (self.lag5_time == 0) {self.lag5_time = t;self.lag5_float1 = f1;self.lag5_float2 = f2;self.lag5_entity1 = e1;self.lag5_vec1 = v1;self.lag5_vec2 = v2;self.lag5_vec3 = v3;self.lag5_vec4 = v4;return true;} // no room for it (what is the best thing to do here??) - return FALSE; + return false; } float bot_shouldattack(entity e) @@ -105,44 +105,44 @@ float bot_shouldattack(entity e) if (e.team == self.team) { if (e == self) - return FALSE; + return false; if (teamplay) if (e.team != 0) - return FALSE; + return false; } if(e.frozen) - return FALSE; + return false; // If neither player has ball then don't attack unless the ball is on the // ground. if (g_keepaway) if (!e.ballcarried && !self.ballcarried && ka_ball.owner) - return FALSE; + return false; if(teamplay) { if(e.team==0) - return FALSE; + return false; } else if(bot_ignore_bots) if(IS_BOT_CLIENT(e)) - return FALSE; + return false; if (!e.takedamage) - return FALSE; + return false; if (e.deadflag) - return FALSE; + return false; if (e.BUTTON_CHAT) - return FALSE; + return false; if(e.flags & FL_NOTARGET) - return FALSE; + return false; checkentity = e; if(MUTATOR_CALLHOOK(BotShouldAttack)) - return FALSE; + return false; - return TRUE; + return true; } void bot_lagfunc(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4) @@ -306,7 +306,7 @@ float bot_aimdir(vector v, float maxfiredeviation) if ((normalize(v) * shotdir) >= cos(maxfiredeviation * (3.14159265358979323846 / 180))) if (vlen(trace_endpos-shotorg) < 500+500*bound(0, skill+self.bot_aggresskill, 10) || random()*random()>bound(0,(skill+self.bot_aggresskill)*0.05,1)) self.bot_firetimer = time + bound(0.1, 0.5-(skill+self.bot_aggresskill)*0.05, 0.5); - //traceline(shotorg,shotorg+shotdir*1000,FALSE,world); + //traceline(shotorg,shotorg+shotdir*1000,false,world); //dprint(ftos(maxfiredeviation),"\n"); //dprint(" diff:", vtos(diffang), "\n"); @@ -360,7 +360,7 @@ float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float a if (!findtrajectorywithleading(shotorg, '0 0 0', '0 0 0', self.bot_aimtarg, shotspeed, shotspeedupward, maxshottime, 0, self)) { self.dphitcontentsmask = hf; - return FALSE; + return false; } f = bot_aimdir(findtrajectory_velocity - shotspeedupward * '0 0 1', r); @@ -369,23 +369,23 @@ float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float a { f = bot_aimdir(v - shotorg, r); //dprint("AIM: ");dprint(vtos(self.bot_aimtargorigin));dprint(" + ");dprint(vtos(self.bot_aimtargvelocity));dprint(" * ");dprint(ftos(self.bot_aimlatency + vlen(self.bot_aimtargorigin - shotorg) / shotspeed));dprint(" = ");dprint(vtos(v));dprint(" : aimdir = ");dprint(vtos(normalize(v - shotorg)));dprint(" : ");dprint(vtos(shotdir));dprint("\n"); - //traceline(shotorg, shotorg + shotdir * 10000, FALSE, self); + //traceline(shotorg, shotorg + shotdir * 10000, false, self); //if (trace_ent.takedamage) //if (trace_fraction < 1) //if (!bot_shouldattack(trace_ent)) - // return FALSE; - traceline(shotorg, self.bot_aimtargorigin, FALSE, self); + // return false; + traceline(shotorg, self.bot_aimtargorigin, false, self); if (trace_fraction < 1) if (trace_ent != self.enemy) if (!bot_shouldattack(trace_ent)) { self.dphitcontentsmask = hf; - return FALSE; + return false; } } //if (r > maxshottime * shotspeed) - // return FALSE; + // return false; self.dphitcontentsmask = hf; - return TRUE; + return true; } diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index 40b769ddd..d4737dba3 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -53,7 +53,7 @@ void bot_think() { self.v_angle = self.angles; self.v_angle_z = 0; - self.fixangle = FALSE; + self.fixangle = false; } self.dmg_take = 0; @@ -201,7 +201,7 @@ void bot_setnameandstuff() READSKILL(bot_thinkskill, 1, 0.5); // think skill READSKILL(bot_aiskill, 2, 0); // "ai" skill - self.bot_config_loaded = TRUE; + self.bot_config_loaded = true; // this is really only a default, JoinBestTeam is called later setcolor(self, stof(bot_shirt) * 16 + stof(bot_pants)); @@ -243,7 +243,7 @@ void bot_custom_weapon_priority_setup() { float tokens, i, c, w; - bot_custom_weapon = FALSE; + bot_custom_weapon = false; if( autocvar_bot_ai_custom_weapon_priority_far == "" || autocvar_bot_ai_custom_weapon_priority_mid == "" || @@ -313,7 +313,7 @@ void bot_custom_weapon_priority_setup() if(c < WEP_COUNT) bot_weapons_close[c] = -1; - bot_custom_weapon = TRUE; + bot_custom_weapon = true; } void bot_endgame() @@ -358,7 +358,7 @@ void bot_relinkplayerlist() } dprint(strcat("relink: ", ftos(currentbots), " bots seen.\n")); bot_strategytoken = bot_list; - bot_strategytoken_taken = TRUE; + bot_strategytoken_taken = true; } void bot_clientdisconnect() @@ -391,7 +391,7 @@ void bot_clientconnect() self.bot_preferredcolors = self.clientcolors; self.bot_nextthink = time - random(); self.lag_func = bot_lagfunc; - self.isbot = TRUE; + self.isbot = true; self.createdtime = self.bot_nextthink; if(!self.bot_config_loaded) // This is needed so team overrider doesn't break between matches @@ -406,7 +406,7 @@ void bot_clientconnect() else if(self.bot_forced_team==4) self.team = NUM_TEAM_4; else - JoinBestTeam(self, FALSE, TRUE); + JoinBestTeam(self, false, true); havocbot_setupbot(); } @@ -417,7 +417,7 @@ void bot_removefromlargestteam() entity best, head; CheckAllowedTeams(world); GetTeamCounts(world); - head = findchainfloat(isbot, TRUE); + head = findchainfloat(isbot, true); if (!head) return; best = head; @@ -463,7 +463,7 @@ void bot_removenewest() return; } - head = findchainfloat(isbot, TRUE); + head = findchainfloat(isbot, true); if (!head) return; best = head; @@ -560,7 +560,7 @@ float bot_fixcount() // minplayers+bot_number, or remove all bots if no one is playing // But don't remove bots immediately on level change, as the real players // usually haven't rejoined yet - bots_would_leave = FALSE; + bots_would_leave = false; if (teamplay && autocvar_bot_vs_human && (c3==-1 && c4==-1)) bots = min(ceil(fabs(autocvar_bot_vs_human) * activerealplayers), maxclients - realplayers); else if ((realplayers || autocvar_bot_join_empty || (currentbots > 0 && time < 5))) @@ -575,7 +575,7 @@ float bot_fixcount() bots = min(max(minbots, minplayers - activerealplayers), maxclients - realplayers); if(bots > minbots) - bots_would_leave = TRUE; + bots_would_leave = true; } else { @@ -592,14 +592,14 @@ float bot_fixcount() if (bot_spawn() == world) { bprint("Can not add bot, server full.\n"); - return FALSE; + return false; } } while (currentbots > bots) bot_removenewest(); } - return TRUE; + return true; } void bot_serverframe() @@ -654,7 +654,7 @@ void bot_serverframe() } else { - botframe_spawnedwaypoints = TRUE; + botframe_spawnedwaypoints = true; waypoint_loadall(); if(!waypoint_load_links()) waypoint_schedulerelinkall(); @@ -667,7 +667,7 @@ void bot_serverframe() // frame, which causes choppy framerates) if (bot_strategytoken_taken) { - bot_strategytoken_taken = FALSE; + bot_strategytoken_taken = false; if (bot_strategytoken) bot_strategytoken = bot_strategytoken.nextbot; if (!bot_strategytoken) diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 47f7f3669..6022fe857 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -16,7 +16,7 @@ void havocbot_ai() { if(self.havocbot_blockhead) { - self.havocbot_blockhead = FALSE; + self.havocbot_blockhead = false; } else { @@ -51,7 +51,7 @@ void havocbot_ai() if (pointcontents(head.origin + head.maxs + '0 0 1') != CONTENT_EMPTY) continue; - traceline(self.origin + self.view_ofs , head.origin, TRUE, head); + traceline(self.origin + self.view_ofs , head.origin, true, head); if(trace_fraction<1) continue; @@ -71,7 +71,7 @@ void havocbot_ai() } // token has been used this frame - bot_strategytoken_taken = TRUE; + bot_strategytoken_taken = true; } if(self.deadflag != DEAD_NO) @@ -95,8 +95,8 @@ void havocbot_ai() WEP_ACTION(self.weapon, WR_AIM); if (autocvar_bot_nofire || IS_INDEPENDENT_PLAYER(self)) { - self.BUTTON_ATCK = FALSE; - self.BUTTON_ATCK2 = FALSE; + self.BUTTON_ATCK = false; + self.BUTTON_ATCK2 = false; } else { @@ -238,7 +238,7 @@ void havocbot_keyboard_movement(vector destorg) keyboard_z = 0; self.havocbot_keyboard = keyboard * maxspeed; - if (self.havocbot_ducktime>time) self.BUTTON_CROUCH=TRUE; + if (self.havocbot_ducktime>time) self.BUTTON_CROUCH=true; keyboard = self.havocbot_keyboard; blend = bound(0,vlen(destorg-self.origin)/autocvar_bot_ai_keyboard_distance,1); // When getting close move with 360 degree @@ -265,7 +265,7 @@ void havocbot_bunnyhop(vector dir) if(self.aistatus & AI_STATUS_DANGER_AHEAD) { self.aistatus &= ~AI_STATUS_RUNNING; - self.BUTTON_JUMP = FALSE; + self.BUTTON_JUMP = false; self.bot_canruntogoal = 0; self.bot_timelastseengoal = 0; return; @@ -300,7 +300,7 @@ void havocbot_bunnyhop(vector dir) if(time - self.bot_timelastseengoal > autocvar_bot_ai_bunnyhop_firstjumpdelay) { float checkdistance; - checkdistance = TRUE; + checkdistance = true; // don't run if it is too close if(self.bot_canruntogoal==0) @@ -332,7 +332,7 @@ void havocbot_bunnyhop(vector dir) if(vlen(gco - gno) > autocvar_bot_ai_bunnyhop_startdistance) if(checkpvs(self.origin + self.view_ofs, self.goalstack01)) { - checkdistance = FALSE; + checkdistance = false; } } } @@ -341,12 +341,12 @@ void havocbot_bunnyhop(vector dir) { self.aistatus &= ~AI_STATUS_RUNNING; if(bunnyhopdistance > autocvar_bot_ai_bunnyhop_stopdistance) - self.BUTTON_JUMP = TRUE; + self.BUTTON_JUMP = true; } else { self.aistatus |= AI_STATUS_RUNNING; - self.BUTTON_JUMP = TRUE; + self.BUTTON_JUMP = true; } } } @@ -366,7 +366,7 @@ void havocbot_bunnyhop(vector dir) if((self.flags & FL_ONGROUND) == 0) { if(self.velocity.z < 0 || vlen(self.velocity)1000) continue; - traceline(self.origin + self.view_ofs , ( ( head.absmin + head.absmax ) * 0.5 ), TRUE, world); + traceline(self.origin + self.view_ofs , ( ( head.absmin + head.absmax ) * 0.5 ), true, world); if(trace_fraction<1) continue; @@ -557,11 +557,11 @@ void havocbot_movetogoal() { if(self.velocity.z<0) { - self.BUTTON_HOOK = TRUE; + self.BUTTON_HOOK = true; } } else - self.BUTTON_HOOK = TRUE; + self.BUTTON_HOOK = true; // If there is no goal try to move forward @@ -586,14 +586,14 @@ void havocbot_movetogoal() } } - self.havocbot_blockhead = TRUE; + self.havocbot_blockhead = true; return; } else if(self.health>WEP_CVAR(devastator, damage)*0.5) { if(self.velocity.z < 0) - if(client_hasweapon(self, WEP_DEVASTATOR, TRUE, FALSE)) + if(client_hasweapon(self, WEP_DEVASTATOR, true, false)) { self.movement_x = maxspeed; @@ -601,7 +601,7 @@ void havocbot_movetogoal() { if(time > self.rocketjumptime) { - self.BUTTON_ATCK2 = TRUE; + self.BUTTON_ATCK2 = true; self.rocketjumptime = 0; } return; @@ -609,7 +609,7 @@ void havocbot_movetogoal() self.switchweapon = WEP_DEVASTATOR; self.v_angle_x = 90; - self.BUTTON_ATCK = TRUE; + self.BUTTON_ATCK = true; self.rocketjumptime = time + WEP_CVAR(devastator, detonatedelay); return; } @@ -630,9 +630,9 @@ void havocbot_movetogoal() if(self.waterlevel>WATERLEVEL_SWIMMING) dir_z = 1; else if(self.velocity.z >= 0 && !(self.waterlevel == WATERLEVEL_WETFEET && self.watertype == CONTENT_WATER)) - self.BUTTON_JUMP = TRUE; + self.BUTTON_JUMP = true; else - self.BUTTON_JUMP = FALSE; + self.BUTTON_JUMP = false; makevectors(self.v_angle.y * '0 1 0'); self.movement_x = dir * v_forward * maxspeed; self.movement_y = dir * v_right * maxspeed; @@ -688,9 +688,9 @@ void havocbot_movetogoal() { if(self.velocity.z >= 0 && !(self.watertype == CONTENT_WATER && gco.z < self.origin.z) && ( !(self.waterlevel == WATERLEVEL_WETFEET && self.watertype == CONTENT_WATER) || self.aistatus & AI_STATUS_OUT_WATER)) - self.BUTTON_JUMP = TRUE; + self.BUTTON_JUMP = true; else - self.BUTTON_JUMP = FALSE; + self.BUTTON_JUMP = false; } dir = normalize(flatdir); makevectors(self.v_angle.y * '0 1 0'); @@ -702,17 +702,17 @@ void havocbot_movetogoal() // jump if going toward an obstacle that doesn't look like stairs we // can walk up directly - tracebox(self.origin, self.mins, self.maxs, self.origin + self.velocity * 0.2, FALSE, self); + tracebox(self.origin, self.mins, self.maxs, self.origin + self.velocity * 0.2, false, self); if (trace_fraction < 1) if (trace_plane_normal.z < 0.7) { s = trace_fraction; - tracebox(self.origin + stepheightvec, self.mins, self.maxs, self.origin + self.velocity * 0.2 + stepheightvec, FALSE, self); + tracebox(self.origin + stepheightvec, self.mins, self.maxs, self.origin + self.velocity * 0.2 + stepheightvec, false, self); if (trace_fraction < s + 0.01) if (trace_plane_normal.z < 0.7) { s = trace_fraction; - tracebox(self.origin + jumpstepheightvec, self.mins, self.maxs, self.origin + self.velocity * 0.2 + jumpstepheightvec, FALSE, self); + tracebox(self.origin + jumpstepheightvec, self.mins, self.maxs, self.origin + self.velocity * 0.2 + jumpstepheightvec, false, self); if (trace_fraction > s) self.BUTTON_JUMP = 1; } @@ -725,12 +725,12 @@ void havocbot_movetogoal() dst_down = dst_ahead - '0 0 1500'; // Look ahead - traceline(self.origin + self.view_ofs, dst_ahead, TRUE, world); + traceline(self.origin + self.view_ofs, dst_ahead, true, world); // Check head-banging against walls if(vlen(self.origin + self.view_ofs - trace_endpos) < 25 && !(self.aistatus & AI_STATUS_OUT_WATER)) { - self.BUTTON_JUMP = TRUE; + self.BUTTON_JUMP = true; if(self.facingwalltime && time > self.facingwalltime) { self.ignoregoal = self.goalcurrent; @@ -759,10 +759,10 @@ void havocbot_movetogoal() self.aistatus &= ~AI_STATUS_DANGER_AHEAD; if(trace_fraction == 1 && self.jumppadcount == 0 && !self.goalcurrent.wphardwired ) - if((self.flags & FL_ONGROUND) || (self.aistatus & AI_STATUS_RUNNING) || self.BUTTON_JUMP == TRUE) + if((self.flags & FL_ONGROUND) || (self.aistatus & AI_STATUS_RUNNING) || self.BUTTON_JUMP == true) { // Look downwards - traceline(dst_ahead , dst_down, TRUE, world); + traceline(dst_ahead , dst_down, true, world); // te_lightning2(world, self.origin, dst_ahead); // Draw "ahead" look // te_lightning2(world, dst_ahead, dst_down); // Draw "downwards" look if(trace_endpos.z < self.origin.z + self.mins.z) @@ -801,7 +801,7 @@ void havocbot_movetogoal() dodge = havocbot_dodge(); dodge = dodge * bound(0,0.5+(skill+self.bot_dodgeskill)*0.1,1); evadelava = evadelava * bound(1,3-(skill+self.bot_dodgeskill),3); //Noobs fear lava a lot and take more distance from it - traceline(self.origin, ( ( self.enemy.absmin + self.enemy.absmax ) * 0.5 ), TRUE, world); + traceline(self.origin, ( ( self.enemy.absmin + self.enemy.absmax ) * 0.5 ), true, world); if(IS_PLAYER(trace_ent)) dir = dir * bound(0,(skill+self.bot_dodgeskill)/7,1); @@ -842,7 +842,7 @@ void havocbot_movetogoal() havocbot_bunnyhop(dir); if ((dir * v_up) >= autocvar_sv_jumpvelocity*0.5 && (self.flags & FL_ONGROUND)) self.BUTTON_JUMP=1; - if (((dodge * v_up) > 0) && random()*frametime >= 0.2*bound(0,(10-skill-self.bot_dodgeskill)*0.1,1)) self.BUTTON_JUMP=TRUE; + if (((dodge * v_up) > 0) && random()*frametime >= 0.2*bound(0,(10-skill-self.bot_dodgeskill)*0.1,1)) self.BUTTON_JUMP=true; if (((dodge * v_up) < 0) && random()*frametime >= 0.5*bound(0,(10-skill-self.bot_dodgeskill)*0.1,1)) self.havocbot_ducktime=time+0.3/bound(0.1,skill+self.bot_dodgeskill,10); } @@ -871,7 +871,7 @@ void havocbot_chooseenemy() // and not really really far away // and we're not severely injured // then keep tracking for a half second into the future - traceline(self.origin+self.view_ofs, ( self.enemy.absmin + self.enemy.absmax ) * 0.5,FALSE,world); + traceline(self.origin+self.view_ofs, ( self.enemy.absmin + self.enemy.absmax ) * 0.5,false,world); if (trace_ent == self.enemy || trace_fraction == 1) if (vlen((( self.enemy.absmin + self.enemy.absmax ) * 0.5) - self.origin) < 1000) if (self.health > 30) @@ -892,7 +892,7 @@ void havocbot_chooseenemy() eye = self.origin + self.view_ofs; best = world; bestrating = 100000000; - head = head2 = findchainfloat(bot_attack, TRUE); + head = head2 = findchainfloat(bot_attack, true); // Backup hit flags hf = self.dphitcontentsmask; @@ -911,7 +911,7 @@ void havocbot_chooseenemy() if (bestrating > rating) if (bot_shouldattack(head)) { - traceline(eye, v, TRUE, self); + traceline(eye, v, true, self); if (trace_ent == head || trace_fraction >= 1) { best = head; @@ -938,7 +938,7 @@ void havocbot_chooseenemy() self.dphitcontentsmask = hf; self.enemy = best; - self.havocbot_stickenemy = TRUE; + self.havocbot_stickenemy = true; } float havocbot_chooseweapon_checkreload(float new_weapon) @@ -947,23 +947,23 @@ float havocbot_chooseweapon_checkreload(float new_weapon) // so skip this for them, or they'll never get to reload their weapons at all. // this also allows bots under this skill to be more stupid, and reload more often during combat :) if(skill < 5) - return FALSE; + return false; // if this weapon is scheduled for reloading, don't switch to it during combat if (self.weapon_load[new_weapon] < 0) { - float i, other_weapon_available = FALSE; + float i, other_weapon_available = false; for(i = WEP_FIRST; i <= WEP_LAST; ++i) { // if we are out of ammo for all other weapons, it's an emergency to switch to anything else if (WEP_ACTION(i, WR_CHECKAMMO1) + WEP_ACTION(i, WR_CHECKAMMO2)) - other_weapon_available = TRUE; + other_weapon_available = true; } if(other_weapon_available) - return TRUE; + return true; } - return FALSE; + return false; } void havocbot_chooseweapon() @@ -984,7 +984,7 @@ void havocbot_chooseweapon() if(self.weapon==0) for(i = WEP_FIRST; i <= WEP_LAST; ++i) if(i != WEP_BLASTER) { - if(client_hasweapon(self, i, TRUE, FALSE)) + if(client_hasweapon(self, i, true, false)) { self.switchweapon = i; return; @@ -1011,13 +1011,13 @@ void havocbot_chooseweapon() // Ideally this 4 should be calculated as longest_weapon_refire / bot_ai_weapon_combo_threshold combo_time = time + ct + (ct * ((-0.3*(skill+self.bot_weaponskill))+3)); - combo = FALSE; + combo = false; if(autocvar_bot_ai_weapon_combo) if(self.weapon == self.lastfiredweapon) if(af > combo_time) { - combo = TRUE; + combo = true; self.lastcombotime = time; } @@ -1030,7 +1030,7 @@ void havocbot_chooseweapon() if ( distance > bot_distance_far ) { for(i=0; i < WEP_COUNT && bot_weapons_far[i] != -1 ; ++i){ w = bot_weapons_far[i]; - if ( client_hasweapon(self, w, TRUE, FALSE) ) + if ( client_hasweapon(self, w, true, false) ) { if ((self.weapon == w && combo) || havocbot_chooseweapon_checkreload(w)) continue; @@ -1044,7 +1044,7 @@ void havocbot_chooseweapon() if ( distance > bot_distance_close) { for(i=0; i < WEP_COUNT && bot_weapons_mid[i] != -1 ; ++i){ w = bot_weapons_mid[i]; - if ( client_hasweapon(self, w, TRUE, FALSE) ) + if ( client_hasweapon(self, w, true, false) ) { if ((self.weapon == w && combo) || havocbot_chooseweapon_checkreload(w)) continue; @@ -1057,7 +1057,7 @@ void havocbot_chooseweapon() // Choose weapons for close distance for(i=0; i < WEP_COUNT && bot_weapons_close[i] != -1 ; ++i){ w = bot_weapons_close[i]; - if ( client_hasweapon(self, w, TRUE, FALSE) ) + if ( client_hasweapon(self, w, true, false) ) { if ((self.weapon == w && combo) || havocbot_chooseweapon_checkreload(w)) continue; @@ -1118,7 +1118,7 @@ float havocbot_moveto(vector pos) if (!bot_strategytoken_taken) if(self.havocbot_personal_waypoint_searchtime self.health ) continue; @@ -104,7 +104,7 @@ void havocbot_goalrating_items(float ratingscale, vector org, float sradius) if (head.ammo_plasma && player.ammo_plasma > self.ammo_plasma) continue; - discard = FALSE; + discard = false; } else { @@ -184,7 +184,7 @@ void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradi // not falling if((head.flags & FL_ONGROUND) == 0) { - traceline(head.origin, head.origin + '0 0 -1500', TRUE, world); + traceline(head.origin, head.origin + '0 0 -1500', true, world); t = pointcontents(trace_endpos + '0 0 1'); if( t != CONTENT_SOLID ) if(t & CONTENT_WATER || t & CONTENT_SLIME || t & CONTENT_LAVA) diff --git a/qcsrc/server/bot/navigation.qc b/qcsrc/server/bot/navigation.qc index 8c244bf8b..d98a9ab79 100644 --- a/qcsrc/server/bot/navigation.qc +++ b/qcsrc/server/bot/navigation.qc @@ -34,20 +34,20 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float dist = totaldist = vlen(move); dir = normalize(move); stepdist = 32; - ignorehazards = FALSE; - swimming = FALSE; + ignorehazards = false; + swimming = false; // Analyze starting point traceline(start, start, MOVE_NORMAL, e); if (trace_dpstartcontents & (DPCONTENTS_SLIME | DPCONTENTS_LAVA)) - ignorehazards = TRUE; + ignorehazards = true; else { traceline( start, start + '0 0 -65536', MOVE_NORMAL, e); if (trace_dpstartcontents & (DPCONTENTS_SLIME | DPCONTENTS_LAVA)) { - ignorehazards = TRUE; - swimming = TRUE; + ignorehazards = true; + swimming = true; } } tracebox(start, m1, m2, start, MOVE_NOMONSTERS, e); @@ -58,7 +58,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float debugnodestatus(start, DEBUG_NODE_FAIL); //print("tracewalk: ", vtos(start), " is a bad start\n"); - return FALSE; + return false; } // Movement loop @@ -73,7 +73,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float debugnodestatus(org, DEBUG_NODE_SUCCESS); //print("tracewalk: ", vtos(start), " can reach ", vtos(end), "\n"); - return TRUE; + return true; } if(autocvar_bot_debug_tracewalk) debugnode(org); @@ -93,7 +93,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float debugnodestatus(org, DEBUG_NODE_FAIL); //print("tracewalk: ", vtos(start), " hits a hazard when trying to reach ", vtos(end), "\n"); - return FALSE; + return false; } } if (trace_dpstartcontents & DPCONTENTS_LIQUIDSMASK) @@ -106,7 +106,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float if (trace_fraction < 1) { - swimming = TRUE; + swimming = true; org = trace_endpos - normalize(org - trace_endpos) * stepdist; for(0; org.z < end.z + self.maxs.z; org.z += stepdist) { @@ -122,7 +122,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float if(autocvar_bot_debug_tracewalk) debugnodestatus(org, DEBUG_NODE_FAIL); - return FALSE; + return false; //print("tracewalk: ", vtos(start), " failed under water\n"); } continue; @@ -173,7 +173,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float //print("tracewalk: ", vtos(start), " hit something when trying to reach ", vtos(end), "\n"); //te_explosion(trace_endpos); //print(ftos(e.dphitcontentsmask), "\n"); - return FALSE; // failed + return false; // failed } } else @@ -197,7 +197,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float float c; c = pointcontents(org + '0 0 1'); if (!(c == CONTENT_WATER || c == CONTENT_LAVA || c == CONTENT_SLIME)) - swimming = FALSE; + swimming = false; else continue; } @@ -212,7 +212,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float if(autocvar_bot_debug_tracewalk) debugnodestatus(org, DEBUG_NODE_FAIL); - return FALSE; + return false; } ///////////////////////////////////////////////////////////////////////////// @@ -223,7 +223,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float void navigation_clearroute() { //print("bot ", etos(self), " clear\n"); - self.navigation_hasgoals = FALSE; + self.navigation_hasgoals = false; self.goalcurrent = world; self.goalstack01 = world; self.goalstack02 = world; @@ -347,22 +347,22 @@ float navigation_waypoint_will_link(vector v, vector org, entity ent, float walk dist = vlen(v - org); if (bestdist > dist) { - traceline(v, org, TRUE, ent); + traceline(v, org, true, ent); if (trace_fraction == 1) { if (walkfromwp) { if (tracewalk(ent, v, PL_MIN, PL_MAX, org, bot_navigation_movemode)) - return TRUE; + return true; } else { if (tracewalk(ent, org, PL_MIN, PL_MAX, v, bot_navigation_movemode)) - return TRUE; + return true; } } } - return FALSE; + return false; } // find the spawnfunc_waypoint near a dynamic goal such as a dropped weapon @@ -442,7 +442,7 @@ float navigation_markroutes_nearestwaypoints(entity waylist, float maxdist) entity head; vector v, m1, m2, diff; float c; -// navigation_testtracewalk = TRUE; +// navigation_testtracewalk = true; c = 0; head = waylist; while (head) @@ -464,7 +464,7 @@ float navigation_markroutes_nearestwaypoints(entity waylist, float maxdist) diff_z = max(0, diff.z); if (vlen(diff) < maxdist) { - head.wpconsidered = TRUE; + head.wpconsidered = true; if (tracewalk(self, self.origin, self.mins, self.maxs, v, bot_navigation_movemode)) { head.wpnearestpoint = v; @@ -477,7 +477,7 @@ float navigation_markroutes_nearestwaypoints(entity waylist, float maxdist) } head = head.chain; } - //navigation_testtracewalk = FALSE; + //navigation_testtracewalk = false; return c; } @@ -516,7 +516,7 @@ void navigation_markroutes(entity fixed_source_waypoint) w = waylist = findchain(classname, "waypoint"); while (w) { - w.wpconsidered = FALSE; + w.wpconsidered = false; w.wpnearestpoint = '0 0 0'; w.wpcost = 10000000; w.wpfire = 0; @@ -526,7 +526,7 @@ void navigation_markroutes(entity fixed_source_waypoint) if(fixed_source_waypoint) { - fixed_source_waypoint.wpconsidered = TRUE; + fixed_source_waypoint.wpconsidered = true; fixed_source_waypoint.wpnearestpoint = fixed_source_waypoint.origin + 0.5 * (fixed_source_waypoint.mins + fixed_source_waypoint.maxs); fixed_source_waypoint.wpcost = fixed_source_waypoint.dmg; fixed_source_waypoint.wpfire = 1; @@ -551,16 +551,16 @@ void navigation_markroutes(entity fixed_source_waypoint) for(i=increment;!navigation_markroutes_nearestwaypoints(waylist, i)&&i e.nearestwaypointtimeout) { - nwp = navigation_findnearestwaypoint(e, TRUE); + nwp = navigation_findnearestwaypoint(e, true); if(nwp) e.nearestwaypoint = nwp; else @@ -808,11 +808,11 @@ void navigation_routerating(entity e, float f, float rangebias) bot_debug(strcat("FAILED to find a nearest waypoint to '", e.classname, "' #", etos(e), "\n")); if(e.flags & FL_ITEM) - e.blacklisted = TRUE; + e.blacklisted = true; else if (e.flags & FL_WEAPON) { if(e.classname != "droppedweapon") - e.blacklisted = TRUE; + e.blacklisted = true; } if(e.blacklisted) @@ -855,9 +855,9 @@ float navigation_routetogoal(entity e, vector startposition) // if there is no goal, just exit if (!e) - return FALSE; + return false; - self.navigation_hasgoals = TRUE; + self.navigation_hasgoals = true; // put the entity on the goal stack //print("routetogoal ", etos(e), "\n"); @@ -865,11 +865,11 @@ float navigation_routetogoal(entity e, vector startposition) if(g_jetpack) if(e==self.navigation_jetpack_goal) - return TRUE; + return true; // if it can reach the goal there is nothing more to do if (tracewalk(self, startposition, PL_MIN, PL_MAX, (e.absmin + e.absmax) * 0.5, bot_navigation_movemode)) - return TRUE; + return true; // see if there are waypoints describing a path to the item if(e.classname != "waypoint" || (e.wpflags & WAYPOINTFLAG_PERSONAL)) @@ -878,7 +878,7 @@ float navigation_routetogoal(entity e, vector startposition) e = e.enemy; // we already have added it, so... if(e == world) - return FALSE; + return false; for(0;;) { @@ -890,7 +890,7 @@ float navigation_routetogoal(entity e, vector startposition) break; } - return FALSE; + return false; } // removes any currently touching waypoints from the goal stack @@ -950,7 +950,7 @@ void navigation_poptouchedgoals() { if(vlen(self.origin - self.goalcurrent.origin)<150) { - traceline(self.origin + self.view_ofs , self.goalcurrent.origin, TRUE, world); + traceline(self.origin + self.view_ofs , self.goalcurrent.origin, true, world); if(trace_fraction==1) { // Detect personal waypoints @@ -988,7 +988,7 @@ void navigation_goalrating_start() self.navigation_jetpack_goal = world; navigation_bestrating = -1; - self.navigation_hasgoals = FALSE; + self.navigation_hasgoals = false; navigation_clearroute(); navigation_bestgoal = world; navigation_markroutes(world); @@ -1013,7 +1013,7 @@ void navigation_goalrating_end() self.aistatus |= AI_STATUS_STUCK; } - self.navigation_hasgoals = FALSE; // Reset this value + self.navigation_hasgoals = false; // Reset this value } } @@ -1023,7 +1023,7 @@ void botframe_updatedangerousobjects(float maxupdate) vector m1, m2, v, o; float c, d, danger; c = 0; - bot_dodgelist = findchainfloat(bot_dodge, TRUE); + bot_dodgelist = findchainfloat(bot_dodge, true); botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "waypoint"); while (botframe_dangerwaypoint != world) { @@ -1041,7 +1041,7 @@ void botframe_updatedangerousobjects(float maxupdate) d = head.bot_dodgerating - vlen(o - v); if (d > 0) { - traceline(o, v, TRUE, world); + traceline(o, v, true, world); if (trace_fraction == 1) danger = danger + d; } diff --git a/qcsrc/server/bot/scripting.qc b/qcsrc/server/bot/scripting.qc index 71bc21779..60bb02b65 100644 --- a/qcsrc/server/bot/scripting.qc +++ b/qcsrc/server/bot/scripting.qc @@ -8,7 +8,7 @@ void bot_clearqueue(entity bot) if(!bot.bot_cmdqueuebuf_allocated) return; buf_del(bot.bot_cmdqueuebuf); - bot.bot_cmdqueuebuf_allocated = FALSE; + bot.bot_cmdqueuebuf_allocated = false; dprint("bot ", bot.netname, " queue cleared\n"); } @@ -17,7 +17,7 @@ void bot_queuecommand(entity bot, string cmdstring) if(!bot.bot_cmdqueuebuf_allocated) { bot.bot_cmdqueuebuf = buf_create(); - bot.bot_cmdqueuebuf_allocated = TRUE; + bot.bot_cmdqueuebuf_allocated = true; bot.bot_cmdqueuebuf_start = 0; bot.bot_cmdqueuebuf_end = 0; } @@ -275,7 +275,7 @@ void bot_commands_init() bot_cmd_string[BOT_CMD_DEBUG_ASSERT_CANFIRE] = "debug_assert_canfire"; bot_cmd_parm_type[BOT_CMD_DEBUG_ASSERT_CANFIRE] = BOT_CMD_PARAMETER_FLOAT; - bot_cmds_initialized = TRUE; + bot_cmds_initialized = true; } // Returns first bot with matching name @@ -640,7 +640,7 @@ float bot_cmd_select_weapon() if(id < WEP_FIRST || id > WEP_LAST) return CMD_STATUS_ERROR; - if(client_hasweapon(self, id, TRUE, FALSE)) + if(client_hasweapon(self, id, true, false)) self.switchweapon = id; else return CMD_STATUS_ERROR; @@ -651,10 +651,10 @@ float bot_cmd_select_weapon() .float bot_cmd_condition_status; const float CMD_CONDITION_NONE = 0; -const float CMD_CONDITION_TRUE = 1; -const float CMD_CONDITION_FALSE = 2; -const float CMD_CONDITION_TRUE_BLOCK = 4; -const float CMD_CONDITION_FALSE_BLOCK = 8; +const float CMD_CONDITION_true = 1; +const float CMD_CONDITION_false = 2; +const float CMD_CONDITION_true_BLOCK = 4; +const float CMD_CONDITION_false_BLOCK = 8; float bot_cmd_eval(string expr) { @@ -698,7 +698,7 @@ float bot_cmd_if() return CMD_STATUS_ERROR; } - self.bot_cmd_condition_status |= CMD_CONDITION_TRUE_BLOCK; + self.bot_cmd_condition_status |= CMD_CONDITION_true_BLOCK; // search for operators expr = bot_cmd.bot_cmd_parm_string; @@ -711,9 +711,9 @@ float bot_cmd_if() val_b = substring(expr,cmpofs+1,strlen(expr)); if(bot_cmd_eval(val_a)==bot_cmd_eval(val_b)) - self.bot_cmd_condition_status |= CMD_CONDITION_TRUE; + self.bot_cmd_condition_status |= CMD_CONDITION_true; else - self.bot_cmd_condition_status |= CMD_CONDITION_FALSE; + self.bot_cmd_condition_status |= CMD_CONDITION_false; return CMD_STATUS_FINISHED; } @@ -726,9 +726,9 @@ float bot_cmd_if() val_b = substring(expr,cmpofs+1,strlen(expr)); if(bot_cmd_eval(val_a)>bot_cmd_eval(val_b)) - self.bot_cmd_condition_status |= CMD_CONDITION_TRUE; + self.bot_cmd_condition_status |= CMD_CONDITION_true; else - self.bot_cmd_condition_status |= CMD_CONDITION_FALSE; + self.bot_cmd_condition_status |= CMD_CONDITION_false; return CMD_STATUS_FINISHED; } @@ -741,25 +741,25 @@ float bot_cmd_if() val_b = substring(expr,cmpofs+1,strlen(expr)); if(bot_cmd_eval(val_a) 0) - w.wpisbox = TRUE; + w.wpisbox = true; if(!w.wpisbox) { @@ -196,7 +196,7 @@ void waypoint_think() navigation_testtracewalk = 0; if (!self.wpisbox) { - tracebox(sv - PL_MIN_z * '0 0 1', PL_MIN, PL_MAX, sv, FALSE, self); + tracebox(sv - PL_MIN_z * '0 0 1', PL_MIN, PL_MAX, sv, false, self); if (!trace_startsolid) { //dprint("sv deviation", vtos(trace_endpos - sv), "\n"); @@ -205,14 +205,14 @@ void waypoint_think() } if (!e.wpisbox) { - tracebox(ev - PL_MIN_z * '0 0 1', PL_MIN, PL_MAX, ev, FALSE, e); + tracebox(ev - PL_MIN_z * '0 0 1', PL_MIN, PL_MAX, ev, false, e); if (!trace_startsolid) { //dprint("ev deviation", vtos(trace_endpos - ev), "\n"); ev = trace_endpos + '0 0 1'; } } - //traceline(self.origin, e.origin, FALSE, world); + //traceline(self.origin, e.origin, false, world); //if (trace_fraction == 1) if (!self.wpisbox && tracewalk(self, sv, PL_MIN, PL_MAX, ev, MOVE_NOMONSTERS)) waypoint_addlink(self, e); @@ -225,7 +225,7 @@ void waypoint_think() } } navigation_testtracewalk = 0; - self.wplinked = TRUE; + self.wplinked = true; } void waypoint_clearlinks(entity wp) @@ -243,7 +243,7 @@ void waypoint_clearlinks(entity wp) wp.wp16mincost = wp.wp17mincost = wp.wp18mincost = wp.wp19mincost = wp.wp20mincost = wp.wp21mincost = wp.wp22mincost = wp.wp23mincost = f; wp.wp24mincost = wp.wp25mincost = wp.wp26mincost = wp.wp27mincost = wp.wp28mincost = wp.wp29mincost = wp.wp30mincost = wp.wp31mincost = f; - wp.wplinked = FALSE; + wp.wplinked = false; } // tell a spawnfunc_waypoint to relink @@ -372,7 +372,7 @@ float waypoint_load_links() dprint("waypoint links load from "); dprint(filename); dprint(" failed\n"); - return FALSE; + return false; } while ((s = fgets(file))) @@ -383,7 +383,7 @@ float waypoint_load_links() { // bad file format fclose(file); - return FALSE; + return false; } wp_from_pos = stov(argv(0)); @@ -393,13 +393,13 @@ float waypoint_load_links() if(!wp_from || wp_from.origin!=wp_from_pos) { wp_from = findradius(wp_from_pos, 1); - found = FALSE; + found = false; while(wp_from) { if(vlen(wp_from.origin-wp_from_pos)<1) if(wp_from.classname == "waypoint") { - found = TRUE; + found = true; break; } wp_from = wp_from.chain; @@ -415,13 +415,13 @@ float waypoint_load_links() // Search "to" waypoint wp_to = findradius(wp_to_pos, 1); - found = FALSE; + found = false; while(wp_to) { if(vlen(wp_to.origin-wp_to_pos)<1) if(wp_to.classname == "waypoint") { - found = TRUE; + found = true; break; } wp_to = wp_to.chain; @@ -445,8 +445,8 @@ float waypoint_load_links() dprint(mapname); dprint(".waypoints.cache\n"); - botframe_cachedwaypointlinks = TRUE; - return TRUE; + botframe_cachedwaypointlinks = true; + return true; } void waypoint_load_links_hardwired() @@ -459,7 +459,7 @@ void waypoint_load_links_hardwired() filename = strcat(filename, ".waypoints.hardwired"); file = fopen(filename, FILE_READ); - botframe_loadedforcedlinks = TRUE; + botframe_loadedforcedlinks = true; if (file < 0) { @@ -489,13 +489,13 @@ void waypoint_load_links_hardwired() if(!wp_from || wp_from.origin!=wp_from_pos) { wp_from = findradius(wp_from_pos, 5); - found = FALSE; + found = false; while(wp_from) { if(vlen(wp_from.origin-wp_from_pos)<5) if(wp_from.classname == "waypoint") { - found = TRUE; + found = true; break; } wp_from = wp_from.chain; @@ -510,13 +510,13 @@ void waypoint_load_links_hardwired() // Search "to" waypoint wp_to = findradius(wp_to_pos, 5); - found = FALSE; + found = false; while(wp_to) { if(vlen(wp_to.origin-wp_to_pos)<5) if(wp_to.classname == "waypoint") { - found = TRUE; + found = true; break; } wp_to = wp_to.chain; @@ -530,8 +530,8 @@ void waypoint_load_links_hardwired() ++c; waypoint_addlink(wp_from, wp_to); - wp_from.wphardwired = TRUE; - wp_to.wphardwired = TRUE; + wp_from.wphardwired = true; + wp_to.wphardwired = true; } fclose(file); @@ -616,7 +616,7 @@ void waypoint_save_links() w = w.chain; } fclose(file); - botframe_cachedwaypointlinks = TRUE; + botframe_cachedwaypointlinks = true; print("saved "); print(ftos(c)); @@ -666,7 +666,7 @@ void waypoint_saveall() bprint(" failed\n"); } waypoint_save_links(); - botframe_loadedforcedlinks = FALSE; + botframe_loadedforcedlinks = false; } // load waypoints from file @@ -826,10 +826,10 @@ void botframe_showwaypointlinks() if (!player.isbot) if (player.flags & FL_ONGROUND || player.waterlevel > WATERLEVEL_NONE) { - //navigation_testtracewalk = TRUE; - head = navigation_findnearestwaypoint(player, FALSE); + //navigation_testtracewalk = true; + head = navigation_findnearestwaypoint(player, false); // print("currently selected WP is ", etos(head), "\n"); - //navigation_testtracewalk = FALSE; + //navigation_testtracewalk = false; if (head) { w = head ;if (w) te_lightning2(world, w.origin, player.origin); @@ -1061,12 +1061,12 @@ void botframe_deleteuselesswaypoints() { entity w, w1, w2; float i, j, k; - for (w = world; (w = findfloat(w, bot_pickup, TRUE)); ) + for (w = world; (w = findfloat(w, bot_pickup, true)); ) { // NOTE: this protects waypoints if they're the ONLY nearest // waypoint. That's the intention. - navigation_findnearestwaypoint(w, FALSE); // Walk TO item. - navigation_findnearestwaypoint(w, TRUE); // Walk FROM item. + navigation_findnearestwaypoint(w, false); // Walk TO item. + navigation_findnearestwaypoint(w, true); // Walk FROM item. } for (w = world; (w = find(w, classname, "waypoint")); ) { @@ -1147,8 +1147,8 @@ void botframe_autowaypoints() if(p.deadflag) continue; // going back is broken, so only fix waypoints to walk TO the player - //botframe_autowaypoints_fix(p, FALSE, botframe_autowaypoints_lastwp0); - botframe_autowaypoints_fix(p, TRUE, botframe_autowaypoints_lastwp1); + //botframe_autowaypoints_fix(p, false, botframe_autowaypoints_lastwp0); + botframe_autowaypoints_fix(p, true, botframe_autowaypoints_lastwp1); //te_explosion(p.botframe_autowaypoints_lastwp0.origin); } diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index f3c64a696..28bb86cb8 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -178,7 +178,7 @@ float CheatImpulse(float i) IS_CHEAT(i, 0, 0); if(self.personal) { - self.speedrunning = TRUE; + self.speedrunning = true; tracebox(self.personal.origin, self.mins, self.maxs, self.personal.origin, MOVE_WORLDONLY, self); if(trace_startsolid) { @@ -190,7 +190,7 @@ float CheatImpulse(float i) setorigin(self, self.personal.origin); self.oldvelocity = self.velocity = self.personal.velocity; self.angles = self.personal.v_angle; - self.fixangle = TRUE; + self.fixangle = true; MUTATOR_CALLHOOK(AbortSpeedrun); } @@ -232,7 +232,7 @@ float CheatImpulse(float i) self.angles = e.angles; remove(e); // should we? self.angles_x = -self.angles_x; - self.fixangle = TRUE; + self.fixangle = true; self.velocity = '0 0 0'; DID_CHEAT(); break; @@ -242,7 +242,7 @@ float CheatImpulse(float i) { sprint(self, "Emergency teleport used random location\n"); self.angles_x = -self.angles.x; - self.fixangle = TRUE; + self.fixangle = true; self.velocity = '0 0 0'; DID_CHEAT(); break; @@ -319,7 +319,7 @@ float CheatCommand(float argc) // arguments: // effectname effectnum = particleeffectnum(argv(1)); - W_SetupShot(self, FALSE, FALSE, "", CH_WEAPON_A, 0); + W_SetupShot(self, false, false, "", CH_WEAPON_A, 0); traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, self); trailparticles(self, effectnum, w_shotorg, trace_endpos); DID_CHEAT(); @@ -334,7 +334,7 @@ float CheatCommand(float argc) // arguments: // modelname mode f = stof(argv(2)); - W_SetupShot(self, FALSE, FALSE, "", CH_WEAPON_A, 0); + W_SetupShot(self, false, false, "", CH_WEAPON_A, 0); traceline(w_shotorg, w_shotorg + w_shotdir * 2048, MOVE_NORMAL, self); if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) || trace_fraction == 1) { @@ -750,11 +750,11 @@ float CheatFrame() { // use cheat dragging if cheats are enabled crosshair_trace_plusvisibletriggers(self); - Drag(TRUE, TRUE); + Drag(true, true); } else { - Drag(FALSE, FALSE); // execute dragging + Drag(false, false); // execute dragging } break; } @@ -772,9 +772,9 @@ float Drag(float force_allow_pick, float ischeat) { BEGIN_CHEAT_FUNCTION(); - // returns TRUE when an entity has been picked up - // If pick is TRUE, the object can also be picked up if it's not being held already - // If pick is FALSE, only keep dragging the object if it's already being held + // returns true when an entity has been picked up + // If pick is true, the object can also be picked up if it's not being held already + // If pick is false, only keep dragging the object if it's already being held switch(0) { @@ -820,7 +820,7 @@ float Drag(float force_allow_pick, float ischeat) float pick = force_allow_pick; if (e && !pick) { - // pick is TRUE if the object can be picked up. While an object is being carried, the Drag() function + // pick is true if the object can be picked up. While an object is being carried, the Drag() function // must execute for it either way, otherwise it would cause bugs if it went out of the player's trace. // This also makes sure that an object can only pe picked up if in range, but does not get dropped if // it goes out of range while slinging it around. @@ -833,14 +833,14 @@ float Drag(float force_allow_pick, float ischeat) break; case 1: // owner can grab if(e.owner == self || e.realowner == self) - pick = TRUE; + pick = true; break; case 2: // owner and team mates can grab if(SAME_TEAM(e.owner, self) || SAME_TEAM(e.realowner, self) || e.team == self.team) - pick = TRUE; + pick = true; break; case 3: // anyone can grab - pick = TRUE; + pick = true; break; default: break; @@ -860,13 +860,13 @@ float Drag(float force_allow_pick, float ischeat) Drag_Begin(self, e, trace_endpos); if(ischeat) DID_CHEAT(); - return TRUE; + return true; } } } break; } - return FALSE; + return false; } // on dragger: @@ -938,35 +938,35 @@ float Drag_IsDraggable(entity draggee) { // TODO add more checks for bad stuff here if(draggee == world) - return FALSE; + return false; if(draggee.classname == "func_bobbing") - return FALSE; + return false; if(draggee.classname == "door") // FIXME find out why these must be excluded, or work around the problem (trying to drag these causes like 4 fps) - return FALSE; + return false; if(draggee.classname == "plat") - return FALSE; + return false; if(draggee.classname == "func_button") - return FALSE; + return false; // if(draggee.model == "") -// return FALSE; +// return false; if(IS_SPEC(draggee)) - return FALSE; + return false; if(IS_OBSERVER(draggee)) - return FALSE; + return false; if(draggee.classname == "exteriorweaponentity") - return FALSE; + return false; if(draggee.classname == "weaponentity") - return FALSE; + return false; - return TRUE; + return true; } float Drag_MayChangeAngles(entity draggee) { // TODO add more checks for bad stuff here if(substring(draggee.model, 0, 1) == "*") - return FALSE; - return TRUE; + return false; + return true; } void Drag_MoveForward(entity dragger) @@ -1023,18 +1023,18 @@ float Drag_CanDrag(entity dragger) float Drag_IsDragging(entity dragger) { if(!dragger.dragentity) - return FALSE; + return false; if(wasfreed(dragger.dragentity) || dragger.dragentity.draggedby != dragger) { dragger.dragentity = world; - return FALSE; + return false; } if(!Drag_CanDrag(dragger) || !Drag_IsDraggable(dragger.dragentity)) { Drag_Finish(dragger); - return FALSE; + return false; } - return TRUE; + return true; } void Drag_MoveDrag(entity from, entity to) diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index f3f17cfb7..0974dae55 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -8,7 +8,7 @@ float ClientData_Send(entity to, float sf) if(to != self.owner) { error("wtf"); - return FALSE; + return false; } entity e; @@ -40,12 +40,12 @@ float ClientData_Send(entity to, float sf) WriteAngle(MSG_ENTITY, e.v_angle.y); } - return TRUE; + return true; } void ClientData_Attach() { - Net_LinkEntity(self.clientdata = spawn(), FALSE, 0, ClientData_Send); + Net_LinkEntity(self.clientdata = spawn(), false, 0, ClientData_Send); self.clientdata.drawonlytoclient = self; self.clientdata.owner = self; } @@ -142,7 +142,7 @@ void PutObserverInServer (void) if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); } - spot = SelectSpawnPoint (TRUE); + spot = SelectSpawnPoint (true); if(!spot) error("No spawnpoints for observers?!?\n"); RemoveGrapplingHook(self); // Wazat's Grappling Hook @@ -183,10 +183,10 @@ void PutObserverInServer (void) if(autocvar_g_chat_nospectators == 1 || (cvar("g_warmup") && !(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2)) Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_CHAT_NOSPECTATORS); - if(self.just_joined == FALSE) { + if(self.just_joined == false) { LogTeamchange(self.playerid, -1, 4); } else - self.just_joined = FALSE; + self.just_joined = false; } PlayerScore_Clear(self); // clear scores when needed @@ -196,9 +196,9 @@ void PutObserverInServer (void) self.spectatortime = time; self.classname = "observer"; - self.iscreature = FALSE; + self.iscreature = false; self.teleportable = TELEPORT_SIMPLE; - self.damagedbycontents = FALSE; + self.damagedbycontents = false; self.health = -666; self.takedamage = DAMAGE_NO; self.solid = SOLID_NOT; @@ -231,8 +231,8 @@ void PutObserverInServer (void) self.deadflag = DEAD_NO; self.angles = spot.angles; self.angles_z = 0; - self.fixangle = TRUE; - self.crouch = FALSE; + self.fixangle = true; + self.crouch = false; self.revival_time = 0; setorigin (self, (spot.origin + PL_VIEW_OFS)); // offset it so that the spectator spawns higher off the ground, looks better this way @@ -272,7 +272,7 @@ void FixPlayermodel() defaultmodel = ""; defaultskin = 0; - chmdl = FALSE; + chmdl = false; if(autocvar_sv_defaultcharacter == 1) { @@ -319,7 +319,7 @@ void FixPlayermodel() m2 = self.maxs; setplayermodel (self, defaultmodel); setsize (self, m1, m2); - chmdl = TRUE; + chmdl = true; } oldskin = self.skin; @@ -332,7 +332,7 @@ void FixPlayermodel() m2 = self.maxs; setplayermodel (self, self.playermodel); setsize (self, m1, m2); - chmdl = TRUE; + chmdl = true; } oldskin = self.skin; @@ -387,9 +387,9 @@ void PutClientInServer (void) accuracy_resend(self); if(self.team < 0) - JoinBestTeam(self, FALSE, TRUE); + JoinBestTeam(self, false, true); - spot = SelectSpawnPoint (FALSE); + spot = SelectSpawnPoint (false); if(!spot) { Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_NOSPAWNS); @@ -402,10 +402,10 @@ void PutClientInServer (void) vehicles_exit(VHEF_RELESE); self.classname = "player"; - self.wasplayer = TRUE; - self.iscreature = TRUE; + self.wasplayer = true; + self.iscreature = true; self.teleportable = TELEPORT_NORMAL; - self.damagedbycontents = TRUE; + self.damagedbycontents = true; self.movetype = MOVETYPE_WALK; self.solid = SOLID_SLIDEBOX; self.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_SOLID; @@ -512,7 +512,7 @@ void PutClientInServer (void) self.angles_z = 0; // never spawn tilted even if the spot says to if(IS_BOT_CLIENT(self)) self.v_angle = self.angles; - self.fixangle = TRUE; // turn this way immediately + self.fixangle = true; // turn this way immediately self.velocity = '0 0 0'; self.avelocity = '0 0 0'; self.punchangle = '0 0 0'; @@ -523,7 +523,7 @@ void PutClientInServer (void) entity spawnevent = spawn(); spawnevent.owner = self; - Net_LinkEntity(spawnevent, FALSE, 0.5, SpawnEvent_Send); + Net_LinkEntity(spawnevent, false, 0.5, SpawnEvent_Send); // Cut off any still running player sounds. stopsound(self, CH_PLAYER_SINGLE); @@ -532,7 +532,7 @@ void PutClientInServer (void) FixPlayermodel(); self.drawonlytoclient = world; - self.crouch = FALSE; + self.crouch = false; self.view_ofs = PL_VIEW_OFS; setsize (self, PL_MIN, PL_MAX); self.spawnorigin = spot.origin; @@ -546,8 +546,8 @@ void PutClientInServer (void) self.event_damage = PlayerDamage; - self.bot_attack = TRUE; - self.monster_attack = TRUE; + self.bot_attack = true; + self.monster_attack = true; self.spider_slowness = 0; @@ -563,7 +563,7 @@ void PutClientInServer (void) self.colormod = '1 1 1' * autocvar_g_player_brightness; self.exteriorweaponentity.alpha = default_weapon_alpha; - self.speedrunning = FALSE; + self.speedrunning = false; //stuffcmd(self, "chase_active 0"); //stuffcmd(self, "set viewsize $tmpviewsize \n"); @@ -654,7 +654,7 @@ float ClientInit_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, WEP_CVAR_SEC(hagar, load_max)); // hagar max loadable rockets // WEAPONTODO WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange); WriteByte(MSG_ENTITY, WEP_CVAR(porto, secondary)); // WEAPONTODO - return TRUE; + return true; } void ClientInit_CheckUpdate() @@ -694,7 +694,7 @@ void ClientInit_Spawn() e = spawn(); e.classname = "clientinit"; e.think = ClientInit_CheckUpdate; - Net_LinkEntity(e, FALSE, 0, ClientInit_SendEntity); + Net_LinkEntity(e, false, 0, ClientInit_SendEntity); o = self; self = e; @@ -753,7 +753,7 @@ void ClientKill_Now_TeamChange() { if(self.killindicator_teamchange == -1) { - JoinBestTeam( self, FALSE, TRUE ); + JoinBestTeam( self, false, true ); } else if(self.killindicator_teamchange == -2) { @@ -1084,7 +1084,7 @@ void ClientConnect (void) if(self.team_forced > 0) self.team_forced = 0; - JoinBestTeam(self, FALSE, FALSE); // if the team number is valid, keep it + JoinBestTeam(self, false, false); // if the team number is valid, keep it if((autocvar_sv_spectate == 1) || autocvar_g_campaign || self.team_forced < 0) { self.classname = "observer"; @@ -1120,7 +1120,7 @@ void ClientConnect (void) LogTeamchange(self.playerid, self.team, 1); - self.just_joined = TRUE; // stop spamming the eventlog with additional lines when the client connects + self.just_joined = true; // stop spamming the eventlog with additional lines when the client connects self.netname_previous = strzone(self.netname); @@ -1707,7 +1707,7 @@ void SpectateCopy(entity spectatee) { self.frozen = spectatee.frozen; self.revive_progress = spectatee.revive_progress; if(!self.BUTTON_USE) - self.fixangle = TRUE; + self.fixangle = true; setorigin(self, spectatee.origin); setsize(self, spectatee.mins, spectatee.maxs); SetZoomState(spectatee.zoomstate); @@ -1716,7 +1716,7 @@ void SpectateCopy(entity spectatee) { self.hud = spectatee.hud; if(spectatee.vehicle) { - self.fixangle = FALSE; + self.fixangle = false; //self.velocity = spectatee.vehicle.velocity; self.vehicle_health = spectatee.vehicle_health; self.vehicle_shield = spectatee.vehicle_shield; @@ -1759,7 +1759,7 @@ float SpectateUpdate() float SpectateSet() { if(self.enemy.classname != "player") - return FALSE; + return false; /*if(self.enemy.vehicle) { @@ -1783,7 +1783,7 @@ float SpectateSet() if(!SpectateUpdate()) PutObserverInServer(); //} - return TRUE; + return true; } void SetSpectator(entity player, entity spectatee) @@ -1854,7 +1854,7 @@ float SpectatePrev() // NOTE: chain order is from the highest to the lower entnum (unlike find) other = findchain(classname, "player"); if (!other) // no player - return FALSE; + return false; entity first = other; // skip players until current spectated player @@ -1873,7 +1873,7 @@ float SpectatePrev() while(other.team != self.team) other = other.chain; if(other == self.enemy) - return TRUE; + return true; } } else @@ -1925,7 +1925,7 @@ void LeaveSpectatorMode() nades_RemoveBonus(self); if(autocvar_g_campaign || autocvar_g_balance_teams) - { JoinBestTeam(self, FALSE, TRUE); } + { JoinBestTeam(self, false, true); } if(autocvar_g_campaign) { campaign_bots_may_start = 1; } @@ -1948,7 +1948,7 @@ void LeaveSpectatorMode() /** * Determines whether the player is allowed to join. This depends on cvar - * g_maxplayers, if it isn't used this function always return TRUE, otherwise + * g_maxplayers, if it isn't used this function always return true, otherwise * it checks whether the number of currently playing players exceeds g_maxplayers. * @return int number of free slots for players, 0 if none */ @@ -2159,16 +2159,16 @@ float isInvisibleString(string s) case 192: // charmap space if (!autocvar_utf8_enable) break; - return FALSE; + return false; case 160: // space in unicode fonts case 0xE000 + 192: // utf8 charmap space if (autocvar_utf8_enable) break; default: - return FALSE; + return false; } } - return TRUE; + return true; } /* @@ -2319,7 +2319,7 @@ void PlayerPreThink (void) // FIXME turn this into CSQC stuff self.v_angle = self.lastV_angle; self.angles = self.lastV_angle; - self.fixangle = TRUE; + self.fixangle = true; } if(frametime) @@ -2338,7 +2338,7 @@ void PlayerPreThink (void) } } else - self.weaponentity_glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2; + self.weaponentity_glowmod = colormapPaletteColor(self.clientcolors & 0x0F, true) * 2; player_powerups(); } @@ -2427,20 +2427,20 @@ void PlayerPreThink (void) { if (!self.crouch) { - self.crouch = TRUE; + self.crouch = true; self.view_ofs = PL_CROUCH_VIEW_OFS; setsize (self, PL_CROUCH_MIN, PL_CROUCH_MAX); - // setanim(self, self.anim_duck, FALSE, TRUE, TRUE); // this anim is BROKEN anyway + // setanim(self, self.anim_duck, false, true, true); // this anim is BROKEN anyway } } else { if (self.crouch) { - tracebox(self.origin, PL_MIN, PL_MAX, self.origin, FALSE, self); + tracebox(self.origin, PL_MIN, PL_MAX, self.origin, false, self); if (!trace_startsolid) { - self.crouch = FALSE; + self.crouch = false; self.view_ofs = PL_VIEW_OFS; setsize (self, PL_MIN, PL_MAX); } diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index 7446b7022..3a9c8bb3a 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -99,7 +99,7 @@ void ImpulseCommands (void) W_PreviousWeapon(2); break; case 17: - W_ThrowWeapon(W_CalculateProjectileVelocity(self.velocity, v_forward * 750, FALSE), '0 0 0', TRUE); + W_ThrowWeapon(W_CalculateProjectileVelocity(self.velocity, v_forward * 750, false), '0 0 0', true); break; case 18: W_NextWeapon(1); @@ -171,7 +171,7 @@ void ImpulseCommands (void) { if (!MUTATOR_CALLHOOK(HelpMePing)) { - wp = WaypointSprite_Attach("helpme", TRUE, RADARICON_HELPME, '1 0.5 0'); + wp = WaypointSprite_Attach("helpme", true, RADARICON_HELPME, '1 0.5 0'); if(!wp) WaypointSprite_HelpMePing(self.waypointsprite_attachedforcarrier); else @@ -181,14 +181,14 @@ void ImpulseCommands (void) } break; case 34: - wp = WaypointSprite_DeployFixed("here", FALSE, self.origin, RADARICON_HERE, '0 1 0'); + wp = WaypointSprite_DeployFixed("here", false, self.origin, RADARICON_HERE, '0 1 0'); if(wp) WaypointSprite_Ping(wp); sprint(self, "HERE spawned at location\n"); break; case 35: WarpZone_crosshair_trace(self); - wp = WaypointSprite_DeployFixed("here", FALSE, trace_endpos, RADARICON_HERE, '0 1 0'); + wp = WaypointSprite_DeployFixed("here", false, trace_endpos, RADARICON_HERE, '0 1 0'); if(wp) WaypointSprite_Ping(wp); sprint(self, "HERE spawned at crosshair\n"); @@ -196,21 +196,21 @@ void ImpulseCommands (void) case 36: if(vlen(self.death_origin)) { - wp = WaypointSprite_DeployFixed("here", FALSE, self.death_origin, RADARICON_HERE, '0 1 0'); + wp = WaypointSprite_DeployFixed("here", false, self.death_origin, RADARICON_HERE, '0 1 0'); if(wp) WaypointSprite_Ping(wp); sprint(self, "HERE spawned at death location\n"); } break; case 37: - wp = WaypointSprite_DeployFixed("danger", FALSE, self.origin, RADARICON_DANGER, '1 0.5 0'); + wp = WaypointSprite_DeployFixed("danger", false, self.origin, RADARICON_DANGER, '1 0.5 0'); if(wp) WaypointSprite_Ping(wp); sprint(self, "DANGER spawned at location\n"); break; case 38: WarpZone_crosshair_trace(self); - wp = WaypointSprite_DeployFixed("danger", FALSE, trace_endpos, RADARICON_DANGER, '1 0.5 0'); + wp = WaypointSprite_DeployFixed("danger", false, trace_endpos, RADARICON_DANGER, '1 0.5 0'); if(wp) WaypointSprite_Ping(wp); sprint(self, "DANGER spawned at crosshair\n"); @@ -218,7 +218,7 @@ void ImpulseCommands (void) case 39: if(vlen(self.death_origin)) { - wp = WaypointSprite_DeployFixed("danger", FALSE, self.death_origin, RADARICON_DANGER, '1 0.5 0'); + wp = WaypointSprite_DeployFixed("danger", false, self.death_origin, RADARICON_DANGER, '1 0.5 0'); if(wp) WaypointSprite_Ping(wp); sprint(self, "DANGER spawned at death location\n"); @@ -255,7 +255,7 @@ void ImpulseCommands (void) bprint(strcat("Waypoint spawned at ",vtos(self.origin),"\n")); break; case 104: - e = navigation_findnearestwaypoint(self, FALSE); + e = navigation_findnearestwaypoint(self, false); if (e) if (!(e.wpflags & WAYPOINTFLAG_GENERATED)) { @@ -275,7 +275,7 @@ void ImpulseCommands (void) e.colormod = '0.5 0.5 0.5'; e.effects &= ~(EF_NODEPTHTEST | EF_RED | EF_BLUE); } - e2 = navigation_findnearestwaypoint(self, FALSE); + e2 = navigation_findnearestwaypoint(self, false); navigation_markroutes(e2); i = 0; m = 0; @@ -316,7 +316,7 @@ void ImpulseCommands (void) org = e.origin; tracebox(e.origin, PL_MIN, PL_MAX, e.origin - '0 0 512', MOVE_NOMONSTERS, world); setorigin(e, trace_endpos); - if(navigation_findnearestwaypoint(e, FALSE)) + if(navigation_findnearestwaypoint(e, false)) { setorigin(e, org); e.effects &= ~EF_NODEPTHTEST; @@ -347,7 +347,7 @@ void ImpulseCommands (void) } for(e = start; e; e = e.chain) { - if(navigation_findnearestwaypoint(e, FALSE)) + if(navigation_findnearestwaypoint(e, false)) { } else @@ -364,7 +364,7 @@ void ImpulseCommands (void) for(e = start; e; e = e.chain) { org = e.origin; - if(navigation_findnearestwaypoint(e, TRUE)) + if(navigation_findnearestwaypoint(e, true)) { } else diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index d0ddefe35..c31550c58 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -15,24 +15,24 @@ PlayerJump When you press the jump key -returns TRUE if handled +returns true if handled ============= */ float PlayerJump (void) { if(self.frozen) - return TRUE; // no jumping in freezetag when frozen + return true; // no jumping in freezetag when frozen if(self.player_blocked) - return TRUE; // no jumping while blocked + return true; // no jumping while blocked - float doublejump = FALSE; + float doublejump = false; float mjumpheight = autocvar_sv_jumpvelocity; player_multijump = doublejump; player_jumpheight = mjumpheight; if(MUTATOR_CALLHOOK(PlayerJump)) - return TRUE; + return true; doublejump = player_multijump; mjumpheight = player_jumpheight; @@ -42,7 +42,7 @@ float PlayerJump (void) tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self); if (trace_fraction < 1 && trace_plane_normal.z > 0.7) { - doublejump = TRUE; + doublejump = true; // we MUST clip velocity here! float f; @@ -55,7 +55,7 @@ float PlayerJump (void) if (self.waterlevel >= WATERLEVEL_SWIMMING) { self.velocity_z = self.stat_sv_maxspeed * 0.7; - return TRUE; + return true; } if (!doublejump) @@ -64,7 +64,7 @@ float PlayerJump (void) if(self.cvar_cl_movement_track_canjump) if (!(self.flags & FL_JUMPRELEASED)) - return TRUE; + return true; // sv_jumpspeedcap_min/sv_jumpspeedcap_max act as baseline // velocity bounds. Final velocity is bound between (jumpheight * @@ -116,14 +116,14 @@ float PlayerJump (void) self.flags &= ~FL_ONGROUND; self.flags &= ~FL_JUMPRELEASED; - animdecide_setaction(self, ANIMACTION_JUMP, TRUE); + animdecide_setaction(self, ANIMACTION_JUMP, true); if(autocvar_g_jump_grunt) PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND); self.restart_jump = -1; // restart jump anim next time // value -1 is used to not use the teleport bit (workaround for tiny hitch when re-jumping) - return TRUE; + return true; } void CheckWaterJump() { @@ -136,13 +136,13 @@ void CheckWaterJump() v_forward_z = 0; normalize(v_forward); end = start + v_forward*24; - traceline (start, end, TRUE, self); + traceline (start, end, true, self); if (trace_fraction < 1) { // solid at waist start_z = start.z + self.maxs.z - 8; end = start + v_forward*24; self.movedir = trace_plane_normal * -50; - traceline (start, end, TRUE, self); + traceline (start, end, true, self); if (trace_fraction == 1) { // open at eye level self.flags |= FL_WATERJUMP; @@ -177,7 +177,7 @@ void CheckPlayerJump() Send_Notification(NOTIF_ONE, self, MSG_INFO, INFO_JETPACK_NOFUEL); else if (activate) Send_Notification(NOTIF_ONE, self, MSG_INFO, INFO_JETPACK_NOFUEL); - self.jetpack_stopped = TRUE; + self.jetpack_stopped = true; self.items &= ~IT_USING_JETPACK; } else if (activate && !self.frozen) @@ -185,7 +185,7 @@ void CheckPlayerJump() } else { - self.jetpack_stopped = FALSE; + self.jetpack_stopped = false; self.items &= ~IT_USING_JETPACK; } if (!self.BUTTON_JUMP) @@ -756,7 +756,7 @@ void SV_PlayerPhysics() self.angles_x = random() * 360; self.angles_y = random() * 360; // at least I'm not forcing retardedview by also assigning to angles_z - self.fixangle = TRUE; + self.fixangle = true; } } diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index de1996552..89f9ca2c5 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -92,7 +92,7 @@ void CopyBody(float keepvelocity) self.think = CopyBody_Think; // "bake" the current animation frame for clones (they don't get clientside animation) animdecide_load_if_needed(self); - animdecide_setframes(self, FALSE, frame, frame1time, frame2, frame2time); + animdecide_setframes(self, false, frame, frame1time, frame2, frame2time); self = oldself; } @@ -112,7 +112,7 @@ void player_setupanimsformodel() { // load animation info animdecide_load_if_needed(self); - animdecide_setstate(self, 0, FALSE); + animdecide_setstate(self, 0, false); } void player_anim (void) @@ -135,14 +135,14 @@ void player_anim (void) animbits |= ANIMSTATE_FROZEN; if(self.crouch) animbits |= ANIMSTATE_DUCK; - animdecide_setstate(self, animbits, FALSE); + animdecide_setstate(self, animbits, false); animdecide_setimplicitstate(self, (self.flags & FL_ONGROUND)); if (self.weaponentity) { updateanim(self.weaponentity); if (!self.weaponentity.animstate_override) - setanim(self.weaponentity, self.weaponentity.anim_idle, TRUE, FALSE, FALSE); + setanim(self.weaponentity, self.weaponentity.anim_idle, true, false, false); } } @@ -194,7 +194,7 @@ void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float self.alpha = -1; self.solid = SOLID_NOT; // restore later self.takedamage = DAMAGE_NO; // restore later - self.damagedbycontents = FALSE; + self.damagedbycontents = false; } } @@ -426,9 +426,9 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht if (!self.animstate_override) { if (random() > 0.5) - animdecide_setaction(self, ANIMACTION_PAIN1, TRUE); + animdecide_setaction(self, ANIMACTION_PAIN1, true); else - animdecide_setaction(self, ANIMACTION_PAIN2, TRUE); + animdecide_setaction(self, ANIMACTION_PAIN2, true); } } @@ -497,7 +497,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht if (self.health < 1) { float defer_ClientKill_Now_TeamChange; - defer_ClientKill_Now_TeamChange = FALSE; + defer_ClientKill_Now_TeamChange = false; if(self.alivetime) { @@ -523,7 +523,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht remove(self.killindicator); self.killindicator = world; if(self.killindicator_teamchange) - defer_ClientKill_Now_TeamChange = TRUE; + defer_ClientKill_Now_TeamChange = true; if(self.classname == "body") if(deathtype == DEATH_KILL) @@ -556,7 +556,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht Portal_ClearAllLater(self); - self.fixangle = TRUE; + self.fixangle = true; if(defer_ClientKill_Now_TeamChange) ClientKill_Now_TeamChange(); // can turn player into spectator @@ -600,9 +600,9 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht self.death_time = time; if (random() < 0.5) - animdecide_setstate(self, self.anim_state | ANIMSTATE_DEAD1, TRUE); + animdecide_setstate(self, self.anim_state | ANIMSTATE_DEAD1, true); else - animdecide_setstate(self, self.anim_state | ANIMSTATE_DEAD2, TRUE); + animdecide_setstate(self, self.anim_state | ANIMSTATE_DEAD2, true); if (self.maxs.z > 5) { self.maxs_z = 5; @@ -666,11 +666,11 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f else { colorstr = ""; - teamsay = FALSE; + teamsay = false; } if(intermission_running) - teamsay = FALSE; + teamsay = false; if(msgin != "") msgin = trigger_magicear_processmessage_forallears(source, teamsay, privatesay, msgin); @@ -1096,7 +1096,7 @@ void FakeGlobalSound(string sample, float chan, float voicetype) case VOICETYPE_TAUNT: if(IS_PLAYER(self)) if(self.deadflag == DEAD_NO) - animdecide_setaction(self, ANIMACTION_TAUNT, TRUE); + animdecide_setaction(self, ANIMACTION_TAUNT, true); if(!sv_taunt) break; if(autocvar_sv_gentle) @@ -1193,7 +1193,7 @@ void GlobalSound(string sample, float chan, float voicetype) case VOICETYPE_TAUNT: if(IS_PLAYER(self)) if(self.deadflag == DEAD_NO) - animdecide_setaction(self, ANIMACTION_TAUNT, TRUE); + animdecide_setaction(self, ANIMACTION_TAUNT, true); if(!sv_taunt) break; if(autocvar_sv_gentle) diff --git a/qcsrc/server/command/banning.qc b/qcsrc/server/command/banning.qc index 794854ded..2838a2c29 100644 --- a/qcsrc/server/command/banning.qc +++ b/qcsrc/server/command/banning.qc @@ -69,7 +69,7 @@ void BanCommand_kickban(float request, float argc, string command) if(argc >= 2) { entity client = GetIndexedEntity(argc, 1); - float accepted = VerifyClientEntity(client, TRUE, FALSE); + float accepted = VerifyClientEntity(client, true, false); float reason_arg, bantime, masksize; string reason; @@ -116,11 +116,11 @@ void BanCommand_mute(float request, float argc, string command) // TODO: Add a s if(argc >= 2) { entity client = GetFilteredEntity(argv(1)); - float accepted = VerifyClientEntity(client, TRUE, FALSE); + float accepted = VerifyClientEntity(client, true, false); if(accepted > 0) { - client.muted = TRUE; + client.muted = true; return; } else @@ -204,11 +204,11 @@ void BanCommand_unmute(float request, float argc) if(argc >= 2) { entity client = GetFilteredEntity(argv(1)); - float accepted = VerifyClientEntity(client, TRUE, FALSE); + float accepted = VerifyClientEntity(client, true, false); if(accepted > 0) { - client.muted = FALSE; + client.muted = false; return; } else @@ -282,23 +282,23 @@ void BanCommand_macro_help() float BanCommand_macro_command(float argc, string command) { #define BAN_COMMAND(name,function,description) \ - { if(name == strtolower(argv(0))) { function; return TRUE; } } + { if(name == strtolower(argv(0))) { function; return true; } } BAN_COMMANDS(CMD_REQUEST_COMMAND, argc, command) #undef BAN_COMMAND - return FALSE; + return false; } float BanCommand_macro_usage(float argc) { #define BAN_COMMAND(name,function,description) \ - { if(name == strtolower(argv(1))) { function; return TRUE; } } + { if(name == strtolower(argv(1))) { function; return true; } } BAN_COMMANDS(CMD_REQUEST_USAGE, argc, "") #undef BAN_COMMAND - return FALSE; + return false; } void BanCommand_macro_write_aliases(float fh) @@ -323,8 +323,8 @@ float BanCommand(string command) if(BanCommand_macro_command(argc, command)) // continue as usual and scan for normal commands { - return TRUE; // handled by one of the above GenericCommand_* functions + return true; // handled by one of the above GenericCommand_* functions } - return FALSE; + return false; } diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 898e7db18..64ab85753 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -10,7 +10,7 @@ float SV_ParseClientCommand_floodcheck() if(time <= (self.cmd_floodtime + autocvar_sv_clientcommand_antispam_time)) { self.cmd_floodcount += 1; - if(self.cmd_floodcount > autocvar_sv_clientcommand_antispam_count) { return FALSE; } // too much spam, halt + if(self.cmd_floodcount > autocvar_sv_clientcommand_antispam_count) { return false; } // too much spam, halt } else { @@ -18,7 +18,7 @@ float SV_ParseClientCommand_floodcheck() self.cmd_floodcount = 1; } } - return TRUE; // continue, as we're not flooding yet + return true; // continue, as we're not flooding yet } @@ -92,7 +92,7 @@ void ClientCommand_clientversion(float request, float argc) // internal command, } else if(autocvar_g_campaign || autocvar_g_balance_teams) { - //JoinBestTeam(self, FALSE, TRUE); + //JoinBestTeam(self, false, true); } else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0)) { @@ -306,7 +306,7 @@ void ClientCommand_mobspawn(float request, float argc) mon = get_monsterinfo(i); if(mon.netname == tospawn) { - found = TRUE; + found = true; break; } } @@ -316,10 +316,10 @@ void ClientCommand_mobspawn(float request, float argc) totalspawned += 1; makevectors(self.v_angle); - WarpZone_TraceBox (CENTER_OR_VIEWOFS(self), PL_MIN, PL_MAX, CENTER_OR_VIEWOFS(self) + v_forward * 150, TRUE, self); + WarpZone_TraceBox (CENTER_OR_VIEWOFS(self), PL_MIN, PL_MAX, CENTER_OR_VIEWOFS(self) + v_forward * 150, true, self); //WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 150, MOVE_NORMAL, self); - e = spawnmonster(tospawn, 0, self, self, trace_endpos, FALSE, FALSE, moveflag); + e = spawnmonster(tospawn, 0, self, self, trace_endpos, false, false, moveflag); sprint(self, strcat("Spawned ", e.monster_name, "\n")); @@ -357,12 +357,12 @@ void ClientCommand_ready(float request) // todo: anti-spam for toggling readynes return; if (self.ready) // toggle { - self.ready = FALSE; + self.ready = false; bprint(self.netname, "^2 is ^1NOT^2 ready\n"); } else { - self.ready = TRUE; + self.ready = true; bprint(self.netname, "^2 is ready\n"); } @@ -393,7 +393,7 @@ void ClientCommand_say(float request, float argc, string command) { case CMD_REQUEST_COMMAND: { - if(argc >= 2) { Say(self, FALSE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); } + if(argc >= 2) { Say(self, false, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); } return; // never fall through to usage } @@ -413,7 +413,7 @@ void ClientCommand_say_team(float request, float argc, string command) { case CMD_REQUEST_COMMAND: { - if(argc >= 2) { Say(self, TRUE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); } + if(argc >= 2) { Say(self, true, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); } return; // never fall through to usage } @@ -635,13 +635,13 @@ void ClientCommand_tell(float request, float argc, string command) if(argc >= 3) { entity tell_to = GetIndexedEntity(argc, 1); - float tell_accepted = VerifyClientEntity(tell_to, TRUE, FALSE); + float tell_accepted = VerifyClientEntity(tell_to, true, false); if(tell_accepted > 0) // the target is a real client { if(tell_to != self) // and we're allowed to send to them :D { - Say(self, FALSE, tell_to, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)), TRUE); + Say(self, false, tell_to, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)), true); return; } else { print_to(self, "You can't ^2tell^7 a message to yourself."); return; } @@ -759,23 +759,23 @@ void ClientCommand_macro_help() float ClientCommand_macro_command(float argc, string command) { #define CLIENT_COMMAND(name,function,description) \ - { if(name == strtolower(argv(0))) { function; return TRUE; } } + { if(name == strtolower(argv(0))) { function; return true; } } CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc, command) #undef CLIENT_COMMAND - return FALSE; + return false; } float ClientCommand_macro_usage(float argc) { #define CLIENT_COMMAND(name,function,description) \ - { if(name == strtolower(argv(1))) { function; return TRUE; } } + { if(name == strtolower(argv(1))) { function; return true; } } CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc, "") #undef CLIENT_COMMAND - return FALSE; + return false; } void ClientCommand_macro_write_aliases(float fh) @@ -826,9 +826,9 @@ void SV_ParseClientCommand(string command) default: if(SV_ParseClientCommand_floodcheck()) - break; // "TRUE": continue, as we're not flooding yet + break; // "true": continue, as we're not flooding yet else - return; // "FALSE": not allowed to continue, halt // print("^1ERROR: ^7ANTISPAM CAUGHT: ", command, ".\n"); + return; // "false": not allowed to continue, halt // print("^1ERROR: ^7ANTISPAM CAUGHT: ", command, ".\n"); } /* NOTE: should this be disabled? It can be spammy perhaps, but hopefully it's okay for now */ diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index c5ae7c7be..60ac9917a 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -50,9 +50,9 @@ string GetClientErrorString(float clienterror, string original_input) float VerifyClientNumber(float tmp_number) { if((tmp_number < 1) || (tmp_number > maxclients)) - return FALSE; + return false; else - return TRUE; + return true; } entity GetIndexedEntity(float argc, float start_index) @@ -196,7 +196,7 @@ void timeout_handler_think() // unlock the view for players so they can move around again FOR_EACH_REALPLAYER(tmp_player) - tmp_player.fixangle = FALSE; + tmp_player.fixangle = false; timeout_handler_reset(); } @@ -456,8 +456,8 @@ void CommonCommand_time(float request, entity caller) print_to(caller, strcat("realtime = ", ftos(gettime(GETTIME_REALTIME)))); print_to(caller, strcat("hires = ", ftos(gettime(GETTIME_HIRES)))); print_to(caller, strcat("uptime = ", ftos(gettime(GETTIME_UPTIME)))); - print_to(caller, strcat("localtime = ", strftime(TRUE, "%a %b %e %H:%M:%S %Z %Y"))); - print_to(caller, strcat("gmtime = ", strftime(FALSE, "%a %b %e %H:%M:%S %Z %Y"))); + print_to(caller, strcat("localtime = ", strftime(true, "%a %b %e %H:%M:%S %Z %Y"))); + print_to(caller, strcat("gmtime = ", strftime(false, "%a %b %e %H:%M:%S %Z %Y"))); return; } @@ -698,23 +698,23 @@ void CommonCommand_macro_help(entity caller) float CommonCommand_macro_command(float argc, entity caller, string command) { #define COMMON_COMMAND(name,function,description) \ - { if(name == strtolower(argv(0))) { function; return TRUE; } } + { if(name == strtolower(argv(0))) { function; return true; } } COMMON_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, command) #undef COMMON_COMMAND - return FALSE; + return false; } float CommonCommand_macro_usage(float argc, entity caller) { #define COMMON_COMMAND(name,function,description) \ - { if(name == strtolower(argv(1))) { function; return TRUE; } } + { if(name == strtolower(argv(1))) { function; return true; } } COMMON_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "") #undef COMMON_COMMAND - return FALSE; + return false; } void CommonCommand_macro_write_aliases(float fh) diff --git a/qcsrc/server/command/getreplies.qc b/qcsrc/server/command/getreplies.qc index b77799033..dd57b2645 100644 --- a/qcsrc/server/command/getreplies.qc +++ b/qcsrc/server/command/getreplies.qc @@ -320,7 +320,7 @@ string getlsmaps() (g_cts && !stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, CTS_RECORD, "time")))) ) { - newmaps = TRUE; + newmaps = true; if(i % 2) { col = "^4*"; } else { col = "^5*"; } } diff --git a/qcsrc/server/command/radarmap.qc b/qcsrc/server/command/radarmap.qc index 9706996a4..9c644bfc5 100644 --- a/qcsrc/server/command/radarmap.qc +++ b/qcsrc/server/command/radarmap.qc @@ -28,7 +28,7 @@ float FullTraceFraction(vector a, vector mi, vector ma, vector b) c = trace_endpos; } - n += tracebox_inverted(c, mi, ma, b, MOVE_WORLDONLY, world, FALSE, world); + n += tracebox_inverted(c, mi, ma, b, MOVE_WORLDONLY, world, false, world); white += vlen(trace_endpos - c); c = trace_endpos; @@ -419,9 +419,9 @@ float RadarMap_Make(float argc) if(radarmapper) // after doing the arguments, see if we successfully went forward. { print("Radarmap entity spawned.\n"); - return TRUE; // if so, don't print usage. + return true; // if so, don't print usage. } } - return FALSE; + return false; } diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 7ff97da65..c925b3894 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -91,7 +91,7 @@ void GameCommand_adminmsg(float request, float argc) // Check to see if the player is a valid target client = GetFilteredEntity(t); - accepted = VerifyClientEntity(client, TRUE, FALSE); + accepted = VerifyClientEntity(client, true, false); if(accepted <= 0) { @@ -241,7 +241,7 @@ void GameCommand_anticheat(float request, float argc) case CMD_REQUEST_COMMAND: { entity client = GetIndexedEntity(argc, 1); - float accepted = VerifyClientEntity(client, FALSE, FALSE); + float accepted = VerifyClientEntity(client, false, false); if(accepted > 0) { @@ -551,7 +551,7 @@ void GameCommand_defer_clear(float request, float argc) if(argc >= 2) { client = GetIndexedEntity(argc, 1); - accepted = VerifyClientEntity(client, TRUE, FALSE); + accepted = VerifyClientEntity(client, true, false); if(accepted > 0) { @@ -1030,7 +1030,7 @@ void GameCommand_moveplayer(float request, float argc) // Check to see if the player is a valid target client = GetFilteredEntity(t); - accepted = VerifyClientEntity(client, FALSE, FALSE); + accepted = VerifyClientEntity(client, false, false); if(accepted <= 0) { @@ -1078,7 +1078,7 @@ void GameCommand_moveplayer(float request, float argc) else if(team_id == 0) // auto team { CheckAllowedTeams(client); - team_id = Team_NumberToTeam(FindSmallestTeam(client, FALSE)); + team_id = Team_NumberToTeam(FindSmallestTeam(client, false)); } else { @@ -1190,7 +1190,7 @@ void GameCommand_playerdemo(float request, float argc) case "read": { client = GetIndexedEntity(argc, 2); - accepted = VerifyClientEntity(client, FALSE, TRUE); + accepted = VerifyClientEntity(client, false, true); if(accepted <= 0) { @@ -1206,7 +1206,7 @@ void GameCommand_playerdemo(float request, float argc) case "write": { client = GetIndexedEntity(argc, 2); - accepted = VerifyClientEntity(client, FALSE, FALSE); + accepted = VerifyClientEntity(client, false, false); if(accepted <= 0) { @@ -1261,7 +1261,7 @@ void GameCommand_printstats(float request) { case CMD_REQUEST_COMMAND: { - DumpStats(FALSE); + DumpStats(false); print("stats dumped.\n"); return; } @@ -1468,7 +1468,7 @@ void GameCommand_stuffto(float request, float argc) if(argv(2)) { entity client = GetIndexedEntity(argc, 1); - float accepted = VerifyClientEntity(client, TRUE, FALSE); + float accepted = VerifyClientEntity(client, true, false); if(accepted > 0) { @@ -1824,23 +1824,23 @@ void GameCommand_macro_help() float GameCommand_macro_command(float argc, string command) { #define SERVER_COMMAND(name,function,description) \ - { if(name == strtolower(argv(0))) { function; return TRUE; } } + { if(name == strtolower(argv(0))) { function; return true; } } SERVER_COMMANDS(CMD_REQUEST_COMMAND, argc, command) #undef SERVER_COMMAND - return FALSE; + return false; } float GameCommand_macro_usage(float argc) { #define SERVER_COMMAND(name,function,description) \ - { if(name == strtolower(argv(1))) { function; return TRUE; } } + { if(name == strtolower(argv(1))) { function; return true; } } SERVER_COMMANDS(CMD_REQUEST_USAGE, argc, "") #undef SERVER_COMMAND - return FALSE; + return false; } void GameCommand_macro_write_aliases(float fh) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index fb09b7e9a..7d9517d54 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -69,12 +69,12 @@ float Nagger_SendEntity(entity to, float sendflags) } } - return TRUE; + return true; } void Nagger_Init() { - Net_LinkEntity(nagger = spawn(), FALSE, 0, Nagger_SendEntity); + Net_LinkEntity(nagger = spawn(), false, 0, Nagger_SendEntity); } void Nagger_VoteChanged() @@ -306,7 +306,7 @@ void VoteThink() if(vote_endtime > 0) // a vote was called if(time > vote_endtime) // time is up { - VoteCount(FALSE); + VoteCount(false); } return; @@ -396,7 +396,7 @@ void reset_map(float dorespawn) void ReadyRestart_think() { restart_mapalreadyrestarted = 1; - reset_map(TRUE); + reset_map(true); Score_ClearAll(); remove(self); @@ -457,7 +457,7 @@ void ReadyRestart_force() if(autocvar_sv_timeout) { FOR_EACH_REALPLAYER(tmp_player) { tmp_player.allowed_timeouts = autocvar_sv_timeout_number; } } //reset map immediately if this cvar is not set - if (!autocvar_sv_ready_restart_after_countdown) { reset_map(TRUE); } + if (!autocvar_sv_ready_restart_after_countdown) { reset_map(true); } if(autocvar_sv_eventlog) { GameLogEcho(":restart"); } } @@ -523,10 +523,10 @@ float Votecommand_check_assignment(entity caller, float assignment) || ((!from_server && assignment == VC_ASGNMNT_CLIENTONLY) || (from_server && assignment == VC_ASGNMNT_SERVERONLY))) { - return TRUE; + return true; } - return FALSE; + return false; } string VoteCommand_extractcommand(string input, float startpos, float argc) @@ -547,9 +547,9 @@ float VoteCommand_checknasty(string vote_command) || (strstrofs(vote_command, "\n", 0) >= 0) || (strstrofs(vote_command, "\r", 0) >= 0) || (strstrofs(vote_command, "$", 0) >= 0)) - return FALSE; + return false; - return TRUE; + return true; } float VoteCommand_checkinlist(string vote_command, string list) @@ -557,9 +557,9 @@ float VoteCommand_checkinlist(string vote_command, string list) string l = strcat(" ", list, " "); if(strstrofs(l, strcat(" ", vote_command, " "), 0) >= 0) - return TRUE; + return true; - return FALSE; + return false; } string ValidateMap(string validated_map, entity caller) @@ -599,7 +599,7 @@ float VoteCommand_checkargs(float startpos, float argc) float checkmate; if(cmdrestriction == "") - return TRUE; + return true; ++startpos; // skip command name @@ -611,7 +611,7 @@ float VoteCommand_checkargs(float startpos, float argc) minargs = stof(cmdrestriction); if(argc - startpos < minargs) - return FALSE; + return false; p = strstrofs(cmdrestriction, ";", 0); // find first semicolon @@ -632,7 +632,7 @@ float VoteCommand_checkargs(float startpos, float argc) break; // otherwise fail - return FALSE; + return false; } // cut to next semicolon @@ -652,7 +652,7 @@ float VoteCommand_checkargs(float startpos, float argc) checkmate = strlen(arg); for(check = 0; check < checkmate; ++check) if(strstrofs(charlist, substring(arg, check, 1), 0) < 0) - return FALSE; // not allowed character + return false; // not allowed character // all characters are allowed. FINE. } @@ -661,7 +661,7 @@ float VoteCommand_checkargs(float startpos, float argc) p = q; } - return TRUE; + return true; } float VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, float argc) @@ -680,13 +680,13 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl && (strlen(substring(vote_command, argv_start_index(startpos), strlen(vote_command) - argv_start_index(startpos))) > autocvar_sv_vote_limit) ) - return FALSE; + return false; if (!VoteCommand_checkinlist(first_command, vote_list)) - return FALSE; + return false; if (!VoteCommand_checkargs(startpos, argc)) - return FALSE; + return false; switch(first_command) // now go through and parse the proper commands to adjust as needed. { @@ -694,7 +694,7 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl case "kickban": // catch all kick/kickban commands { entity victim = GetIndexedEntity(argc, (startpos + 1)); - float accepted = VerifyClientEntity(victim, TRUE, FALSE); + float accepted = VerifyClientEntity(victim, true, false); if(accepted > 0) { @@ -709,7 +709,7 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl vote_parsed_command = strcat(first_command, " # ", ftos(num_for_edict(victim)), " ", command_arguments); vote_parsed_display = strcat("^1", vote_command, " (^7", victim.netname, "^1): ", reason); } - else { print_to(caller, strcat("vcall: ", GetClientErrorString(accepted, argv(startpos + 1)), ".\n")); return FALSE; } + else { print_to(caller, strcat("vcall: ", GetClientErrorString(accepted, argv(startpos + 1)), ".\n")); return false; } break; } @@ -719,7 +719,7 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl case "gotomap": // re-direct all map selection commands to gotomap { vote_command = ValidateMap(argv(startpos + 1), caller); - if (!vote_command) { return FALSE; } + if (!vote_command) { return false; } vote_parsed_command = strcat("gotomap ", vote_command); vote_parsed_display = strzone(strcat("^1", vote_parsed_command)); @@ -735,7 +735,7 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl } } - return TRUE; + return true; } @@ -757,7 +757,7 @@ void VoteCommand_abstain(float request, entity caller) // CLIENT ONLY print_to(caller, "^1You abstained from your vote."); caller.vote_selection = VOTE_SELECT_ABSTAIN; msg_entity = caller; - if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); } + if(!autocvar_sv_vote_singlecount) { VoteCount(false); } } return; @@ -818,7 +818,7 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2 calls a vote for ", vote_called_display, "\n"); if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); } Nagger_VoteChanged(); - VoteCount(TRUE); // needed if you are the only one + VoteCount(true); // needed if you are the only one } return; @@ -873,7 +873,7 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co else // everything went okay, proceed with giving this player master privilages { - caller.vote_master = TRUE; + caller.vote_master = true; print_to(caller, strcat("Accepted vote master login from ", GetCallerName(caller))); bprint("\{1}^2* ^3", GetCallerName(caller), "^2 logged in as ^3master^2\n"); if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vlogin:", ftos(caller.playerid))); } @@ -907,7 +907,7 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2 calls a vote to become ^3master^2.\n"); if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); } Nagger_VoteChanged(); - VoteCount(TRUE); // needed if you are the only one + VoteCount(true); // needed if you are the only one } return; @@ -945,7 +945,7 @@ void VoteCommand_no(float request, entity caller) // CLIENT ONLY print_to(caller, "^1You rejected the vote."); caller.vote_selection = VOTE_SELECT_REJECT; msg_entity = caller; - if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); } + if(!autocvar_sv_vote_singlecount) { VoteCount(false); } } return; @@ -1022,7 +1022,7 @@ void VoteCommand_yes(float request, entity caller) // CLIENT ONLY print_to(caller, "^1You accepted the vote."); caller.vote_selection = VOTE_SELECT_ACCEPT; msg_entity = caller; - if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); } + if(!autocvar_sv_vote_singlecount) { VoteCount(false); } } return; @@ -1110,12 +1110,12 @@ void VoteCommand_macro_help(entity caller, float argc) float VoteCommand_macro_command(entity caller, float argc, string vote_command) { #define VOTE_COMMAND(name,function,description,assignment) \ - { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(1))) { function; return TRUE; } } } + { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(1))) { function; return true; } } } VOTE_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, vote_command) #undef VOTE_COMMAND - return FALSE; + return false; } diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 9c6d35e81..fb4e90038 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -606,9 +606,9 @@ const float MIF_GUIDED_TAG = 128; #define MIF_GUIDED_TRACKING (MIF_GUIDED_HEAT | MIF_GUIDED_LASER | MIF_GUIDED_AI | MIF_GUIDED_TAG) #define MIF_GUIDED_CONFUSABLE (MIF_GUIDED_HEAT | MIF_GUIDED_AI) -#define MISSILE_IS_CONFUSABLE(m) ((m.missile_flags & MIF_GUIDED_CONFUSABLE) ? TRUE : FALSE) -#define MISSILE_IS_GUIDED(m) ((m.missile_flags & MIF_GUIDED_ALL) ? TRUE : FALSE) -#define MISSILE_IS_TRACKING(m) ((m.missile_flags & MIF_GUIDED_TRACKING) ? TRUE : FALSE) +#define MISSILE_IS_CONFUSABLE(m) ((m.missile_flags & MIF_GUIDED_CONFUSABLE) ? true : false) +#define MISSILE_IS_GUIDED(m) ((m.missile_flags & MIF_GUIDED_ALL) ? true : false) +#define MISSILE_IS_TRACKING(m) ((m.missile_flags & MIF_GUIDED_TRACKING) ? true : false) //// diff --git a/qcsrc/server/ent_cs.qc b/qcsrc/server/ent_cs.qc index 4bec01a96..b6db8dd3c 100644 --- a/qcsrc/server/ent_cs.qc +++ b/qcsrc/server/ent_cs.qc @@ -25,16 +25,16 @@ float entcs_customize() entity o; o = self.owner; if(o.deadflag != DEAD_NO) - return FALSE; + return false; if (!IS_PLAYER(o)) - return FALSE; + return false; if(other == o) - return FALSE; + return false; if((IS_PLAYER(other)) || other.caplayer) if(!teamplay || o.team != other.team) if (!radar_showennemies) - return FALSE; - return TRUE; + return false; + return true; } float entcs_send(entity to, float sf) @@ -55,7 +55,7 @@ float entcs_send(entity to, float sf) WriteByte(MSG_ENTITY, self.health / 10); // FIXME use a better scale? if(sf & 16) WriteByte(MSG_ENTITY, self.armorvalue / 10); // FIXME use a better scale? - return TRUE; + return true; } void entcs_think() @@ -97,7 +97,7 @@ entity attach_entcs() ent.think = entcs_think; ent.nextthink = time; - Net_LinkEntity(ent, FALSE, 0, entcs_send); + Net_LinkEntity(ent, false, 0, entcs_send); ent.customizeentityforclient = entcs_customize; self.entcs = ent; diff --git a/qcsrc/server/func_breakable.qc b/qcsrc/server/func_breakable.qc index 7b4f08651..d117cbfe6 100644 --- a/qcsrc/server/func_breakable.qc +++ b/qcsrc/server/func_breakable.qc @@ -114,7 +114,7 @@ void func_breakable_behave_destroyed() { self.health = self.max_health; self.takedamage = DAMAGE_NO; - self.bot_attack = FALSE; + self.bot_attack = false; self.event_damage = func_null; self.state = 1; func_breakable_colormod(); @@ -129,7 +129,7 @@ void func_breakable_behave_restore() WaypointSprite_UpdateHealth(self.sprite, self.health); } self.takedamage = DAMAGE_AIM; - self.bot_attack = TRUE; + self.bot_attack = true; self.event_damage = func_breakable_damage; self.state = 0; self.nextthink = 0; // cancel auto respawn diff --git a/qcsrc/server/g_casings.qc b/qcsrc/server/g_casings.qc index 5dea2ce7d..2ef04be17 100644 --- a/qcsrc/server/g_casings.qc +++ b/qcsrc/server/g_casings.qc @@ -9,7 +9,7 @@ float Casing_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, self.angles.x * 256 / 360); WriteByte(MSG_ENTITY, self.angles.y * 256 / 360); WriteByte(MSG_ENTITY, self.angles.z * 256 / 360); - return TRUE; + return true; } void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float randomavel, float casingtype, entity casingowner) @@ -29,6 +29,6 @@ void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float ran e.angles = ang; e.oldorigin_x = compressShortVector(e.velocity); - Net_LinkEntity(e, TRUE, 0.2, Casing_SendEntity); + Net_LinkEntity(e, true, 0.2, Casing_SendEntity); // 0.2s should be enough time for all clients to receive this ent once, do the gibbage and be done with it } diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 9b7f45d0c..0e35b0f74 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -15,7 +15,7 @@ float Damage_DamageInfo_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, bound(1, self.dmg_edge, 255)); WriteShort(MSG_ENTITY, self.oldorigin.x); WriteByte(MSG_ENTITY, self.species); - return TRUE; + return true; } void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, float deathtype, float bloodtype, entity dmgowner) @@ -39,7 +39,7 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad e.oldorigin_x = compressShortVector(e.velocity); e.species = bloodtype; - Net_LinkEntity(e, FALSE, 0.2, Damage_DamageInfo_SendEntity); + Net_LinkEntity(e, false, 0.2, Damage_DamageInfo_SendEntity); } float checkrules_firstblood; @@ -288,7 +288,7 @@ float Obituary_WeaponDeath( { w_deathtype = deathtype; float death_message = WEP_ACTION(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE)); - w_deathtype = FALSE; + w_deathtype = false; if(death_message) { @@ -318,9 +318,9 @@ float Obituary_WeaponDeath( ); } - return TRUE; + return true; } - return FALSE; + return false; } void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) @@ -329,7 +329,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) if (!IS_PLAYER(targ)) { backtrace("Obituary called on non-player?!\n"); return; } // Declarations - float notif_firstblood = FALSE; + float notif_firstblood = false; float kill_count_to_attacker, kill_count_to_target; // Set final information for the death @@ -359,7 +359,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) { if(deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE) { - Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.team, 0, 0); + Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.team, 0, 0); } else { @@ -367,19 +367,19 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) { case DEATH_MIRRORDAMAGE: { - Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0); + Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0); break; } default: { - Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0); + Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0); break; } } } } - else if (!Obituary_WeaponDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0)) + else if (!Obituary_WeaponDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.killcount, 0)) { backtrace("SUICIDE: what the hell happened here?\n"); return; @@ -431,8 +431,8 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) if(!checkrules_firstblood) { - checkrules_firstblood = TRUE; - notif_firstblood = TRUE; // modify the current messages so that they too show firstblood information + checkrules_firstblood = true; + notif_firstblood = true; // modify the current messages so that they too show firstblood information PS_GR_P_ADDVAL(attacker, PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD, 1); PS_GR_P_ADDVAL(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1); @@ -493,8 +493,8 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) ); } - if (!Obituary_WeaponDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker)) - Obituary_SpecialDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, 0); + if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker)) + Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, 0); } } @@ -518,7 +518,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) case DEATH_CUSTOM: { - Obituary_SpecialDeath(targ, FALSE, deathtype, + Obituary_SpecialDeath(targ, false, deathtype, targ.netname, ((strstrofs(deathmessage, "%", 0) < 0) ? strcat("%s ", deathmessage) : deathmessage), deathlocation, @@ -530,7 +530,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) default: { - Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0); + Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0); break; } } @@ -604,7 +604,7 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo // add waypoint if(show_waypoint) - WaypointSprite_Spawn("frozen", 0, 0, targ, '0 0 64', world, targ.team, targ, waypointsprite_attached, TRUE, RADARICON_WAYPOINT, '0.25 0.90 1'); + WaypointSprite_Spawn("frozen", 0, 0, targ, '0 0 64', world, targ.team, targ, waypointsprite_attached, true, RADARICON_WAYPOINT, '0.25 0.90 1'); } void Unfreeze (entity targ) @@ -794,7 +794,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float entity oldself = self; self = targ; - entity spot = SelectSpawnPoint (FALSE); + entity spot = SelectSpawnPoint (false); if(spot) { @@ -807,7 +807,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float self.effects |= EF_TELEPORT_BIT; self.angles_z = 0; // never spawn tilted even if the spot says to - self.fixangle = TRUE; // turn this way immediately + self.fixangle = true; // turn this way immediately self.velocity = '0 0 0'; self.avelocity = '0 0 0'; self.punchangle = '0 0 0'; @@ -990,7 +990,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in stat_damagedone = 0; - targ = WarpZone_FindRadius (inflictororigin, rad + MAX_DAMAGEEXTRARADIUS, FALSE); + targ = WarpZone_FindRadius (inflictororigin, rad + MAX_DAMAGEEXTRARADIUS, false); while (targ) { next = targ.chain; @@ -1140,7 +1140,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, float deathtype, entity directhitentity) { - return RadiusDamageForSource (inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, FALSE, forceintensity, deathtype, directhitentity); + return RadiusDamageForSource (inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, false, forceintensity, deathtype, directhitentity); } .float fire_damagepersec; @@ -1254,7 +1254,7 @@ float Fire_AddDamage(entity e, entity o, float d, float t, float dt) if(e.fire_owner != o) { e.fire_owner = o; - e.fire_hitsound = FALSE; + e.fire_hitsound = false; } } if(accuracy_isgooddamage(o, e)) @@ -1270,7 +1270,7 @@ float Fire_AddDamage(entity e, entity o, float d, float t, float dt) e.fire_endtime = time + t; e.fire_deathtype = dt; e.fire_owner = o; - e.fire_hitsound = FALSE; + e.fire_hitsound = false; if(accuracy_isgooddamage(o, e)) accuracy_add(o, DEATH_WEAPONOFWEAPONDEATH(dt), 0, d); return d; @@ -1309,7 +1309,7 @@ void Fire_ApplyDamage(entity e) e.fire_owner.damage_dealt = hi; e.fire_owner.typehitsound = ty; } - e.fire_hitsound = TRUE; + e.fire_hitsound = true; if (!IS_INDEPENDENT_PLAYER(e)) if(!e.frozen) diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index cb1aedd73..f77cf56e3 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -59,7 +59,7 @@ void RemoveGrapplingHook(entity pl) if(pl.movetype == MOVETYPE_FLY) pl.movetype = MOVETYPE_WALK; - //pl.disableclientprediction = FALSE; + //pl.disableclientprediction = false; } void GrapplingHookReset(void) @@ -109,7 +109,7 @@ float GrapplingHookSend(entity to, float sf) WriteCoord(MSG_ENTITY, self.hook_end.y); WriteCoord(MSG_ENTITY, self.hook_end.z); } - return TRUE; + return true; } void GrapplingHookThink() @@ -267,7 +267,7 @@ void GrapplingHookTouch (void) WarpZone_RefSys_BeginAddingIncrementally(self, self.aiment); } - //self.realowner.disableclientprediction = TRUE; + //self.realowner.disableclientprediction = true; } void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) @@ -335,7 +335,7 @@ void FireGrapplingHook (void) missile.state = 0; // not latched onto anything - W_SetupProjVelocity_Explicit(missile, v_forward, v_up, autocvar_g_balance_grapplehook_speed_fly, 0, 0, 0, FALSE); + W_SetupProjVelocity_Explicit(missile, v_forward, v_up, autocvar_g_balance_grapplehook_speed_fly, 0, 0, 0, false); missile.angles = vectoangles (missile.velocity); //missile.glow_color = 250; // 244, 250 @@ -354,7 +354,7 @@ void FireGrapplingHook (void) missile.hook_start = missile.hook_end = missile.origin; - Net_LinkEntity(missile, FALSE, 0, GrapplingHookSend); + Net_LinkEntity(missile, false, 0, GrapplingHookSend); } // void GrapplingHookFrame() @@ -477,10 +477,10 @@ void GrappleHookInit() else { WEP_ACTION(WEP_HOOK, WR_INIT); - hook_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), FALSE, FALSE, 1); - hook_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), FALSE, FALSE, 2); - hook_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), FALSE, FALSE, 3); - hook_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), FALSE, FALSE, 4); + hook_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), false, false, 1); + hook_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), false, false, 2); + hook_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), false, false, 3); + hook_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), false, false, 4); } } diff --git a/qcsrc/server/g_models.qc b/qcsrc/server/g_models.qc index a594cd521..3916d2b51 100644 --- a/qcsrc/server/g_models.qc +++ b/qcsrc/server/g_models.qc @@ -123,7 +123,7 @@ float g_clientmodel_genericsendentity (entity to, float sf) } } - return TRUE; + return true; } @@ -143,7 +143,7 @@ float g_clientmodel_genericsendentity (entity to, float sf) InitializeEntity(self, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \ if(!self.solid) self.solid = (sol); else if(self.solid < 0) self.solid = SOLID_NOT; \ if(!self.bgmscriptsustain) self.bgmscriptsustain = 1; else if(self.bgmscriptsustain < 0) self.bgmscriptsustain = 0; \ - Net_LinkEntity(self, TRUE, 0, g_clientmodel_genericsendentity); + Net_LinkEntity(self, true, 0, g_clientmodel_genericsendentity); // non-solid model entities: void spawnfunc_misc_gamemodel() { self.angles_x = -self.angles.x; G_MODEL_INIT (SOLID_NOT) } // model entity diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index 63dc67c1f..94856c9c4 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -49,7 +49,7 @@ void updateanim(entity e) e.animstate_starttime = e.animstate_endtime; e.animstate_endtime = e.animstate_starttime + e.animstate_numframes / e.animstate_framerate; } - e.animstate_override = FALSE; + e.animstate_override = false; } e.frame = e.animstate_startframe + bound(0, (time - e.animstate_starttime) * e.animstate_framerate, e.animstate_numframes - 1); //print(ftos(time), " -> ", ftos(e.frame), "\n"); @@ -507,7 +507,7 @@ void tracebox_antilag_force_wz (entity source, vector v1, vector mi, vector ma, } void traceline_antilag_force (entity source, vector v1, vector v2, float nomonst, entity forent, float lag) { - tracebox_antilag_force_wz(source, v1, '0 0 0', '0 0 0', v2, nomonst, forent, lag, FALSE); + tracebox_antilag_force_wz(source, v1, '0 0 0', '0 0 0', v2, nomonst, forent, lag, false); } void traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag) { @@ -519,11 +519,11 @@ void tracebox_antilag (entity source, vector v1, vector mi, vector ma, vector v2 { if (autocvar_g_antilag != 2 || source.cvar_cl_noantilag) lag = 0; - tracebox_antilag_force_wz(source, v1, mi, ma, v2, nomonst, forent, lag, FALSE); + tracebox_antilag_force_wz(source, v1, mi, ma, v2, nomonst, forent, lag, false); } void WarpZone_traceline_antilag_force (entity source, vector v1, vector v2, float nomonst, entity forent, float lag) { - tracebox_antilag_force_wz(source, v1, '0 0 0', '0 0 0', v2, nomonst, forent, lag, TRUE); + tracebox_antilag_force_wz(source, v1, '0 0 0', '0 0 0', v2, nomonst, forent, lag, true); } void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag) { @@ -535,7 +535,7 @@ void WarpZone_tracebox_antilag (entity source, vector v1, vector mi, vector ma, { if (autocvar_g_antilag != 2 || source.cvar_cl_noantilag) lag = 0; - tracebox_antilag_force_wz(source, v1, mi, ma, v2, nomonst, forent, lag, TRUE); + tracebox_antilag_force_wz(source, v1, mi, ma, v2, nomonst, forent, lag, true); } float tracebox_inverted (vector v1, vector mi, vector ma, vector v2, float nomonsters, entity forent, float stopatentity, entity ignorestopatentity) // returns the number of traces done, for benchmarking @@ -640,12 +640,12 @@ vector findbetterlocation (vector org, float mindist) c = 0; while (c < 6) { - traceline (org, org + vec, TRUE, world); + traceline (org, org + vec, true, world); vec = vec * -1; if (trace_fraction < 1) { loc = trace_endpos; - traceline (loc, loc + vec, TRUE, world); + traceline (loc, loc + vec, true, world); if (trace_fraction >= 1) org = loc + vec; } @@ -727,7 +727,7 @@ float LOD_customize() self.modelindex = self.lodmodelindex1; else // if(d == 3) self.modelindex = self.lodmodelindex2; - return TRUE; + return true; } // TODO csqc network this so it only gets sent once @@ -739,7 +739,7 @@ float LOD_customize() else self.modelindex = self.lodmodelindex2; - return TRUE; + return true; } void LOD_uncustomize() diff --git a/qcsrc/server/g_tetris.qc b/qcsrc/server/g_tetris.qc index d7e47c077..6fb88e436 100644 --- a/qcsrc/server/g_tetris.qc +++ b/qcsrc/server/g_tetris.qc @@ -820,7 +820,7 @@ float CheckMetrics(float piece, float orgx, float orgy, float rot) /*FIXDECL*/ PieceMinsMaxs(rot, piece); if (tet_piecemins.x+orgx<1 || tet_piecemaxs.x+orgx > TET_WIDTH || tet_piecemins.y+orgy<1 || tet_piecemaxs.y+orgy> TET_LINES) - return FALSE; // ouside the level + return false; // ouside the level for (y = tet_piecemins.y; y <= tet_piecemaxs.y; y = y + 1) { l = GetLine(y + orgy); @@ -828,9 +828,9 @@ float CheckMetrics(float piece, float orgx, float orgy, float rot) /*FIXDECL*/ for (x = tet_piecemins.x; x <= tet_piecemaxs.x; x = x + 1) if (PieceMetric(x, y, rot, piece)) if (GetXBlock(x + orgx, l)) - return FALSE; // uhoh, gonna hit something. + return false; // uhoh, gonna hit something. } - return TRUE; + return true; } void ClearPiece(float piece, float orgx, float orgy, float rot) /*FIXDECL*/ diff --git a/qcsrc/server/g_triggers.qc b/qcsrc/server/g_triggers.qc index 7d3c16eaf..0af8737b4 100644 --- a/qcsrc/server/g_triggers.qc +++ b/qcsrc/server/g_triggers.qc @@ -509,9 +509,9 @@ float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end) for(th = trigger_hurt_first; th; th = th.trigger_hurt_next) if(tracebox_hits_box(start, mi, ma, end, th.absmin, th.absmax)) - return TRUE; + return true; - return FALSE; + return false; } ////////////////////////////////////////////////////////////// @@ -614,7 +614,7 @@ void trigger_gravity_touch() { float g; - if(self.state != TRUE) + if(self.state != true) return; EXACTTRIGGER_TOUCH; @@ -668,12 +668,12 @@ void spawnfunc_trigger_gravity() if(self.noise != "") precache_sound(self.noise); - self.state = TRUE; + self.state = true; IFTARGETED { self.use = trigger_gravity_use; if(self.spawnflags & 2) - self.state = FALSE; + self.state = false; } } @@ -1049,7 +1049,7 @@ void spawnfunc_func_rain() self.state = 1; // 1 is rain, 0 is snow self.Version = 1; - Net_LinkEntity(self, FALSE, 0, rainsnow_SendEntity); + Net_LinkEntity(self, false, 0, rainsnow_SendEntity); } @@ -1087,7 +1087,7 @@ void spawnfunc_func_snow() self.state = 0; // 1 is rain, 0 is snow self.Version = 1; - Net_LinkEntity(self, FALSE, 0, rainsnow_SendEntity); + Net_LinkEntity(self, false, 0, rainsnow_SendEntity); } .float modelscale; @@ -1334,7 +1334,7 @@ void spawnfunc_misc_laser() self.mangle = self.angles; - Net_LinkEntity(self, FALSE, 0, laser_SendEntity); + Net_LinkEntity(self, false, 0, laser_SendEntity); IFTARGETED { @@ -1903,7 +1903,7 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay, entity oldself; string savemessage; - magicear_matched = FALSE; + magicear_matched = false; dotrigger = ((IS_PLAYER(source)) && (source.deadflag == DEAD_NO) && ((ear.radius == 0) || (vlen(source.origin - ear.origin) <= ear.radius))); domatch = ((ear.spawnflags & 32) || dotrigger); @@ -1920,7 +1920,7 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay, if(!W_Tuba_HasPlayed(source, ear.message, ear.movedir.x, !(ear.spawnflags & 512), ear.movedir.y, ear.movedir.z)) return msgin; - magicear_matched = TRUE; + magicear_matched = true; if(dotrigger) { @@ -2011,7 +2011,7 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay, if(matchstart == -1) // no match return msgin; - magicear_matched = TRUE; + magicear_matched = true; if(dotrigger) { diff --git a/qcsrc/server/g_violence.qc b/qcsrc/server/g_violence.qc index f034c0c46..0f3e885de 100644 --- a/qcsrc/server/g_violence.qc +++ b/qcsrc/server/g_violence.qc @@ -7,7 +7,7 @@ float Violence_GibSplash_SendEntity(entity to, float sf) WriteShort(MSG_ENTITY, floor(self.origin.y / 4)); // not using a coord here, as gibs don't need this accuracy WriteShort(MSG_ENTITY, floor(self.origin.z / 4)); // not using a coord here, as gibs don't need this accuracy WriteShort(MSG_ENTITY, self.oldorigin.x); // acrually compressed velocity - return TRUE; + return true; } // TODO maybe convert this to a TE? @@ -38,7 +38,7 @@ void Violence_GibSplash_At(vector org, vector dir, float type, float amount, ent e.oldorigin_x = compressShortVector(e.velocity); - Net_LinkEntity(e, FALSE, 0.2, Violence_GibSplash_SendEntity); + Net_LinkEntity(e, false, 0.2, Violence_GibSplash_SendEntity); } void Violence_GibSplash(entity source, float type, float amount, entity attacker) diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 0f29b1cfa..08681c980 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -133,8 +133,8 @@ void cvar_changes_init() buf_cvarlist(h, "", "_"); // exclude all _ cvars as they are temporary n = buf_getsize(h); - adding = TRUE; - pureadding = TRUE; + adding = true; + pureadding = true; for(i = 0; i < n; ++i) { @@ -470,7 +470,7 @@ float RandomSeed_Send(entity to, float sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_RANDOMSEED); WriteShort(MSG_ENTITY, self.cnt); - return TRUE; + return true; } void RandomSeed_Think() { @@ -483,7 +483,7 @@ void RandomSeed_Spawn() { randomseed = spawn(); randomseed.think = RandomSeed_Think; - Net_LinkEntity(randomseed, FALSE, 0, RandomSeed_Send); + Net_LinkEntity(randomseed, false, 0, RandomSeed_Send); entity oldself; oldself = self; @@ -542,7 +542,7 @@ void spawnfunc_worldspawn (void) if(world_already_spawned) error("world already spawned - you may have EXACTLY ONE worldspawn!"); - world_already_spawned = TRUE; + world_already_spawned = true; remove = remove_safely; // during spawning, watch what you remove! @@ -559,7 +559,7 @@ void spawnfunc_worldspawn (void) head = nextent(head); } - server_is_dedicated = (stof(cvar_defstring("is_dedicated")) ? TRUE : FALSE); + server_is_dedicated = (stof(cvar_defstring("is_dedicated")) ? true : false); // needs to be done so early because of the constants they create CALL_ACCUMULATED_FUNCTION(RegisterWeapons); @@ -643,7 +643,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", ftos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000)); matchid = strzone(s); GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s)); @@ -823,7 +823,7 @@ void spawnfunc_worldspawn (void) if(substring(argv(i), -18, -1) != "-serverpackage.txt") if(substring(argv(i), -14, -1) != ".serverpackage") // OLD legacy s = strcat(s, " ", argv(i)); - fd = search_begin("*-serverpackage.txt", TRUE, FALSE); + fd = search_begin("*-serverpackage.txt", true, false); if(fd >= 0) { j = search_getsize(fd); @@ -831,7 +831,7 @@ void spawnfunc_worldspawn (void) s = strcat(s, " ", search_getfilename(fd, i)); search_end(fd); } - fd = search_begin("*.serverpackage", TRUE, FALSE); + fd = search_begin("*.serverpackage", true, false); if(fd >= 0) { j = search_getsize(fd); @@ -913,7 +913,7 @@ float MapHasRightSize(string map) if(!fexists(strcat("maps/", map, ".waypoints"))) { dprint(": no waypoints\n"); - return FALSE; + return false; } dprint(": has waypoints\n"); } @@ -931,18 +931,18 @@ float MapHasRightSize(string map) if(player_count < mapmin) { dprint("not enough\n"); - return FALSE; + return false; } if(player_count > mapmax) { dprint("too many\n"); - return FALSE; + return false; } dprint("right size\n"); - return TRUE; + return true; } dprint(": not found\n"); - return TRUE; + return true; } string Map_Filename(float position) @@ -1172,29 +1172,29 @@ float DoNextMapOverride(float reinit) if(autocvar_g_campaign) { CampaignPostIntermission(); - alreadychangedlevel = TRUE; - return TRUE; + alreadychangedlevel = true; + return true; } if(autocvar_quit_when_empty) { if(player_count <= currentbots) { localcmd("quit\n"); - alreadychangedlevel = TRUE; - return TRUE; + alreadychangedlevel = true; + return true; } } if(autocvar_quit_and_redirect != "") { redirection_target = strzone(autocvar_quit_and_redirect); - alreadychangedlevel = TRUE; - return TRUE; + alreadychangedlevel = true; + return true; } if (!reinit && autocvar_samelevel) // if samelevel is set, stay on same level { localcmd("restart\n"); - alreadychangedlevel = TRUE; - return TRUE; + alreadychangedlevel = true; + return true; } if(autocvar_nextmap != "") { @@ -1203,29 +1203,29 @@ float DoNextMapOverride(float reinit) cvar_set("nextmap",m); if(!m || gametypevote) - return FALSE; + return false; if(autocvar_sv_vote_gametype) { Map_Goto_SetStr(m); - return FALSE; + return false; } if(MapInfo_CheckMap(m)) { Map_Goto_SetStr(m); Map_Goto(reinit); - alreadychangedlevel = TRUE; - return TRUE; + alreadychangedlevel = true; + return true; } } if(!reinit && autocvar_lastlevel) { cvar_settemp_restore(); localcmd("set lastlevel 0\ntogglemenu 1\n"); - alreadychangedlevel = TRUE; - return TRUE; + alreadychangedlevel = true; + return true; } - return FALSE; + return false; } void GotoNextMap(float reinit) @@ -1235,7 +1235,7 @@ void GotoNextMap(float reinit) //string s; if (alreadychangedlevel) return; - alreadychangedlevel = TRUE; + alreadychangedlevel = true; string nextMap; @@ -1265,7 +1265,7 @@ void IntermissionThink() && ((self.autoscreenshot > 0) && (time > self.autoscreenshot)) ) { self.autoscreenshot = -1; - if(IS_REAL_CLIENT(self)) { stuffcmd(self, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; echo \"^5A screenshot has been taken at request of the server.\"\n", GetMapname(), strftime(FALSE, "%s"))); } + if(IS_REAL_CLIENT(self)) { stuffcmd(self, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; echo \"^5A screenshot has been taken at request of the server.\"\n", GetMapname(), strftime(false, "%s"))); } return; } @@ -1350,13 +1350,13 @@ void DumpStats(float final) if(!final) { - to_console = TRUE; // always print printstats replies - to_eventlog = FALSE; // but never print them to the event log + to_console = true; // always print printstats replies + to_eventlog = false; // but never print them to the event log } if(to_eventlog) if(autocvar_sv_eventlog_console) - to_console = FALSE; // otherwise we get the output twice + to_console = false; // otherwise we get the output twice if(final) s = ":scores:"; @@ -1374,7 +1374,7 @@ void DumpStats(float final) { file = fopen(autocvar_sv_logscores_filename, FILE_APPEND); if(file == -1) - to_file = FALSE; + to_file = false; else fputs(file, strcat(s, "\n")); } @@ -1476,7 +1476,7 @@ only called if a time or frag limit has expired */ void NextLevel() { - gameover = TRUE; + gameover = true; intermission_running = 1; @@ -1497,10 +1497,10 @@ void NextLevel() VoteReset(); - DumpStats(TRUE); + DumpStats(true); // send statistics - PlayerStats_GameReport(TRUE); + PlayerStats_GameReport(true); WeaponStats_Shutdown(); Kill_Notification(NOTIF_ALL, world, MSG_CENTER, 0); // kill all centerprints now @@ -1737,16 +1737,16 @@ float WinningCondition_LMS() float have_players; float l; - have_player = FALSE; - have_players = FALSE; + have_player = false; + have_players = false; l = LMS_NewPlayerLives(); head = find(world, classname, "player"); if(head) - have_player = TRUE; + have_player = true; head2 = find(head, classname, "player"); if(head2) - have_players = TRUE; + have_players = true; if(have_player) { @@ -1798,7 +1798,7 @@ float WinningCondition_LMS() ClearWinners(); if(WinningConditionHelper_winner) - WinningConditionHelper_winner.winning = TRUE; + WinningConditionHelper_winner.winning = true; if(WinningConditionHelper_topscore == WinningConditionHelper_secondscore) return WINNING_NEVER; @@ -1860,10 +1860,10 @@ float WinningCondition_Scores(float limit, float leadlimit) } } - limitreached = FALSE; + limitreached = false; if(limit) if(WinningConditionHelper_topscore >= limit) - limitreached = TRUE; + limitreached = true; if(leadlimit) { float leadlimitreached; @@ -1965,7 +1965,7 @@ float WinningCondition_RanOutOfSpawns() ClearWinners(); if(team1_score + team2_score + team3_score + team4_score == 0) { - checkrules_equality = TRUE; + checkrules_equality = true; return WINNING_YES; } else if(team1_score + team2_score + team3_score + team4_score == 1) @@ -2062,7 +2062,7 @@ void CheckRules_World() { if(!checkrules_suddendeathwarning) { - checkrules_suddendeathwarning = TRUE; + checkrules_suddendeathwarning = true; if(g_race && !g_race_qualifying) Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_RACE_FINISHLAP); else @@ -2221,7 +2221,7 @@ void EndFrame() // needed! FOR_EACH_CLIENT(self) { - self.typehitsound = FALSE; + self.typehitsound = false; self.damage_dealt = 0; antilag_record(self, altime); } @@ -2232,7 +2232,7 @@ void EndFrame() /* * RedirectionThink: - * returns TRUE if redirecting + * returns true if redirecting */ float redirection_timeout; float redirection_nextthink; @@ -2241,7 +2241,7 @@ float RedirectionThink() float clients_found; if(redirection_target == "") - return FALSE; + return false; if(!redirection_timeout) { @@ -2254,7 +2254,7 @@ float RedirectionThink() } if(time < redirection_nextthink) - return TRUE; + return true; redirection_nextthink = time + 1; @@ -2275,7 +2275,7 @@ float RedirectionThink() if(time > redirection_timeout || clients_found == 0) localcmd("\nwait; wait; wait; quit\n"); - return TRUE; + return true; } void TargetMusic_RestoreGame(); @@ -2307,7 +2307,7 @@ void Shutdown() Ban_SaveBans(); // playerstats with unfinished match - PlayerStats_GameReport(FALSE); + PlayerStats_GameReport(false); if(!cheatcount_total) { diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index 5a3bed86d..2c9fa4bcd 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -276,11 +276,11 @@ void Ban_SaveBans() float Ban_Delete(float i) { if(i < 0) - return FALSE; + return false; if(i >= ban_count) - return FALSE; + return false; if(ban_expire[i] == 0) - return FALSE; + return false; if(ban_expire[i] > 0) { OnlineBanList_SendUnban(ban_ip[i]); @@ -289,7 +289,7 @@ float Ban_Delete(float i) ban_expire[i] = 0; ban_ip[i] = ""; Ban_SaveBans(); - return TRUE; + return true; } void Ban_LoadBans() @@ -298,7 +298,7 @@ void Ban_LoadBans() for(i = 0; i < ban_count; ++i) Ban_Delete(i); ban_count = 0; - ban_loaded = TRUE; + ban_loaded = true; n = tokenize_console(autocvar_g_banned_list); if(stof(argv(0)) == 1) { @@ -360,10 +360,10 @@ float Ban_GetClientIP(entity client) goto ipv6; i2 = strstrofs(s, ".", i1 + 1); if(i2 < 0) - return FALSE; + return false; i3 = strstrofs(s, ".", i2 + 1); if(i3 < 0) - return FALSE; + return false; i4 = strstrofs(s, ".", i3 + 1); if(i4 >= 0) s = substring(s, 0, i4); @@ -372,21 +372,21 @@ float Ban_GetClientIP(entity client) ban_ip2 = substring(s, 0, i2); // 16 ban_ip3 = substring(s, 0, i3); // 24 ban_ip4 = strcat1(s); // 32 - return TRUE; + return true; :ipv6 i1 = strstrofs(s, ":", 0); if(i1 < 0) - return FALSE; + return false; i1 = strstrofs(s, ":", i1 + 1); if(i1 < 0) - return FALSE; + return false; i2 = strstrofs(s, ":", i1 + 1); if(i2 < 0) - return FALSE; + return false; i3 = strstrofs(s, ":", i2 + 1); if(i3 < 0) - return FALSE; + return false; ban_ip1 = strcat(substring(s, 0, i1), "::/32"); // 32 ban_ip2 = strcat(substring(s, 0, i2), "::/48"); // 48 @@ -397,7 +397,7 @@ float Ban_GetClientIP(entity client) else ban_ip3 = strcat(substring(s, 0, i2), ":0::/56"); - return TRUE; + return true; } float Ban_IsClientBanned(entity client, float idx) @@ -406,7 +406,7 @@ float Ban_IsClientBanned(entity client, float idx) if(!ban_loaded) Ban_LoadBans(); if(!Ban_GetClientIP(client)) - return FALSE; + return false; if(idx < 0) { b = 0; @@ -417,27 +417,27 @@ float Ban_IsClientBanned(entity client, float idx) b = idx; e = idx + 1; } - ipbanned = FALSE; + ipbanned = false; for(i = b; i < e; ++i) { string s; if(time > ban_expire[i]) continue; s = ban_ip[i]; - if(ban_ip1 == s) ipbanned = TRUE; - if(ban_ip2 == s) ipbanned = TRUE; - if(ban_ip3 == s) ipbanned = TRUE; - if(ban_ip4 == s) ipbanned = TRUE; - if(ban_idfp == s) return TRUE; + if(ban_ip1 == s) ipbanned = true; + if(ban_ip2 == s) ipbanned = true; + if(ban_ip3 == s) ipbanned = true; + if(ban_ip4 == s) ipbanned = true; + if(ban_idfp == s) return true; } if(ipbanned) { if(!autocvar_g_banned_list_idmode) - return TRUE; + return true; if (!ban_idfp) - return TRUE; + return true; } - return FALSE; + return false; } float Ban_MaybeEnforceBan(entity client) @@ -448,17 +448,17 @@ float Ban_MaybeEnforceBan(entity client) s = strcat("^1NOTE:^7 banned client ", client.netaddress, " just tried to enter\n"); dropclient(client); bprint(s); - return TRUE; + return true; } - return FALSE; + return false; } .float ban_checked; float Ban_MaybeEnforceBanOnce(entity client) { if(client.ban_checked) - return FALSE; - client.ban_checked = TRUE; + return false; + client.ban_checked = true; return Ban_MaybeEnforceBan(self); } @@ -516,7 +516,7 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync) if(substring(reason, 0, 1) != "~") // like IRC: unauthenticated banner OnlineBanList_SendBan(ip, bantime, reason); - return FALSE; + return false; } // do we have a free slot? @@ -543,7 +543,7 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync) if(ban_expire[i] > time + bantime) { print(ip, " could not get banned due to no free ban slot\n"); - return FALSE; + return false; } // okay, insert our new victim as i Ban_Delete(i); @@ -562,7 +562,7 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync) if(substring(reason, 0, 1) != "~") // like IRC: unauthenticated banner OnlineBanList_SendBan(ip, bantime, reason); - return TRUE; + return true; } void Ban_KickBanClient(entity client, float bantime, float masksize, string reason) diff --git a/qcsrc/server/item_key.qc b/qcsrc/server/item_key.qc index 964f065e3..994e6a6f1 100644 --- a/qcsrc/server/item_key.qc +++ b/qcsrc/server/item_key.qc @@ -12,15 +12,15 @@ bool item_keys_usekey(entity l, entity p) { if (!valid) { // other has none of the needed keys - return FALSE; + return false; } else if (l.itemkeys == valid) { // ALL needed keys were given l.itemkeys = 0; - return TRUE; + return true; } else { // only some of the needed keys were given l.itemkeys &= ~valid; - return TRUE; + return true; } } @@ -105,7 +105,7 @@ void spawn_item_key() { { // first nudge it off the floor a little bit to avoid math errors setorigin(self, self.origin + '0 0 1'); - // note droptofloor returns FALSE if stuck/or would fall too far + // note droptofloor returns false if stuck/or would fall too far droptofloor(); } @@ -308,8 +308,8 @@ void trigger_keylock_kill(string s) { }; void trigger_keylock_touch(void) { - bool key_used = FALSE; - bool started_delay = FALSE; + bool key_used = false; + bool started_delay = false; // only player may trigger the lock if (!IS_PLAYER(other)) @@ -337,10 +337,10 @@ void trigger_keylock_touch(void) { } // trigger target2 - if (self.delay <= time || started_delay == TRUE) + if (self.delay <= time || started_delay == true) if (self.target2) { trigger_keylock_trigger(self.target2); - started_delay = TRUE; + started_delay = true; self.delay = time + self.wait; } } else { diff --git a/qcsrc/server/item_key.qh b/qcsrc/server/item_key.qh index 24ef1e935..99b2b1d5c 100644 --- a/qcsrc/server/item_key.qh +++ b/qcsrc/server/item_key.qh @@ -12,7 +12,7 @@ string item_keys_names[ITEM_KEY_MAX]; /** * Use keys from p on l. - * Returns TRUE if any new keys were given, FALSE otherwise. + * Returns true if any new keys were given, false otherwise. */ float item_keys_usekey(entity l, entity p); diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index 9a2cb1871..a85415ff8 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -6,7 +6,7 @@ float GameTypeVote_AvailabilityStatus(string gtname) if ( autocvar_nextmap != "" ) { - if ( !MapInfo_Get_ByName(autocvar_nextmap, FALSE, 0) ) + if ( !MapInfo_Get_ByName(autocvar_nextmap, false, 0) ) return GTV_FORBIDDEN; if (!(MapInfo_Map_supportedGametypes & type)) return GTV_FORBIDDEN; @@ -169,10 +169,10 @@ void MapVote_Init() if(mapvote_suggestion_ptr) for(i = 0; i < 100 && mapvote_count < smax; ++i) - MapVote_AddVotable(mapvote_suggestions[floor(random() * mapvote_suggestion_ptr)], TRUE); + MapVote_AddVotable(mapvote_suggestions[floor(random() * mapvote_suggestion_ptr)], true); for(i = 0; i < 100 && mapvote_count < nmax; ++i) - MapVote_AddVotable(GetNextMap(), FALSE); + MapVote_AddVotable(GetNextMap(), false); if(mapvote_count == 0) { @@ -182,7 +182,7 @@ void MapVote_Init() ShuffleMaplist(); localcmd("\nmenu_cmd sync\n"); for(i = 0; i < 100 && mapvote_count < nmax; ++i) - MapVote_AddVotable(GetNextMap(), FALSE); + MapVote_AddVotable(GetNextMap(), false); } mapvote_count_real = mapvote_count; @@ -308,12 +308,12 @@ float MapVote_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, to.mapvote); } - return TRUE; + return true; } void MapVote_Spawn() { - Net_LinkEntity(mapvote_ent = spawn(), FALSE, 0, MapVote_SendEntity); + Net_LinkEntity(mapvote_ent = spawn(), false, 0, MapVote_SendEntity); } void MapVote_TouchMask() @@ -329,7 +329,7 @@ void MapVote_TouchVotes(entity voter) float MapVote_Finished(float mappos) { if(alreadychangedlevel) - return FALSE; + return false; string result; float i; @@ -364,25 +364,25 @@ float MapVote_Finished(float mappos) { if ( GameTypeVote_Finished(mappos) ) { - gametypevote = FALSE; + gametypevote = false; if(autocvar_nextmap != "") { Map_Goto_SetStr(autocvar_nextmap); Map_Goto(0); - alreadychangedlevel = TRUE; - return TRUE; + alreadychangedlevel = true; + return true; } else MapVote_Init(); } - return FALSE; + return false; } Map_Goto_SetStr(mapvote_maps[mappos]); Map_Goto(0); - alreadychangedlevel = TRUE; + alreadychangedlevel = true; - return TRUE; + return true; } void MapVote_CheckRules_1() @@ -493,7 +493,7 @@ float MapVote_CheckRules_2() GameLogEcho(result); } - return FALSE; + return false; } void MapVote_Tick() @@ -551,7 +551,7 @@ void MapVote_Start() MapInfo_Enumerate(); if(MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1)) - mapvote_run = TRUE; + mapvote_run = true; } void MapVote_Think() @@ -590,7 +590,7 @@ void MapVote_Think() cvar_set("rescan_pending", "0"); } - mapvote_initialized = TRUE; + mapvote_initialized = true; if(DoNextMapOverride(0)) return; if(!autocvar_g_maplist_votable || player_count <= 0) @@ -609,7 +609,7 @@ void MapVote_Think() float GameTypeVote_SetGametype(float type) { if (MapInfo_CurrentGametype() == type) - return TRUE; + return true; float tsave = MapInfo_CurrentGametype(); @@ -629,7 +629,7 @@ float GameTypeVote_SetGametype(float type) bprint("Cannot use this game type: no map for it found\n"); MapInfo_SwitchGameType(tsave); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0); - return FALSE; + return false; } //localcmd("gametype ", MapInfo_Type_ToString(type), "\n"); @@ -638,14 +638,14 @@ float GameTypeVote_SetGametype(float type) if(autocvar_g_maplist_shuffle) ShuffleMaplist(); - return TRUE; + return true; } float gametypevote_finished; float GameTypeVote_Finished(float pos) { if(!gametypevote || gametypevote_finished) - return FALSE; + return false; if ( !GameTypeVote_SetGametype(MapInfo_Type_FromString(mapvote_maps[pos])) ) { @@ -655,22 +655,22 @@ float GameTypeVote_Finished(float pos) localcmd("sv_vote_gametype_hook_all\n"); localcmd("sv_vote_gametype_hook_", mapvote_maps[pos], "\n"); - gametypevote_finished = TRUE; + gametypevote_finished = true; - return TRUE; + return true; } float GameTypeVote_AddVotable(string nextMode) { float j; if ( nextMode == "" || MapInfo_Type_FromString(nextMode) == 0 ) - return FALSE; + return false; for(j = 0; j < mapvote_count; ++j) if(mapvote_maps[j] == nextMode) - return FALSE; + return false; mapvote_maps[mapvote_count] = strzone(nextMode); - mapvote_maps_suggested[mapvote_count] = FALSE; + mapvote_maps_suggested[mapvote_count] = false; mapvote_maps_screenshot_dir[mapvote_count] = 0; mapvote_maps_pakfile[mapvote_count] = strzone(""); @@ -678,7 +678,7 @@ float GameTypeVote_AddVotable(string nextMode) mapvote_count += 1; - return TRUE; + return true; } @@ -720,13 +720,13 @@ float GameTypeVote_Start() mapvote_maps[0] = strzone(MapInfo_Type_ToString(MapInfo_CurrentGametype())); //GameTypeVote_Finished(0); MapVote_Finished(0); - return FALSE; + return false; } if ( really_available == 1 ) { //GameTypeVote_Finished(which_available); MapVote_Finished(which_available); - return FALSE; + return false; } mapvote_count_real = mapvote_count; @@ -737,5 +737,5 @@ float GameTypeVote_Start() MapVote_Spawn(); - return TRUE; + return true; } diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 6e7d4b45d..0f3c8f608 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -118,7 +118,7 @@ void GameLogEcho(string s) { if (!logfile_open) { - logfile_open = TRUE; + logfile_open = true; matches = autocvar_sv_eventlog_files_counter + 1; cvar_set("sv_eventlog_files_counter", ftos(matches)); fn = ftos(matches); @@ -131,7 +131,7 @@ void GameLogEcho(string s) if (logfile >= 0) { if (autocvar_sv_eventlog_files_timestamps) - fputs(logfile, strcat(":time:", strftime(TRUE, "%Y-%m-%d %H:%M:%S", "\n", s, "\n"))); + fputs(logfile, strcat(":time:", strftime(true, "%Y-%m-%d %H:%M:%S", "\n", s, "\n"))); else fputs(logfile, strcat(s, "\n")); } @@ -232,7 +232,7 @@ entity findnearest(vector point, .string field, string value, vector axismod) // now use the first one from our list that we can see for (i = 0; i < num_nearest; ++i) { - traceline(point, nearest_entity[i].origin, TRUE, world); + traceline(point, nearest_entity[i].origin, true, world); if (trace_fraction == 1) { if (i != 0) @@ -378,8 +378,8 @@ string formatmessage(string msg) return msg; } -float boolean(float value) { // if value is 0 return FALSE (0), otherwise return TRUE (1) - return (value == 0) ? FALSE : TRUE; +float boolean(float value) { // if value is 0 return false (0), otherwise return true (1) + return (value == 0) ? false : true; } /* @@ -643,9 +643,9 @@ float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO: what still ne if (g_lms || g_ca || allguns) { if(weaponinfo.spawnflags & WEP_FLAG_NORMAL) - d = TRUE; + d = true; else - d = FALSE; + d = false; } else if (g_cts) d = (i == WEP_SHOTGUN); @@ -783,7 +783,7 @@ void readplayerstartcvars() for (i = WEP_FIRST; i <= WEP_LAST; ++i) { e = get_weaponinfo(i); - float w = want_weapon(e, FALSE); + float w = want_weapon(e, false); if(w & 1) start_weapons |= WepSet_FromWeapon(i); if(w & 2) @@ -1059,13 +1059,13 @@ float sound_allowed(float dest, entity e) // sounds to self may always pass if (dest == MSG_ONE) if (e == msg_entity) - return TRUE; + return true; // sounds by players can be removed if (autocvar_bot_sound_monopoly) if (IS_REAL_CLIENT(e)) - return FALSE; + return false; // anything else may pass - return TRUE; + return true; } #undef sound @@ -1194,15 +1194,15 @@ void play2(entity e, string filename) float spamsound(entity e, float chan, string samp, float vol, float atten) { if (!sound_allowed(MSG_BROADCAST, e)) - return FALSE; + return false; if (time > e.spamtime) { e.spamtime = time; sound(e, chan, samp, vol, atten); - return TRUE; + return true; } - return FALSE; + return false; } void play2team(float t, string filename) @@ -1245,7 +1245,7 @@ void precache_playermodel(string m) if(fexists(f)) precache_model(f); - globhandle = search_begin(strcat(m, "_*.sounds"), TRUE, FALSE); + globhandle = search_begin(strcat(m, "_*.sounds"), true, false); if (globhandle < 0) return; n = search_getsize(globhandle); @@ -1262,7 +1262,7 @@ void precache_all_playermodels(string pattern) float globhandle, i, n; string f; - globhandle = search_begin(pattern, TRUE, FALSE); + globhandle = search_begin(pattern, true, false); if (globhandle < 0) return; n = search_getsize(globhandle); @@ -1612,7 +1612,7 @@ float EliminatedPlayers_SendEntity(entity to, float sendflags) } } - return TRUE; + return true; } void EliminatedPlayers_Init(float(entity) isEliminated_func) @@ -1622,7 +1622,7 @@ void EliminatedPlayers_Init(float(entity) isEliminated_func) backtrace("Can't spawn eliminatedPlayers again!"); return; } - Net_LinkEntity(eliminatedPlayers = spawn(), FALSE, 0, EliminatedPlayers_SendEntity); + Net_LinkEntity(eliminatedPlayers = spawn(), false, 0, EliminatedPlayers_SendEntity); eliminatedPlayers.isEliminated = isEliminated_func; } @@ -1677,9 +1677,9 @@ float trace_hits_box_1d(float end, float thmi, float thma) { // just check if x is in range if (0 < thmi) - return FALSE; + return false; if (0 > thma) - return FALSE; + return false; } else { @@ -1688,9 +1688,9 @@ float trace_hits_box_1d(float end, float thmi, float thma) trace_hits_box_a0 = max(trace_hits_box_a0, min(thmi / end, thma / end)); trace_hits_box_a1 = min(trace_hits_box_a1, max(thmi / end, thma / end)); if (trace_hits_box_a0 > trace_hits_box_a1) - return FALSE; + return false; } - return TRUE; + return true; } float trace_hits_box(vector start, vector end, vector thmi, vector thma) @@ -1704,13 +1704,13 @@ float trace_hits_box(vector start, vector end, vector thmi, vector thma) trace_hits_box_a1 = 1; if (!trace_hits_box_1d(end.x, thmi.x, thma.x)) - return FALSE; + return false; if (!trace_hits_box_1d(end.y, thmi.y, thma.y)) - return FALSE; + return false; if (!trace_hits_box_1d(end.z, thmi.z, thma.z)) - return FALSE; + return false; - return TRUE; + return true; } float tracebox_hits_box(vector start, vector mi, vector ma, vector end, vector thmi, vector thma) @@ -1759,11 +1759,11 @@ void W_Crylink_Dequeue(entity e); float WarpZone_Projectile_Touch_ImpactFilter_Callback() { if(SUB_OwnerCheck()) - return TRUE; + return true; if(SUB_NoImpactCheck()) { if(self.classname == "nade") - return FALSE; // no checks here + return false; // no checks here else if(self.classname == "grapplinghook") RemoveGrapplingHook(self.realowner); else if(self.classname == "spike") @@ -1773,11 +1773,11 @@ float WarpZone_Projectile_Touch_ImpactFilter_Callback() } else remove(self); - return TRUE; + return true; } if(trace_ent && trace_ent.solid > SOLID_TRIGGER) UpdateCSQCProjectile(self); - return FALSE; + return false; } #define PROJECTILE_TOUCH if(WarpZone_Projectile_Touch()) return @@ -1936,10 +1936,10 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f setorigin(e, start); e.angles = vectoangles(end - start); dprint("Needed ", ftos(i + 1), " attempts\n"); - return TRUE; + return true; } else - return FALSE; + return false; } void write_recordmarker(entity pl, float tstart, float dt) @@ -2169,7 +2169,7 @@ float modeleffect_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, self.fade_time * 100.0); WriteByte(MSG_ENTITY, self.alpha * 255.0); - return TRUE; + return true; } void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector ang, vector angv, float s0, float s2, float a, float t1, float t2) @@ -2198,7 +2198,7 @@ void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector an e.scale2 = -s2; sz = max(e.scale, e.scale2); setsize(e, e.mins * sz, e.maxs * sz); - Net_LinkEntity(e, FALSE, 0.1, modeleffect_SendEntity); + Net_LinkEntity(e, false, 0.1, modeleffect_SendEntity); } void shockwave_spawn(string m, vector org, float sz, float t1, float t2) @@ -2355,9 +2355,9 @@ float LostMovetypeFollow(entity ent) float isPushable(entity e) { if(e.iscreature) - return TRUE; + return true; if(e.pushable) - return TRUE; + return true; switch(e.classname) { case "body": @@ -2365,11 +2365,11 @@ float isPushable(entity e) case "keepawayball": case "nexball_basketball": case "nexball_football": - return TRUE; + return true; case "bullet": // antilagged bullets can't hit this either - return FALSE; + return false; } if (e.projectiledeathtype) - return TRUE; - return FALSE; + return true; + return false; } diff --git a/qcsrc/server/mutators/base.qh b/qcsrc/server/mutators/base.qh index 3ea206859..8c3895919 100644 --- a/qcsrc/server/mutators/base.qh +++ b/qcsrc/server/mutators/base.qh @@ -180,7 +180,7 @@ MUTATOR_HOOKABLE(MonsterDropItem); MUTATOR_HOOKABLE(MonsterMove); // called when a monster moves - // returning TRUE makes the monster stop + // returning true makes the monster stop // INPUT: float monster_speed_run; float monster_speed_walk; @@ -324,7 +324,7 @@ MUTATOR_HOOKABLE(HelpMePing); MUTATOR_HOOKABLE(VehicleSpawn); // called when a vehicle initializes - // return TRUE to remove the vehicle + // return true to remove the vehicle MUTATOR_HOOKABLE(VehicleEnter); // called when a player enters a vehicle @@ -335,7 +335,7 @@ MUTATOR_HOOKABLE(VehicleEnter); MUTATOR_HOOKABLE(VehicleTouch); // called when a player touches a vehicle - // return TRUE to stop player from entering the vehicle + // return true to stop player from entering the vehicle // INPUT entity self; // vehicle entity other; // player diff --git a/qcsrc/server/mutators/gamemode_assault.qc b/qcsrc/server/mutators/gamemode_assault.qc index a62460e22..b64219ddf 100644 --- a/qcsrc/server/mutators/gamemode_assault.qc +++ b/qcsrc/server/mutators/gamemode_assault.qc @@ -106,9 +106,9 @@ float assault_decreaser_sprite_visible(entity e) decreaser = self.assault_decreaser; if(decreaser.enemy.health >= ASSAULT_VALUE_INACTIVE) - return FALSE; + return false; - return TRUE; + return true; } void target_objective_decrease_activate() @@ -346,7 +346,7 @@ void havocbot_goalrating_ast_targets(float ratingscale) if (!ad.bot_attack) continue; - found = FALSE; + found = false; for(tod = world; (tod = find(tod, targetname, ad.target)); ) { if(tod.classname == "target_objective_decrease") @@ -354,7 +354,7 @@ void havocbot_goalrating_ast_targets(float ratingscale) if(tod.enemy.health > 0 && tod.enemy.health < ASSAULT_VALUE_INACTIVE) { // dprint(etos(ad),"\n"); - found = TRUE; + found = true; break; } } @@ -374,7 +374,7 @@ void havocbot_goalrating_ast_targets(float ratingscale) // te_lightning2(world, '0 0 0', p); // Find and rate waypoints around it - found = FALSE; + found = false; best = world; bestvalue = 99999999999; for(radius=0; radius<1500 && !found; radius+=500) @@ -385,7 +385,7 @@ void havocbot_goalrating_ast_targets(float ratingscale) if(wp.classname=="waypoint") if(checkpvs(wp.origin, ad)) { - found = TRUE; + found = true; if(wp.cnt= -ctf_captureshield_min_negscore) - return FALSE; + return false; players_total = players_worseeq = 0; FOR_EACH_PLAYER(e) @@ -144,9 +144,9 @@ float ctf_CaptureShield_CheckStatus(entity p) // use this rule here if(players_worseeq >= players_total * ctf_captureshield_max_ratio) - return FALSE; + return false; - return TRUE; + return true; } void ctf_CaptureShield_Update(entity player, float wanted_status) @@ -161,10 +161,10 @@ void ctf_CaptureShield_Update(entity player, float wanted_status) float ctf_CaptureShield_Customize() { - if(!other.ctf_captureshielded) { return FALSE; } - if(SAME_TEAM(self, other)) { return FALSE; } + if(!other.ctf_captureshielded) { return false; } + if(SAME_TEAM(self, other)) { return false; } - return TRUE; + return true; } void ctf_CaptureShield_Touch() @@ -229,7 +229,7 @@ void ctf_Handle_Drop(entity flag, entity player, float droptype) // waypoints if(autocvar_g_ctf_flag_dropped_waypoint) - WaypointSprite_Spawn("flagdropped", 0, 0, flag, FLAG_WAYPOINT_OFFSET, world, ((autocvar_g_ctf_flag_dropped_waypoint == 2) ? 0 : player.team), flag, wps_flagdropped, TRUE, RADARICON_FLAG, WPCOLOR_DROPPEDFLAG(flag.team)); + WaypointSprite_Spawn("flagdropped", 0, 0, flag, FLAG_WAYPOINT_OFFSET, world, ((autocvar_g_ctf_flag_dropped_waypoint == 2) ? 0 : player.team), flag, wps_flagdropped, true, RADARICON_FLAG, WPCOLOR_DROPPEDFLAG(flag.team)); if(autocvar_g_ctf_flag_return_time || (autocvar_g_ctf_flag_return_damage && autocvar_g_ctf_flag_health)) { @@ -332,7 +332,7 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype) targ_origin = WarpZone_RefSys_TransformOrigin(receiver, flag, (0.5 * (receiver.absmin + receiver.absmax))); // this is target origin as seen by the flag flag.pass_distance = vlen((('1 0 0' * targ_origin.x) + ('0 1 0' * targ_origin.y)) - (('1 0 0' * player.origin.x) + ('0 1 0' * player.origin.y))); // for the sake of this check, exclude Z axis - ctf_CalculatePassVelocity(flag, targ_origin, player.origin, FALSE); + ctf_CalculatePassVelocity(flag, targ_origin, player.origin, false); // main flag.movetype = MOVETYPE_FLY; @@ -353,7 +353,7 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype) makevectors((player.v_angle.y * '0 1 0') + (bound(autocvar_g_ctf_throw_angle_min, player.v_angle.x, autocvar_g_ctf_throw_angle_max) * '1 0 0')); flag_velocity = (('0 0 1' * autocvar_g_ctf_throw_velocity_up) + ((v_forward * autocvar_g_ctf_throw_velocity_forward) * ((player.items & IT_STRENGTH) ? autocvar_g_ctf_throw_strengthmultiplier : 1))); - flag.velocity = W_CalculateProjectileVelocity(player.velocity, flag_velocity, FALSE); + flag.velocity = W_CalculateProjectileVelocity(player.velocity, flag_velocity, false); ctf_Handle_Drop(flag, player, droptype); break; } @@ -367,7 +367,7 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype) default: case DROP_NORMAL: { - flag.velocity = W_CalculateProjectileVelocity(player.velocity, (('0 0 1' * autocvar_g_ctf_drop_velocity_up) + ((('0 1 0' * crandom()) + ('1 0 0' * crandom())) * autocvar_g_ctf_drop_velocity_side)), FALSE); + flag.velocity = W_CalculateProjectileVelocity(player.velocity, (('0 0 1' * autocvar_g_ctf_drop_velocity_up) + ((('0 1 0' * crandom()) + ('1 0 0' * crandom())) * autocvar_g_ctf_drop_velocity_side)), false); ctf_Handle_Drop(flag, player, droptype); break; } @@ -620,11 +620,11 @@ void ctf_CheckStalemate(void) } if(stale_red_flags && stale_blue_flags) - ctf_stalemate = TRUE; + ctf_stalemate = true; else if((!stale_red_flags && !stale_blue_flags) && autocvar_g_ctf_stalemate_endcondition == 2) - { ctf_stalemate = FALSE; wpforenemy_announced = FALSE; } + { ctf_stalemate = false; wpforenemy_announced = false; } else if((!stale_red_flags || !stale_blue_flags) && autocvar_g_ctf_stalemate_endcondition == 1) - { ctf_stalemate = FALSE; wpforenemy_announced = FALSE; } + { ctf_stalemate = false; wpforenemy_announced = false; } // if sufficient stalemate, then set up the waypointsprite and announce the stalemate if necessary if(ctf_stalemate) @@ -632,7 +632,7 @@ void ctf_CheckStalemate(void) for(tmp_entity = ctf_staleflaglist; tmp_entity; tmp_entity = tmp_entity.ctf_staleflagnext) { if((tmp_entity.owner) && (!tmp_entity.owner.wps_enemyflagcarrier)) - WaypointSprite_Spawn("enemyflagcarrier", 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, world, tmp_entity.team, tmp_entity.owner, wps_enemyflagcarrier, TRUE, RADARICON_FLAG, WPCOLOR_ENEMYFC(tmp_entity.owner.team)); + WaypointSprite_Spawn("enemyflagcarrier", 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, world, tmp_entity.team, tmp_entity.owner, wps_enemyflagcarrier, true, RADARICON_FLAG, WPCOLOR_ENEMYFC(tmp_entity.owner.team)); } if (!wpforenemy_announced) @@ -640,7 +640,7 @@ void ctf_CheckStalemate(void) FOR_EACH_REALPLAYER(tmp_entity) Send_Notification(NOTIF_ONE, tmp_entity, MSG_CENTER, ((tmp_entity.flagcarried) ? CENTER_CTF_STALEMATE_CARRIER : CENTER_CTF_STALEMATE_OTHER)); - wpforenemy_announced = TRUE; + wpforenemy_announced = true; } } } @@ -786,7 +786,7 @@ void ctf_FlagThink() else { // still a viable target, go for it - ctf_CalculatePassVelocity(self, targ_origin, self.origin, TRUE); + ctf_CalculatePassVelocity(self, targ_origin, self.origin, true); } return; } @@ -951,8 +951,8 @@ void ctf_DelayedFlagSetup(void) // called after a flag is placed on a map by ctf self.bot_basewaypoint = self.nearestwaypoint; // waypointsprites - WaypointSprite_SpawnFixed(((self.team == NUM_TEAM_1) ? "redbase" : "bluebase"), self.origin + FLAG_WAYPOINT_OFFSET, self, wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, FALSE)); - WaypointSprite_UpdateTeamRadar(self.wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, FALSE)); + WaypointSprite_SpawnFixed(((self.team == NUM_TEAM_1) ? "redbase" : "bluebase"), self.origin + FLAG_WAYPOINT_OFFSET, self, wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, false)); + WaypointSprite_UpdateTeamRadar(self.wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, false)); // captureshield setup ctf_CaptureShield_Spawn(self); @@ -982,7 +982,7 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag flag.max_flag_health = ((autocvar_g_ctf_flag_return_damage && autocvar_g_ctf_flag_health) ? autocvar_g_ctf_flag_health : 100); flag.health = flag.max_flag_health; flag.event_damage = ctf_FlagDamage; - flag.pushable = TRUE; + flag.pushable = true; flag.teleportable = TELEPORT_NORMAL; flag.damagedbytriggers = autocvar_g_ctf_flag_return_when_unreachable; flag.damagedbycontents = autocvar_g_ctf_flag_return_when_unreachable; @@ -1043,12 +1043,12 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag if((flag.spawnflags & 1) || flag.noalign) // don't drop to floor, just stay at fixed location { flag.dropped_origin = flag.origin; - flag.noalign = TRUE; + flag.noalign = true; flag.movetype = MOVETYPE_NONE; } else // drop to floor, automatically find a platform and set that as spawn origin { - flag.noalign = FALSE; + flag.noalign = false; self = flag; droptofloor(); flag.movetype = MOVETYPE_TOSS; @@ -1233,7 +1233,7 @@ void havocbot_goalrating_ctf_carrieritems(float ratingscale, vector org, float s { entity head; float t; - head = findchainfloat(bot_pickup, TRUE); + head = findchainfloat(bot_pickup, true); while (head) { // gather health and armor only @@ -1757,7 +1757,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink) if(self.wps_flagcarrier) WaypointSprite_UpdateHealth(self.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON)); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_PlayerDamage) // for changing damage and force values that are applied to players in g_damage.qc @@ -1785,7 +1785,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDamage) // for changing damage and force values t } // todo: add notification for when flag carrier needs help? } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_PlayerDies) @@ -1799,7 +1799,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDies) if(frag_target.flagcarried) { ctf_Handle_Throw(frag_target, world, DROP_NORMAL); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_GiveFragsForKill) @@ -1822,7 +1822,7 @@ MUTATOR_HOOKFUNCTION(ctf_RemovePlayer) if(flag.ctf_dropper == self) { flag.ctf_dropper = world; } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_PortalTeleport) @@ -1831,12 +1831,12 @@ MUTATOR_HOOKFUNCTION(ctf_PortalTeleport) if(!autocvar_g_ctf_portalteleport) { ctf_Handle_Throw(self, world, DROP_NORMAL); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey) { - if(MUTATOR_RETURNVALUE || gameover) { return FALSE; } + if(MUTATOR_RETURNVALUE || gameover) { return false; } entity player = self; @@ -1846,7 +1846,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey) if(autocvar_g_ctf_pass) { entity head, closest_target = world; - head = WarpZone_FindRadius(player.origin, autocvar_g_ctf_pass_radius, TRUE); + head = WarpZone_FindRadius(player.origin, autocvar_g_ctf_pass_radius, true); while(head) // find the closest acceptable target to pass to { @@ -1873,7 +1873,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey) Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname); } player.throw_antispam = time + autocvar_g_ctf_pass_wait; - return TRUE; + return true; } else if(player.flagcarried) { @@ -1890,7 +1890,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey) head = head.chain; } - if(closest_target) { ctf_Handle_Throw(player, closest_target, DROP_PASS); return TRUE; } + if(closest_target) { ctf_Handle_Throw(player, closest_target, DROP_PASS); return true; } } // throw the flag in front of you @@ -1903,12 +1903,12 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey) player.throw_prevtime = time; player.throw_count = 1; ctf_Handle_Throw(player, world, DROP_THROW); - return TRUE; + return true; } else { Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_FLAG_THROW_PUNISH, rint((player.throw_prevtime + autocvar_g_ctf_throw_punish_delay) - time)); - return FALSE; + return false; } } else @@ -1919,12 +1919,12 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey) player.throw_prevtime = time; ctf_Handle_Throw(player, world, DROP_THROW); - return TRUE; + return true; } } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_HelpMePing) @@ -1936,11 +1936,11 @@ MUTATOR_HOOKFUNCTION(ctf_HelpMePing) } else // create a normal help me waypointsprite { - WaypointSprite_Spawn("helpme", waypointsprite_deployed_lifetime, waypointsprite_limitedrange, self, FLAG_WAYPOINT_OFFSET, world, self.team, self, wps_helpme, FALSE, RADARICON_HELPME, '1 0.5 0'); + WaypointSprite_Spawn("helpme", waypointsprite_deployed_lifetime, waypointsprite_limitedrange, self, FLAG_WAYPOINT_OFFSET, world, self.team, self, wps_helpme, false, RADARICON_HELPME, '1 0.5 0'); WaypointSprite_Ping(self.wps_helpme); } - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(ctf_VehicleEnter) @@ -1958,10 +1958,10 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleEnter) vh_player.flagcarried.scale = VEHICLE_FLAG_SCALE; //vh_player.flagcarried.angles = '0 0 0'; } - return TRUE; + return true; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_VehicleExit) @@ -1972,10 +1972,10 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleExit) setorigin(vh_player.flagcarried, FLAG_CARRY_OFFSET); vh_player.flagcarried.scale = FLAG_SCALE; vh_player.flagcarried.angles = '0 0 0'; - return TRUE; + return true; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_AbortSpeedrun) @@ -1984,10 +1984,10 @@ MUTATOR_HOOKFUNCTION(ctf_AbortSpeedrun) { Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(self.flagcarried, INFO_CTF_FLAGRETURN_ABORTRUN_)); ctf_RespawnFlag(self.flagcarried); - return TRUE; + return true; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_MatchEnd) @@ -2005,7 +2005,7 @@ MUTATOR_HOOKFUNCTION(ctf_MatchEnd) flag.movetype = MOVETYPE_NONE; flag.takedamage = DAMAGE_NO; flag.solid = SOLID_NOT; - flag.nextthink = FALSE; // stop thinking + flag.nextthink = false; // stop thinking //dprint("stopping the ", flag.netname, " from moving.\n"); break; @@ -2021,13 +2021,13 @@ MUTATOR_HOOKFUNCTION(ctf_MatchEnd) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ctf_BotRoles) { havocbot_ctf_reset_role(self); - return TRUE; + return true; } @@ -2147,7 +2147,7 @@ void spawnfunc_team_CTF_bluespawn() { spawnfunc_info_player_team2(); } // scoreboard setup void ctf_ScoreRules() { - ScoreRules_basics(2, SFL_SORT_PRIO_PRIMARY, 0, TRUE); + ScoreRules_basics(2, SFL_SORT_PRIO_PRIMARY, 0, true); ScoreInfo_SetLabel_TeamScore (ST_CTF_CAPS, "caps", SFL_SORT_PRIO_PRIMARY); ScoreInfo_SetLabel_PlayerScore(SP_CTF_CAPS, "caps", SFL_SORT_PRIO_SECONDARY); ScoreInfo_SetLabel_PlayerScore(SP_CTF_CAPTIME, "captime", SFL_LOWER_IS_BETTER | SFL_TIME); diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh index 86ff40dcc..002a434ec 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qh +++ b/qcsrc/server/mutators/gamemode_ctf.qh @@ -34,9 +34,9 @@ const float WPFE_THINKRATE = 0.5; const float VEHICLE_FLAG_SCALE = 1.0; // waypoint colors -#define WPCOLOR_ENEMYFC(t) (colormapPaletteColor(t - 1, FALSE) * 0.75) +#define WPCOLOR_ENEMYFC(t) (colormapPaletteColor(t - 1, false) * 0.75) #define WPCOLOR_FLAGCARRIER(t) ('0.8 0.8 0') -#define WPCOLOR_DROPPEDFLAG(t) (('0.25 0.25 0.25' + colormapPaletteColor(t - 1, FALSE)) * 0.5) +#define WPCOLOR_DROPPEDFLAG(t) (('0.25 0.25 0.25' + colormapPaletteColor(t - 1, false)) * 0.5) // sounds #define snd_flag_taken noise diff --git a/qcsrc/server/mutators/gamemode_cts.qc b/qcsrc/server/mutators/gamemode_cts.qc index a773e4e8c..102072471 100644 --- a/qcsrc/server/mutators/gamemode_cts.qc +++ b/qcsrc/server/mutators/gamemode_cts.qc @@ -29,7 +29,7 @@ void havocbot_role_cts() void cts_ScoreRules() { - ScoreRules_basics(0, 0, 0, FALSE); + ScoreRules_basics(0, 0, 0, false); if(g_race_qualifying) { ScoreInfo_SetLabel_PlayerScore(SP_CTS_FASTEST, "fastest", SFL_SORT_PRIO_PRIMARY | SFL_LOWER_IS_BETTER | SFL_TIME); @@ -97,7 +97,7 @@ MUTATOR_HOOKFUNCTION(cts_PlayerPhysics) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_ResetMap) @@ -131,7 +131,7 @@ MUTATOR_HOOKFUNCTION(cts_ResetMap) cts_ScoreRules(); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_PlayerPreThink) @@ -141,7 +141,7 @@ MUTATOR_HOOKFUNCTION(cts_PlayerPreThink) if(msg_entity.enemy.race_laptime) race_SendNextCheckpoint(msg_entity.enemy, 1); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_ClientConnect) @@ -168,7 +168,7 @@ MUTATOR_HOOKFUNCTION(cts_ClientConnect) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_MakePlayerObserver) @@ -181,7 +181,7 @@ MUTATOR_HOOKFUNCTION(cts_MakePlayerObserver) race_PreparePlayer(); self.race_checkpoint = -1; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_PlayerSpawn) @@ -196,7 +196,7 @@ MUTATOR_HOOKFUNCTION(cts_PlayerSpawn) self.race_place = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_PutClientInServer) @@ -211,20 +211,20 @@ MUTATOR_HOOKFUNCTION(cts_PutClientInServer) race_AbandonRaceCheck(self); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_PlayerDies) { self.respawn_flags |= RESPAWN_FORCE; race_AbandonRaceCheck(self); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_BotRoles) { self.havocbot_role = havocbot_role_cts; - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(cts_PlayerPostThink) @@ -241,21 +241,21 @@ MUTATOR_HOOKFUNCTION(cts_PlayerPostThink) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_ForbidThrowing) { // no weapon dropping in CTS - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(cts_FilterItem) { if(self.classname == "droppedweapon") - return TRUE; + return true; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_PlayerDamage) @@ -264,19 +264,19 @@ MUTATOR_HOOKFUNCTION(cts_PlayerDamage) if(!autocvar_g_cts_selfdamage) frag_damage = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(cts_ForbidClearPlayerScore) { - return TRUE; // in CTS, you don't lose score by observing + return true; // in CTS, you don't lose score by observing } MUTATOR_HOOKFUNCTION(cts_SetMods) { g_cloaked = 1; // always enable cloak in CTS - return FALSE; + return false; } void cts_Initialize() diff --git a/qcsrc/server/mutators/gamemode_domination.qc b/qcsrc/server/mutators/gamemode_domination.qc index 8e4d929be..04c20b250 100644 --- a/qcsrc/server/mutators/gamemode_domination.qc +++ b/qcsrc/server/mutators/gamemode_domination.qc @@ -422,19 +422,19 @@ MUTATOR_HOOKFUNCTION(dom_PlayerSpawn) self.player_blocked = 1; else self.player_blocked = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(dom_ClientConnect) { set_dom_state(self); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(dom_BotRoles) { self.havocbot_role = havocbot_role_dom; - return TRUE; + return true; } /*QUAKED spawnfunc_dom_controlpoint (0 .5 .8) (-16 -16 -24) (16 16 32) @@ -513,7 +513,7 @@ void ScoreRules_dom(float teams) { if(domination_roundbased) { - ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, 0, TRUE); + ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, 0, true); ScoreInfo_SetLabel_TeamScore (ST_DOM_CAPS, "caps", SFL_SORT_PRIO_PRIMARY); ScoreInfo_SetLabel_PlayerScore(SP_DOM_TAKES, "takes", 0); ScoreRules_basics_end(); @@ -526,7 +526,7 @@ void ScoreRules_dom(float teams) sp_domticks = SFL_SORT_PRIO_PRIMARY; else sp_score = SFL_SORT_PRIO_PRIMARY; - ScoreRules_basics(teams, sp_score, sp_score, TRUE); + ScoreRules_basics(teams, sp_score, sp_score, true); ScoreInfo_SetLabel_TeamScore (ST_DOM_TICKS, "ticks", sp_domticks); ScoreInfo_SetLabel_PlayerScore(SP_DOM_TICKS, "ticks", sp_domticks); ScoreInfo_SetLabel_PlayerScore(SP_DOM_TAKES, "takes", 0); diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index 70de31fe3..9efe965ce 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -7,7 +7,7 @@ float freezetag_teams; const float SP_FREEZETAG_REVIVALS = 4; void freezetag_ScoreRules(float teams) { - ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); // SFL_SORT_PRIO_PRIMARY + ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, true); // SFL_SORT_PRIO_PRIMARY ScoreInfo_SetLabel_PlayerScore(SP_FREEZETAG_REVIVALS, "revivals", 0); ScoreRules_basics_end(); } @@ -188,7 +188,7 @@ void freezetag_Freeze(entity attacker) if(autocvar_g_freezetag_frozen_maxtime > 0) self.freezetag_frozen_timeout = time + autocvar_g_freezetag_frozen_maxtime; - Freeze(self, 0, 1, TRUE); + Freeze(self, 0, 1, true); freezetag_count_alive_players(); @@ -206,8 +206,8 @@ void freezetag_Unfreeze(entity attacker) float freezetag_isEliminated(entity e) { if(IS_PLAYER(e) && (e.frozen == 1 || e.deadflag != DEAD_NO)) - return TRUE; - return FALSE; + return true; + return false; } @@ -465,7 +465,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink) if(!o) o = other; if(self.frozen == 1) - other.reviving = TRUE; + other.reviving = true; ++n; } } @@ -509,7 +509,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink) if(other.reviving) { other.revive_progress = self.revive_progress; - other.reviving = FALSE; + other.reviving = false; } } } @@ -536,7 +536,7 @@ MUTATOR_HOOKFUNCTION(freezetag_BotRoles) self.havocbot_role = havocbot_role_ft_offense; } - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(freezetag_GetTeamCount) diff --git a/qcsrc/server/mutators/gamemode_invasion.qc b/qcsrc/server/mutators/gamemode_invasion.qc index dcdd3365a..a5e19f67a 100644 --- a/qcsrc/server/mutators/gamemode_invasion.qc +++ b/qcsrc/server/mutators/gamemode_invasion.qc @@ -59,14 +59,14 @@ void invasion_SpawnChosenMonster(float mon) setsize(e, (get_monsterinfo(mon)).mins, (get_monsterinfo(mon)).maxs); if(MoveToRandomMapLocation(e, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256)) - monster = spawnmonster("", mon, world, world, e.origin, FALSE, FALSE, 2); + monster = spawnmonster("", mon, world, world, e.origin, false, false, 2); else return; e.think = SUB_Remove; e.nextthink = time + 0.1; } else - monster = spawnmonster("", ((spawn_point.monsterid) ? spawn_point.monsterid : mon), spawn_point, spawn_point, spawn_point.origin, FALSE, FALSE, 2); + monster = spawnmonster("", ((spawn_point.monsterid) ? spawn_point.monsterid : mon), spawn_point, spawn_point, spawn_point.origin, false, false, 2); if(spawn_point) monster.target2 = spawn_point.target2; monster.spawnshieldtime = time; @@ -99,7 +99,7 @@ void invasion_SpawnChosenMonster(float mon) } } - monster.monster_attack = FALSE; // it's the player's job to kill all the monsters + monster.monster_attack = false; // it's the player's job to kill all the monsters if(inv_roundcnt >= inv_maxrounds) monster.spawnflags |= MONSTERFLAG_MINIBOSS; // last round spawns minibosses @@ -218,7 +218,7 @@ float Invasion_CheckWinner() float Invasion_CheckPlayers() { - return TRUE; + return true; } void Invasion_RoundStart() @@ -271,13 +271,13 @@ MUTATOR_HOOKFUNCTION(invasion_MonsterDies) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(invasion_MonsterSpawn) { if(!(self.spawnflags & MONSTERFLAG_SPAWNED)) - return TRUE; + return true; if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) { @@ -292,16 +292,16 @@ MUTATOR_HOOKFUNCTION(invasion_MonsterSpawn) self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP | DPCONTENTS_MONSTERCLIP; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(invasion_OnEntityPreSpawn) { if(startsWith(self.classname, "monster_")) if(!(self.spawnflags & MONSTERFLAG_SPAWNED)) - return TRUE; + return true; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(invasion_StartFrame) @@ -309,19 +309,19 @@ MUTATOR_HOOKFUNCTION(invasion_StartFrame) monsters_total = inv_maxspawned; // TODO: make sure numspawned never exceeds maxspawned monsters_killed = inv_numkilled; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(invasion_PlayerRegen) { // no regeneration in invasion - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(invasion_PlayerSpawn) { - self.bot_attack = FALSE; - return FALSE; + self.bot_attack = false; + return false; } MUTATOR_HOOKFUNCTION(invasion_PlayerDamage) @@ -332,13 +332,13 @@ MUTATOR_HOOKFUNCTION(invasion_PlayerDamage) frag_force = '0 0 0'; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(invasion_PlayerCommand) { if(MUTATOR_RETURNVALUE) // command was already handled? - return FALSE; + return false; if(cmd_name == "debuginvasion") { @@ -350,18 +350,18 @@ MUTATOR_HOOKFUNCTION(invasion_PlayerCommand) sprint(self, strcat("monsters_killed = ", ftos(monsters_killed), "\n")); sprint(self, strcat("inv_monsterskill = ", ftos(inv_monsterskill), "\n")); - return TRUE; + return true; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(invasion_BotShouldAttack) { if(!(checkentity.flags & FL_MONSTER)) - return TRUE; + return true; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(invasion_SetStartItems) @@ -369,7 +369,7 @@ MUTATOR_HOOKFUNCTION(invasion_SetStartItems) start_health = 200; start_armorvalue = 200; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(invasion_AccuracyTargetValid) @@ -382,19 +382,19 @@ MUTATOR_HOOKFUNCTION(invasion_AccuracyTargetValid) MUTATOR_HOOKFUNCTION(invasion_AllowMobSpawning) { // monster spawning disabled during an invasion - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(invasion_GetTeamCount) { ret_float = invasion_teams; - return FALSE; + return false; } void invasion_ScoreRules(float inv_teams) { if(inv_teams) { CheckAllowedTeams(world); } - ScoreRules_basics(inv_teams, 0, 0, FALSE); + ScoreRules_basics(inv_teams, 0, 0, false); if(inv_teams) ScoreInfo_SetLabel_TeamScore(ST_INV_KILLS, "frags", SFL_SORT_PRIO_PRIMARY); ScoreInfo_SetLabel_PlayerScore(SP_KILLS, "frags", ((inv_teams) ? SFL_SORT_PRIO_SECONDARY : SFL_SORT_PRIO_PRIMARY)); ScoreRules_basics_end(); diff --git a/qcsrc/server/mutators/gamemode_keepaway.qc b/qcsrc/server/mutators/gamemode_keepaway.qc index 7e1006ec1..095857e14 100644 --- a/qcsrc/server/mutators/gamemode_keepaway.qc +++ b/qcsrc/server/mutators/gamemode_keepaway.qc @@ -7,11 +7,11 @@ float ka_ballcarrier_waypointsprite_visible_for_player(entity e) // runs on wayp { if(e.ballcarried) if(IS_SPEC(other)) - return FALSE; // we don't want spectators of the ballcarrier to see the attached waypoint on the top of their screen + return false; // we don't want spectators of the ballcarrier to see the attached waypoint on the top of their screen // TODO: Make the ballcarrier lack a waypointsprite whenever they have the invisibility powerup - return TRUE; + return true; } void ka_EventLog(string mode, entity actor) // use an alias for easy changing and quick editing later @@ -27,7 +27,7 @@ void ka_RespawnBall() // runs whenever the ball needs to be relocated if(!MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256)) { - entity spot = SelectSpawnPoint(TRUE); + entity spot = SelectSpawnPoint(true); setorigin(self, spot.origin); self.angles = spot.angles; } @@ -43,7 +43,7 @@ void ka_RespawnBall() // runs whenever the ball needs to be relocated pointparticles(particleeffectnum("electro_combo"), oldballorigin, '0 0 0', 1); pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 1); - WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1'); + WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER, '0 1 1'); WaypointSprite_Ping(self.waypointsprite_attachedforcarrier); sound(self, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere) @@ -97,7 +97,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth // apply effects to player other.glow_color = autocvar_g_keepawayball_trail_color; - other.glow_trail = TRUE; + other.glow_trail = true; other.effects |= autocvar_g_keepaway_ballcarrier_effects; // messages and sounds @@ -140,7 +140,7 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los ball.owner = world; // reset the player effects - plyr.glow_trail = FALSE; + plyr.glow_trail = false; plyr.effects &= ~autocvar_g_keepaway_ballcarrier_effects; // messages and sounds @@ -153,7 +153,7 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los // PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless. // waypoints - WaypointSprite_Spawn("ka-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1'); + WaypointSprite_Spawn("ka-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER, '0 1 1'); WaypointSprite_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT); WaypointSprite_Ping(ball.waypointsprite_attachedforcarrier); WaypointSprite_Kill(plyr.waypointsprite_attachedforcarrier); @@ -349,7 +349,7 @@ MUTATOR_HOOKFUNCTION(ka_BotRoles) self.havocbot_role = havocbot_role_ka_carrier; else self.havocbot_role = havocbot_role_ka_collector; - return TRUE; + return true; } @@ -373,7 +373,7 @@ void ka_SpawnBall() // loads various values for the ball, runs only once at star e.solid = SOLID_TRIGGER; e.movetype = MOVETYPE_BOUNCE; e.glow_color = autocvar_g_keepawayball_trail_color; - e.glow_trail = TRUE; + e.glow_trail = true; e.flags = FL_ITEM; e.reset = ka_Reset; e.touch = ka_TouchEvent; @@ -385,7 +385,7 @@ void ka_SpawnBall() // loads various values for the ball, runs only once at star void ka_ScoreRules() { - ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, 0, TRUE); // SFL_SORT_PRIO_PRIMARY + ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, 0, true); // SFL_SORT_PRIO_PRIMARY ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_PICKUPS, "pickups", 0); ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_CARRIERKILLS, "bckills", 0); ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_BCTIME, "bctime", SFL_SORT_PRIO_SECONDARY); diff --git a/qcsrc/server/mutators/gamemode_keyhunt.qc b/qcsrc/server/mutators/gamemode_keyhunt.qc index ae7f66c59..6ae1f8b5b 100644 --- a/qcsrc/server/mutators/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/gamemode_keyhunt.qc @@ -76,7 +76,7 @@ const float SP_KH_KCKILLS = 8; const float SP_KH_LOSSES = 9; void kh_ScoreRules(float teams) { - ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); + ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, true); ScoreInfo_SetLabel_TeamScore( ST_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY); ScoreInfo_SetLabel_PlayerScore(SP_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY); ScoreInfo_SetLabel_PlayerScore(SP_KH_PUSHES, "pushes", 0); @@ -91,20 +91,20 @@ float kh_KeyCarrier_waypointsprite_visible_for_player(entity e) // runs all the { if(!IS_PLAYER(e) || self.team != e.team) if(!kh_tracking_enabled) - return FALSE; + return false; - return TRUE; + return true; } float kh_Key_waypointsprite_visible_for_player(entity e) // ?? { if(!kh_tracking_enabled) - return FALSE; + return false; if(!self.owner) - return TRUE; + return true; if(!self.owner.owner) - return TRUE; - return FALSE; // draw only when key is not owned + return true; + return false; // draw only when key is not owned } void kh_update_state() @@ -494,10 +494,10 @@ void kh_FinishRound() // runs when a team captures the keys kh_interferemsg_time = 0; entity key; - kh_no_radar_circles = TRUE; + kh_no_radar_circles = true; FOR_EACH_KH_KEY(key) kh_Key_Remove(key); - kh_no_radar_circles = FALSE; + kh_no_radar_circles = false; Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_ROUNDSTART, autocvar_g_balance_keyhunt_delay_round); kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round, kh_StartRound); @@ -523,7 +523,7 @@ void kh_WinnerTeam(float teem) // runs when a team wins // Samual: Teem?.... TE nades_GiveBonus(key.owner, autocvar_g_nades_bonus_score_high); } - first = TRUE; + first = true; string keyowner = ""; FOR_EACH_KH_KEY(key) if(key.owner.kh_next == key) @@ -531,12 +531,12 @@ void kh_WinnerTeam(float teem) // runs when a team wins // Samual: Teem?.... TE if(!first) keyowner = strcat(keyowner, ", "); keyowner = key.owner.netname; - first = FALSE; + first = false; } Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM_4(teem, INFO_KEYHUNT_CAPTURE_), keyowner); - first = TRUE; + first = true; midpoint = '0 0 0'; firstorigin = '0 0 0'; lastorigin = '0 0 0'; @@ -553,7 +553,7 @@ void kh_WinnerTeam(float teem) // runs when a team wins // Samual: Teem?.... TE lastorigin = thisorigin; if(first) firstorigin = thisorigin; - first = FALSE; + first = false; } if(kh_teams > 2) { @@ -769,7 +769,7 @@ void kh_Key_Spawn(entity initial_owner, float angle, float i) // runs every tim Send_Notification(NOTIF_ONE, initial_owner, MSG_CENTER, APP_TEAM_NUM_4(initial_owner.team, CENTER_KEYHUNT_START_)); - WaypointSprite_Spawn("key-dropped", 0, 0, key, '0 0 1' * KH_KEY_WP_ZSHIFT, world, key.team, key, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAG, '0 1 1'); + WaypointSprite_Spawn("key-dropped", 0, 0, key, '0 0 1' * KH_KEY_WP_ZSHIFT, world, key.team, key, waypointsprite_attachedforcarrier, false, RADARICON_FLAG, '0 1 1'); key.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = kh_Key_waypointsprite_visible_for_player; kh_Key_AssignTo(key, initial_owner); @@ -814,7 +814,7 @@ void kh_Key_DropOne(entity key) kh_Key_AssignTo(key, world); makevectors(player.v_angle); - key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_throwvelocity * v_forward, FALSE); + key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_throwvelocity * v_forward, false); key.pusher = world; key.pushltime = time + autocvar_g_balance_keyhunt_protecttime; key.kh_dropperteam = key.team; @@ -839,7 +839,7 @@ void kh_Key_DropAll(entity player, float suicide) // runs whenever a player dies Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_4(key, INFO_KEYHUNT_LOST_), player.netname); kh_Key_AssignTo(key, world); makevectors('-1 0 0' * (45 + 45 * random()) + '0 360 0' * random()); - key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_dropvelocity * v_forward, FALSE); + key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_dropvelocity * v_forward, false); key.pusher = mypusher; key.pushltime = time + autocvar_g_balance_keyhunt_protecttime; if(suicide) @@ -893,7 +893,7 @@ void kh_EnableTrackingDevice() // runs after each round Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT); Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT_OTHER); - kh_tracking_enabled = TRUE; + kh_tracking_enabled = true; } void kh_StartRound() // runs at the start of each round @@ -935,7 +935,7 @@ void kh_StartRound() // runs at the start of each round kh_Key_Spawn(my_player, 360 * i / kh_teams, i); } - kh_tracking_enabled = FALSE; + kh_tracking_enabled = false; Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_SCAN, autocvar_g_balance_keyhunt_delay_tracking); kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_tracking, kh_EnableTrackingDevice); } @@ -1025,18 +1025,18 @@ void kh_finalize() MUTATOR_HOOKFUNCTION(kh_Key_DropAll) { - kh_Key_DropAll(self, TRUE); + kh_Key_DropAll(self, true); return 0; } MUTATOR_HOOKFUNCTION(kh_PlayerDies) { if(self == other) - kh_Key_DropAll(self, TRUE); + kh_Key_DropAll(self, true); else if(IS_PLAYER(other)) - kh_Key_DropAll(self, FALSE); + kh_Key_DropAll(self, false); else - kh_Key_DropAll(self, TRUE); + kh_Key_DropAll(self, true); return 0; } diff --git a/qcsrc/server/mutators/gamemode_lms.qc b/qcsrc/server/mutators/gamemode_lms.qc index 0684ac8ed..13b77305a 100644 --- a/qcsrc/server/mutators/gamemode_lms.qc +++ b/qcsrc/server/mutators/gamemode_lms.qc @@ -23,7 +23,7 @@ MUTATOR_HOOKFUNCTION(lms_ResetMap) lms_lowest_lives = 999; lms_next_place = player_count; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(lms_ResetPlayers) @@ -33,7 +33,7 @@ MUTATOR_HOOKFUNCTION(lms_ResetPlayers) if(IS_PLAYER(self)) PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives()); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(lms_PlayerPreSpawn) @@ -43,14 +43,14 @@ MUTATOR_HOOKFUNCTION(lms_PlayerPreSpawn) if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0) self.classname = "observer"; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(lms_PlayerDies) { self.respawn_flags |= RESPAWN_FORCE; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(lms_RemovePlayer) @@ -67,7 +67,7 @@ MUTATOR_HOOKFUNCTION(lms_RemovePlayer) else Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_FORFEIT, self.netname); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(lms_ClientConnect) @@ -81,7 +81,7 @@ MUTATOR_HOOKFUNCTION(lms_ClientConnect) self.frags = FRAGS_SPECTATOR; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(lms_PlayerThink) @@ -89,20 +89,20 @@ MUTATOR_HOOKFUNCTION(lms_PlayerThink) if(self.deadflag == DEAD_DYING) self.deadflag = DEAD_RESPAWNING; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(lms_PlayerRegen) { if(autocvar_g_lms_regenerate) - return FALSE; - return TRUE; + return false; + return true; } MUTATOR_HOOKFUNCTION(lms_ForbidThrowing) { // forbode! - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(lms_GiveFragsForKill) @@ -123,7 +123,7 @@ MUTATOR_HOOKFUNCTION(lms_GiveFragsForKill) } frag_score = 0; - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(lms_SetStartItems) @@ -138,13 +138,13 @@ MUTATOR_HOOKFUNCTION(lms_SetStartItems) start_ammo_plasma = warmup_start_ammo_plasma = cvar("g_lms_start_ammo_plasma"); start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_lms_start_ammo_fuel"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(lms_KeepScore) { // don't clear player score - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(lms_FilterItem) @@ -153,10 +153,10 @@ MUTATOR_HOOKFUNCTION(lms_FilterItem) if(self.classname == "item_health_mega") { self.max_health = 1; - return FALSE; + return false; } - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(lms_ItemTouch) @@ -174,7 +174,7 @@ MUTATOR_HOOKFUNCTION(lms_ItemTouch) // scoreboard stuff void lms_ScoreRules() { - ScoreRules_basics(0, 0, 0, FALSE); + ScoreRules_basics(0, 0, 0, false); ScoreInfo_SetLabel_PlayerScore(SP_LMS_LIVES, "lives", SFL_SORT_PRIO_SECONDARY); ScoreInfo_SetLabel_PlayerScore(SP_LMS_RANK, "rank", SFL_LOWER_IS_BETTER | SFL_RANK | SFL_SORT_PRIO_PRIMARY | SFL_ALLOW_HIDE); ScoreRules_basics_end(); diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index 52533e2c8..afdb769cf 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -27,7 +27,7 @@ const float SP_NEXBALL_GOALS = 4; const float SP_NEXBALL_FAULTS = 5; void nb_ScoreRules(float teams) { - ScoreRules_basics(teams, 0, 0, TRUE); + ScoreRules_basics(teams, 0, 0, true); ScoreInfo_SetLabel_TeamScore( ST_NEXBALL_GOALS, "goals", SFL_SORT_PRIO_PRIMARY); ScoreInfo_SetLabel_PlayerScore( SP_NEXBALL_GOALS, "goals", SFL_SORT_PRIO_PRIMARY); ScoreInfo_SetLabel_PlayerScore(SP_NEXBALL_FAULTS, "faults", SFL_SORT_PRIO_SECONDARY | SFL_LOWER_IS_BETTER); @@ -74,7 +74,7 @@ void nexball_setstatus(void) void relocate_nexball(void) { - tracebox(self.origin, BALL_MINS, BALL_MAXS, self.origin, TRUE, self); + tracebox(self.origin, BALL_MINS, BALL_MAXS, self.origin, true, self); if(trace_startsolid) { vector o; @@ -183,7 +183,7 @@ void DropBall(entity ball, vector org, vector vel) } WaypointSprite_Kill(ball.owner.waypointsprite_attachedforcarrier); - WaypointSprite_Spawn("nb-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR); // no health bar please + WaypointSprite_Spawn("nb-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR); // no health bar please WaypointSprite_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT); ball.owner.ballcarried = world; @@ -204,7 +204,7 @@ void InitBall(void) self.nextthink = time + autocvar_g_nexball_delay_idle + 3; self.teamtime = 0; self.pusher = world; - self.team = FALSE; + self.team = false; sound(self, CH_TRIGGER, self.noise1, VOL_BASE, ATTEN_NORM); WaypointSprite_Ping(self.waypointsprite_attachedforcarrier); LogNB("init", world); @@ -505,7 +505,7 @@ void SpawnBall(void) if(cvar(strcat("g_", self.classname, "_trail"))) //nexball_basketball :p { self.glow_color = autocvar_g_nexball_trail_color; - self.glow_trail = TRUE; + self.glow_trail = true; } self.movetype = MOVETYPE_FLY; @@ -571,9 +571,9 @@ float nb_Goal_Customize() entity e, wp_owner; e = WaypointSprite_getviewentity(other); wp_owner = self.owner; - if(SAME_TEAM(e, wp_owner)) { return FALSE; } + if(SAME_TEAM(e, wp_owner)) { return false; } - return TRUE; + return true; } void SpawnGoal(void) @@ -724,7 +724,7 @@ void W_Nexball_Attack(float t) if(!(ball = self.ballcarried)) return; - W_SetupShot(self, FALSE, 4, "nexball/shoot1.wav", CH_WEAPON_A, 0); + W_SetupShot(self, false, 4, "nexball/shoot1.wav", CH_WEAPON_A, 0); tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, world); if(trace_startsolid) { @@ -747,7 +747,7 @@ void W_Nexball_Attack(float t) mul = mi + (ma - mi) * mul; // range from the minimal power to the maximal power } - DropBall(ball, w_shotorg, W_CalculateProjectileVelocity(self.velocity, w_shotdir * autocvar_g_balance_nexball_primary_speed * mul, FALSE)); + DropBall(ball, w_shotorg, W_CalculateProjectileVelocity(self.velocity, w_shotdir * autocvar_g_balance_nexball_primary_speed * mul, false)); //TODO: use the speed_up cvar too ?? @@ -758,7 +758,7 @@ void W_Nexball_Attack2(void) if(self.ballcarried.enemy) { entity _ball = self.ballcarried; - W_SetupShot(self, FALSE, 4, "nexball/shoot1.wav", CH_WEAPON_A, 0); + W_SetupShot(self, false, 4, "nexball/shoot1.wav", CH_WEAPON_A, 0); DropBall(_ball, w_shotorg, trigger_push_calculatevelocity(_ball.origin, _ball.enemy, 32)); _ball.think = W_Nexball_Think; _ball.nextthink = time; @@ -771,7 +771,7 @@ void W_Nexball_Attack2(void) entity missile; if(!(balls & BALL_BASKET)) return; - W_SetupShot(self, FALSE, 2, "nexball/shoot2.wav", CH_WEAPON_A, 0); + W_SetupShot(self, false, 2, "nexball/shoot2.wav", CH_WEAPON_A, 0); // pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn(); @@ -794,7 +794,7 @@ void W_Nexball_Attack2(void) missile.effects = EF_BRIGHTFIELD | EF_LOWPRECISION; missile.flags = FL_PROJECTILE; - CSQCProjectile(missile, TRUE, PROJECTILE_ELECTRO, TRUE); + CSQCProjectile(missile, true, PROJECTILE_ELECTRO, true); } float ball_customize() @@ -804,7 +804,7 @@ float ball_customize() self.effects &= ~EF_FLAME; self.scale = 1; self.customizeentityforclient = func_null; - return TRUE; + return true; } if(other == self.owner) @@ -821,7 +821,7 @@ float ball_customize() self.scale = 1; } - return TRUE; + return true; } float w_nexball_weapon(float req) @@ -870,8 +870,8 @@ float w_nexball_weapon(float req) { //weapon_setup(WEP_PORTO); } - // No need to check WR_CHECKAMMO* or WR_AIM, it should always return TRUE - return TRUE; + // No need to check WR_CHECKAMMO* or WR_AIM, it should always return true + return true; } MUTATOR_HOOKFUNCTION(nexball_BallDrop) @@ -943,7 +943,7 @@ MUTATOR_HOOKFUNCTION(nexball_PlayerPreThink) nexball_setstatus(); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nexball_PlayerSpawn) @@ -955,7 +955,7 @@ MUTATOR_HOOKFUNCTION(nexball_PlayerSpawn) else self.weapons = '0 0 0'; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nexball_PlayerPhysics) @@ -965,31 +965,31 @@ MUTATOR_HOOKFUNCTION(nexball_PlayerPhysics) self.stat_sv_airspeedlimit_nonqw *= autocvar_g_nexball_basketball_carrier_highspeed; self.stat_sv_maxspeed *= autocvar_g_nexball_basketball_carrier_highspeed; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nexball_SetStartItems) { start_items |= IT_UNLIMITED_SUPERWEAPONS; // FIXME BAD BAD BAD BAD HACK, NEXBALL SHOULDN'T ABUSE PORTO'S WEAPON SLOT - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nexball_ForbidThrowing) { if(self.weapon == WEP_MORTAR) - return TRUE; + return true; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nexball_FilterItem) { if(self.classname == "droppedweapon") if(self.weapon == WEP_MORTAR) - return TRUE; + return true; - return FALSE; + return false; } MUTATOR_DEFINITION(gamemode_nexball) diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/gamemode_onslaught.qc index 6cfefdfe5..f0b6fde95 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/gamemode_onslaught.qc @@ -102,12 +102,12 @@ void onslaught_updatelinks() l = findchain(classname, "onslaught_controlpoint"); while (l) { - l.islinked = FALSE; - l.isshielded = TRUE; - l.isgenneighbor_red = FALSE; - l.isgenneighbor_blue = FALSE; - l.iscpneighbor_red = FALSE; - l.iscpneighbor_blue = FALSE; + l.islinked = false; + l.isshielded = true; + l.isgenneighbor_red = false; + l.isgenneighbor_blue = false; + l.iscpneighbor_red = false; + l.iscpneighbor_blue = false; dprint(etos(l), " (point) belongs to team ", ftos(l.team), "\n"); l = l.chain; } @@ -118,10 +118,10 @@ void onslaught_updatelinks() dprint(etos(l), " (link) connects ", etos(l.goalentity), " with ", etos(l.enemy), "\n"); l = l.chain; } - stop = FALSE; + stop = false; while (!stop) { - stop = TRUE; + stop = true; l = links; while (l) { @@ -133,14 +133,14 @@ void onslaught_updatelinks() { if (!l.goalentity.islinked) { - stop = FALSE; - l.goalentity.islinked = TRUE; + stop = false; + l.goalentity.islinked = true; dprint(etos(l), " (link) is marking ", etos(l.goalentity), " (point) because its team matches ", etos(l.enemy), " (point)\n"); } else if (!l.enemy.islinked) { - stop = FALSE; - l.enemy.islinked = TRUE; + stop = false; + l.enemy.islinked = true; dprint(etos(l), " (link) is marking ", etos(l.enemy), " (point) because its team matches ", etos(l.goalentity), " (point)\n"); } } @@ -157,21 +157,21 @@ void onslaught_updatelinks() if (l.goalentity.team != l.enemy.team) { dprint(etos(l), " (link) is unshielding ", etos(l.enemy), " (point) because its team does not match ", etos(l.goalentity), " (point)\n"); - l.enemy.isshielded = FALSE; + l.enemy.isshielded = false; } if(l.goalentity.classname == "onslaught_generator") { if(l.goalentity.team == NUM_TEAM_1) - l.enemy.isgenneighbor_red = TRUE; + l.enemy.isgenneighbor_red = true; else if(l.goalentity.team == NUM_TEAM_2) - l.enemy.isgenneighbor_blue = TRUE; + l.enemy.isgenneighbor_blue = true; } else { if(l.goalentity.team == NUM_TEAM_1) - l.enemy.iscpneighbor_red = TRUE; + l.enemy.iscpneighbor_red = true; else if(l.goalentity.team == NUM_TEAM_2) - l.enemy.iscpneighbor_blue = TRUE; + l.enemy.iscpneighbor_blue = true; } } if (l.enemy.islinked) @@ -179,21 +179,21 @@ void onslaught_updatelinks() if (l.goalentity.team != l.enemy.team) { dprint(etos(l), " (link) is unshielding ", etos(l.goalentity), " (point) because its team does not match ", etos(l.enemy), " (point)\n"); - l.goalentity.isshielded = FALSE; + l.goalentity.isshielded = false; } if(l.enemy.classname == "onslaught_generator") { if(l.enemy.team == NUM_TEAM_1) - l.goalentity.isgenneighbor_red = TRUE; + l.goalentity.isgenneighbor_red = true; else if(l.enemy.team == NUM_TEAM_2) - l.goalentity.isgenneighbor_blue = TRUE; + l.goalentity.isgenneighbor_blue = true; } else { if(l.enemy.team == NUM_TEAM_1) - l.goalentity.iscpneighbor_red = TRUE; + l.goalentity.iscpneighbor_red = true; else if(l.enemy.team == NUM_TEAM_2) - l.goalentity.iscpneighbor_blue = TRUE; + l.goalentity.iscpneighbor_blue = true; } } l = l.chain; @@ -207,14 +207,14 @@ void onslaught_updatelinks() dprint(etos(l), " (generator) is shielded\n"); l.enemy.alpha = 1; l.takedamage = DAMAGE_NO; - l.bot_attack = FALSE; + l.bot_attack = false; } else { dprint(etos(l), " (generator) is not shielded\n"); l.enemy.alpha = -1; l.takedamage = DAMAGE_AIM; - l.bot_attack = TRUE; + l.bot_attack = true; } l = l.chain; } @@ -229,7 +229,7 @@ void onslaught_updatelinks() if (l.goalentity) { l.goalentity.takedamage = DAMAGE_NO; - l.goalentity.bot_attack = FALSE; + l.goalentity.bot_attack = false; } } else @@ -239,7 +239,7 @@ void onslaught_updatelinks() if (l.goalentity) { l.goalentity.takedamage = DAMAGE_AIM; - l.goalentity.bot_attack = TRUE; + l.goalentity.bot_attack = true; } } onslaught_controlpoint_updatesprite(l); @@ -524,11 +524,11 @@ void onslaught_generator_deaththink() { i = random(); if(i < 0.3) - ons_throwgib(self.origin + '0 0 40', (100 * randomvec() - '1 1 1') * 11 + '0 0 20', "models/onslaught/gen_gib1.md3", 6, TRUE); + ons_throwgib(self.origin + '0 0 40', (100 * randomvec() - '1 1 1') * 11 + '0 0 20', "models/onslaught/gen_gib1.md3", 6, true); else if(i > 0.7) - ons_throwgib(self.origin + '0 0 40', (100 * randomvec() - '1 1 1') * 12 + '0 0 20', "models/onslaught/gen_gib2.md3", 6, TRUE); + ons_throwgib(self.origin + '0 0 40', (100 * randomvec() - '1 1 1') * 12 + '0 0 20', "models/onslaught/gen_gib2.md3", 6, true); else - ons_throwgib(self.origin + '0 0 40', (100 * randomvec() - '1 1 1') * 13 + '0 0 20', "models/onslaught/gen_gib3.md3", 6, TRUE); + ons_throwgib(self.origin + '0 0 40', (100 * randomvec() - '1 1 1') * 13 + '0 0 20', "models/onslaught/gen_gib3.md3", 6, true); } // Spawn fire balls @@ -623,9 +623,9 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage, t = Team_ColoredFullName(attacker.team); bprint(Team_ColoredFullName(self.team), " generator destroyed by ", t, "!\n"); } - self.iscaptured = FALSE; - self.islinked = FALSE; - self.isshielded = FALSE; + self.iscaptured = false; + self.islinked = false; + self.isshielded = false; self.takedamage = DAMAGE_NO; // can't be hurt anymore self.event_damage = func_null; // won't do anything if hurt self.count = 0; // reset counter @@ -666,11 +666,11 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage, sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM); i = random(); if(i < 0.3) - ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib1.md3", 5, TRUE); + ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib1.md3", 5, true); else if(i > 0.7) - ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib2.md3", 5, TRUE); + ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib2.md3", 5, true); else - ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib3.md3", 5, TRUE); + ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib3.md3", 5, true); } else { @@ -687,7 +687,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage, //throw some gibs on damage if(random() < damage/200+0.2) if(random() < 0.5) - ons_throwgib(hitloc + '0 0 20', randomvec()*360, "models/onslaught/gen_gib1.md3", 5, FALSE); + ons_throwgib(hitloc + '0 0 20', randomvec()*360, "models/onslaught/gen_gib1.md3", 5, false); } // update links after a delay @@ -732,14 +732,14 @@ void onslaught_generator_updatesprite(entity e) if(e.lastshielded) { if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2) - WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, 0.5 * colormapPaletteColor(e.team - 1, FALSE)); + WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, 0.5 * colormapPaletteColor(e.team - 1, false)); else WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, '0.5 0.5 0.5'); } else { if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2) - WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, colormapPaletteColor(e.team - 1, FALSE)); + WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, colormapPaletteColor(e.team - 1, false)); else WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, '0.75 0.75 0.75'); } @@ -819,14 +819,14 @@ void onslaught_controlpoint_updatesprite(entity e) if(e.lastshielded) { if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2) - WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, 0.5 * colormapPaletteColor(e.team - 1, FALSE)); + WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, 0.5 * colormapPaletteColor(e.team - 1, false)); else WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.5 0.5 0.5'); } else { if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2) - WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, colormapPaletteColor(e.team - 1, FALSE)); + WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, colormapPaletteColor(e.team - 1, false)); else WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.75 0.75 0.75'); } @@ -843,10 +843,10 @@ void onslaught_generator_reset() self.team = self.team_saved; self.lasthealth = self.max_health = self.health = autocvar_g_onslaught_gen_health; self.takedamage = DAMAGE_AIM; - self.bot_attack = TRUE; - self.iscaptured = TRUE; - self.islinked = TRUE; - self.isshielded = TRUE; + self.bot_attack = true; + self.iscaptured = true; + self.islinked = true; + self.isshielded = true; self.enemy.solid = SOLID_NOT; self.think = onslaught_generator_delayed; self.nextthink = time + 0.2; @@ -925,11 +925,11 @@ void spawnfunc_onslaught_generator() setsize(self, '-52 -52 -14', '52 52 75'); setorigin(self, self.origin); self.takedamage = DAMAGE_AIM; - self.bot_attack = TRUE; + self.bot_attack = true; self.event_damage = onslaught_generator_damage; - self.iscaptured = TRUE; - self.islinked = TRUE; - self.isshielded = TRUE; + self.iscaptured = true; + self.islinked = true; + self.isshielded = true; // helper entity that create fx when generator is damaged onslaught_generator_damage_spawn(self); // spawn shield model which indicates whether this can be damaged @@ -987,12 +987,12 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float if (IS_PLAYER(attacker)) { - nag = FALSE; + nag = false; if(self.team == NUM_TEAM_1) { if(time - ons_notification_time_team1 > 10) { - nag = TRUE; + nag = true; ons_notification_time_team1 = time; } } @@ -1000,12 +1000,12 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float { if(time - ons_notification_time_team2 > 10) { - nag = TRUE; + nag = true; ons_notification_time_team2 = time; } } else - nag = TRUE; + nag = true; if(nag) play2team(self.team, "onslaught/controlpoint_underattack.wav"); @@ -1037,17 +1037,17 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float string t; t = Team_ColoredFullName(attacker.team); bprint(Team_ColoredFullName(self.team), " ", self.message, " control point destroyed by ", t, "\n"); - ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 25, "models/onslaught/controlpoint_icon_gib1.md3", 3, FALSE); - ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, FALSE); - ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, FALSE); - ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 75, "models/onslaught/controlpoint_icon_gib4.md3", 3, FALSE); - ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 75, "models/onslaught/controlpoint_icon_gib4.md3", 3, FALSE); - ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 75, "models/onslaught/controlpoint_icon_gib4.md3", 3, FALSE); - ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 75, "models/onslaught/controlpoint_icon_gib4.md3", 3, FALSE); + ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 25, "models/onslaught/controlpoint_icon_gib1.md3", 3, false); + ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, false); + ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, false); + ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 75, "models/onslaught/controlpoint_icon_gib4.md3", 3, false); + ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 75, "models/onslaught/controlpoint_icon_gib4.md3", 3, false); + ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 75, "models/onslaught/controlpoint_icon_gib4.md3", 3, false); + ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 75, "models/onslaught/controlpoint_icon_gib4.md3", 3, false); } self.owner.goalentity = world; - self.owner.islinked = FALSE; - self.owner.iscaptured = FALSE; + self.owner.islinked = false; + self.owner.iscaptured = false; self.owner.team = 0; self.owner.colormap = 1024; @@ -1235,7 +1235,7 @@ void onslaught_controlpoint_icon_buildthink() self.think = onslaught_controlpoint_icon_think; sound(self, CH_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTEN_NORM); bprint(Team_ColoredFullName(self.team), " captured ", self.owner.message, " control point\n"); - self.owner.iscaptured = TRUE; + self.owner.iscaptured = true; WaypointSprite_UpdateMaxHealth(self.owner.sprite, self.max_health); WaypointSprite_UpdateHealth(self.owner.sprite, self.health); @@ -1289,7 +1289,7 @@ void onslaught_controlpoint_touch() setsize(e, '-32 -32 -32', '32 32 32'); setorigin(e, self.origin + '0 0 96'); e.takedamage = DAMAGE_AIM; - e.bot_attack = TRUE; + e.bot_attack = true; e.event_damage = onslaught_controlpoint_icon_damage; e.team = other.team; e.colormap = 1024 + (e.team - 1) * 17; @@ -1316,9 +1316,9 @@ void onslaught_controlpoint_reset() self.goalentity = world; self.team = 0; self.colormap = 1024; - self.iscaptured = FALSE; - self.islinked = FALSE; - self.isshielded = TRUE; + self.iscaptured = false; + self.islinked = false; + self.isshielded = true; self.enemy.solid = SOLID_NOT; self.enemy.colormap = self.colormap; self.think = onslaught_controlpoint_think; @@ -1386,9 +1386,9 @@ void spawnfunc_onslaught_controlpoint() self.touch = onslaught_controlpoint_touch; self.team = 0; self.colormap = 1024; - self.iscaptured = FALSE; - self.islinked = FALSE; - self.isshielded = TRUE; + self.iscaptured = false; + self.islinked = false; + self.isshielded = true; // spawn shield model which indicates whether this can be damaged self.enemy = spawn(); @@ -1439,7 +1439,7 @@ float onslaught_link_send(entity to, float sendflags) { WriteByte(MSG_ENTITY, self.clientcolors); // which is goalentity's color + enemy's color * 16 } - return TRUE; + return true; } void onslaught_link_checkupdate() @@ -1520,7 +1520,7 @@ void spawnfunc_onslaught_link() if (self.target == "" || self.target2 == "") objerror("target and target2 must be set\n"); InitializeEntity(self, onslaught_link_delayed, INITPRIO_FINDTARGET); - Net_LinkEntity(self, FALSE, 0, onslaught_link_send); + Net_LinkEntity(self, false, 0, onslaught_link_send); } MUTATOR_HOOKFUNCTION(ons_BuildMutatorsString) @@ -1539,7 +1539,7 @@ MUTATOR_HOOKFUNCTION(ons_Spawn_Score) { /* - float _neer_home = (random() > 0.5 ? TRUE : FALSE); + float _neer_home = (random() > 0.5 ? true : false); RandomSelection_Init(); @@ -1579,7 +1579,7 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn) if(random() < 0.5) // 50/50 chane to use default spawnsystem. return 0; - float _close_to_home = ((random() > 0.5) ? TRUE : FALSE); + float _close_to_home = ((random() > 0.5) ? true : false); entity _best = world, _trg_gen = world; float _score, _best_score = MAX_SHOT_DISTANCE; @@ -1663,7 +1663,7 @@ MUTATOR_HOOKFUNCTION(ons_MonsterThink) if (e != world) self.team = e.team; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ons_MonsterSpawn) @@ -1686,7 +1686,7 @@ MUTATOR_HOOKFUNCTION(ons_MonsterSpawn) self.use(); } - return FALSE; + return false; } MUTATOR_DEFINITION(gamemode_onslaught) diff --git a/qcsrc/server/mutators/gamemode_race.qc b/qcsrc/server/mutators/gamemode_race.qc index fd48a0fce..3cb26f131 100644 --- a/qcsrc/server/mutators/gamemode_race.qc +++ b/qcsrc/server/mutators/gamemode_race.qc @@ -29,7 +29,7 @@ void havocbot_role_race() void race_ScoreRules() { - ScoreRules_basics(race_teams, 0, 0, FALSE); + ScoreRules_basics(race_teams, 0, 0, false); if(race_teams) { ScoreInfo_SetLabel_TeamScore( ST_RACE_LAPS, "laps", SFL_SORT_PRIO_PRIMARY); @@ -104,7 +104,7 @@ MUTATOR_HOOKFUNCTION(race_PlayerPhysics) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_ResetMap) @@ -138,7 +138,7 @@ MUTATOR_HOOKFUNCTION(race_ResetMap) race_ScoreRules(); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_PlayerPreThink) @@ -148,7 +148,7 @@ MUTATOR_HOOKFUNCTION(race_PlayerPreThink) if(msg_entity.enemy.race_laptime) race_SendNextCheckpoint(msg_entity.enemy, 1); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_ClientConnect) @@ -175,7 +175,7 @@ MUTATOR_HOOKFUNCTION(race_ClientConnect) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_MakePlayerObserver) @@ -189,7 +189,7 @@ MUTATOR_HOOKFUNCTION(race_MakePlayerObserver) race_PreparePlayer(); self.race_checkpoint = -1; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_PlayerSpawn) @@ -204,7 +204,7 @@ MUTATOR_HOOKFUNCTION(race_PlayerSpawn) self.race_place = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_PutClientInServer) @@ -219,20 +219,20 @@ MUTATOR_HOOKFUNCTION(race_PutClientInServer) race_AbandonRaceCheck(self); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_PlayerDies) { self.respawn_flags |= RESPAWN_FORCE; race_AbandonRaceCheck(self); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_BotRoles) { self.havocbot_role = havocbot_role_race; - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(race_PlayerPostThink) @@ -249,21 +249,21 @@ MUTATOR_HOOKFUNCTION(race_PlayerPostThink) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_ForbidClearPlayerScore) { if(g_race_qualifying) - return TRUE; // in qualifying, you don't lose score by observing + return true; // in qualifying, you don't lose score by observing - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(race_GetTeamCount) { ret_float = race_teams; - return FALSE; + return false; } void race_Initialize() diff --git a/qcsrc/server/mutators/gamemode_tdm.qc b/qcsrc/server/mutators/gamemode_tdm.qc index 59f0927e8..de172873e 100644 --- a/qcsrc/server/mutators/gamemode_tdm.qc +++ b/qcsrc/server/mutators/gamemode_tdm.qc @@ -48,7 +48,7 @@ void tdm_DelayedInit() MUTATOR_HOOKFUNCTION(tdm_GetTeamCount) { ret_string = "tdm_team"; - return TRUE; + return true; } MUTATOR_DEFINITION(gamemode_tdm) diff --git a/qcsrc/server/mutators/mutator_bloodloss.qc b/qcsrc/server/mutators/mutator_bloodloss.qc index 4d990b3cf..08e14199e 100644 --- a/qcsrc/server/mutators/mutator_bloodloss.qc +++ b/qcsrc/server/mutators/mutator_bloodloss.qc @@ -5,7 +5,7 @@ MUTATOR_HOOKFUNCTION(bloodloss_PlayerThink) if(IS_PLAYER(self)) if(self.health <= autocvar_g_bloodloss && self.deadflag == DEAD_NO) { - self.BUTTON_CROUCH = TRUE; + self.BUTTON_CROUCH = true; if(time >= self.bloodloss_timer) { @@ -14,27 +14,27 @@ MUTATOR_HOOKFUNCTION(bloodloss_PlayerThink) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(bloodloss_PlayerJump) { if(self.health <= autocvar_g_bloodloss) - return TRUE; + return true; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(bloodloss_BuildMutatorsString) { ret_string = strcat(ret_string, ":bloodloss"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(bloodloss_BuildMutatorsPrettyString) { ret_string = strcat(ret_string, ", Blood loss"); - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_bloodloss) @@ -44,5 +44,5 @@ MUTATOR_DEFINITION(mutator_bloodloss) MUTATOR_HOOK(BuildMutatorsString, bloodloss_BuildMutatorsString, CBC_ORDER_ANY); MUTATOR_HOOK(BuildMutatorsPrettyString, bloodloss_BuildMutatorsPrettyString, CBC_ORDER_ANY); - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_buffs.qc b/qcsrc/server/mutators/mutator_buffs.qc index 8c2101fa5..5efe23790 100644 --- a/qcsrc/server/mutators/mutator_buffs.qc +++ b/qcsrc/server/mutators/mutator_buffs.qc @@ -8,7 +8,7 @@ float buffs_BuffModel_Customize() same_team = (SAME_TEAM(player, myowner) || SAME_TEAM(player, myowner)); if(myowner.alpha <= 0.5 && !same_team && myowner.alpha != 0) - return FALSE; + return false; if(player == myowner || (IS_SPEC(other) && other.enemy == myowner)) { @@ -21,24 +21,24 @@ float buffs_BuffModel_Customize() self.effects = EF_FULLBRIGHT | EF_LOWPRECISION; self.alpha = 1; } - return TRUE; + return true; } // buff item float buff_Waypoint_visible_for_player(entity plr) { if(!self.owner.buff_active && !self.owner.buff_activetime) - return FALSE; + return false; if(plr.buffs) { if(plr.cvar_cl_buffs_autoreplace) { if(plr.buffs == self.owner.buffs) - return FALSE; + return false; } else - return FALSE; + return false; } return WaypointSprite_visible_for_player(plr); @@ -46,7 +46,7 @@ float buff_Waypoint_visible_for_player(entity plr) void buff_Waypoint_Spawn(entity e) { - WaypointSprite_Spawn(Buff_Sprite(e.buffs), 0, autocvar_g_buffs_waypoint_distance, e, '0 0 1' * e.maxs.z, world, e.team, e, buff_waypoint, TRUE, RADARICON_POWERUP, e.glowmod); + WaypointSprite_Spawn(Buff_Sprite(e.buffs), 0, autocvar_g_buffs_waypoint_distance, e, '0 0 1' * e.maxs.z, world, e.team, e, buff_waypoint, true, RADARICON_POWERUP, e.glowmod); WaypointSprite_UpdateTeamRadar(e.buff_waypoint, RADARICON_POWERUP, e.glowmod); e.buff_waypoint.waypointsprite_visible_for_player = buff_Waypoint_visible_for_player; } @@ -71,7 +71,7 @@ void buff_Respawn(entity ent) if(!MoveToRandomMapLocation(ent, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, ((autocvar_g_buffs_random_location_attempts > 0) ? autocvar_g_buffs_random_location_attempts : 10), 1024, 256)) { - entity spot = SelectSpawnPoint(TRUE); + entity spot = SelectSpawnPoint(true); setorigin(ent, ((spot.origin + '0 0 200') + (randomvec() * 300))); ent.angles = spot.angles; } @@ -131,7 +131,7 @@ void buff_Touch() } self.owner = other; - self.buff_active = FALSE; + self.buff_active = false; self.lifetime = 0; Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_BUFF_GOT, self.buffs); @@ -145,15 +145,15 @@ void buff_Touch() float buff_Available(float buffid) { if(buffid == BUFF_AMMO && ((start_items & IT_UNLIMITED_WEAPON_AMMO) || (start_items & IT_UNLIMITED_AMMO) || (cvar("g_melee_only")))) - return FALSE; + return false; if(buffid == BUFF_VAMPIRE && cvar("g_vampire")) - return FALSE; + return false; if(!cvar(strcat("g_buffs_", Buff_Name(buffid)))) - return FALSE; + return false; - return TRUE; + return true; } void buff_NewType(entity ent, float cb) @@ -196,7 +196,7 @@ void buff_Think() if(!self.buff_activetime_updated) { buff_SetCooldown(self.buff_activetime); - self.buff_activetime_updated = TRUE; + self.buff_activetime_updated = true; } if(!self.buff_active && !self.buff_activetime) @@ -219,7 +219,7 @@ void buff_Think() if(!self.buff_activetime) { - self.buff_active = TRUE; + self.buff_active = true; sound(self, CH_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM); pointparticles(particleeffectnum("item_respawn"), CENTER_OR_VIEWOFS(self), '0 0 0', 1); } @@ -264,7 +264,7 @@ void buff_Reset() self.owner = world; buff_SetCooldown(autocvar_g_buffs_cooldown_activate); buff_Waypoint_Reset(); - self.buff_activetime_updated = FALSE; + self.buff_activetime_updated = false; if(autocvar_g_buffs_random_location || (self.spawnflags & 1)) buff_Respawn(self); @@ -337,7 +337,7 @@ void buff_SpawnReplacement(entity ent, entity old) // mutator hooks MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_SplitHealthArmor) { - if(frag_deathtype == DEATH_BUFF_VENGEANCE) { return FALSE; } // oh no you don't + if(frag_deathtype == DEATH_BUFF_VENGEANCE) { return false; } // oh no you don't if(frag_target.buffs & BUFF_RESISTANCE) { @@ -346,7 +346,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_SplitHealthArmor) damage_save = v.y; } - return FALSE; + return false; } void buff_Vengeance_DelayedDamage() @@ -360,7 +360,7 @@ void buff_Vengeance_DelayedDamage() MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_Calculate) { - if(frag_deathtype == DEATH_BUFF_VENGEANCE) { return FALSE; } // oh no you don't + if(frag_deathtype == DEATH_BUFF_VENGEANCE) { return false; } // oh no you don't if(frag_target.buffs & BUFF_SPEED) if(frag_target != frag_attacker) @@ -424,7 +424,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_Calculate) if(DIFF_TEAM(frag_attacker, frag_target)) frag_attacker.health = bound(0, frag_attacker.health + bound(0, frag_damage * autocvar_g_buffs_vampire_damage_steal, frag_target.health), g_pickup_healthsmall_max); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_PlayerSpawn) @@ -433,7 +433,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerSpawn) // reset timers here to prevent them continuing after re-spawn self.buff_disability_time = 0; self.buff_disability_effect_time = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_PlayerPhysics) @@ -450,7 +450,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerPhysics) self.stat_sv_airspeedlimit_nonqw *= autocvar_g_buffs_disability_speed; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_PlayerJump) @@ -459,7 +459,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerJump) player_jumpheight = autocvar_g_buffs_jump_height; self.stat_jumpheight = player_jumpheight; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_MonsterMove) @@ -470,7 +470,7 @@ MUTATOR_HOOKFUNCTION(buffs_MonsterMove) monster_speed_run *= autocvar_g_buffs_disability_speed; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_PlayerDies) @@ -486,12 +486,12 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDies) self.buff_model = world; } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_PlayerUseKey) { - if(MUTATOR_RETURNVALUE || gameover) { return FALSE; } + if(MUTATOR_RETURNVALUE || gameover) { return false; } if(self.buffs) { Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_BUFF_DROP, self.buffs); @@ -499,9 +499,9 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerUseKey) self.buffs = 0; sound(self, CH_TRIGGER, "relics/relic_effect.wav", VOL_BASE, ATTN_NORM); - return TRUE; + return true; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_RemovePlayer) @@ -516,7 +516,7 @@ MUTATOR_HOOKFUNCTION(buffs_RemovePlayer) self.buff_disability_time = 0; self.buff_disability_effect_time = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_CustomizeWaypoint) @@ -527,9 +527,9 @@ MUTATOR_HOOKFUNCTION(buffs_CustomizeWaypoint) // but only apply this to real players, not to spectators if((self.owner.flags & FL_CLIENT) && (self.owner.buffs & BUFF_INVISIBLE) && (e == other)) if(DIFF_TEAM(self.owner, e)) - return TRUE; + return true; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_OnEntityPreSpawn) @@ -542,10 +542,10 @@ MUTATOR_HOOKFUNCTION(buffs_OnEntityPreSpawn) { entity e = spawn(); buff_SpawnReplacement(e, self); - return TRUE; + return true; } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_WeaponRate) @@ -556,12 +556,12 @@ MUTATOR_HOOKFUNCTION(buffs_WeaponRate) if(time < self.buff_disability_time) weapon_rate *= autocvar_g_buffs_disability_rate; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_PlayerThink) { - if(gameover || self.deadflag != DEAD_NO) { return FALSE; } + if(gameover || self.deadflag != DEAD_NO) { return false; } if(time < self.buff_disability_time) if(time >= self.buff_disability_effect_time) @@ -667,27 +667,27 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink) self.buff_model.alpha = self.alpha; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_SpectateCopy) { self.buffs = other.buffs; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_VehicleEnter) { vh_vehicle.buffs = vh_player.buffs; vh_player.buffs = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_VehicleExit) { vh_player.buffs = vh_vehicle.buffs; vh_vehicle.buffs = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_PlayerRegen) @@ -702,25 +702,25 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerRegen) if(self.buffs & BUFF_SPEED) regen_mod_regen = autocvar_g_buffs_speed_regen; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_GetCvars) { GetCvars_handleFloat(get_cvars_s, get_cvars_f, cvar_cl_buffs_autoreplace, "cl_buffs_autoreplace"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_BuildMutatorsString) { ret_string = strcat(ret_string, ":Buffs"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(buffs_BuildMutatorsPrettyString) { ret_string = strcat(ret_string, ", Buffs"); - return FALSE; + return false; } void buffs_DelayedInit() @@ -783,5 +783,5 @@ MUTATOR_DEFINITION(mutator_buffs) buffs_Initialize(); } - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_campcheck.qc b/qcsrc/server/mutators/mutator_campcheck.qc index 2ec584db4..30362448d 100644 --- a/qcsrc/server/mutators/mutator_campcheck.qc +++ b/qcsrc/server/mutators/mutator_campcheck.qc @@ -5,7 +5,7 @@ MUTATOR_HOOKFUNCTION(campcheck_PlayerDies) { Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_CAMPCHECK); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(campcheck_PlayerDamage) @@ -18,7 +18,7 @@ MUTATOR_HOOKFUNCTION(campcheck_PlayerDamage) frag_attacker.campcheck_traveled_distance = autocvar_g_campcheck_distance; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(campcheck_PlayerThink) @@ -56,7 +56,7 @@ MUTATOR_HOOKFUNCTION(campcheck_PlayerThink) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(campcheck_PlayerSpawn) @@ -64,13 +64,13 @@ MUTATOR_HOOKFUNCTION(campcheck_PlayerSpawn) self.campcheck_nextcheck = time + autocvar_g_campcheck_interval * 2; self.campcheck_traveled_distance = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(campcheck_BuildMutatorsString) { ret_string = strcat(ret_string, ":CampCheck"); - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_campcheck) @@ -81,5 +81,5 @@ MUTATOR_DEFINITION(mutator_campcheck) MUTATOR_HOOK(PlayerSpawn, campcheck_PlayerSpawn, CBC_ORDER_ANY); MUTATOR_HOOK(BuildMutatorsString, campcheck_BuildMutatorsString, CBC_ORDER_ANY); - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_dodging.qc b/qcsrc/server/mutators/mutator_dodging.qc index e20008197..c2db56b94 100644 --- a/qcsrc/server/mutators/mutator_dodging.qc +++ b/qcsrc/server/mutators/mutator_dodging.qc @@ -99,7 +99,7 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) { if (autocvar_sv_dodging_sound == 1) PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND); - animdecide_setaction(self, ANIMACTION_JUMP, TRUE); + animdecide_setaction(self, ANIMACTION_JUMP, true); self.dodging_single_action = 0; } @@ -128,22 +128,22 @@ float check_close_to_wall(float threshold) { trace_start = self.origin; trace_end = self.origin + (1000*v_right); - tracebox(trace_start, self.mins, self.maxs, trace_end, TRUE, self); + tracebox(trace_start, self.mins, self.maxs, trace_end, true, self); if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold) return 1; trace_end = self.origin - (1000*v_right); - tracebox(trace_start, self.mins, self.maxs, trace_end, TRUE, self); + tracebox(trace_start, self.mins, self.maxs, trace_end, true, self); if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold) return 1; trace_end = self.origin + (1000*v_forward); - tracebox(trace_start, self.mins, self.maxs, trace_end, TRUE, self); + tracebox(trace_start, self.mins, self.maxs, trace_end, true, self); if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold) return 1; trace_end = self.origin - (1000*v_forward); - tracebox(trace_start, self.mins, self.maxs, trace_end, TRUE, self); + tracebox(trace_start, self.mins, self.maxs, trace_end, true, self); if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold) return 1; diff --git a/qcsrc/server/mutators/mutator_instagib.qc b/qcsrc/server/mutators/mutator_instagib.qc index 4200b2207..127eb0f1e 100644 --- a/qcsrc/server/mutators/mutator_instagib.qc +++ b/qcsrc/server/mutators/mutator_instagib.qc @@ -24,7 +24,7 @@ void instagib_stop_countdown(entity e) if (!e.instagib_needammo) return; Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_INSTAGIB_FINDAMMO); - e.instagib_needammo = FALSE; + e.instagib_needammo = false; } void instagib_ammocheck() { @@ -39,7 +39,7 @@ void instagib_ammocheck() instagib_stop_countdown(self); else { - self.instagib_needammo = TRUE; + self.instagib_needammo = true; if (self.health <= 5) { Damage(self, self, self, 5, DEATH_NOAMMO, self.origin, '0 0 0'); @@ -106,14 +106,14 @@ MUTATOR_HOOKFUNCTION(instagib_MatchEnd) FOR_EACH_PLAYER(head) instagib_stop_countdown(head); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_MonsterLoot) { other.monster_loot = spawnfunc_item_minst_cells; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_MonsterSpawn) @@ -122,39 +122,39 @@ MUTATOR_HOOKFUNCTION(instagib_MonsterSpawn) if(self.monsterid == MON_MAGE) self.skin = 1; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_BotShouldAttack) { if(checkentity.items & IT_STRENGTH) - return TRUE; + return true; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_MakePlayerObserver) { instagib_stop_countdown(self); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_PlayerSpawn) { self.effects |= EF_FULLBRIGHT; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_PlayerPreThink) { instagib_ammocheck(); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_PlayerRegen) { // no regeneration in instagib - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(instagib_PlayerPowerups) @@ -203,7 +203,7 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerPowerups) Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_SPEED); } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_PlayerPhysics) @@ -211,7 +211,7 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerPhysics) if(self.items & IT_INVINCIBLE) self.stat_sv_maxspeed = self.stat_sv_maxspeed * autocvar_g_instagib_speed_highspeed; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_SplitHealthArmor) @@ -219,14 +219,14 @@ MUTATOR_HOOKFUNCTION(instagib_SplitHealthArmor) damage_save = 0; damage_take = frag_damage; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_ForbidThrowing) { // weapon dropping on death handled by FilterItem - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(instagib_PlayerDamage) @@ -284,7 +284,7 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerDamage) if(frag_target.items & IT_STRENGTH) yoda = 1; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_SetStartItems) @@ -302,18 +302,18 @@ MUTATOR_HOOKFUNCTION(instagib_SetStartItems) start_weapons = warmup_start_weapons = WEPSET_VAPORIZER; start_items |= IT_UNLIMITED_SUPERWEAPONS; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_FilterItem) { if(self.classname == "item_cells") - return TRUE; // no normal cells? + return true; // no normal cells? if(self.weapon == WEP_VAPORIZER && self.classname == "droppedweapon") { self.ammo_cells = autocvar_g_instagib_ammo_drop; - return FALSE; + return false; } if(self.weapon == WEP_DEVASTATOR || self.weapon == WEP_VORTEX) @@ -325,19 +325,19 @@ MUTATOR_HOOKFUNCTION(instagib_FilterItem) self = e; spawnfunc_item_minst_cells(); self = oldself; - return TRUE; + return true; } if(self.flags & FL_POWERUP) - return FALSE; + return false; if(self.ammo_cells > autocvar_g_instagib_ammo_drop && self.classname != "item_minst_cells") self.ammo_cells = autocvar_g_instagib_ammo_drop; if(self.ammo_cells && !self.weapon) - return FALSE; + return false; - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(instagib_CustomizeWaypoint) @@ -348,9 +348,9 @@ MUTATOR_HOOKFUNCTION(instagib_CustomizeWaypoint) // but only apply this to real players, not to spectators if((self.owner.flags & FL_CLIENT) && (self.owner.items & IT_STRENGTH) && (e == other)) if(DIFF_TEAM(self.owner, e)) - return TRUE; + return true; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_ItemCountdown) @@ -361,7 +361,7 @@ MUTATOR_HOOKFUNCTION(instagib_ItemCountdown) case IT_NAILS: item_name = "item-extralife"; item_color = '1 0 0'; break; case IT_INVINCIBLE: item_name = "item-speed"; item_color = '1 0 1'; break; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_ItemTouch) @@ -395,9 +395,9 @@ MUTATOR_HOOKFUNCTION(instagib_ItemTouch) MUTATOR_HOOKFUNCTION(instagib_OnEntityPreSpawn) { - if (!autocvar_g_powerups) { return FALSE; } + if (!autocvar_g_powerups) { return false; } if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega")) - return FALSE; + return false; entity e = spawn(); @@ -413,25 +413,25 @@ MUTATOR_HOOKFUNCTION(instagib_OnEntityPreSpawn) e.noalign = self.noalign; setorigin(e, self.origin); - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(instagib_BuildMutatorsString) { ret_string = strcat(ret_string, ":instagib"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_BuildMutatorsPrettyString) { ret_string = strcat(ret_string, ", instagib"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(instagib_SetModname) { modname = "instagib"; - return TRUE; + return true; } MUTATOR_DEFINITION(mutator_instagib) @@ -459,5 +459,5 @@ MUTATOR_DEFINITION(mutator_instagib) MUTATOR_HOOK(BuildMutatorsPrettyString, instagib_BuildMutatorsPrettyString, CBC_ORDER_ANY); MUTATOR_HOOK(SetModname, instagib_SetModname, CBC_ORDER_ANY); - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_melee_only.qc b/qcsrc/server/mutators/mutator_melee_only.qc index c435aba03..b4f9c3771 100644 --- a/qcsrc/server/mutators/mutator_melee_only.qc +++ b/qcsrc/server/mutators/mutator_melee_only.qc @@ -3,12 +3,12 @@ MUTATOR_HOOKFUNCTION(melee_SetStartItems) start_ammo_shells = warmup_start_ammo_shells = 0; start_weapons = warmup_start_weapons = WEPSET_SHOTGUN; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(melee_ForbidThrowing) { - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(melee_FilterItem) @@ -17,22 +17,22 @@ MUTATOR_HOOKFUNCTION(melee_FilterItem) { case IT_5HP: case IT_ARMOR_SHARD: - return FALSE; + return false; } - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(melee_BuildMutatorsString) { ret_string = strcat(ret_string, ":MeleeOnly"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(melee_BuildMutatorsPrettyString) { ret_string = strcat(ret_string, ", Melee Only Arena"); - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_melee_only) @@ -43,5 +43,5 @@ MUTATOR_DEFINITION(mutator_melee_only) MUTATOR_HOOK(BuildMutatorsString, melee_BuildMutatorsString, CBC_ORDER_ANY); MUTATOR_HOOK(BuildMutatorsPrettyString, melee_BuildMutatorsPrettyString, CBC_ORDER_ANY); - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_midair.qc b/qcsrc/server/mutators/mutator_midair.qc index f13ae5c8a..d582c05ce 100644 --- a/qcsrc/server/mutators/mutator_midair.qc +++ b/qcsrc/server/mutators/mutator_midair.qc @@ -5,9 +5,9 @@ MUTATOR_HOOKFUNCTION(midair_PlayerDamage) if(IS_PLAYER(frag_attacker)) if(IS_PLAYER(frag_target)) if(time < self.midair_shieldtime) - frag_damage = FALSE; + frag_damage = false; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(midair_PlayerPowerups) @@ -19,7 +19,7 @@ MUTATOR_HOOKFUNCTION(midair_PlayerPowerups) self.midair_shieldtime = max(self.midair_shieldtime, time + autocvar_g_midair_shieldtime); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(midair_PlayerSpawn) @@ -27,19 +27,19 @@ MUTATOR_HOOKFUNCTION(midair_PlayerSpawn) if(IS_BOT_CLIENT(self)) self.bot_moveskill = 0; // disable bunnyhopping - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(midair_BuildMutatorsString) { ret_string = strcat(ret_string, ":midair"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(midair_BuildMutatorsPrettyString) { ret_string = strcat(ret_string, ", Midair"); - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_midair) @@ -50,5 +50,5 @@ MUTATOR_DEFINITION(mutator_midair) MUTATOR_HOOK(BuildMutatorsString, midair_BuildMutatorsString, CBC_ORDER_ANY); MUTATOR_HOOK(BuildMutatorsPrettyString, midair_BuildMutatorsPrettyString, CBC_ORDER_ANY); - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_multijump.qc b/qcsrc/server/mutators/mutator_multijump.qc index f380865ad..d36f3ecbe 100644 --- a/qcsrc/server/mutators/mutator_multijump.qc +++ b/qcsrc/server/mutators/mutator_multijump.qc @@ -6,15 +6,15 @@ MUTATOR_HOOKFUNCTION(multijump_PlayerPhysics) if(self.flags & FL_ONGROUND) self.multijump_count = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(multijump_PlayerJump) { if (self.flags & FL_JUMPRELEASED && !(self.flags & FL_ONGROUND)) // jump button pressed this frame and we are in midair - self.multijump_ready = TRUE; // this is necessary to check that we released the jump button and pressed it again + self.multijump_ready = true; // this is necessary to check that we released the jump button and pressed it again else - self.multijump_ready = FALSE; + self.multijump_ready = false; if(!player_multijump && self.multijump_ready && (autocvar_g_multijump == -1 || self.multijump_count < autocvar_g_multijump) && self.velocity.z > autocvar_g_multijump_speed) { @@ -24,12 +24,12 @@ MUTATOR_HOOKFUNCTION(multijump_PlayerJump) { if (self.velocity.z < autocvar_sv_jumpvelocity) { - player_multijump = TRUE; + player_multijump = true; self.velocity_z = 0; } } else - player_multijump = TRUE; + player_multijump = true; if(player_multijump) { @@ -53,22 +53,22 @@ MUTATOR_HOOKFUNCTION(multijump_PlayerJump) self.multijump_count += 1; } } - self.multijump_ready = FALSE; // require releasing and pressing the jump button again for the next jump + self.multijump_ready = false; // require releasing and pressing the jump button again for the next jump } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(multijump_BuildMutatorsString) { ret_string = strcat(ret_string, ":multijump"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(multijump_BuildMutatorsPrettyString) { ret_string = strcat(ret_string, ", Multi jump"); - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_multijump) @@ -78,5 +78,5 @@ MUTATOR_DEFINITION(mutator_multijump) MUTATOR_HOOK(BuildMutatorsString, multijump_BuildMutatorsString, CBC_ORDER_ANY); MUTATOR_HOOK(BuildMutatorsPrettyString, multijump_BuildMutatorsPrettyString, CBC_ORDER_ANY); - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator_nades.qc index dda88a74f..88e83a960 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator_nades.qc @@ -10,7 +10,7 @@ void nade_timer_think() void nade_burn_spawn(entity _nade) { - CSQCProjectile(_nade, TRUE, Nade_ProjectileFromID(_nade.nade_type, TRUE), TRUE); + CSQCProjectile(_nade, true, Nade_ProjectileFromID(_nade.nade_type, true), true); } void nade_spawn(entity _nade) @@ -29,7 +29,7 @@ void nade_spawn(entity _nade) _nade.effects |= EF_LOWPRECISION; - CSQCProjectile(_nade, TRUE, Nade_ProjectileFromID(_nade.nade_type, FALSE), TRUE); + CSQCProjectile(_nade, true, Nade_ProjectileFromID(_nade.nade_type, false), true); } void napalm_damage(float dist, float damage, float edgedamage, float burntime) @@ -42,7 +42,7 @@ void napalm_damage(float dist, float damage, float edgedamage, float burntime) return; RandomSelection_Init(); - for(e = WarpZone_FindRadius(self.origin, dist, TRUE); e; e = e.chain) + for(e = WarpZone_FindRadius(self.origin, dist, true); e; e = e.chain) if(e.takedamage == DAMAGE_AIM) if(self.realowner != e || autocvar_g_nades_napalm_selfdamage) if(!IS_PLAYER(e) || !self.realowner || DIFF_TEAM(e, self)) @@ -115,7 +115,7 @@ void nade_napalm_ball() proj.realowner = self.realowner; proj.team = self.owner.team; proj.classname = "grenade"; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = autocvar_g_nades_napalm_ball_damage; proj.movetype = MOVETYPE_BOUNCE; proj.projectiledeathtype = DEATH_NADE_NAPALM; @@ -140,7 +140,7 @@ void nade_napalm_ball() proj.flags = FL_PROJECTILE; proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC; - //CSQCProjectile(proj, TRUE, PROJECTILE_NAPALM_FIRE, TRUE); + //CSQCProjectile(proj, true, PROJECTILE_NAPALM_FIRE, true); } @@ -202,25 +202,25 @@ void nade_napalm_boom() fountain.team = self.team; fountain.movetype = MOVETYPE_TOSS; fountain.projectiledeathtype = DEATH_NADE_NAPALM; - fountain.bot_dodge = TRUE; + fountain.bot_dodge = true; fountain.bot_dodgerating = autocvar_g_nades_napalm_fountain_damage; fountain.nade_special_time = time; setsize(fountain, '-16 -16 -16', '16 16 16'); - CSQCProjectile(fountain, TRUE, PROJECTILE_NAPALM_FOUNTAIN, TRUE); + CSQCProjectile(fountain, true, PROJECTILE_NAPALM_FOUNTAIN, true); } void nade_ice_freeze(entity freezefield, entity frost_target, float freeze_time) { frost_target.frozen_by = freezefield.realowner; pointparticles(particleeffectnum("electro_impact"), frost_target.origin, '0 0 0', 1); - Freeze(frost_target, 1/freeze_time, 3, FALSE); + Freeze(frost_target, 1/freeze_time, 3, false); if(frost_target.ballcarried) if(g_keepaway) { ka_DropEvent(frost_target); } else { DropBall(frost_target.ballcarried, frost_target.origin, frost_target.velocity);} if(frost_target.flagcarried) { ctf_Handle_Throw(frost_target, world, DROP_THROW); } if(frost_target.nade) { toss_nade(frost_target, '0 0 0', time + 0.05); } - kh_Key_DropAll(frost_target, FALSE); + kh_Key_DropAll(frost_target, false); } void nade_ice_think() @@ -312,7 +312,7 @@ void nade_ice_boom() fountain.team = self.team; fountain.movetype = MOVETYPE_TOSS; fountain.projectiledeathtype = DEATH_NADE_ICE; - fountain.bot_dodge = FALSE; + fountain.bot_dodge = false; setsize(fountain, '-16 -16 -16', '16 16 16'); fountain.nade_special_time = time+0.3; fountain.angles = self.angles; @@ -447,7 +447,7 @@ void nade_heal_boom() healer.healer_lifetime = autocvar_g_nades_heal_time; // save the cvar healer.ltime = time + healer.healer_lifetime; healer.team = self.realowner.team; - healer.bot_dodge = FALSE; + healer.bot_dodge = false; healer.solid = SOLID_TRIGGER; healer.touch = nade_heal_touch; @@ -456,7 +456,7 @@ void nade_heal_boom() vector size = '1 1 1' * healer.healer_radius / 2; setsize(healer,-size,size); - Net_LinkEntity(healer, TRUE, 0, healer_send); + Net_LinkEntity(healer, true, 0, healer_send); healer.think = nade_heal_think; healer.nextthink = time; @@ -465,7 +465,7 @@ void nade_heal_boom() void nade_monster_boom() { - entity e = spawnmonster(self.pokenade_type, 0, self.realowner, self.realowner, self.origin, FALSE, FALSE, 1); + entity e = spawnmonster(self.pokenade_type, 0, self.realowner, self.realowner, self.origin, false, false, 1); if(autocvar_g_nades_pokenade_monster_lifetime > 0) e.monster_lifetime = time + autocvar_g_nades_pokenade_monster_lifetime; @@ -662,7 +662,7 @@ void toss_nade(entity e, vector _velocity, float _time) makevectors(e.v_angle); - W_SetupShot(e, FALSE, FALSE, "", CH_WEAPON_A, 0); + W_SetupShot(e, false, false, "", CH_WEAPON_A, 0); Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_NADES); @@ -673,7 +673,7 @@ void toss_nade(entity e, vector _velocity, float _time) setsize(_nade, '-16 -16 -16', '16 16 16'); _nade.movetype = MOVETYPE_BOUNCE; - tracebox(_nade.origin, _nade.mins, _nade.maxs, _nade.origin, FALSE, _nade); + tracebox(_nade.origin, _nade.mins, _nade.maxs, _nade.origin, false, _nade); if (trace_startsolid) setorigin(_nade, e.origin); @@ -684,7 +684,7 @@ void toss_nade(entity e, vector _velocity, float _time) else if(autocvar_g_nades_nade_newton_style == 2) _nade.velocity = _velocity; else - _nade.velocity = W_CalculateProjectileVelocity(e.velocity, _velocity, TRUE); + _nade.velocity = W_CalculateProjectileVelocity(e.velocity, _velocity, true); _nade.touch = nade_touch; _nade.health = autocvar_g_nades_nade_health; @@ -694,11 +694,11 @@ void toss_nade(entity e, vector _velocity, float _time) _nade.customizeentityforclient = func_null; _nade.exteriormodeltoclient = world; _nade.traileffectnum = 0; - _nade.teleportable = TRUE; - _nade.pushable = TRUE; + _nade.teleportable = true; + _nade.pushable = true; _nade.gravity = 1; _nade.missile_flags = MIF_SPLASH | MIF_ARC; - _nade.damagedbycontents = TRUE; + _nade.damagedbycontents = true; _nade.angles = vectoangles(_nade.velocity); _nade.flags = FL_PROJECTILE; _nade.projectiledeathtype = DEATH_NADE; @@ -751,7 +751,7 @@ void nades_RemoveBonus(entity player) float nade_customize() { - //if(IS_SPEC(other)) { return FALSE; } + //if(IS_SPEC(other)) { return false; } if(other == self.realowner || (IS_SPEC(other) && other.enemy == self.realowner)) { // somewhat hide the model, but keep the glow @@ -764,11 +764,11 @@ float nade_customize() { //self.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION; if(!self.traileffectnum) - self.traileffectnum = particleeffectnum(Nade_TrailEffect(Nade_ProjectileFromID(self.nade_type, FALSE), self.team)); + self.traileffectnum = particleeffectnum(Nade_TrailEffect(Nade_ProjectileFromID(self.nade_type, false), self.team)); self.alpha = 1; } - return TRUE; + return true; } void nade_prime() @@ -804,7 +804,7 @@ void nade_prime() //setattachment(n, self, "bip01 l hand"); n.exteriormodeltoclient = self; n.customizeentityforclient = nade_customize; - n.traileffectnum = particleeffectnum(Nade_TrailEffect(Nade_ProjectileFromID(n.nade_type, FALSE), self.team)); + n.traileffectnum = particleeffectnum(Nade_TrailEffect(Nade_ProjectileFromID(n.nade_type, false), self.team)); n.colormod = Nade_Color(n.nade_type); n.realowner = self; n.colormap = self.colormap; @@ -831,24 +831,24 @@ void nade_prime() float CanThrowNade() { if(self.vehicle) - return FALSE; + return false; if(gameover) - return FALSE; + return false; if(self.deadflag != DEAD_NO) - return FALSE; + return false; if (!autocvar_g_nades) - return FALSE; // allow turning them off mid match + return false; // allow turning them off mid match if(forbidWeaponUse()) - return FALSE; + return false; if (!IS_PLAYER(self)) - return FALSE; + return false; - return TRUE; + return true; } void nades_CheckThrow() @@ -892,7 +892,7 @@ void nades_Clear(entity player) MUTATOR_HOOKFUNCTION(nades_CheckThrow) { if(MUTATOR_RETURNVALUE) { nades_CheckThrow(); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_VehicleEnter) @@ -900,17 +900,17 @@ MUTATOR_HOOKFUNCTION(nades_VehicleEnter) if(vh_player.nade) toss_nade(vh_player, '0 0 100', max(vh_player.nade.wait, time + 0.05)); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_PlayerPreThink) { - if(!IS_PLAYER(self)) { return FALSE; } + if(!IS_PLAYER(self)) { return false; } float key_pressed = self.BUTTON_HOOK; float time_score; - if(g_grappling_hook || client_hasweapon(self, WEP_HOOK, FALSE, FALSE) || (weaponsInMap & WEPSET_HOOK)) + if(g_grappling_hook || client_hasweapon(self, WEP_HOOK, false, false) || (weaponsInMap & WEPSET_HOOK)) key_pressed = self.button16; // if hook is enabled, use an alternate key if(self.nade) @@ -1005,7 +1005,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerPreThink) if(!o) o = other; if(self.frozen == 1) - other.reviving = TRUE; + other.reviving = true; ++n; } } @@ -1027,11 +1027,11 @@ MUTATOR_HOOKFUNCTION(nades_PlayerPreThink) FOR_EACH_PLAYER(other) if(other.reviving) { other.revive_progress = self.revive_progress; - other.reviving = FALSE; + other.reviving = false; } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_PlayerSpawn) @@ -1058,7 +1058,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerSpawn) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_PlayerDies) @@ -1092,7 +1092,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerDies) nades_RemoveBonus(frag_target); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_PlayerDamage) @@ -1112,7 +1112,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerDamage) Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_REVIVE_SELF); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_MonsterDies) @@ -1122,14 +1122,14 @@ MUTATOR_HOOKFUNCTION(nades_MonsterDies) if(!(self.spawnflags & MONSTERFLAG_SPAWNED)) nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_minor); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_RemovePlayer) { nades_Clear(self); nades_RemoveBonus(self); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_SpectateCopy) @@ -1141,7 +1141,7 @@ MUTATOR_HOOKFUNCTION(nades_SpectateCopy) self.bonus_nade_score = other.bonus_nade_score; self.stat_healing_orb = other.stat_healing_orb; self.stat_healing_orb_alpha = other.stat_healing_orb_alpha; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_GetCvars) @@ -1149,19 +1149,19 @@ MUTATOR_HOOKFUNCTION(nades_GetCvars) GetCvars_handleFloat(get_cvars_s, get_cvars_f, cvar_cl_nade_type, "cl_nade_type"); GetCvars_handleString(get_cvars_s, get_cvars_f, cvar_cl_pokenade_type, "cl_pokenade_type"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_BuildMutatorsString) { ret_string = strcat(ret_string, ":Nades"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(nades_BuildMutatorsPrettyString) { ret_string = strcat(ret_string, ", Nades"); - return FALSE; + return false; } void nades_Initialize() @@ -1210,5 +1210,5 @@ MUTATOR_DEFINITION(mutator_nades) nades_Initialize(); } - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_new_toys.qc b/qcsrc/server/mutators/mutator_new_toys.qc index 56d38c244..5aa94b187 100644 --- a/qcsrc/server/mutators/mutator_new_toys.qc +++ b/qcsrc/server/mutators/mutator_new_toys.qc @@ -88,9 +88,9 @@ float nt_IsNewToy(float w) case WEP_HLAC: case WEP_RIFLE: case WEP_SHOCKWAVE: - return TRUE; + return true; default: - return FALSE; + return false; } } diff --git a/qcsrc/server/mutators/mutator_nix.qc b/qcsrc/server/mutators/mutator_nix.qc index 6a980af08..ee337b50a 100644 --- a/qcsrc/server/mutators/mutator_nix.qc +++ b/qcsrc/server/mutators/mutator_nix.qc @@ -12,22 +12,22 @@ float NIX_CanChooseWeapon(float wpn) entity e; e = get_weaponinfo(wpn); if(!e.weapon) // skip dummies - return FALSE; + return false; if(g_weaponarena) { if(!(g_weaponarena_weapons & WepSet_FromWeapon(wpn))) - return FALSE; + return false; } else { if(wpn == WEP_BLASTER && g_nix_with_blaster) // WEAPONTODO: rename to g_nix_with_blaster - return FALSE; + return false; if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED) - return FALSE; + return false; if (!(e.spawnflags & WEP_FLAG_NORMAL)) - return FALSE; + return false; } - return TRUE; + return true; } void NIX_ChooseNextWeapon() { @@ -142,8 +142,8 @@ void NIX_GiveCurrentWeapon() self.weapons |= WepSet_FromWeapon(nix_weapon); if(self.switchweapon != nix_weapon) - if(!client_hasweapon(self, self.switchweapon, TRUE, FALSE)) - if(client_hasweapon(self, nix_weapon, TRUE, FALSE)) + if(!client_hasweapon(self, self.switchweapon, true, false)) + if(client_hasweapon(self, nix_weapon, true, false)) W_SwitchWeapon(nix_weapon); } @@ -265,7 +265,7 @@ MUTATOR_DEFINITION(mutator_nix) e.ammo_rockets = start_ammo_rockets; e.ammo_fuel = start_ammo_fuel; e.weapons = start_weapons; - if(!client_hasweapon(e, e.weapon, TRUE, FALSE)) + if(!client_hasweapon(e, e.weapon, true, false)) e.switchweapon = w_getbestweapon(self); } } diff --git a/qcsrc/server/mutators/mutator_overkill.qc b/qcsrc/server/mutators/mutator_overkill.qc index 7a5e62a7e..868b16d47 100644 --- a/qcsrc/server/mutators/mutator_overkill.qc +++ b/qcsrc/server/mutators/mutator_overkill.qc @@ -24,7 +24,7 @@ void ok_IncreaseCharge(entity ent, float wep) float ok_CheckWeaponCharge(entity ent, float wep) { - if(!ent.ok_use_ammocharge) return TRUE; + if(!ent.ok_use_ammocharge) return true; entity wepent = get_weaponinfo(wep); @@ -51,14 +51,14 @@ MUTATOR_HOOKFUNCTION(ok_PlayerDamage_Calculate) } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_PlayerDamage_SplitHealthArmor) { if(damage_take) self.ok_pauseregen_finished = max(self.ok_pauseregen_finished, time + 2); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_PlayerDies) @@ -72,9 +72,9 @@ MUTATOR_HOOKFUNCTION(ok_PlayerDies) } self = spawn(); - self.ok_item = TRUE; - self.noalign = TRUE; - self.pickup_anyway = TRUE; + self.ok_item = true; + self.noalign = true; + self.pickup_anyway = true; spawnfunc_item_armor_small(); self.movetype = MOVETYPE_TOSS; self.gravity = 1; @@ -87,7 +87,7 @@ MUTATOR_HOOKFUNCTION(ok_PlayerDies) self.ok_lastwep = self.switchweapon; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_PlayerRegen) @@ -106,21 +106,21 @@ MUTATOR_HOOKFUNCTION(ok_PlayerRegen) self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > self.pauserotfuel_finished), limitf); } - return TRUE; // return TRUE anyway, as frozen uses no regen + return true; // return true anyway, as frozen uses no regen } MUTATOR_HOOKFUNCTION(ok_ForbidThrowCurrentWeapon) { - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(ok_PlayerPreThink) { if(intermission_running || gameover) - return FALSE; + return false; if(self.deadflag != DEAD_NO || !IS_PLAYER(self) || self.frozen) - return FALSE; + return false; if(self.ok_lastwep) { @@ -151,7 +151,7 @@ MUTATOR_HOOKFUNCTION(ok_PlayerPreThink) ); } - self.weapon_blocked = FALSE; + self.weapon_blocked = false; self.ok_ammo_charge = self.ammo_charge[self.weapon]; @@ -167,12 +167,12 @@ MUTATOR_HOOKFUNCTION(ok_PlayerPreThink) if(self.weaponentity.state != WS_CLEAR) w_ready(); - self.weapon_blocked = TRUE; + self.weapon_blocked = true; } self.BUTTON_ATCK2 = 0; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_PlayerSpawn) @@ -192,7 +192,7 @@ MUTATOR_HOOKFUNCTION(ok_PlayerSpawn) self.ok_pauseregen_finished = time + 2; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_OnEntityPreSpawn) @@ -206,15 +206,15 @@ MUTATOR_HOOKFUNCTION(ok_OnEntityPreSpawn) setorigin(wep, self.origin); setmodel(wep, "models/weapons/g_ok_hmg.md3"); wep.classname = "weapon_hmg"; - wep.ok_item = TRUE; + wep.ok_item = true; wep.noalign = self.noalign; wep.cnt = self.cnt; wep.team = self.team; wep.respawntime = autocvar_g_overkill_superguns_respawn_time; - wep.pickup_anyway = TRUE; + wep.pickup_anyway = true; wep.think = spawnfunc_weapon_hmg; wep.nextthink = time + 0.1; - return TRUE; + return true; } if(self.classname == "item_invincible") @@ -223,25 +223,25 @@ MUTATOR_HOOKFUNCTION(ok_OnEntityPreSpawn) setorigin(wep, self.origin); setmodel(wep, "models/weapons/g_ok_rl.md3"); wep.classname = "weapon_rpc"; - wep.ok_item = TRUE; + wep.ok_item = true; wep.noalign = self.noalign; wep.cnt = self.cnt; wep.team = self.team; wep.respawntime = autocvar_g_overkill_superguns_respawn_time; - wep.pickup_anyway = TRUE; + wep.pickup_anyway = true; wep.think = spawnfunc_weapon_rpc; wep.nextthink = time + 0.1; - return TRUE; + return true; } } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_ItemRemove) { if(self.ok_item) - return FALSE; + return false; switch(self.items) { @@ -249,7 +249,7 @@ MUTATOR_HOOKFUNCTION(ok_ItemRemove) case IT_ARMOR: return !(autocvar_g_overkill_100a_anyway); } - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(ok_SpectateCopy) @@ -257,7 +257,7 @@ MUTATOR_HOOKFUNCTION(ok_SpectateCopy) self.ammo_charge[self.weapon] = other.ammo_charge[other.weapon]; self.ok_use_ammocharge = other.ok_use_ammocharge; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_StartItems) @@ -270,25 +270,25 @@ MUTATOR_HOOKFUNCTION(ok_StartItems) start_items |= IT_UNLIMITED_WEAPON_AMMO; start_weapons = warmup_start_weapons = ok_start_items; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_BuildMutatorsString) { ret_string = strcat(ret_string, ":OK"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_BuildMutatorsPrettyString) { ret_string = strcat(ret_string, ", Overkill"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(ok_SetModname) { modname = "Overkill"; - return TRUE; + return true; } void ok_SetCvars() @@ -360,5 +360,5 @@ MUTATOR_DEFINITION(mutator_overkill) (get_weaponinfo(WEP_HMG)).spawnflags |= WEP_FLAG_MUTATORBLOCKED; } - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_physical_items.qc b/qcsrc/server/mutators/mutator_physical_items.qc index c99228673..dd2d8556d 100644 --- a/qcsrc/server/mutators/mutator_physical_items.qc +++ b/qcsrc/server/mutators/mutator_physical_items.qc @@ -58,9 +58,9 @@ void physical_item_damage(entity inflictor, entity attacker, float damage, float MUTATOR_HOOKFUNCTION(item_spawning) { if(self.owner == world && autocvar_g_physical_items <= 1) - return FALSE; + return false; if (self.spawnflags & 1) // floating item - return FALSE; + return false; // The actual item can't be physical and trigger at the same time, so make it invisible and use a second entity for physics. // Ugly hack, but unless SOLID_TRIGGER is gotten to work with MOVETYPE_PHYSICS in the engine it can't be fixed. @@ -95,7 +95,7 @@ MUTATOR_HOOKFUNCTION(item_spawning) self.movetype = MOVETYPE_FOLLOW; self.aiment = wep; // attach the original weapon - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_physical_items) diff --git a/qcsrc/server/mutators/mutator_pinata.qc b/qcsrc/server/mutators/mutator_pinata.qc index 6d982d5a4..7cf405ef7 100644 --- a/qcsrc/server/mutators/mutator_pinata.qc +++ b/qcsrc/server/mutators/mutator_pinata.qc @@ -5,21 +5,21 @@ MUTATOR_HOOKFUNCTION(pinata_PlayerDies) if(self.weapons & WepSet_FromWeapon(j)) if(self.switchweapon != j) if(W_IsWeaponThrowable(j)) - W_ThrowNewWeapon(self, j, FALSE, self.origin + (self.mins + self.maxs) * 0.5, randomvec() * 175 + '0 0 325'); + W_ThrowNewWeapon(self, j, false, self.origin + (self.mins + self.maxs) * 0.5, randomvec() * 175 + '0 0 325'); - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(pinata_BuildMutatorsString) { ret_string = strcat(ret_string, ":Pinata"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(pinata_BuildMutatorsPrettyString) { ret_string = strcat(ret_string, ", Piñata"); - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_pinata) @@ -28,5 +28,5 @@ MUTATOR_DEFINITION(mutator_pinata) MUTATOR_HOOK(BuildMutatorsString, pinata_BuildMutatorsString, CBC_ORDER_ANY); MUTATOR_HOOK(BuildMutatorsPrettyString, pinata_BuildMutatorsPrettyString, CBC_ORDER_ANY); - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_random_gravity.qc b/qcsrc/server/mutators/mutator_random_gravity.qc index 184047189..f70ee4ba3 100644 --- a/qcsrc/server/mutators/mutator_random_gravity.qc +++ b/qcsrc/server/mutators/mutator_random_gravity.qc @@ -7,10 +7,10 @@ float gravity_delay; MUTATOR_HOOKFUNCTION(gravity_StartFrame) { - if(gameover || !cvar("g_random_gravity")) return FALSE; - if(time < gravity_delay) return FALSE; - if(time < game_starttime) return FALSE; - if(round_handler_IsActive() && !round_handler_IsRoundStarted()) return FALSE; + if(gameover || !cvar("g_random_gravity")) return false; + if(time < gravity_delay) return false; + if(time < game_starttime) return false; + if(round_handler_IsActive() && !round_handler_IsRoundStarted()) return false; if(random() >= autocvar_g_random_gravity_negative_chance) cvar_set("sv_gravity", ftos(bound(autocvar_g_random_gravity_min, random() - random() * -autocvar_g_random_gravity_negative, autocvar_g_random_gravity_max))); @@ -21,7 +21,7 @@ MUTATOR_HOOKFUNCTION(gravity_StartFrame) dprint("Gravity is now: ", ftos(autocvar_sv_gravity), "\n"); - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(gravity_BuildMutatorsString) @@ -47,5 +47,5 @@ MUTATOR_DEFINITION(mutator_random_gravity) cvar_settemp("sv_gravity", cvar_string("sv_gravity")); // settemp current gravity so it's restored on match end } - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_superspec.qc b/qcsrc/server/mutators/mutator_superspec.qc index 161439d95..1fd1022e7 100644 --- a/qcsrc/server/mutators/mutator_superspec.qc +++ b/qcsrc/server/mutators/mutator_superspec.qc @@ -1,5 +1,5 @@ #define _SSMAGIX "SUPERSPEC_OPTIONSFILE_V1" -#define _ISLOCAL ((edict_num(1) == self) ? TRUE : FALSE) +#define _ISLOCAL ((edict_num(1) == self) ? true : false) const float ASF_STRENGTH = 1; const float ASF_SHIELD = 2; @@ -25,7 +25,7 @@ float _spectate(entity _player) if(Spectate(_player) == 1) self.classname = "spectator"; - return TRUE; + return true; } void superspec_save_client_conf() @@ -79,19 +79,19 @@ float superspec_filteritem(entity _for, entity _item) float i; if(_for.superspec_itemfilter == "") - return TRUE; + return true; if(_for.superspec_itemfilter == "") - return TRUE; + return true; float l = tokenize_console(_for.superspec_itemfilter); for(i = 0; i < l; ++i) { if(argv(i) == _item.classname) - return TRUE; + return true; } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(superspec_ItemTouch) @@ -154,10 +154,10 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) var = strcat(var, text," ^7(^3 ", long, "^7 | ^3", short, " ^7)\n") if(MUTATOR_RETURNVALUE) // command was already handled? - return FALSE; + return false; if(IS_PLAYER(self)) - return FALSE; + return false; if(cmd_name == "superspec_itemfilter") { @@ -181,7 +181,7 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) if(self.superspec_itemfilter == "") { superspec_msg("^3superspec_itemfilter^7 is ^1not^7 set", "\n^3superspec_itemfilter^7 is ^1not^7 set\n", self, "", 1); - return TRUE; + return true; } float i; float l = tokenize_console(self.superspec_itemfilter); @@ -202,7 +202,7 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) self.superspec_itemfilter = strzone(argv(1)); } - return TRUE; + return true; } if(cmd_name == "superspec") @@ -220,7 +220,7 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) _aspeco = strcat(_aspeco, "^3 item_message ^7(short^5 im^7) makes superspectate print items that were picked up.\n"); _aspeco = strcat(_aspeco, "^7 Use cmd superspec_itemfilter \"item_class1 item_class2\" to set up a filter of what to show with ^3item_message.\n"); superspec_msg("^2Available Super Spectate ^3options:\n\n\n", "\n^2Available Super Spectate ^3options:\n", self, _aspeco, 1); - return TRUE; + return true; } if(argv(1) == "clear") @@ -259,7 +259,7 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) superspec_msg("^3Current Super Spectate options are:\n\n\n\n\n", "\n^3Current Super Spectate options are:\n", self, _aspeco, 1); - return TRUE; + return true; } ///////////////////// @@ -283,7 +283,7 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) _aspeco = strcat(_aspeco, "^3 followkiller ^7(short ^5fk^7) to autospec the killer/off\n"); _aspeco = strcat(_aspeco, "^3 all ^7(short ^5aa^7) to turn everything on/off\n"); superspec_msg("^2Available Auto Spectate ^3options:\n\n\n", "\n^2Available Auto Spectate ^3options:\n", self, _aspeco, 1); - return TRUE; + return true; } float i, _bits = 0, _start = 1; @@ -335,7 +335,7 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) OPTIONINFO(self.autospec_flags, _aspeco, ASF_FOLLOWKILLER, "Followkiller", "followkiller", "fk"); superspec_msg("^3Current auto spectate options are:\n\n\n\n\n", "\n^3Current auto spectate options are:\n", self, _aspeco, 1); - return TRUE; + return true; } if(cmd_name == "followpowerup") @@ -348,7 +348,7 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) } superspec_msg("", "", self, "No active powerup\n", 1); - return TRUE; + return true; } if(cmd_name == "followstrength") @@ -361,7 +361,7 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) } superspec_msg("", "", self, "No active Strength\n", 1); - return TRUE; + return true; } if(cmd_name == "followshield") @@ -374,17 +374,17 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) } superspec_msg("", "", self, "No active Shield\n", 1); - return TRUE; + return true; } if(cmd_name == "followfc") { if(!g_ctf) - return TRUE; + return true; entity _player; float _team = 0; - float found = FALSE; + float found = false; if(cmd_argc == 2) { @@ -398,7 +398,7 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) { if(_player.flagcarried && (_player.team == _team || _team == 0)) { - found = TRUE; + found = true; if(_team == 0 && IS_SPEC(self) && self.enemy == _player) continue; // already spectating a fc, try to find the other fc return _spectate(_player); @@ -407,10 +407,10 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) if(!found) superspec_msg("", "", self, "No active flag carrier\n", 1); - return TRUE; + return true; } - return FALSE; + return false; #undef OPTIONINFO } @@ -437,7 +437,7 @@ void superspec_hello() MUTATOR_HOOKFUNCTION(superspec_ClientConnect) { if(!IS_REAL_CLIENT(self)) - return FALSE; + return false; string fn = "superspec-local.options"; float fh; @@ -453,7 +453,7 @@ MUTATOR_HOOKFUNCTION(superspec_ClientConnect) if (!_ISLOCAL) { if(self.crypto_idfp == "") - return FALSE; + return false; fn = sprintf("superspec-%s.options", uri_escape(self.crypto_idfp)); } @@ -479,7 +479,7 @@ MUTATOR_HOOKFUNCTION(superspec_ClientConnect) fclose(fh); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(superspec_PlayerDies) @@ -498,13 +498,13 @@ MUTATOR_HOOKFUNCTION(superspec_PlayerDies) } self = _old_self; - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(superspec_ClientDisconnect) { superspec_save_client_conf(); - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_superspec) diff --git a/qcsrc/server/mutators/mutator_touchexplode.qc b/qcsrc/server/mutators/mutator_touchexplode.qc index 3e7aa3f39..fb58b3955 100644 --- a/qcsrc/server/mutators/mutator_touchexplode.qc +++ b/qcsrc/server/mutators/mutator_touchexplode.qc @@ -37,12 +37,12 @@ MUTATOR_HOOKFUNCTION(touchexplode_PlayerThink) } } - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_touchexplode) { MUTATOR_HOOK(PlayerPreThink, touchexplode_PlayerThink, CBC_ORDER_ANY); - return FALSE; + return false; } diff --git a/qcsrc/server/mutators/mutator_vampire.qc b/qcsrc/server/mutators/mutator_vampire.qc index 73317d0c1..aa45fc1ac 100644 --- a/qcsrc/server/mutators/mutator_vampire.qc +++ b/qcsrc/server/mutators/mutator_vampire.qc @@ -8,7 +8,7 @@ MUTATOR_HOOKFUNCTION(vampire_PlayerDamage) frag_attacker.health = bound(0, frag_attacker.health, autocvar_g_balance_health_limit); } - return FALSE; + return false; } MUTATOR_HOOKFUNCTION(vampire_BuildMutatorsString) diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index fc6336bb6..63cb1cc19 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -64,7 +64,7 @@ void sandbox_ObjectFunction_Think() entity sandbox_ObjectEdit_Get(float permissions) { // Returns the traced entity if the player can edit it, and world if not. - // If permissions if FALSE, the object is returned regardless of editing rights. + // If permissions if false, the object is returned regardless of editing rights. // Attached objects are SOLID_NOT and do not get traced. crosshair_trace_plusvisibletriggers(self); @@ -165,8 +165,8 @@ entity sandbox_ObjectSpawn(float database) // set public object information e.netname = strzone(self.netname); // name of the owner - e.message = strzone(strftime(TRUE, "%d-%m-%Y %H:%M:%S")); // creation time - e.message2 = strzone(strftime(TRUE, "%d-%m-%Y %H:%M:%S")); // last editing time + e.message = strzone(strftime(true, "%d-%m-%Y %H:%M:%S")); // creation time + e.message2 = strzone(strftime(true, "%d-%m-%Y %H:%M:%S")); // last editing time // set origin and direction based on player position and view angle makevectors(self.v_angle); @@ -363,7 +363,7 @@ void sandbox_Database_Save() file_name = strcat("sandbox/storage_", autocvar_g_sandbox_storage_name, "_", GetMapname(), ".txt"); file_get = fopen(file_name, FILE_WRITE); - fputs(file_get, strcat("// sandbox storage \"", autocvar_g_sandbox_storage_name, "\" for map \"", GetMapname(), "\" last updated ", strftime(TRUE, "%d-%m-%Y %H:%M:%S"))); + fputs(file_get, strcat("// sandbox storage \"", autocvar_g_sandbox_storage_name, "\" for map \"", GetMapname(), "\" last updated ", strftime(true, "%d-%m-%Y %H:%M:%S"))); fputs(file_get, strcat(" containing ", ftos(object_count), " objects\n")); for(head = world; (head = find(head, classname, "object")); ) @@ -373,7 +373,7 @@ void sandbox_Database_Save() continue; // use a line of text for each object, listing all properties - fputs(file_get, strcat(sandbox_ObjectPort_Save(head, TRUE), "\n")); + fputs(file_get, strcat(sandbox_ObjectPort_Save(head, true), "\n")); } fclose(file_get); } @@ -404,7 +404,7 @@ void sandbox_Database_Load() continue; entity e; - e = sandbox_ObjectPort_Load(file_read, TRUE); + e = sandbox_ObjectPort_Load(file_read, true); if(e.material) { @@ -422,18 +422,18 @@ void sandbox_Database_Load() MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) { if(MUTATOR_RETURNVALUE) // command was already handled? - return FALSE; + return false; if(cmd_name == "g_sandbox") { if(autocvar_g_sandbox_readonly) { print_to(self, "^2SANDBOX - INFO: ^7Sandbox mode is active, but in read-only mode. Sandbox commands cannot be used"); - return TRUE; + return true; } if(cmd_argc < 2) { print_to(self, "^2SANDBOX - INFO: ^7Sandbox mode is active. For usage information, type 'sandbox help'"); - return TRUE; + return true; } switch(argv(1)) @@ -471,52 +471,52 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) print_to(self, "^3mesh ^7- prints information about the object's mesh, including skeletal bones"); print_to(self, "^3attachments ^7- prints information about the object's attachments"); print_to(self, "^7The ^1drag object ^7key can be used to grab and carry objects. Players can only grab their own objects"); - return TRUE; + return true; // ---------------- COMMAND: OBJECT, SPAWN ---------------- case "object_spawn": if(time < self.object_flood) { print_to(self, strcat("^1SANDBOX - WARNING: ^7Flood protection active. Please wait ^3", ftos(self.object_flood - time), " ^7seconds beofore spawning another object")); - return TRUE; + return true; } self.object_flood = time + autocvar_g_sandbox_editor_flood; if(object_count >= autocvar_g_sandbox_editor_maxobjects) { print_to(self, strcat("^1SANDBOX - WARNING: ^7Cannot spawn any more objects. Up to ^3", ftos(autocvar_g_sandbox_editor_maxobjects), " ^7objects may exist at a time")); - return TRUE; + return true; } if(cmd_argc < 3) { print_to(self, "^1SANDBOX - WARNING: ^7Attempted to spawn an object without specifying a model. Please specify the path to your model file after the 'object_spawn' command"); - return TRUE; + return true; } if (!(fexists(argv(2)))) { print_to(self, "^1SANDBOX - WARNING: ^7Attempted to spawn an object with a non-existent model. Make sure the path to your model file is correct"); - return TRUE; + return true; } - e = sandbox_ObjectSpawn(FALSE); + e = sandbox_ObjectSpawn(false); setmodel(e, argv(2)); if(autocvar_g_sandbox_info > 0) print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " spawned an object at origin ^3", vtos(e.origin), "\n")); - return TRUE; + return true; // ---------------- COMMAND: OBJECT, REMOVE ---------------- case "object_remove": - e = sandbox_ObjectEdit_Get(TRUE); + e = sandbox_ObjectEdit_Get(true); if(e != world) { if(autocvar_g_sandbox_info > 0) print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " removed an object at origin ^3", vtos(e.origin), "\n")); sandbox_ObjectRemove(e); - return TRUE; + return true; } print_to(self, "^1SANDBOX - WARNING: ^7Object could not be removed. Make sure you are facing an object that you have edit rights over"); - return TRUE; + return true; // ---------------- COMMAND: OBJECT, DUPLICATE ---------------- case "object_duplicate": @@ -527,42 +527,42 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) e = sandbox_ObjectEdit_Get(autocvar_g_sandbox_editor_free); // can we copy objects we can't edit? if(e != world) { - s = sandbox_ObjectPort_Save(e, FALSE); + s = sandbox_ObjectPort_Save(e, false); s = strreplace("\"", "\\\"", s); stuffcmd(self, strcat("set ", argv(3), " \"", s, "\"")); print_to(self, "^2SANDBOX - INFO: ^7Object copied to clipboard"); - return TRUE; + return true; } print_to(self, "^1SANDBOX - WARNING: ^7Object could not be copied. Make sure you are facing an object that you have copy rights over"); - return TRUE; + return true; case "paste": // spawns a new object using the properties in the player's clipboard cvar if(time < self.object_flood) { print_to(self, strcat("^1SANDBOX - WARNING: ^7Flood protection active. Please wait ^3", ftos(self.object_flood - time), " ^7seconds beofore spawning another object")); - return TRUE; + return true; } self.object_flood = time + autocvar_g_sandbox_editor_flood; if(argv(3) == "") // no object in clipboard { print_to(self, "^1SANDBOX - WARNING: ^7No object in clipboard. You must copy an object before you can paste it"); - return TRUE; + return true; } if(object_count >= autocvar_g_sandbox_editor_maxobjects) { print_to(self, strcat("^1SANDBOX - WARNING: ^7Cannot spawn any more objects. Up to ^3", ftos(autocvar_g_sandbox_editor_maxobjects), " ^7objects may exist at a time")); - return TRUE; + return true; } - e = sandbox_ObjectPort_Load(argv(3), FALSE); + e = sandbox_ObjectPort_Load(argv(3), false); print_to(self, "^2SANDBOX - INFO: ^7Object pasted successfully"); if(autocvar_g_sandbox_info > 0) print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " pasted an object at origin ^3", vtos(e.origin), "\n")); - return TRUE; + return true; } - return TRUE; + return true; // ---------------- COMMAND: OBJECT, ATTACH ---------------- case "object_attach": @@ -570,24 +570,24 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) { case "get": // select e as the object as meant to be attached - e = sandbox_ObjectEdit_Get(TRUE); + e = sandbox_ObjectEdit_Get(true); if(e != world) { self.object_attach = e; print_to(self, "^2SANDBOX - INFO: ^7Object selected for attachment"); - return TRUE; + return true; } print_to(self, "^1SANDBOX - WARNING: ^7Object could not be selected for attachment. Make sure you are facing an object that you have edit rights over"); - return TRUE; + return true; case "set": if(self.object_attach == world) { print_to(self, "^1SANDBOX - WARNING: ^7No object selected for attachment. Please select an object to be attached first."); - return TRUE; + return true; } // attaches the previously selected object to e - e = sandbox_ObjectEdit_Get(TRUE); + e = sandbox_ObjectEdit_Get(true); if(e != world) { sandbox_ObjectAttach_Set(self.object_attach, e, argv(3)); @@ -595,35 +595,35 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) print_to(self, "^2SANDBOX - INFO: ^7Object attached successfully"); if(autocvar_g_sandbox_info > 1) print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " attached objects at origin ^3", vtos(e.origin), "\n")); - return TRUE; + return true; } print_to(self, "^1SANDBOX - WARNING: ^7Object could not be attached to the parent. Make sure you are facing an object that you have edit rights over"); - return TRUE; + return true; case "remove": // removes e if it was attached - e = sandbox_ObjectEdit_Get(TRUE); + e = sandbox_ObjectEdit_Get(true); if(e != world) { sandbox_ObjectAttach_Remove(e); print_to(self, "^2SANDBOX - INFO: ^7Child objects detached successfully"); if(autocvar_g_sandbox_info > 1) print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " detached objects at origin ^3", vtos(e.origin), "\n")); - return TRUE; + return true; } print_to(self, "^1SANDBOX - WARNING: ^7Child objects could not be detached. Make sure you are facing an object that you have edit rights over"); - return TRUE; + return true; } - return TRUE; + return true; // ---------------- COMMAND: OBJECT, EDIT ---------------- case "object_edit": if(argv(2) == "") { print_to(self, "^1SANDBOX - WARNING: ^7Too few parameters. You must specify a property to edit"); - return TRUE; + return true; } - e = sandbox_ObjectEdit_Get(TRUE); + e = sandbox_ObjectEdit_Get(true); if(e != world) { switch(argv(2)) @@ -690,20 +690,20 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) break; default: print_to(self, "^1SANDBOX - WARNING: ^7Invalid object property. For usage information, type 'sandbox help'"); - return TRUE; + return true; } // update last editing time if(e.message2) strunzone(e.message2); - e.message2 = strzone(strftime(TRUE, "%d-%m-%Y %H:%M:%S")); + e.message2 = strzone(strftime(true, "%d-%m-%Y %H:%M:%S")); if(autocvar_g_sandbox_info > 1) print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " edited property ^3", argv(2), " ^7of an object at origin ^3", vtos(e.origin), "\n")); - return TRUE; + return true; } print_to(self, "^1SANDBOX - WARNING: ^7Object could not be edited. Make sure you are facing an object that you have edit rights over"); - return TRUE; + return true; // ---------------- COMMAND: OBJECT, CLAIM ---------------- case "object_claim": @@ -711,9 +711,9 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) if(self.crypto_idfp == "") { print_to(self, "^1SANDBOX - WARNING: ^7You do not have a player UID, and cannot claim objects"); - return TRUE; + return true; } - e = sandbox_ObjectEdit_Get(TRUE); + e = sandbox_ObjectEdit_Get(true); if(e != world) { // update the owner's name @@ -729,7 +729,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) if(e.crypto_idfp == self.crypto_idfp) { print_to(self, "^2SANDBOX - INFO: ^7Object is already yours, nothing to claim"); - return TRUE; + return true; } if(e.crypto_idfp) strunzone(e.crypto_idfp); @@ -738,25 +738,25 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) print_to(self, "^2SANDBOX - INFO: ^7Object claimed successfully"); } print_to(self, "^1SANDBOX - WARNING: ^7Object could not be claimed. Make sure you are facing an object that you have edit rights over"); - return TRUE; + return true; // ---------------- COMMAND: OBJECT, INFO ---------------- case "object_info": // prints public information about the object to the player - e = sandbox_ObjectEdit_Get(FALSE); + e = sandbox_ObjectEdit_Get(false); if(e != world) { switch(argv(2)) { case "object": print_to(self, strcat("^2SANDBOX - INFO: ^7Object is owned by \"^7", e.netname, "^7\", created \"^3", e.message, "^7\", last edited \"^3", e.message2, "^7\"")); - return TRUE; + return true; case "mesh": s = ""; FOR_EACH_TAG(e) s = strcat(s, "^7\"^5", gettaginfo_name, "^7\", "); print_to(self, strcat("^2SANDBOX - INFO: ^7Object mesh is \"^3", e.model, "^7\" at animation frame ^3", ftos(e.frame), " ^7containing the following tags: ", s)); - return TRUE; + return true; case "attachments": // this should show the same info as 'mesh' but for attachments s = ""; @@ -776,39 +776,39 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) print_to(self, strcat("^2SANDBOX - INFO: ^7Object contains the following ^1", ftos(i), "^7 attachment(s): ", s)); else print_to(self, "^2SANDBOX - INFO: ^7Object contains no attachments"); - return TRUE; + return true; } } print_to(self, "^1SANDBOX - WARNING: ^7No information could be found. Make sure you are facing an object"); - return TRUE; + return true; // ---------------- COMMAND: DEFAULT ---------------- default: print_to(self, "Invalid command. For usage information, type 'sandbox help'"); - return TRUE; + return true; } } - return FALSE; + return false; } float autosave_time; MUTATOR_HOOKFUNCTION(sandbox_StartFrame) { if(!autocvar_g_sandbox_storage_autosave) - return FALSE; + return false; if(time < autosave_time) - return FALSE; + return false; autosave_time = time + autocvar_g_sandbox_storage_autosave; sandbox_Database_Save(); - return TRUE; + return true; } MUTATOR_HOOKFUNCTION(sandbox_SetModname) { modname = "Sandbox"; - return TRUE; + return true; } MUTATOR_DEFINITION(sandbox) @@ -834,6 +834,6 @@ MUTATOR_DEFINITION(sandbox) // nothing to remove } - return FALSE; + return false; } diff --git a/qcsrc/server/pathlib.qc b/qcsrc/server/pathlib.qc index 1848f258f..95737a45d 100644 --- a/qcsrc/server/pathlib.qc +++ b/qcsrc/server/pathlib.qc @@ -554,10 +554,10 @@ void dumpnode(entity n) n.path_next = world; n.path_prev = world; - n.is_path_node = FALSE; + n.is_path_node = false; n.owner = scraplist; #else - //n.is_path_node = FALSE; + //n.is_path_node = false; n.think = SUB_Remove; n.nextthink = time; #endif @@ -568,7 +568,7 @@ entity pathlib_mknode(vector where,entity parent) entity node; node = newnode(); - node.is_path_node = TRUE; + node.is_path_node = true; node.owner = openlist; node.path_prev = parent; @@ -635,7 +635,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go node = findradius(where,pathlib_gridsize * 0.75); while(node) { - if(node.is_path_node == TRUE) + if(node.is_path_node == true) { ++pathlib_merge_cnt; if(node.owner == openlist) @@ -727,7 +727,7 @@ void pathlib_close_node(entity node,vector goal) if(pathlib_movenode_goodnode) { goal_node = node; - pathlib_foundgoal = TRUE; + pathlib_foundgoal = true; } } } @@ -797,11 +797,11 @@ void pathlib_cleanup() { entity node; - node = findfloat(world,is_path_node, TRUE); + node = findfloat(world,is_path_node, true); while(node) { dumpnode(node); - node = findfloat(node,is_path_node, TRUE); + node = findfloat(node,is_path_node, true); } if(openlist) diff --git a/qcsrc/server/pathlib/main.qc b/qcsrc/server/pathlib/main.qc index 5e1db5051..cd586b3cd 100644 --- a/qcsrc/server/pathlib/main.qc +++ b/qcsrc/server/pathlib/main.qc @@ -16,7 +16,7 @@ const float PATHLIB_NODEEXPIRE = 20; void dumpnode(entity n) { - n.is_path_node = FALSE; + n.is_path_node = false; n.think = SUB_Remove; n.nextthink = time; } @@ -38,7 +38,7 @@ entity pathlib_mknode(vector where,entity parent) node.think = SUB_Remove; node.nextthink = time + PATHLIB_NODEEXPIRE; - node.is_path_node = TRUE; + node.is_path_node = true; node.owner = openlist; node.path_prev = parent; @@ -157,7 +157,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go node = findradius(where,pathlib_gridsize * 0.5); while(node) { - if(node.is_path_node == TRUE) + if(node.is_path_node == true) { ++pathlib_merge_cnt; if(node.owner == openlist) @@ -255,7 +255,7 @@ void pathlib_close_node(entity node,vector goal) if(pathlib_movenode_goodnode) { goal_node = node; - pathlib_foundgoal = TRUE; + pathlib_foundgoal = true; } } } @@ -268,7 +268,7 @@ void pathlib_cleanup() entity node; - node = findfloat(world,is_path_node, TRUE); + node = findfloat(world,is_path_node, true); while(node) { /* @@ -280,7 +280,7 @@ void pathlib_cleanup() */ dumpnode(node); - node = findfloat(node,is_path_node, TRUE); + node = findfloat(node,is_path_node, true); } if(openlist) diff --git a/qcsrc/server/pathlib/path_waypoint.qc b/qcsrc/server/pathlib/path_waypoint.qc index 9f443b0ac..231c14f21 100644 --- a/qcsrc/server/pathlib/path_waypoint.qc +++ b/qcsrc/server/pathlib/path_waypoint.qc @@ -11,14 +11,14 @@ void pathlib_wpp_close(entity wp) best_open_node = world; if(wp == goal_node) - pathlib_foundgoal = TRUE; + pathlib_foundgoal = true; } float pathlib_wpp_opencb(entity wp, entity child, float cost) { if(child.pathlib_list == closedlist) - return FALSE; + return false; // FIXME! wp.wp##mincost is NOT distance. Make it distance or add a field for distance to be used here (for better speed) cost = vlen(child.origin - wp.origin); @@ -32,21 +32,21 @@ float pathlib_wpp_opencb(entity wp, entity child, float cost) if(child == goal_node) - pathlib_foundgoal = TRUE; + pathlib_foundgoal = true; ++pathlib_open_cnt; if(best_open_node.pathlib_node_f > child.pathlib_node_f) best_open_node = child; - return TRUE; + return true; } float pathlib_wpp_openncb(entity wp, entity child, float cost) { if(child.pathlib_list == closedlist) - return FALSE; + return false; // FIXME! wp.wp##mincost is NOT distance. Make it distance or add a field for distance to be used here (for better speed) cost = vlen(child.origin - wp.origin); @@ -58,14 +58,14 @@ float pathlib_wpp_openncb(entity wp, entity child, float cost) child.pathlib_node_f = child.pathlib_node_g + child.pathlib_node_h; if(child == goal_node) - pathlib_foundgoal = TRUE; + pathlib_foundgoal = true; ++pathlib_open_cnt; if(best_open_node.pathlib_node_f > child.pathlib_node_f) best_open_node = child; - return TRUE; + return true; } float pathlib_wpp_expand(entity wp) @@ -138,7 +138,7 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback) pathlib_movecost_diag = vlen('1 1 0' * pathlib_movecost); if (!pathlib_wpp_waypointcallback) - callback = FALSE; + callback = false; if (callback) pathlib_wpp_open = pathlib_wpp_opencb; @@ -156,7 +156,7 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback) pathlib_closed_cnt = 0; pathlib_open_cnt = 0; pathlib_searched_cnt = 0; - pathlib_foundgoal = FALSE; + pathlib_foundgoal = false; dprint("pathlib_waypointpath init\n"); diff --git a/qcsrc/server/pathlib/utility.qc b/qcsrc/server/pathlib/utility.qc index 5a82e0845..738ceb2ce 100644 --- a/qcsrc/server/pathlib/utility.qc +++ b/qcsrc/server/pathlib/utility.qc @@ -74,7 +74,7 @@ entity pathlib_nodeatpoint(vector where) node = findradius(where,pathlib_gridsize * 0.5); while(node) { - if(node.is_path_node == TRUE) + if(node.is_path_node == true) return node; node = node.chain; diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index decd42dd5..16fde1955 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -493,7 +493,7 @@ float Portal_Customize() { self.modelindex = self.savemodelindex; } - return TRUE; + return true; } // cleanup: diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 5c123ebc5..aa70d407c 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -689,11 +689,11 @@ void checkpoint_use() float race_waypointsprite_visible_for_player(entity e) { if(e.race_checkpoint == -1 || self.owner.race_checkpoint == -2) - return TRUE; + return true; else if(e.race_checkpoint == self.owner.race_checkpoint) - return TRUE; + return true; else - return FALSE; + return false; } float have_verified; @@ -722,7 +722,7 @@ void trigger_race_checkpoint_verify() // race only (middle of the race) g_race_qualifying = 0; self.race_place = 0; - if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, FALSE)) + if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, false)) error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for respawning in race) - bailing out")); if(i == 0) @@ -730,7 +730,7 @@ void trigger_race_checkpoint_verify() // qualifying only g_race_qualifying = 1; self.race_place = race_lowest_place_spawn; - if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, FALSE)) + if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, false)) error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for qualifying) - bailing out")); // race only (initial spawn) @@ -738,7 +738,7 @@ void trigger_race_checkpoint_verify() for(p = 1; p <= race_highest_place_spawn; ++p) { self.race_place = p; - if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, FALSE)) + if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, false)) error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for initially spawning in race) - bailing out")); } } @@ -750,7 +750,7 @@ void trigger_race_checkpoint_verify() self.race_checkpoint = race_NextCheckpoint(0); g_race_qualifying = 1; self.race_place = race_lowest_place_spawn; - if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, FALSE)) + if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, false)) error(strcat("Checkpoint 0 misses a spawnpoint with race_place==", ftos(self.race_place), " (used for qualifying) - bailing out")); } else diff --git a/qcsrc/server/round_handler.qc b/qcsrc/server/round_handler.qc index af69e8e9e..6681151df 100644 --- a/qcsrc/server/round_handler.qc +++ b/qcsrc/server/round_handler.qc @@ -17,10 +17,10 @@ void round_handler_Think() if(self.wait) { - self.wait = FALSE; + self.wait = false; self.cnt = self.count + 1; // init countdown round_starttime = time + self.count; - reset_map(TRUE); + reset_map(true); } if(self.cnt > 0) // countdown running @@ -52,7 +52,7 @@ void round_handler_Think() if(self.canRoundEnd()) { // schedule a new round - self.wait = TRUE; + self.wait = true; self.nextthink = time + self.delay; } else @@ -93,14 +93,14 @@ void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, v round_handler.canRoundStart = canRoundStart_func; round_handler.canRoundEnd = canRoundEnd_func; round_handler.roundStart = roundStart_func; - round_handler.wait = FALSE; + round_handler.wait = false; round_handler_Init(5, 5, 180); round_handler.nextthink = time; } void round_handler_Reset(float next_think) { - round_handler.wait = FALSE; + round_handler.wait = false; if(round_handler.count) if(round_handler.cnt < round_handler.count + 1) round_handler.cnt = round_handler.count + 1; diff --git a/qcsrc/server/round_handler.qh b/qcsrc/server/round_handler.qh index 22a91dc2c..90ffc33fa 100644 --- a/qcsrc/server/round_handler.qh +++ b/qcsrc/server/round_handler.qh @@ -1,7 +1,7 @@ entity round_handler; .float delay; // stores delay from round end to countdown start .float count; // stores initial number of the countdown -.float wait; // it's set to TRUE when round ends, to FALSE when countdown starts +.float wait; // it's set to true when round ends, to false when countdown starts .float cnt; // its initial value is .count + 1, then decreased while counting down // reaches 0 when the round starts .float round_timelimit; diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index d2ff30449..b7278241e 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -75,7 +75,7 @@ float TeamScore_SendEntity(entity to, float sendflags) WriteChar(MSG_ENTITY, self.(teamscores[i])); } - return TRUE; + return true; } void TeamScore_Spawn(float t, string name) @@ -85,7 +85,7 @@ void TeamScore_Spawn(float t, string name) ts.classname = "csqc_score_team"; ts.netname = name; // not used yet, FIXME ts.team = t; - Net_LinkEntity(ts, FALSE, 0, TeamScore_SendEntity); + Net_LinkEntity(ts, false, 0, TeamScore_SendEntity); teamscorekeepers[t - 1] = ts; ++teamscores_entities_count; PlayerStats_GameReport_AddTeam(t); @@ -193,7 +193,7 @@ float ScoreInfo_SendEntity(entity to, float sf) WriteString(MSG_ENTITY, teamscores_label[i]); WriteByte(MSG_ENTITY, teamscores_flags[i]); } - return TRUE; + return true; } void ScoreInfo_Init(float teams) @@ -206,7 +206,7 @@ void ScoreInfo_Init(float teams) { scores_initialized = spawn(); scores_initialized.classname = "ent_client_scoreinfo"; - Net_LinkEntity(scores_initialized, FALSE, 0, ScoreInfo_SendEntity); + Net_LinkEntity(scores_initialized, false, 0, ScoreInfo_SendEntity); } if(teams >= 1) TeamScore_Spawn(NUM_TEAM_1, "Red"); @@ -250,7 +250,7 @@ float PlayerScore_SendEntity(entity to, float sendflags) WriteChar(MSG_ENTITY, self.(scores[i])); } - return TRUE; + return true; } float PlayerScore_Clear(entity player) @@ -314,7 +314,7 @@ void PlayerScore_Attach(entity player) error("player already has a scorekeeper"); sk = spawn(); sk.owner = player; - Net_LinkEntity(sk, FALSE, 0, PlayerScore_SendEntity); + Net_LinkEntity(sk, false, 0, PlayerScore_SendEntity); player.scorekeeper = sk; } diff --git a/qcsrc/server/scores_rules.qc b/qcsrc/server/scores_rules.qc index 6343625c0..0b9d120d4 100644 --- a/qcsrc/server/scores_rules.qc +++ b/qcsrc/server/scores_rules.qc @@ -37,10 +37,10 @@ void ScoreRules_generic() if(teamplay) { CheckAllowedTeams(world); - ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); + ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, true); } else - ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); + ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, true); ScoreRules_basics_end(); } diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 511db81c7..552981ff3 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -7,7 +7,7 @@ float SpawnPoint_Send(entity to, float sf) WriteShort(MSG_ENTITY, self.origin.y); WriteShort(MSG_ENTITY, self.origin.z); - return TRUE; + return true; } float SpawnEvent_Send(entity to, float sf) @@ -22,14 +22,14 @@ float SpawnEvent_Send(entity to, float sf) WriteShort(MSG_ENTITY, self.owner.origin.x); WriteShort(MSG_ENTITY, self.owner.origin.y); WriteShort(MSG_ENTITY, self.owner.origin.z); - send = TRUE; + send = true; } else if((to == self.owner) || (IS_SPEC(to) && (to.enemy == self.owner)) ) { WriteByte(MSG_ENTITY, 0); - send = TRUE; + send = true; } - else { send = FALSE; } + else { send = false; } return send; } @@ -50,7 +50,7 @@ void relocate_spawnpoint() // nudge off the floor setorigin(self, self.origin + '0 0 1'); - tracebox(self.origin, PL_MIN, PL_MAX, self.origin, TRUE, self); + tracebox(self.origin, PL_MIN, PL_MAX, self.origin, true, self); if (trace_startsolid) { vector o; @@ -127,7 +127,7 @@ void relocate_spawnpoint() || autocvar_g_spawn_useallspawns ) - { Net_LinkEntity(self, FALSE, 0, SpawnPoint_Send); } + { Net_LinkEntity(self, false, 0, SpawnPoint_Send); } } void spawnfunc_info_player_survivor (void) diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index c035f9865..fa1066b69 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -4,7 +4,7 @@ void CreatureFrame (void) float dm; oldself = self; - for(self = world; (self = findfloat(self, damagedbycontents, TRUE)); ) + for(self = world; (self = findfloat(self, damagedbycontents, true)); ) { if (self.movetype == MOVETYPE_NOCLIP) { continue; } @@ -210,10 +210,10 @@ void StartFrame (void) skill = autocvar_skill; // detect when the pre-game countdown (if any) has ended and the game has started - game_delay = (time < game_starttime) ? TRUE : FALSE; + game_delay = (time < game_starttime) ? true : false; - if(game_delay_last == TRUE) - if(game_delay == FALSE) + if(game_delay_last == true) + if(game_delay == false) if(autocvar_sv_eventlog) GameLogEcho(":startdelay_ended"); diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 40d80c9d4..1b876a098 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -257,7 +257,7 @@ float ItemSend(entity to, float sf) WriteCoord(MSG_ENTITY, self.velocity.z); } - return TRUE; + return true; } void ItemUpdate(entity item) @@ -270,34 +270,34 @@ float have_pickup_item(void) if(self.flags & FL_POWERUP) { if(autocvar_g_powerups > 0) - return TRUE; + return true; if(autocvar_g_powerups == 0) - return FALSE; + return false; } else { if(autocvar_g_pickup_items > 0) - return TRUE; + return true; if(autocvar_g_pickup_items == 0) - return FALSE; + return false; if(g_weaponarena) if(self.weapons || (self.items & IT_AMMO)) // no item or ammo pickups in weaponarena - return FALSE; + return false; } - return TRUE; + return true; } /* float Item_Customize() { if(self.spawnshieldtime) - return TRUE; + return true; if(self.weapons & ~other.weapons) { self.colormod = '0 0 0'; self.glowmod = self.colormod; self.alpha = 0.5 + 0.5 * g_ghost_items; // halfway more alpha - return TRUE; + return true; } else { @@ -306,10 +306,10 @@ float Item_Customize() self.colormod = stov(autocvar_g_ghost_items_color); self.glowmod = self.colormod; self.alpha = g_ghost_items; - return TRUE; + return true; } else - return FALSE; + return false; } } */ @@ -440,7 +440,7 @@ void Item_RespawnCountdown (void) } if(name) { - WaypointSprite_Spawn(name, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, TRUE, RADARICON_POWERUP, rgb); + WaypointSprite_Spawn(name, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP, rgb); if(self.waypointsprite_attached) WaypointSprite_UpdateBuildFinished(self.waypointsprite_attached, time + ITEM_RESPAWN_TICKS); } @@ -508,7 +508,7 @@ void Item_ScheduleInitialRespawn(entity e) float Item_GiveAmmoTo(entity item, entity player, .float ammotype, float ammomax, float mode) { if (!item.ammotype) - return FALSE; + return false; if (item.spawnshieldtime) { @@ -528,7 +528,7 @@ float Item_GiveAmmoTo(entity item, entity player, .float ammotype, float ammomax } } - return FALSE; + return false; :YEAH switch(mode) @@ -545,7 +545,7 @@ float Item_GiveAmmoTo(entity item, entity player, .float ammotype, float ammomax default: break; } - return TRUE; + return true; } float Item_GiveTo(entity item, entity player) @@ -556,17 +556,17 @@ float Item_GiveTo(entity item, entity player) float i; // if nothing happens to player, just return without taking the item - pickedup = FALSE; - _switchweapon = FALSE; + pickedup = false; + _switchweapon = false; // in case the player has autoswitch enabled do the following: // if the player is using their best weapon before items are given, they // probably want to switch to an even better weapon after items are given if (player.autoswitch) if (player.switchweapon == w_getbestweapon(player)) - _switchweapon = TRUE; + _switchweapon = true; if (!(player.weapons & WepSet_FromWeapon(player.switchweapon))) - _switchweapon = TRUE; + _switchweapon = true; pickedup |= Item_GiveAmmoTo(item, player, ammo_fuel, g_pickup_fuel_max, ITEM_MODE_FUEL); pickedup |= Item_GiveAmmoTo(item, player, ammo_shells, g_pickup_shells_max, ITEM_MODE_NONE); @@ -585,7 +585,7 @@ float Item_GiveTo(entity item, entity player) if (it || (item.spawnshieldtime && item.pickup_anyway)) { - pickedup = TRUE; + pickedup = true; for(i = WEP_FIRST; i <= WEP_LAST; ++i) if(it & WepSet_FromWeapon(i)) { @@ -597,24 +597,24 @@ float Item_GiveTo(entity item, entity player) if((it = (item.items - (item.items & player.items)) & IT_PICKUPMASK)) { - pickedup = TRUE; + pickedup = true; player.items |= it; Send_Notification(NOTIF_ONE, player, MSG_INFO, INFO_ITEM_WEAPON_GOT, item.netname); } if (item.strength_finished) { - pickedup = TRUE; + pickedup = true; player.strength_finished = max(player.strength_finished, time) + item.strength_finished; } if (item.invincible_finished) { - pickedup = TRUE; + pickedup = true; player.invincible_finished = max(player.invincible_finished, time) + item.invincible_finished; } if (item.superweapons_finished) { - pickedup = TRUE; + pickedup = true; player.superweapons_finished = max(player.superweapons_finished, time) + item.superweapons_finished; } @@ -622,7 +622,7 @@ float Item_GiveTo(entity item, entity player) // always eat teamed entities if(item.team) - pickedup = TRUE; + pickedup = true; if (!pickedup) return 0; @@ -832,7 +832,7 @@ float weapon_pickupevalfunc(entity player, entity item) float commodity_pickupevalfunc(entity player, entity item) { float c, i; - float need_shells = FALSE, need_nails = FALSE, need_rockets = FALSE, need_cells = FALSE, need_plasma = FALSE, need_fuel = FALSE; + float need_shells = false, need_nails = false, need_rockets = false, need_cells = false, need_plasma = false, need_fuel = false; entity wi; c = 0; @@ -845,17 +845,17 @@ float commodity_pickupevalfunc(entity player, entity item) continue; if(wi.items & IT_SHELLS) - need_shells = TRUE; + need_shells = true; else if(wi.items & IT_NAILS) - need_nails = TRUE; + need_nails = true; else if(wi.items & IT_ROCKETS) - need_rockets = TRUE; + need_rockets = true; else if(wi.items & IT_CELLS) - need_cells = TRUE; + need_cells = true; else if(wi.items & IT_PLASMA) - need_plasma = TRUE; + need_plasma = true; else if(wi.items & IT_FUEL) - need_fuel = TRUE; + need_fuel = true; } // TODO: figure out if the player even has the weapon this ammo is for? @@ -903,7 +903,7 @@ void Item_Damage(entity inflictor, entity attacker, float damage, float deathtyp void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, float defaultrespawntimejitter, string itemname, float itemid, float weaponid, float itemflags, float(entity player, entity item) pickupevalfunc, float pickupbasevalue) { - startitem_failed = FALSE; + startitem_failed = false; if(self.model == "") self.model = itemmodel; @@ -933,7 +933,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, if(MUTATOR_CALLHOOK(FilterItem)) // error means we do not want the item { - startitem_failed = TRUE; + startitem_failed = true; remove(self); return; } @@ -973,7 +973,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, traceline(self.origin, self.origin, MOVE_NORMAL, self); if (trace_dpstartcontents & DPCONTENTS_NODROP) { - startitem_failed = TRUE; + startitem_failed = true; remove(self); return; } @@ -982,7 +982,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, { if(!have_pickup_item()) { - startitem_failed = TRUE; + startitem_failed = true; remove (self); return; } @@ -1006,7 +1006,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, else setsize (self, '-16 -16 0', '16 16 32'); - // note droptofloor returns FALSE if stuck/or would fall too far + // note droptofloor returns false if stuck/or would fall too far droptofloor(); waypoint_spawnforitem(self); } @@ -1019,7 +1019,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, { // target_give not yet supported; maybe later print("removed targeted ", self.classname, "\n"); - startitem_failed = TRUE; + startitem_failed = true; remove (self); return; } @@ -1038,7 +1038,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, error("Mapper sucks."); } } - self.is_item = TRUE; + self.is_item = true; } weaponsInMap |= WepSet_FromWeapon(weaponid); @@ -1058,7 +1058,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, self.target = "###item###"; // for finding the nearest item using find() } - self.bot_pickup = TRUE; + self.bot_pickup = true; self.bot_pickupevalfunc = pickupevalfunc; self.bot_pickupbasevalue = pickupbasevalue; self.mdl = self.model; @@ -1108,7 +1108,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, else Item_Reset(); - Net_LinkEntity(self, FALSE, 0, ItemSend); + Net_LinkEntity(self, false, 0, ItemSend); self.SendFlags |= ISF_SIZE; if(self.angles) @@ -1117,7 +1117,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, // call this hook after everything else has been done if(MUTATOR_CALLHOOK(Item_Spawn)) { - startitem_failed = TRUE; + startitem_failed = true; remove(self); return; } @@ -1136,9 +1136,9 @@ void spawnfunc_item_bullets (void) { if(autocvar_sv_q3acompat_machineshotgunswap) if(self.classname != "droppedweapon") { - weaponswapping = TRUE; + weaponswapping = true; spawnfunc_item_shells(); - weaponswapping = FALSE; + weaponswapping = false; return; } @@ -1171,9 +1171,9 @@ void spawnfunc_item_shells (void) { if(autocvar_sv_q3acompat_machineshotgunswap) if(self.classname != "droppedweapon") { - weaponswapping = TRUE; + weaponswapping = true; spawnfunc_item_bullets(); - weaponswapping = FALSE; + weaponswapping = false; return; } @@ -1586,10 +1586,10 @@ float GiveItems(entity e, float beginarg, float endarg) got = 0; - _switchweapon = FALSE; + _switchweapon = false; if (e.autoswitch) if (e.switchweapon == w_getbestweapon(e)) - _switchweapon = TRUE; + _switchweapon = true; e.strength_finished = max(0, e.strength_finished - time); e.invincible_finished = max(0, e.invincible_finished - time); @@ -1773,7 +1773,7 @@ float GiveItems(entity e, float beginarg, float endarg) e.superweapons_finished += time; if (!(e.weapons & WepSet_FromWeapon(e.switchweapon))) - _switchweapon = TRUE; + _switchweapon = true; if(_switchweapon) W_SwitchWeapon_Force(e, w_getbestweapon(e)); diff --git a/qcsrc/server/t_jumppads.qc b/qcsrc/server/t_jumppads.qc index 2b939028c..99a58a4b7 100644 --- a/qcsrc/server/t_jumppads.qc +++ b/qcsrc/server/t_jumppads.qc @@ -182,10 +182,10 @@ void trigger_push_touch() { float i; float found; - found = FALSE; + found = false; for(i = 0; i < other.jumppadcount && i < NUM_JUMPPADSUSED; ++i) if(other.(jumppadsused[i]) == self) - found = TRUE; + found = true; if(!found) { other.(jumppadsused[other.jumppadcount % NUM_JUMPPADSUSED]) = self; @@ -201,10 +201,10 @@ void trigger_push_touch() other.lastteleporttime = time; if (other.deadflag == DEAD_NO) - animdecide_setaction(other, ANIMACTION_JUMP, TRUE); + animdecide_setaction(other, ANIMACTION_JUMP, true); } else - other.jumppadcount = TRUE; + other.jumppadcount = true; // reset tracking of who pushed you into a hazard (for kill credit) other.pushltime = 0; diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index be3c6b07f..c51e5d53a 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -196,15 +196,15 @@ float set_platmovetype(entity e, string s) if(n > 2) if(argv(2) == "force") - return TRUE; // no checking, return immediately + return true; // no checking, return immediately if(!cubic_speedfunc_is_sane(e.platmovetype_start, e.platmovetype_end)) { objerror("Invalid platform move type; platform would go in reverse, which is not allowed."); - return FALSE; + return false; } - return TRUE; + return true; } void spawnfunc_path_corner() @@ -315,7 +315,7 @@ void train_wait() SUB_CalcAngleMove(ang, TSPEED_TIME, self.ltime - time + self.wait, train_wait); else // instant turning SUB_CalcAngleMove(ang, TSPEED_TIME, 0.0000001, train_wait); - self.train_wait_turning = TRUE; + self.train_wait_turning = true; return; } @@ -324,7 +324,7 @@ void train_wait() if(self.wait < 0 || self.train_wait_turning) // no waiting or we already waited while turning { - self.train_wait_turning = FALSE; + self.train_wait_turning = false; train_next(); } else @@ -420,7 +420,7 @@ void spawnfunc_func_train() if (self.spawnflags & 2) { - self.platmovetype_turn = TRUE; + self.platmovetype_turn = true; self.view_ofs = '0 0 0'; // don't offset a rotating train, origin works differently now } else @@ -995,12 +995,12 @@ float door_check_keys(void) { // no key needed if (!door.itemkeys) - return TRUE; + return true; // this door require a key // only a player can have a key if (!IS_PLAYER(other)) - return FALSE; + return false; if (item_keys_usekey(door, other)) { // some keys were used @@ -1022,9 +1022,9 @@ float door_check_keys(void) { // door is now unlocked play2(other, "misc/talk.wav"); Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_DOOR_UNLOCKED); - return TRUE; + return true; } else - return FALSE; + return false; } @@ -1318,18 +1318,18 @@ float LinkDoors_isconnected(entity e1, entity e2, entity pass) { float DELTA = 4; if (e1.absmin.x > e2.absmax.x + DELTA) - return FALSE; + return false; if (e1.absmin.y > e2.absmax.y + DELTA) - return FALSE; + return false; if (e1.absmin.z > e2.absmax.z + DELTA) - return FALSE; + return false; if (e2.absmin.x > e1.absmax.x + DELTA) - return FALSE; + return false; if (e2.absmin.y > e1.absmax.y + DELTA) - return FALSE; + return false; if (e2.absmin.z > e1.absmax.z + DELTA) - return FALSE; - return TRUE; + return false; + return true; } /* @@ -1702,7 +1702,7 @@ void fd_secret_use() string message_save; self.health = 10000; - self.bot_attack = TRUE; + self.bot_attack = true; // exit if still moving around... if (self.origin != self.oldorigin) diff --git a/qcsrc/server/t_teleporters.qc b/qcsrc/server/t_teleporters.qc index 7923c9d26..af72d135a 100644 --- a/qcsrc/server/t_teleporters.qc +++ b/qcsrc/server/t_teleporters.qc @@ -114,7 +114,7 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle setorigin (player, to); player.oldorigin = to; // don't undo the teleport by unsticking player.angles = to_angles; - player.fixangle = TRUE; + player.fixangle = true; player.velocity = to_velocity; BITXOR_ASSIGN(player.effects, EF_TELEPORT_BIT); diff --git a/qcsrc/server/target_music.qc b/qcsrc/server/target_music.qc index 61773234c..a806d40bb 100644 --- a/qcsrc/server/target_music.qc +++ b/qcsrc/server/target_music.qc @@ -130,5 +130,5 @@ void spawnfunc_trigger_music() self.use = trigger_music_use; self.reset = trigger_music_reset; - Net_LinkEntity(self, FALSE, 0, trigger_music_SendEntity); + Net_LinkEntity(self, false, 0, trigger_music_SendEntity); } diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 2f6963bf7..0654d3efd 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -595,11 +595,11 @@ float TeamSmallerEqThanTeam(float ta, float tb, entity e) // invalid if(ca < 0 || cb < 0) - return FALSE; + return false; // equal if(ta == tb) - return TRUE; + return true; if(IS_REAL_CLIENT(e)) { @@ -613,10 +613,10 @@ float TeamSmallerEqThanTeam(float ta, float tb, entity e) // keep teams alive (teams of size 0 always count as smaller, ignoring score) if(ca < 1) if(cb >= 1) - return TRUE; + return true; if(ca >= 1) if(cb < 1) - return FALSE; + return false; // first, normalize f = max(ca, cb, 1); @@ -735,7 +735,7 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam) // otherwise end up on the smallest team (handled below) } - smallest = FindSmallestTeam(pl, TRUE); + smallest = FindSmallestTeam(pl, true); if(!only_return_best && !pl.bot_forced_team) { @@ -812,7 +812,7 @@ void SV_ChangeTeam(float _color) if(scolor == dcolor) { //bprint("same team change\n"); - SetPlayerTeam(self, dteam, steam, TRUE); + SetPlayerTeam(self, dteam, steam, true); return; } @@ -840,7 +840,7 @@ void SV_ChangeTeam(float _color) TeamchangeFrags(self); } - SetPlayerTeam(self, dteam, steam, FALSE); + SetPlayerTeam(self, dteam, steam, false); if(IS_PLAYER(self) && steam != dteam) { @@ -984,7 +984,7 @@ void ShufflePlayerOutOfTeam (float source_team) // move the player to the new team TeamchangeFrags(selected); - SetPlayerTeam(selected, smallestteam, source_team, FALSE); + SetPlayerTeam(selected, smallestteam, source_team, false); if(selected.deadflag == DEAD_NO) Damage(selected, selected, selected, 100000, DEATH_AUTOTEAMCHANGE, selected.origin, '0 0 0'); diff --git a/qcsrc/server/tturrets/system/system_main.qc b/qcsrc/server/tturrets/system/system_main.qc index 8442af17c..28d2ae29c 100644 --- a/qcsrc/server/tturrets/system/system_main.qc +++ b/qcsrc/server/tturrets/system/system_main.qc @@ -73,7 +73,7 @@ float turret_send(entity to, float sf) WriteByte(MSG_ENTITY, ceil((self.health / self.tur_health) * 255)); } - return TRUE; + return true; } void load_unit_settings(entity ent, string unitname, float is_reload) @@ -182,7 +182,7 @@ entity turret_projectile(string _snd, float _size, float _health, float _death, setsize(proj, '-0.5 -0.5 -0.5' * _size, '0.5 0.5 0.5' * _size); proj.owner = self; proj.realowner = self; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = self.shot_dmg; proj.think = turret_projectile_explode; proj.touch = turret_projectile_touch; @@ -980,7 +980,7 @@ void turret_stdproc_use() void turret_link() { - Net_LinkEntity(self, TRUE, 0, turret_send); + Net_LinkEntity(self, true, 0, turret_send); self.think = turret_think; self.nextthink = time; self.tur_head.effects = EF_NODRAW; @@ -1102,8 +1102,8 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa if (!self.health) self.health = 1000; self.tur_health = max(1, self.health); - self.bot_attack = TRUE; - self.monster_attack = TRUE; + self.bot_attack = true; + self.monster_attack = true; if (!self.turrcaps_flags) self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_MEDPROJ | TFL_TURRCAPS_PLAYERKILL; diff --git a/qcsrc/server/tturrets/system/system_misc.qc b/qcsrc/server/tturrets/system/system_misc.qc index 8a1d2123a..78aa63c09 100644 --- a/qcsrc/server/tturrets/system/system_misc.qc +++ b/qcsrc/server/tturrets/system/system_misc.qc @@ -120,13 +120,13 @@ float turret_tag_fire_update_s() { error("Call to turret_tag_fire_update with self.tur_head missing!\n"); self.tur_shotorg = '0 0 0'; - return FALSE; + return false; } self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire")); v_forward = normalize(v_forward); - return TRUE; + return true; } /* @@ -149,7 +149,7 @@ void FireImoBeam (vector start, vector end, vector smin, vector smax, // note down which entities were hit so we can damage them later while (1) { - tracebox(start, smin, smax, end, FALSE, self); + tracebox(start, smin, smax, end, false, self); // if it is world we can't hurt it so stop now if (trace_ent == world || trace_fraction == 1) @@ -159,7 +159,7 @@ void FireImoBeam (vector start, vector end, vector smin, vector smax, break; // make the entity non-solid so we can hit the next one - trace_ent.railgunhit = TRUE; + trace_ent.railgunhit = true; trace_ent.railgunhitloc = end; trace_ent.railgunhitsolidbackup = trace_ent.solid; @@ -172,23 +172,23 @@ void FireImoBeam (vector start, vector end, vector smin, vector smax, endpoint = trace_endpos; // find all the entities the railgun hit and restore their solid state - ent = findfloat(world, railgunhit, TRUE); + ent = findfloat(world, railgunhit, true); while (ent) { // restore their solid type ent.solid = ent.railgunhitsolidbackup; - ent = findfloat(ent, railgunhit, TRUE); + ent = findfloat(ent, railgunhit, true); } // find all the entities the railgun hit and hurt them - ent = findfloat(world, railgunhit, TRUE); + ent = findfloat(world, railgunhit, true); while (ent) { // get the details we need to call the damage function hitloc = ent.railgunhitloc; ent.railgunhitloc = '0 0 0'; ent.railgunhitsolidbackup = SOLID_NOT; - ent.railgunhit = FALSE; + ent.railgunhit = false; // apply the damage if (ent.takedamage) @@ -199,7 +199,7 @@ void FireImoBeam (vector start, vector end, vector smin, vector smax, } // advance to the next entity - ent = findfloat(ent, railgunhit, TRUE); + ent = findfloat(ent, railgunhit, true); } trace_endpos = endpoint; } diff --git a/qcsrc/server/tturrets/units/unit_ewheel.qc b/qcsrc/server/tturrets/units/unit_ewheel.qc index 76283cde4..f67ae25e8 100644 --- a/qcsrc/server/tturrets/units/unit_ewheel.qc +++ b/qcsrc/server/tturrets/units/unit_ewheel.qc @@ -13,7 +13,7 @@ void ewheel_attack() { turret_do_updates(self); - _mis = turret_projectile("weapons/lasergun_fire.wav", 1, 0, DEATH_TURRET_EWHEEL, PROJECTILE_BLASTER, TRUE, TRUE); // WEAPONTODO: this is not a projectile made by the blaster, add separate effect for it + _mis = turret_projectile("weapons/lasergun_fire.wav", 1, 0, DEATH_TURRET_EWHEEL, PROJECTILE_BLASTER, true, true); // WEAPONTODO: this is not a projectile made by the blaster, add separate effect for it _mis.missile_flags = MIF_SPLASH; pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); @@ -110,7 +110,7 @@ void ewheel_move_enemy() movelib_beak_simple(autocvar_g_turrets_unit_ewheel_speed_stop); } - turrets_setframe(newframe , FALSE); + turrets_setframe(newframe , false); /*if(self.frame != newframe) { @@ -254,9 +254,9 @@ void turret_ewheel_dinit() self.frame = 1; self.target_select_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_LOS; self.target_validate_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_LOS; - self.iscreature = TRUE; + self.iscreature = true; self.teleportable = TELEPORT_NORMAL; - self.damagedbycontents = TRUE; + self.damagedbycontents = true; self.movetype = MOVETYPE_WALK; self.solid = SOLID_SLIDEBOX; self.takedamage = DAMAGE_AIM; diff --git a/qcsrc/server/tturrets/units/unit_flac.qc b/qcsrc/server/tturrets/units/unit_flac.qc index 3c9e55863..e398a83da 100644 --- a/qcsrc/server/tturrets/units/unit_flac.qc +++ b/qcsrc/server/tturrets/units/unit_flac.qc @@ -25,7 +25,7 @@ void turret_flac_attack() turret_tag_fire_update(); - proj = turret_projectile("weapons/hagar_fire.wav", 5, 0, DEATH_TURRET_FLAC, PROJECTILE_HAGAR, TRUE, TRUE); + proj = turret_projectile("weapons/hagar_fire.wav", 5, 0, DEATH_TURRET_FLAC, PROJECTILE_HAGAR, true, true); pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); proj.think = turret_flac_projectile_think_explode; proj.nextthink = time + self.tur_impacttime + (random() * 0.01 - random() * 0.01); diff --git a/qcsrc/server/tturrets/units/unit_hellion.qc b/qcsrc/server/tturrets/units/unit_hellion.qc index e1b88b06a..5a3e80f69 100644 --- a/qcsrc/server/tturrets/units/unit_hellion.qc +++ b/qcsrc/server/tturrets/units/unit_hellion.qc @@ -72,7 +72,7 @@ void turret_hellion_attack() else self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire2")); - missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_HELLION, PROJECTILE_ROCKET, FALSE, FALSE); + missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_HELLION, PROJECTILE_ROCKET, false, false); te_explosion (missile.origin); missile.think = turret_hellion_missile_think; missile.nextthink = time; diff --git a/qcsrc/server/tturrets/units/unit_hk.qc b/qcsrc/server/tturrets/units/unit_hk.qc index 89aaa9459..cb8c743fb 100644 --- a/qcsrc/server/tturrets/units/unit_hk.qc +++ b/qcsrc/server/tturrets/units/unit_hk.qc @@ -101,7 +101,7 @@ void turret_hk_missile_think() self.enemy.velocity * min((vlen(self.enemy.origin - self.origin) / vlen(self.velocity)),0.5); - traceline(self.origin, pre_pos,TRUE,self.enemy); + traceline(self.origin, pre_pos,true,self.enemy); ve = normalize(pre_pos - self.origin); fe = trace_fraction; @@ -121,7 +121,7 @@ void turret_hk_missile_think() lt_seek = myspeed * 2.95; // Trace forward - traceline(self.origin, self.origin + v_forward * lt_for,FALSE,self); + traceline(self.origin, self.origin + v_forward * lt_for,false,self); vf = trace_endpos; ff = trace_fraction; @@ -142,22 +142,22 @@ void turret_hk_missile_think() if (ff < 0.5) pt_seek = 1; // Trace left - traceline(self.origin, self.origin + (-1 * (v_right * pt_seek) + (v_forward * ff)) * lt_seek,FALSE,self); + traceline(self.origin, self.origin + (-1 * (v_right * pt_seek) + (v_forward * ff)) * lt_seek,false,self); vl = trace_endpos; fl = trace_fraction; // Trace right - traceline(self.origin, self.origin + ((v_right * pt_seek) + (v_forward * ff)) * lt_seek ,FALSE,self); + traceline(self.origin, self.origin + ((v_right * pt_seek) + (v_forward * ff)) * lt_seek ,false,self); vr = trace_endpos; fr = trace_fraction; // Trace up - traceline(self.origin, self.origin + ((v_up * pt_seek) + (v_forward * ff)) * lt_seek ,FALSE,self); + traceline(self.origin, self.origin + ((v_up * pt_seek) + (v_forward * ff)) * lt_seek ,false,self); vu = trace_endpos; fu = trace_fraction; // Trace down - traceline(self.origin, self.origin + (-1 * (v_up * pt_seek) + (v_forward * ff)) * lt_seek ,FALSE,self); + traceline(self.origin, self.origin + (-1 * (v_up * pt_seek) + (v_forward * ff)) * lt_seek ,false,self); vd = trace_endpos; fd = trace_fraction; @@ -247,7 +247,7 @@ void turret_hk_attack() { entity missile; - missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_HK, PROJECTILE_ROCKET, FALSE, FALSE); + missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_HK, PROJECTILE_ROCKET, false, false); te_explosion (missile.origin); missile.think = turret_hk_missile_think; diff --git a/qcsrc/server/tturrets/units/unit_mlrs.qc b/qcsrc/server/tturrets/units/unit_mlrs.qc index 783966032..0b03dbce2 100644 --- a/qcsrc/server/tturrets/units/unit_mlrs.qc +++ b/qcsrc/server/tturrets/units/unit_mlrs.qc @@ -18,7 +18,7 @@ void turret_mlrs_attack() entity missile; turret_tag_fire_update(); - missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_MLRS, PROJECTILE_ROCKET, TRUE, TRUE); + missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_MLRS, PROJECTILE_ROCKET, true, true); missile.nextthink = time + max(self.tur_impacttime,(self.shot_radius * 2) / self.shot_speed); missile.missile_flags = MIF_SPLASH; te_explosion (missile.origin); diff --git a/qcsrc/server/tturrets/units/unit_phaser.qc b/qcsrc/server/tturrets/units/unit_phaser.qc index c704aa111..a5aafda8f 100644 --- a/qcsrc/server/tturrets/units/unit_phaser.qc +++ b/qcsrc/server/tturrets/units/unit_phaser.qc @@ -91,7 +91,7 @@ void turret_phaser_attack() beam.scale = self.target_range / 256; beam.movetype = MOVETYPE_NONE; beam.enemy = self.enemy; - beam.bot_dodge = TRUE; + beam.bot_dodge = true; beam.bot_dodgerating = beam.shot_dmg; sound (beam, CH_SHOTS_SINGLE, "turrets/phaser.wav", VOL_BASE, ATTEN_NORM); self.fireflag = 1; diff --git a/qcsrc/server/tturrets/units/unit_plasma.qc b/qcsrc/server/tturrets/units/unit_plasma.qc index 26a3dc04e..1bfd8ac34 100644 --- a/qcsrc/server/tturrets/units/unit_plasma.qc +++ b/qcsrc/server/tturrets/units/unit_plasma.qc @@ -65,7 +65,7 @@ void turret_plasma_minsta_attack (void) void turret_plasma_attack() { - entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE); + entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, true, true); missile.missile_flags = MIF_SPLASH; pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); @@ -75,7 +75,7 @@ void turret_plasma_attack() void turret_plasma_dual_attack() { - entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE); + entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, true, true); missile.missile_flags = MIF_SPLASH; pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); self.tur_head.frame += 1; diff --git a/qcsrc/server/tturrets/units/unit_walker.qc b/qcsrc/server/tturrets/units/unit_walker.qc index 2ecf47406..4b1c44c15 100644 --- a/qcsrc/server/tturrets/units/unit_walker.qc +++ b/qcsrc/server/tturrets/units/unit_walker.qc @@ -46,7 +46,7 @@ void walker_meele_do_dmg() void walker_setnoanim() { - turrets_setframe(ANIM_NO, FALSE); + turrets_setframe(ANIM_NO, false); self.animflag = self.frame; } void walker_rocket_explode() @@ -192,7 +192,7 @@ void walker_fire_rocket(vector org) rocket.classname = "walker_rocket"; rocket.owner = self; - rocket.bot_dodge = TRUE; + rocket.bot_dodge = true; rocket.bot_dodgerating = 50; rocket.takedamage = DAMAGE_YES; rocket.damageforcescale = 2; @@ -218,7 +218,7 @@ void walker_fire_rocket(vector org) rocket.tur_health = time + 9; rocket.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_GUIDED_HEAT; - CSQCProjectile(rocket, FALSE, PROJECTILE_ROCKET, FALSE); // no culling, has fly sound + CSQCProjectile(rocket, false, PROJECTILE_ROCKET, false); // no culling, has fly sound } .vector enemy_last_loc; @@ -510,7 +510,7 @@ void walker_postthink() self.SendFlags |= TNSF_MOVE; self.oldorigin = self.origin; - turrets_setframe(self.animflag, FALSE); + turrets_setframe(self.animflag, false); } void walker_attack() @@ -589,9 +589,9 @@ void turret_walker_dinit() setsize(self, WALKER_MIN, WALKER_MAX); self.target_select_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_LOS; self.target_validate_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_LOS; - self.iscreature = TRUE; + self.iscreature = true; self.teleportable = TELEPORT_NORMAL; - self.damagedbycontents = TRUE; + self.damagedbycontents = true; self.movetype = MOVETYPE_WALK; self.solid = SOLID_SLIDEBOX; self.takedamage = DAMAGE_AIM; diff --git a/qcsrc/server/vehicles/bumblebee.qc b/qcsrc/server/vehicles/bumblebee.qc index b63617fc4..1554f1843 100644 --- a/qcsrc/server/vehicles/bumblebee.qc +++ b/qcsrc/server/vehicles/bumblebee.qc @@ -86,7 +86,7 @@ void bumb_fire_cannon(entity _gun, string _tagname, entity _owner) vehicles_projectile("bigplasma_muzzleflash", "weapons/flacexp3.wav", v, normalize(v_forward + randomvec() * autocvar_g_vehicle_bumblebee_cannon_spread) * autocvar_g_vehicle_bumblebee_cannon_speed, autocvar_g_vehicle_bumblebee_cannon_damage, autocvar_g_vehicle_bumblebee_cannon_radius, autocvar_g_vehicle_bumblebee_cannon_force, 0, - DEATH_VH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, TRUE, TRUE, _owner); + DEATH_VH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, true, true, _owner); } float bumb_gunner_frame() @@ -292,7 +292,7 @@ float bumb_gunner_enter() else { dprint("^1ERROR:^7Tried to enter a fully occupied vehicle!\n"); - return FALSE; + return false; } _gunner = other; @@ -334,28 +334,28 @@ float bumb_gunner_enter() other = vh_player; _gun = vh_vehicle; - return TRUE; + return true; } float vehicles_valid_pilot() { if (!IS_PLAYER(other)) - return FALSE; + return false; if(other.deadflag != DEAD_NO) - return FALSE; + return false; if(other.vehicle != world) - return FALSE; + return false; if (!IS_REAL_CLIENT(other)) if(!autocvar_g_vehicles_allow_bots) - return FALSE; + return false; if(teamplay && other.team != self.team) - return FALSE; + return false; - return TRUE; + return true; } void bumb_touch() @@ -392,13 +392,13 @@ void bumb_regen() self.gun2.vehicle_energy + autocvar_g_vehicle_bumblebee_cannon_ammo_regen * frametime); if(self.vehicle_flags & VHF_SHIELDREGEN) - vehicles_regen(self.dmg_time, vehicle_shield, autocvar_g_vehicle_bumblebee_shield, autocvar_g_vehicle_bumblebee_shield_regen_pause, autocvar_g_vehicle_bumblebee_shield_regen, frametime, TRUE); + vehicles_regen(self.dmg_time, vehicle_shield, autocvar_g_vehicle_bumblebee_shield, autocvar_g_vehicle_bumblebee_shield_regen_pause, autocvar_g_vehicle_bumblebee_shield_regen, frametime, true); if(self.vehicle_flags & VHF_HEALTHREGEN) - vehicles_regen(self.dmg_time, vehicle_health, autocvar_g_vehicle_bumblebee_health, autocvar_g_vehicle_bumblebee_health_regen_pause, autocvar_g_vehicle_bumblebee_health_regen, frametime, FALSE); + vehicles_regen(self.dmg_time, vehicle_health, autocvar_g_vehicle_bumblebee_health, autocvar_g_vehicle_bumblebee_health_regen_pause, autocvar_g_vehicle_bumblebee_health_regen, frametime, false); if(self.vehicle_flags & VHF_ENERGYREGEN) - vehicles_regen(self.wait, vehicle_energy, autocvar_g_vehicle_bumblebee_energy, autocvar_g_vehicle_bumblebee_energy_regen_pause, autocvar_g_vehicle_bumblebee_energy_regen, frametime, FALSE); + vehicles_regen(self.wait, vehicle_energy, autocvar_g_vehicle_bumblebee_energy, autocvar_g_vehicle_bumblebee_energy_regen_pause, autocvar_g_vehicle_bumblebee_energy_regen, frametime, false); } @@ -863,7 +863,7 @@ void bumb_spawn(float _f) if(self.gun3.enemy == world) { self.gun3.enemy = spawn(); - Net_LinkEntity(self.gun3.enemy, TRUE, 0, bumble_raygun_send); + Net_LinkEntity(self.gun3.enemy, true, 0, bumble_raygun_send); self.gun3.enemy.SendFlags = BRG_SETUP; self.gun3.enemy.cnt = autocvar_g_vehicle_bumblebee_raygun; self.gun3.enemy.effects = EF_NODRAW | EF_LOWPRECISION; @@ -913,10 +913,10 @@ void spawnfunc_vehicle_bumblebee() if(!vehicle_initialize( "Bumblebee", "models/vehicles/bumblebee_body.dpm", "", "models/vehicles/spiderbot_cockpit.dpm", "", "", "tag_viewport", - HUD_BUMBLEBEE, BUMB_MIN, BUMB_MAX, FALSE, + HUD_BUMBLEBEE, BUMB_MIN, BUMB_MAX, false, bumb_spawn, autocvar_g_vehicle_bumblebee_respawntime, bumb_pilot_frame, bumb_enter, bumb_exit, - bumb_die, bumb_think, FALSE, autocvar_g_vehicle_bumblebee_health, autocvar_g_vehicle_bumblebee_shield)) + bumb_die, bumb_think, false, autocvar_g_vehicle_bumblebee_health, autocvar_g_vehicle_bumblebee_shield)) { remove(self); return; @@ -949,7 +949,7 @@ float bumble_raygun_send(entity to, float sf) WriteCoord(MSG_ENTITY, self.hook_end.z); } - return TRUE; + return true; } #endif // SVQC diff --git a/qcsrc/server/vehicles/racer.qc b/qcsrc/server/vehicles/racer.qc index 038c10e46..58d143843 100644 --- a/qcsrc/server/vehicles/racer.qc +++ b/qcsrc/server/vehicles/racer.qc @@ -128,7 +128,7 @@ void racer_fire_cannon(string tagname) bolt = vehicles_projectile("wakizashi_gun_muzzleflash", "weapons/lasergun_fire.wav", v, normalize(v_forward + randomvec() * autocvar_g_vehicle_racer_cannon_spread) * autocvar_g_vehicle_racer_cannon_speed, autocvar_g_vehicle_racer_cannon_damage, autocvar_g_vehicle_racer_cannon_radius, autocvar_g_vehicle_racer_cannon_force, 0, - DEATH_VH_WAKI_GUN, PROJECTILE_WAKICANNON, 0, TRUE, TRUE, self.owner); + DEATH_VH_WAKI_GUN, PROJECTILE_WAKICANNON, 0, true, true, self.owner); // Fix z-aim (for chase mode) v = normalize(trace_endpos - bolt.origin); @@ -242,7 +242,7 @@ void racer_fire_rocket(string tagname, entity trg) entity rocket = rocket = vehicles_projectile("wakizashi_rocket_launch", "weapons/rocket_fire.wav", v, v_forward * autocvar_g_vehicle_racer_rocket_speed, autocvar_g_vehicle_racer_rocket_damage, autocvar_g_vehicle_racer_rocket_radius, autocvar_g_vehicle_racer_rocket_force, 3, - DEATH_VH_WAKI_ROCKET, PROJECTILE_WAKIROCKET, 20, FALSE, FALSE, self.owner); + DEATH_VH_WAKI_ROCKET, PROJECTILE_WAKIROCKET, 20, false, false, self.owner); rocket.lip = autocvar_g_vehicle_racer_rocket_accel * sys_frametime; rocket.wait = autocvar_g_vehicle_racer_rocket_turnrate; @@ -425,13 +425,13 @@ float racer_frame() player.vehicle_reload1 = bound(0, 100 * ((time - racer.lip) / (racer.delay - racer.lip)), 100); if(racer.vehicle_flags & VHF_SHIELDREGEN) - vehicles_regen(racer.dmg_time, vehicle_shield, autocvar_g_vehicle_racer_shield, autocvar_g_vehicle_racer_shield_regen_pause, autocvar_g_vehicle_racer_shield_regen, frametime, TRUE); + vehicles_regen(racer.dmg_time, vehicle_shield, autocvar_g_vehicle_racer_shield, autocvar_g_vehicle_racer_shield_regen_pause, autocvar_g_vehicle_racer_shield_regen, frametime, true); if(racer.vehicle_flags & VHF_HEALTHREGEN) - vehicles_regen(racer.dmg_time, vehicle_health, autocvar_g_vehicle_racer_health, autocvar_g_vehicle_racer_health_regen_pause, autocvar_g_vehicle_racer_health_regen, frametime, FALSE); + vehicles_regen(racer.dmg_time, vehicle_health, autocvar_g_vehicle_racer_health, autocvar_g_vehicle_racer_health_regen_pause, autocvar_g_vehicle_racer_health_regen, frametime, false); if(racer.vehicle_flags & VHF_ENERGYREGEN) - vehicles_regen(racer.wait, vehicle_energy, autocvar_g_vehicle_racer_energy, autocvar_g_vehicle_racer_energy_regen_pause, autocvar_g_vehicle_racer_energy_regen, frametime, FALSE); + vehicles_regen(racer.wait, vehicle_energy, autocvar_g_vehicle_racer_energy, autocvar_g_vehicle_racer_energy_regen_pause, autocvar_g_vehicle_racer_energy_regen, frametime, false); VEHICLE_UPDATE_PLAYER(player, health, racer); @@ -667,12 +667,12 @@ void spawnfunc_vehicle_racer() "", "", "tag_viewport", HUD_WAKIZASHI, 0.5 * RACER_MIN, 0.5 * RACER_MAX, - FALSE, + false, racer_spawn, autocvar_g_vehicle_racer_respawntime, racer_frame, racer_enter, racer_exit, racer_die, racer_think, - TRUE, + true, autocvar_g_vehicle_racer_health, autocvar_g_vehicle_racer_shield)) { diff --git a/qcsrc/server/vehicles/raptor.qc b/qcsrc/server/vehicles/raptor.qc index 86d63d10d..9b78cdc5f 100644 --- a/qcsrc/server/vehicles/raptor.qc +++ b/qcsrc/server/vehicles/raptor.qc @@ -145,7 +145,7 @@ void raptor_bomb_burst() bomblet.velocity = normalize(normalize(self.velocity) + (randomvec() * autocvar_g_vehicle_raptor_bomblet_spread)) * vlen(self.velocity); PROJECTILE_MAKETRIGGER(bomblet); - CSQCProjectile(bomblet, TRUE, PROJECTILE_RAPTORBOMBLET, TRUE); + CSQCProjectile(bomblet, true, PROJECTILE_RAPTORBOMBLET, true); } remove(self); @@ -180,8 +180,8 @@ void raptor_bombdrop() PROJECTILE_MAKETRIGGER(bomb_1); PROJECTILE_MAKETRIGGER(bomb_2); - CSQCProjectile(bomb_1, TRUE, PROJECTILE_RAPTORBOMB, TRUE); - CSQCProjectile(bomb_2, TRUE, PROJECTILE_RAPTORBOMB, TRUE); + CSQCProjectile(bomb_1, true, PROJECTILE_RAPTORBOMB, true); + CSQCProjectile(bomb_2, true, PROJECTILE_RAPTORBOMB, true); } @@ -190,7 +190,7 @@ void raptor_fire_cannon(entity gun, string tagname) vehicles_projectile("raptor_cannon_muzzleflash", "weapons/lasergun_fire.wav", gettaginfo(gun, gettagindex(gun, tagname)), normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed, autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force, 0, - DEATH_VH_RAPT_CANNON, PROJECTILE_RAPTORCANNON, 0, TRUE, TRUE, self.owner); + DEATH_VH_RAPT_CANNON, PROJECTILE_RAPTORCANNON, 0, true, true, self.owner); } void raptor_think() @@ -318,13 +318,13 @@ float raptor_takeoff() player.PlayerPhysplug = raptor_frame; if(self.vehicle_flags & VHF_SHIELDREGEN) - vehicles_regen(raptor.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime, TRUE); + vehicles_regen(raptor.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime, true); if(self.vehicle_flags & VHF_HEALTHREGEN) - vehicles_regen(raptor.dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime, FALSE); + vehicles_regen(raptor.dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime, false); if(self.vehicle_flags & VHF_ENERGYREGEN) - vehicles_regen(raptor.cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime, FALSE); + vehicles_regen(raptor.cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime, false); raptor.bomb1.alpha = raptor.bomb2.alpha = (time - raptor.lip) / (raptor.delay - raptor.lip); @@ -605,13 +605,13 @@ float raptor_frame() } if(self.vehicle_flags & VHF_SHIELDREGEN) - vehicles_regen(raptor.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime, TRUE); + vehicles_regen(raptor.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime, true); if(self.vehicle_flags & VHF_HEALTHREGEN) - vehicles_regen(raptor.dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime, FALSE); + vehicles_regen(raptor.dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime, false); if(self.vehicle_flags & VHF_ENERGYREGEN) - vehicles_regen(raptor.cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime, FALSE); + vehicles_regen(raptor.cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime, false); if(raptor.vehicle_weapon2mode == RSM_BOMB) { @@ -776,7 +776,7 @@ float raptor_impulse(float _imp) self.vehicle.vehicle_weapon2mode = RSM_FIRST; CSQCVehicleSetup(self, 0); - return TRUE; + return true; case 12: case 16: case 19: @@ -785,7 +785,7 @@ float raptor_impulse(float _imp) self.vehicle.vehicle_weapon2mode = RSM_LAST; CSQCVehicleSetup(self, 0); - return TRUE; + return true; /* case 17: // toss gun, could be used to exit? @@ -794,7 +794,7 @@ float raptor_impulse(float _imp) break; */ } - return FALSE; + return false; } void raptor_spawn(float _f) @@ -931,12 +931,12 @@ void spawnfunc_vehicle_raptor() "", "tag_hud", "tag_camera", HUD_RAPTOR, RAPTOR_MIN, RAPTOR_MAX, - FALSE, + false, raptor_spawn, autocvar_g_vehicle_raptor_respawntime, raptor_frame, raptor_enter, raptor_exit, raptor_die, raptor_think, - FALSE, + false, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_shield)) { diff --git a/qcsrc/server/vehicles/spiderbot.qc b/qcsrc/server/vehicles/spiderbot.qc index d51775787..c8ad08f14 100644 --- a/qcsrc/server/vehicles/spiderbot.qc +++ b/qcsrc/server/vehicles/spiderbot.qc @@ -261,7 +261,7 @@ void spiderbot_rocket_do() rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav", v, normalize(randomvec() * autocvar_g_vehicle_spiderbot_rocket_spread + v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed, autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1, - DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner); + DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner); crosshair_trace(self.owner); float _dist = (random() * autocvar_g_vehicle_spiderbot_rocket_radius) + vlen(v - trace_endpos); _dist -= (random() * autocvar_g_vehicle_spiderbot_rocket_radius) ; @@ -275,7 +275,7 @@ void spiderbot_rocket_do() rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav", v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed, autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1, - DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, FALSE, self.owner); + DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, false, self.owner); crosshair_trace(self.owner); rocket.pos1 = trace_endpos; rocket.nextthink = time; @@ -287,7 +287,7 @@ void spiderbot_rocket_do() rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav", v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed, autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1, - DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner); + DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner); crosshair_trace(self.owner); @@ -322,7 +322,7 @@ void spiderbot_rocket_do() float spiderbot_aiframe() { - return FALSE; + return false; } float spiderbot_frame() @@ -369,7 +369,7 @@ float spiderbot_frame() crosshair_trace(player); ad = vectoangles(normalize(trace_endpos - ad)); ad = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(spider.angles), AnglesTransform_FromAngles(ad))) - spider.tur_head.angles; - ad = AnglesTransform_Normalize(ad, TRUE); + ad = AnglesTransform_Normalize(ad, true); //UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload2) + ('0 1 0' * (1 - player.vehicle_reload2)), 2); // Rotate head @@ -526,16 +526,16 @@ float spiderbot_frame() else vehicles_regen(spider.cnt, vehicle_ammo1, autocvar_g_vehicle_spiderbot_minigun_ammo_max, autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause, - autocvar_g_vehicle_spiderbot_minigun_ammo_regen, frametime, FALSE); + autocvar_g_vehicle_spiderbot_minigun_ammo_regen, frametime, false); spiderbot_rocket_do(); if(self.vehicle_flags & VHF_SHIELDREGEN) - vehicles_regen(spider.dmg_time, vehicle_shield, autocvar_g_vehicle_spiderbot_shield, autocvar_g_vehicle_spiderbot_shield_regen_pause, autocvar_g_vehicle_spiderbot_shield_regen, frametime, TRUE); + vehicles_regen(spider.dmg_time, vehicle_shield, autocvar_g_vehicle_spiderbot_shield, autocvar_g_vehicle_spiderbot_shield_regen_pause, autocvar_g_vehicle_spiderbot_shield_regen, frametime, true); if(self.vehicle_flags & VHF_HEALTHREGEN) - vehicles_regen(spider.dmg_time, vehicle_health, autocvar_g_vehicle_spiderbot_health, autocvar_g_vehicle_spiderbot_health_regen_pause, autocvar_g_vehicle_spiderbot_health_regen, frametime, FALSE); + vehicles_regen(spider.dmg_time, vehicle_health, autocvar_g_vehicle_spiderbot_health, autocvar_g_vehicle_spiderbot_health_regen_pause, autocvar_g_vehicle_spiderbot_health_regen, frametime, false); player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0; player.vehicle_ammo2 = spider.tur_head.frame; @@ -767,7 +767,7 @@ float spiderbot_impulse(float _imp) //centerprint(self, strcat("Rocket mode is ", ftos(self.vehicle.vehicle_weapon2mode))); CSQCVehicleSetup(self, 0); - return TRUE; + return true; case 12: case 16: case 19: @@ -777,7 +777,7 @@ float spiderbot_impulse(float _imp) //centerprint(self, strcat("Rocket mode is ", ftos(self.vehicle.vehicle_weapon2mode))); CSQCVehicleSetup(self, 0); - return TRUE; + return true; /* case 17: // toss gun, could be used to exit? @@ -786,7 +786,7 @@ float spiderbot_impulse(float _imp) break; */ } - return FALSE; + return false; } void spiderbot_spawn(float _f) @@ -867,12 +867,12 @@ void spawnfunc_vehicle_spiderbot() "tag_head", "tag_hud", "", HUD_SPIDERBOT, SPIDERBOT_MIN, SPIDERBOT_MAX, - FALSE, + false, spiderbot_spawn, autocvar_g_vehicle_spiderbot_respawntime, spiderbot_frame, spiderbot_enter, spiderbot_exit, spiderbot_die, spiderbot_think, - FALSE, + false, autocvar_g_vehicle_spiderbot_health, autocvar_g_vehicle_spiderbot_shield)) { diff --git a/qcsrc/server/vehicles/vehicles.qc b/qcsrc/server/vehicles/vehicles.qc index 4957d4d52..8e4b963f2 100644 --- a/qcsrc/server/vehicles/vehicles.qc +++ b/qcsrc/server/vehicles/vehicles.qc @@ -41,7 +41,7 @@ float SendAuxiliaryXhair(entity to, float sf) WriteByte(MSG_ENTITY, rint(self.colormod.y * 255)); WriteByte(MSG_ENTITY, rint(self.colormod.z * 255)); - return TRUE; + return true; } void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, float axh_id) @@ -60,7 +60,7 @@ void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, float axh_id) axh.cnt = axh_id; axh.drawonlytoclient = own; axh.owner = own; - Net_LinkEntity(axh, FALSE, 0, SendAuxiliaryXhair); + Net_LinkEntity(axh, false, 0, SendAuxiliaryXhair); } setorigin(axh, loc); @@ -422,7 +422,7 @@ entity vehicles_projectile(string _mzlfx, string _mzlsound, proj.solid = SOLID_BBOX; proj.movetype = MOVETYPE_FLYMISSILE; proj.flags = FL_PROJECTILE; - proj.bot_dodge = TRUE; + proj.bot_dodge = true; proj.bot_dodgerating = _dmg; proj.velocity = _vel; proj.touch = vehicles_projectile_explode; @@ -495,14 +495,14 @@ void vehicles_spawn() self.touch = vehicles_touch; self.event_damage = vehicles_damage; self.reset = vehicles_reset; - self.iscreature = TRUE; - self.teleportable = FALSE; // no teleporting for vehicles, too buggy - self.damagedbycontents = TRUE; + self.iscreature = true; + self.teleportable = false; // no teleporting for vehicles, too buggy + self.damagedbycontents = true; self.movetype = MOVETYPE_WALK; self.solid = SOLID_SLIDEBOX; self.takedamage = DAMAGE_AIM; self.deadflag = DEAD_NO; - self.bot_attack = TRUE; + self.bot_attack = true; self.flags = FL_NOTARGET; self.avelocity = '0 0 0'; self.velocity = '0 0 0'; @@ -529,12 +529,12 @@ void vehicles_spawn() float vehicles_crushable(entity e) { if(IS_PLAYER(e)) - return TRUE; + return true; if(e.flags & FL_MONSTER) - return TRUE; + return true; - return FALSE; + return false; } void vehicles_impact(float _minspeed, float _speedfac, float _maxpain) @@ -667,7 +667,7 @@ void vehicles_enter() self.team = self.owner.team; self.flags -= FL_NOTARGET; - self.monster_attack = TRUE; + self.monster_attack = true; if (IS_REAL_CLIENT(other)) { @@ -774,7 +774,7 @@ void vehicles_exit(float eject) return; } - vehicles_exit_running = TRUE; + vehicles_exit_running = true; if(IS_CLIENT(self)) { _vehicle = self.vehicle; @@ -783,7 +783,7 @@ void vehicles_exit(float eject) { _vehicle.vehicle_exit(eject); self = _oldself; - vehicles_exit_running = FALSE; + vehicles_exit_running = false; return; } } @@ -845,7 +845,7 @@ void vehicles_exit(float eject) sound (_vehicle, CH_TRIGGER_SINGLE, "misc/null.wav", 1, ATTEN_NORM); _vehicle.vehicle_hudmodel.viewmodelforclient = _vehicle; _vehicle.phase = time + 1; - _vehicle.monster_attack = FALSE; + _vehicle.monster_attack = false; _vehicle.vehicle_exit(eject); @@ -854,7 +854,7 @@ void vehicles_exit(float eject) _vehicle.owner = world; self = _oldself; - vehicles_exit_running = FALSE; + vehicles_exit_running = false; } @@ -1072,7 +1072,7 @@ void vehicles_showwp() rgb = Team_ColorRGB(self.team); else rgb = '1 1 1'; - WaypointSprite_Spawn("vehicle", 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, TRUE, RADARICON_POWERUP, rgb); + WaypointSprite_Spawn("vehicle", 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP, rgb); if(self.waypointsprite_attached) { WaypointSprite_UpdateRule(self.waypointsprite_attached, self.wp00.team, SPRITERULE_DEFAULT); @@ -1202,7 +1202,7 @@ float vehicle_addplayerslot( entity _owner, setattachment(_slot.vehicle_hudmodel, _slot, ""); setattachment(_slot.vehicle_viewport, _slot.vehicle_hudmodel, ""); - return TRUE; + return true; } float vehicle_initialize(string net_name, @@ -1228,7 +1228,7 @@ float vehicle_initialize(string net_name, float _max_shield) { if(!autocvar_g_vehicles) - return FALSE; + return false; if(self.targetname) { @@ -1290,10 +1290,10 @@ float vehicle_initialize(string net_name, self.tur_head = spawn(); self.tur_head.owner = self; self.takedamage = DAMAGE_AIM; - self.bot_attack = TRUE; - self.iscreature = TRUE; - self.teleportable = FALSE; // no teleporting for vehicles, too buggy - self.damagedbycontents = TRUE; + self.bot_attack = true; + self.iscreature = true; + self.teleportable = false; // no teleporting for vehicles, too buggy + self.damagedbycontents = true; self.hud = vhud; self.tur_health = _max_health; self.tur_head.tur_health = _max_shield; @@ -1352,9 +1352,9 @@ float vehicle_initialize(string net_name, self.tur_head.team = self.team; if(MUTATOR_CALLHOOK(VehicleSpawn)) - return FALSE; + return false; - return TRUE; + return true; } vector vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string _tagname, @@ -1366,7 +1366,7 @@ vector vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string vtag = gettaginfo(_turrret, gettagindex(_turrret, _tagname)); vtmp = vectoangles(normalize(_target - vtag)); vtmp = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(_vehic.angles), AnglesTransform_FromAngles(vtmp))) - _turrret.angles; - vtmp = AnglesTransform_Normalize(vtmp, TRUE); + vtmp = AnglesTransform_Normalize(vtmp, true); ftmp = _aimspeed * frametime; vtmp_y = bound(-ftmp, vtmp.y, ftmp); vtmp_x = bound(-ftmp, vtmp.x, ftmp); diff --git a/qcsrc/server/waypointsprites.qc b/qcsrc/server/waypointsprites.qc index 5fffc4888..5ba24b448 100644 --- a/qcsrc/server/waypointsprites.qc +++ b/qcsrc/server/waypointsprites.qc @@ -168,12 +168,12 @@ void WaypointSprite_Think() { float doremove; - doremove = FALSE; + doremove = false; if(self.fade_time) { if(time >= self.teleport_time) - doremove = TRUE; + doremove = true; } if(self.exteriormodeltoclient) @@ -190,18 +190,18 @@ float WaypointSprite_visible_for_player(entity e) // personal waypoints if(self.enemy) if(self.enemy != e) - return FALSE; + return false; // team waypoints if(self.team && self.rule == SPRITERULE_DEFAULT) { if(self.team != e.team) - return FALSE; + return false; if (!IS_PLAYER(e)) - return FALSE; + return false; } - return TRUE; + return true; } entity WaypointSprite_getviewentity(entity e) @@ -220,14 +220,14 @@ float WaypointSprite_isteammate(entity e, entity e2) if(teamplay) { if(e2.team != e.team) - return FALSE; + return false; } else { if(e2 != e) - return FALSE; + return false; } - return TRUE; + return true; } float WaypointSprite_Customize() @@ -239,7 +239,7 @@ float WaypointSprite_Customize() e = WaypointSprite_getviewentity(other); if(MUTATOR_CALLHOOK(CustomizeWaypoint)) - return FALSE; + return false; return self.waypointsprite_visible_for_player(e); } @@ -330,7 +330,7 @@ float WaypointSprite_SendEntity(entity to, float sendflags) WriteByte(MSG_ENTITY, 0); } - return TRUE; + return true; } void WaypointSprite_Reset() @@ -384,7 +384,7 @@ entity WaypointSprite_Spawn( wp.reset2 = WaypointSprite_Reset; wp.cnt = icon; wp.colormod = rgb; - Net_LinkEntity(wp, FALSE, 0, WaypointSprite_SendEntity); + Net_LinkEntity(wp, false, 0, WaypointSprite_SendEntity); return wp; } @@ -396,7 +396,7 @@ entity WaypointSprite_SpawnFixed( float icon, vector rgb // initial icon and color ) { - return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, own, ownfield, TRUE, icon, rgb); + return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, own, ownfield, true, icon, rgb); } .entity waypointsprite_deployed_fixed; @@ -416,7 +416,7 @@ entity WaypointSprite_DeployFixed( maxdistance = waypointsprite_limitedrange; else maxdistance = 0; - return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, world, ofs, world, t, self, waypointsprite_deployed_fixed, FALSE, icon, rgb); + return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, world, ofs, world, t, self, waypointsprite_deployed_fixed, false, icon, rgb); } .entity waypointsprite_deployed_personal; @@ -426,7 +426,7 @@ entity WaypointSprite_DeployPersonal( float icon, vector rgb // initial icon and color ) { - return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, self, waypointsprite_deployed_personal, FALSE, icon, rgb); + return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, self, waypointsprite_deployed_personal, false, icon, rgb); } .entity waypointsprite_attached; @@ -448,7 +448,7 @@ entity WaypointSprite_Attach( maxdistance = waypointsprite_limitedrange; else maxdistance = 0; - return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, self, '0 0 64', world, t, self, waypointsprite_attached, FALSE, icon, rgb); + return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, self, '0 0 64', world, t, self, waypointsprite_attached, false, icon, rgb); } entity WaypointSprite_AttachCarrier( @@ -459,7 +459,7 @@ entity WaypointSprite_AttachCarrier( { entity e; WaypointSprite_Kill(carrier.waypointsprite_attached); // FC overrides attached - e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', world, carrier.team, carrier, waypointsprite_attachedforcarrier, FALSE, icon, rgb); + e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', world, carrier.team, carrier, waypointsprite_attachedforcarrier, false, icon, rgb); if(e) { WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON) * 2); diff --git a/qcsrc/server/weapons/accuracy.qc b/qcsrc/server/weapons/accuracy.qc index 98929b1a1..2c6d91854 100644 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@ -25,7 +25,7 @@ float accuracy_send(entity to, float sf) // note: zero sendflags can never be sent... so we can use that to say that we send no accuracy! WriteInt24_t(MSG_ENTITY, sf); if(sf == 0) - return TRUE; + return true; // note: we know that client and server agree about SendFlags... for(w = 0, f = 1; w <= WEP_LAST - WEP_FIRST; ++w) { @@ -36,7 +36,7 @@ float accuracy_send(entity to, float sf) else f *= 2; } - return TRUE; + return true; } // init/free @@ -46,7 +46,7 @@ void accuracy_init(entity e) e.accuracy.owner = e; e.accuracy.classname = "accuracy"; e.accuracy.drawonlytoclient = e; - Net_LinkEntity(e.accuracy, FALSE, 0, accuracy_send); + Net_LinkEntity(e.accuracy, false, 0, accuracy_send); } void accuracy_free(entity e) @@ -113,13 +113,13 @@ float accuracy_isgooddamage(entity attacker, entity targ) if(!targ.frozen) if(mutator_check == MUT_ACCADD_INVALID || (mutator_check == MUT_ACCADD_VALID && IS_CLIENT(targ))) if(DIFF_TEAM(attacker, targ)) - return TRUE; - return FALSE; + return true; + return false; } float accuracy_canbegooddamage(entity attacker) { if(!warmup_stage) - return TRUE; - return FALSE; + return true; + return false; } diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index 6e54cb060..04658b52a 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -39,28 +39,28 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp if(autocvar_g_projectiles_damage <= -2) { - return FALSE; // no damage to projectiles at all, not even with the exceptions + return false; // no damage to projectiles at all, not even with the exceptions } else if(autocvar_g_projectiles_damage == -1) { if(is_from_exception) return (exception); // if exception is detected, allow it to override else - return FALSE; // otherwise, no other damage is allowed + return false; // otherwise, no other damage is allowed } else if(autocvar_g_projectiles_damage == 0) { if(is_from_exception) return (exception); // if exception is detected, allow it to override else if(!is_from_contents) - return FALSE; // otherwise, only allow damage from contents + return false; // otherwise, only allow damage from contents } else if(autocvar_g_projectiles_damage == 1) { if(is_from_exception) return (exception); // if exception is detected, allow it to override else if(!(is_from_contents || is_from_owner)) - return FALSE; // otherwise, only allow self damage and damage from contents + return false; // otherwise, only allow self damage and damage from contents } else if(autocvar_g_projectiles_damage == 2) // allow any damage, but override for exceptions { @@ -68,7 +68,7 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp return (exception); // if exception is detected, allow it to override } - return TRUE; // if none of these return, then allow damage anyway. + return true; // if none of these return, then allow damage anyway. } void W_PrepareExplosionByDamage(entity attacker, void() explode) diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index b4f6930e5..8ec11925f 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -26,7 +26,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) { if (complain) sprint(self, "Invalid weapon\n"); - return FALSE; + return false; } if (cl.weapons & WepSet_FromWeapon(wpn)) { @@ -59,10 +59,10 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) play2(cl, "weapons/unavailable.wav"); Send_WeaponComplain (cl, wpn, 0); } - return FALSE; + return false; } } - return TRUE; + return true; } if (complain) { @@ -101,7 +101,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) play2(cl, "weapons/unavailable.wav"); } - return FALSE; + return false; } float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, float complain, float skipmissing) @@ -136,13 +136,13 @@ float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, floa if(wep.impulse != imp) continue; - float i, have_other = FALSE; + float i, have_other = false; for(i = WEP_FIRST; i <= WEP_LAST; ++i) { if(i != weaponwant) if((get_weaponinfo(i)).impulse == imp || imp < 0) if((pl.weapons & WepSet_FromWeapon(i)) || (weaponsInMap & WepSet_FromWeapon(i))) - have_other = TRUE; + have_other = true; } // skip weapons we don't own that aren't normal and aren't in the map @@ -153,7 +153,7 @@ float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, floa ++c; - if(!skipmissing || client_hasweapon(pl, weaponwant, TRUE, FALSE)) + if(!skipmissing || client_hasweapon(pl, weaponwant, true, false)) { if(switchtonext) return weaponwant; @@ -193,13 +193,13 @@ float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, floa if(wep.impulse != imp) continue; - float i, have_other = FALSE; + float i, have_other = false; for(i = WEP_FIRST; i <= WEP_LAST; ++i) { if(i != weaponwant) if((get_weaponinfo(i)).impulse == imp || imp < 0) if((pl.weapons & WepSet_FromWeapon(i)) || (weaponsInMap & WepSet_FromWeapon(i))) - have_other = TRUE; + have_other = true; } // skip weapons we don't own that aren't normal and aren't in the map @@ -211,7 +211,7 @@ float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, floa --c; if(c == 0) { - client_hasweapon(pl, weaponwant, TRUE, TRUE); + client_hasweapon(pl, weaponwant, true, true); break; } } @@ -248,7 +248,7 @@ void W_SwitchWeapon(float imp) { if (self.switchweapon != imp) { - if (client_hasweapon(self, imp, TRUE, TRUE)) + if (client_hasweapon(self, imp, true, true)) W_SwitchWeapon_Force(self, imp); else self.selectweapon = imp; // update selectweapon ANYWAY @@ -259,7 +259,7 @@ void W_SwitchWeapon(float imp) void W_CycleWeapon(string weaponorder, float dir) { float w; - w = W_GetCycleWeapon(self, weaponorder, dir, -1, 1, TRUE); + w = W_GetCycleWeapon(self, weaponorder, dir, -1, 1, true); if(w > 0) W_SwitchWeapon(w); } @@ -297,7 +297,7 @@ void W_PreviousWeapon(float list) // previously used if exists and has ammo, (second) best otherwise void W_LastWeapon(void) { - if(client_hasweapon(self, self.cnt, TRUE, FALSE)) + if(client_hasweapon(self, self.cnt, true, false)) W_SwitchWeapon(self.cnt); else W_SwitchToOtherWeapon(self); diff --git a/qcsrc/server/weapons/selection.qh b/qcsrc/server/weapons/selection.qh index 8e2937f0c..0c9aeefb3 100644 --- a/qcsrc/server/weapons/selection.qh +++ b/qcsrc/server/weapons/selection.qh @@ -7,7 +7,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain); .float weaponcomplainindex; float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, float complain, float skipmissing); -#define w_getbestweapon(ent) W_GetCycleWeapon(ent, ent.cvar_cl_weaponpriority, 0, -1, FALSE, TRUE) +#define w_getbestweapon(ent) W_GetCycleWeapon(ent, ent.cvar_cl_weaponpriority, 0, -1, false, true) void W_SwitchWeapon_Force(entity e, float w); diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index 04dd3f6f2..f13b28608 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -42,7 +42,7 @@ void weapon_defaultspawnfunc(float wpn) if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED) { objerror("Attempted to spawn a mutator-blocked weapon rejected"); - startitem_failed = TRUE; + startitem_failed = true; return; } @@ -54,7 +54,7 @@ void weapon_defaultspawnfunc(float wpn) if(s == "") { remove(self); - startitem_failed = TRUE; + startitem_failed = true; return; } t = tokenize_console(s); @@ -105,7 +105,7 @@ void weapon_defaultspawnfunc(float wpn) if(wpn == 0) { remove(self); - startitem_failed = TRUE; + startitem_failed = true; return; } } @@ -161,7 +161,7 @@ void weapon_defaultspawnfunc(float wpn) // pickup anyway if(g_pickup_weapons_anyway) - self.pickup_anyway = TRUE; + self.pickup_anyway = true; f = FL_WEAPON; diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 552f03557..411ab92be 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -73,7 +73,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto wep.think = thrown_wep_think; wep.savenextthink = wep.nextthink; wep.nextthink = min(wep.nextthink, time + 0.5); - wep.pickup_anyway = TRUE; // these are ALWAYS pickable + wep.pickup_anyway = true; // these are ALWAYS pickable //wa = W_AmmoItemCode(wpn); if(ammotype == ammo_none) @@ -185,5 +185,5 @@ void SpawnThrownWeapon(vector org, float w) { if(self.weapons & WepSet_FromWeapon(self.weapon)) if(W_IsWeaponThrowable(self.weapon)) - W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200'); + W_ThrowNewWeapon(self, self.weapon, false, org, randomvec() * 125 + '0 0 200'); } diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index 356095bdf..c4dbe9f84 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -207,9 +207,9 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f while (1) { if(self.antilag_debug) - WarpZone_traceline_antilag (self, start, end, FALSE, o, self.antilag_debug); + WarpZone_traceline_antilag (self, start, end, false, o, self.antilag_debug); else - WarpZone_traceline_antilag (self, start, end, FALSE, o, ANTILAG_LATENCY(self)); + WarpZone_traceline_antilag (self, start, end, false, o, ANTILAG_LATENCY(self)); if(o && WarpZone_trace_firstzone) { o = world; @@ -224,7 +224,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f break; // make the entity non-solid so we can hit the next one - trace_ent.railgunhit = TRUE; + trace_ent.railgunhit = true; trace_ent.railgunhitloc = end; trace_ent.railgunhitsolidbackup = trace_ent.solid; trace_ent.railgundistance = vlen(WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos) - start); @@ -243,12 +243,12 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f endq3surfaceflags = trace_dphitq3surfaceflags; // find all the entities the railgun hit and restore their solid state - ent = findfloat(world, railgunhit, TRUE); + ent = findfloat(world, railgunhit, true); while (ent) { // restore their solid type ent.solid = ent.railgunhitsolidbackup; - ent = findfloat(ent, railgunhit, TRUE); + ent = findfloat(ent, railgunhit, true); } // spawn a temporary explosion entity for RadiusDamage calls @@ -281,7 +281,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f } // find all the entities the railgun hit and hurt them - ent = findfloat(world, railgunhit, TRUE); + ent = findfloat(world, railgunhit, true); while (ent) { // get the details we need to call the damage function @@ -303,11 +303,11 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f ent.railgunhitloc = '0 0 0'; ent.railgunhitsolidbackup = SOLID_NOT; - ent.railgunhit = FALSE; + ent.railgunhit = false; ent.railgundistance = 0; // advance to the next entity - ent = findfloat(ent, railgunhit, TRUE); + ent = findfloat(ent, railgunhit, true); } // calculate hits and fired shots for hitscan @@ -366,7 +366,7 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat for(0;;) { // TODO also show effect while tracing - WarpZone_TraceBox_ThroughZone(start, '0 0 0', '0 0 0', end, FALSE, WarpZone_trace_forent, world, fireBullet_trace_callback); + WarpZone_TraceBox_ThroughZone(start, '0 0 0', '0 0 0', end, false, WarpZone_trace_forent, world, fireBullet_trace_callback); dir = WarpZone_TransformVelocity(WarpZone_trace_transform, dir); end = WarpZone_TransformOrigin(WarpZone_trace_transform, end); start = trace_endpos; @@ -441,7 +441,7 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat // move the entity along its velocity until it's out of solid, then let it resume // The previously hit entity is ignored here! - traceline_inverted (start, start + dir * maxdist, MOVE_NORMAL, WarpZone_trace_forent, TRUE, hit); + traceline_inverted (start, start + dir * maxdist, MOVE_NORMAL, WarpZone_trace_forent, true, hit); if(trace_fraction == 1) // 1: we never got out of solid break; diff --git a/qcsrc/server/weapons/tracing.qh b/qcsrc/server/weapons/tracing.qh index 49605e8f2..ce8511ba3 100644 --- a/qcsrc/server/weapons/tracing.qh +++ b/qcsrc/server/weapons/tracing.qh @@ -23,19 +23,19 @@ float mspercallcount; void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute); -#define W_SetupProjVelocity_Basic(ent,pspeed,pspread) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, pspeed, 0, 0, pspread, FALSE) +#define W_SetupProjVelocity_Basic(ent,pspeed,pspread) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, pspeed, 0, 0, pspread, false) -#define W_SetupProjVelocity_UP_PRE(ent,wepname,prefix) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR(wepname, prefix##speed), WEP_CVAR(wepname, prefix##speed_up), WEP_CVAR(wepname, prefix##speed_z), WEP_CVAR(wepname, prefix##spread), FALSE) -#define W_SetupProjVelocity_UP_PRI(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), WEP_CVAR_PRI(wepname, speed_up), WEP_CVAR_PRI(wepname, speed_z), WEP_CVAR_PRI(wepname, spread), FALSE) -#define W_SetupProjVelocity_UP_SEC(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), WEP_CVAR_SEC(wepname, speed_up), WEP_CVAR_SEC(wepname, speed_z), WEP_CVAR_SEC(wepname, spread), FALSE) +#define W_SetupProjVelocity_UP_PRE(ent,wepname,prefix) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR(wepname, prefix##speed), WEP_CVAR(wepname, prefix##speed_up), WEP_CVAR(wepname, prefix##speed_z), WEP_CVAR(wepname, prefix##spread), false) +#define W_SetupProjVelocity_UP_PRI(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), WEP_CVAR_PRI(wepname, speed_up), WEP_CVAR_PRI(wepname, speed_z), WEP_CVAR_PRI(wepname, spread), false) +#define W_SetupProjVelocity_UP_SEC(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), WEP_CVAR_SEC(wepname, speed_up), WEP_CVAR_SEC(wepname, speed_z), WEP_CVAR_SEC(wepname, spread), false) #define W_SetupProjVelocity_UP_BOTH(ent,wepname,isprimary) \ if(isprimary) { W_SetupProjVelocity_UP_PRI(ent, wepname); } \ else { W_SetupProjVelocity_UP_SEC(ent, wepname); } -#define W_SetupProjVelocity_PRE(ent,wepname,prefix) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR(wepname, prefix##speed), 0, 0, WEP_CVAR(wepname, prefix##spread), FALSE) -#define W_SetupProjVelocity_PRI(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), 0, 0, WEP_CVAR_PRI(wepname, spread), FALSE) -#define W_SetupProjVelocity_SEC(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), 0, 0, WEP_CVAR_SEC(wepname, spread), FALSE) +#define W_SetupProjVelocity_PRE(ent,wepname,prefix) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR(wepname, prefix##speed), 0, 0, WEP_CVAR(wepname, prefix##spread), false) +#define W_SetupProjVelocity_PRI(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), 0, 0, WEP_CVAR_PRI(wepname, spread), false) +#define W_SetupProjVelocity_SEC(ent,wepname) W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), 0, 0, WEP_CVAR_SEC(wepname, spread), false) #define W_SetupProjVelocity_BOTH(ent,wepname,isprimary) \ if(isprimary) { W_SetupProjVelocity_PRI(ent, wepname); } \ diff --git a/qcsrc/server/weapons/weaponstats.qc b/qcsrc/server/weapons/weaponstats.qc index c1bb87a7d..c0ccff0b9 100644 --- a/qcsrc/server/weapons/weaponstats.qc +++ b/qcsrc/server/weapons/weaponstats.qc @@ -14,11 +14,11 @@ void WeaponStats_ready(entity fh, entity pass, float status) // we can write prefix = strcat(autocvar_hostname, "\t", GetGametype(), "_", GetMapname(), "\t"); url_fputs(fh, "#begin statsfile\n"); - url_fputs(fh, strcat("#date ", strftime(TRUE, "%a %b %e %H:%M:%S %Z %Y"), "\n")); + url_fputs(fh, strcat("#date ", strftime(true, "%a %b %e %H:%M:%S %Z %Y"), "\n")); #ifdef WATERMARK url_fputs(fh, strcat("#version ", WATERMARK, "\n")); #endif - url_fputs(fh, strcat("#config ", ftos(crc16(FALSE, cvar_purechanges)), "\n")); + url_fputs(fh, strcat("#config ", ftos(crc16(false, cvar_purechanges)), "\n")); url_fputs(fh, strcat("#cvar_purechanges ", ftos(cvar_purechanges_count), "\n")); n = tokenizebyseparator(cvar_purechanges, "\n"); for(i = 0; i < n; ++i) diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index df21b4161..07558aad1 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -37,7 +37,7 @@ float CL_Weaponentity_CustomizeEntityForClient() if(IS_SPEC(other)) if(other.enemy == self.owner) self.viewmodelforclient = other; - return TRUE; + return true; } /* @@ -235,8 +235,8 @@ void CL_WeaponEntity_SetModel(string name) { vector v0; v0 = self.movedir; - self.movedir = shotorg_adjust(v0, FALSE, FALSE); - self.view_ofs = shotorg_adjust(v0, FALSE, TRUE) - v0; + self.movedir = shotorg_adjust(v0, false, false); + self.view_ofs = shotorg_adjust(v0, false, true) - v0; } self.owner.stat_shotorg = compressShotOrigin(self.movedir); self.movedir = decompressShotOrigin(self.owner.stat_shotorg); // make them match perfectly @@ -247,7 +247,7 @@ void CL_WeaponEntity_SetModel(string name) setorigin(self, self.view_ofs); // reset animstate now self.wframe = WFRAME_IDLE; - setanim(self, self.anim_idle, TRUE, FALSE, TRUE); + setanim(self, self.anim_idle, true, false, true); } vector CL_Weapon_GetShotOrg(float wpn) @@ -456,11 +456,11 @@ float weapon_prepareattack_checkammo(float secondary) entity mine; if(self.weapon == WEP_MINE_LAYER) for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self) - return FALSE; + return false; if(self.weapon == WEP_SHOTGUN) if(!secondary && WEP_CVAR(shotgun, secondary) == 1) - return FALSE; // no clicking, just allow + return false; // no clicking, just allow if(self.weapon == self.switchweapon && time - self.prevdryfire > 1) // only play once BEFORE starting to switch weapons { @@ -489,40 +489,40 @@ float weapon_prepareattack_checkammo(float secondary) W_SwitchToOtherWeapon(self); } - return FALSE; + return false; } - return TRUE; + return true; } .float race_penalty; float weapon_prepareattack_check(float secondary, float attacktime) { if(!weapon_prepareattack_checkammo(secondary)) - return FALSE; + return false; //if sv_ready_restart_after_countdown is set, don't allow the player to shoot //if all players readied up and the countdown is running if(time < game_starttime || time < self.race_penalty) { - return FALSE; + return false; } if (timeout_status == TIMEOUT_ACTIVE) //don't allow the player to shoot while game is paused - return FALSE; + return false; // do not even think about shooting if switching if(self.switchweapon != self.weapon) - return FALSE; + return false; if(attacktime >= 0) { // don't fire if previous attack is not finished if (ATTACK_FINISHED(self) > time + self.weapon_frametime * 0.5) - return FALSE; + return false; // don't fire while changing weapon if (self.weaponentity.state != WS_READY) - return FALSE; + return false; } - return TRUE; + return true; } float weapon_prepareattack_do(float secondary, float attacktime) { @@ -542,17 +542,17 @@ float weapon_prepareattack_do(float secondary, float attacktime) } self.bulletcounter += 1; //dprint("attack finished ", ftos(ATTACK_FINISHED(self)), "\n"); - return TRUE; + return true; } float weapon_prepareattack(float secondary, float attacktime) { if(weapon_prepareattack_check(secondary, attacktime)) { weapon_prepareattack_do(secondary, attacktime); - return TRUE; + return true; } else - return FALSE; + return false; } void weapon_thinkf(float fr, float t, void() func) @@ -564,12 +564,12 @@ void weapon_thinkf(float fr, float t, void() func) if(fr == WFRAME_DONTCHANGE) { fr = self.weaponentity.wframe; - restartanim = FALSE; + restartanim = false; } else if (fr == WFRAME_IDLE) - restartanim = FALSE; + restartanim = false; else - restartanim = TRUE; + restartanim = true; of = v_forward; or = v_right; @@ -588,7 +588,7 @@ void weapon_thinkf(float fr, float t, void() func) else // if (fr == WFRAME_RELOAD) a = self.weaponentity.anim_reload; a.z *= g_weaponratefactor; - setanim(self.weaponentity, a, restartanim == FALSE, restartanim, restartanim); + setanim(self.weaponentity, a, restartanim == false, restartanim, restartanim); } v_forward = of; diff --git a/qcsrc/warpzonelib/common.qc b/qcsrc/warpzonelib/common.qc index e8358435f..f91301a5f 100644 --- a/qcsrc/warpzonelib/common.qc +++ b/qcsrc/warpzonelib/common.qc @@ -515,11 +515,11 @@ vector WarpZone_TransformVAngles(entity wz, vector ang) ang = AnglesTransform_ApplyToVAngles(wz.warpzone_transform, ang); #ifdef KEEP_ROLL - ang = AnglesTransform_Normalize(ang, TRUE); + ang = AnglesTransform_Normalize(ang, true); ang = AnglesTransform_CancelRoll(ang); ang_z = roll; #else - ang = AnglesTransform_Normalize(ang, FALSE); + ang = AnglesTransform_Normalize(ang, false); #endif return ang; @@ -548,7 +548,7 @@ vector WarpZone_UnTransformVAngles(entity wz, vector ang) ang_z = 0; ang = AnglesTransform_ApplyToVAngles(AnglesTransform_Invert(wz.warpzone_transform), ang); - ang = AnglesTransform_Normalize(ang, TRUE); + ang = AnglesTransform_Normalize(ang, true); ang = AnglesTransform_CancelRoll(ang); ang_z = roll; diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index 6786e3fd1..a8b6900cb 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -26,7 +26,7 @@ void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector setorigin (player, to); // NOTE: this also aborts the move, when this is called by touch player.oldorigin = to; // for DP's unsticking player.angles = to_angles; - player.fixangle = TRUE; + player.fixangle = true; player.velocity = to_velocity; BITXOR_ASSIGN(player.effects, EF_TELEPORT_BIT); @@ -43,7 +43,7 @@ float WarpZone_Teleported_Send(entity to, float sf) WriteCoord(MSG_ENTITY, self.angles.x); WriteCoord(MSG_ENTITY, self.angles.y); WriteCoord(MSG_ENTITY, self.angles.z); - return TRUE; + return true; } float WarpZone_Teleport(entity wz, entity player, float f0, float f1) @@ -119,7 +119,7 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1) if(IS_PLAYER(player)) { // instead of fixangle, send the transform to the client for smoother operation - player.fixangle = FALSE; + player.fixangle = false; entity ts = spawn(); setmodel(ts, "null"); @@ -254,7 +254,7 @@ float WarpZone_Send(entity to, float sendflags) WriteShort(MSG_ENTITY, self.warpzone_fadeend); } - return TRUE; + return true; } float WarpZone_Camera_Send(entity to, float sendflags) @@ -299,7 +299,7 @@ float WarpZone_Camera_Send(entity to, float sendflags) WriteShort(MSG_ENTITY, self.warpzone_fadeend); } - return TRUE; + return true; } #ifdef WARPZONELIB_KEEPDEBUG @@ -373,7 +373,7 @@ float WarpZone_CheckProjectileImpact(entity player) float WarpZone_Projectile_Touch() { if(other.classname == "trigger_warpzone") - return TRUE; + return true; // no further impacts if we teleported this frame! // this is because even if we did teleport, the engine still may raise @@ -382,7 +382,7 @@ float WarpZone_Projectile_Touch() // but if this is called from TouchAreaGrid of the projectile moving, // then this won't do if(time == self.warpzone_teleport_time) - return TRUE; + return true; #ifdef WARPZONELIB_KEEPDEBUG // this SEEMS to not happen at the moment, but if it did, it would be more reliable @@ -433,9 +433,9 @@ float WarpZone_Projectile_Touch() #endif if(WarpZone_Projectile_Touch_ImpactFilter_Callback()) - return TRUE; + return true; - return FALSE; + return false; } void WarpZone_InitStep_FindOriginTarget() diff --git a/qcsrc/warpzonelib/util_server.qc b/qcsrc/warpzonelib/util_server.qc index daa8e6ddc..8beea9c76 100644 --- a/qcsrc/warpzonelib/util_server.qc +++ b/qcsrc/warpzonelib/util_server.qc @@ -19,11 +19,11 @@ float WarpZoneLib_MoveOutOfSolid(entity e) o = e.origin; traceline(o, o, MOVE_WORLDONLY, e); if (trace_startsolid) - return FALSE; + return false; tracebox(o, e.mins, e.maxs, o, MOVE_WORLDONLY, e); if (!trace_startsolid) - return TRUE; + return true; m0 = e.mins; m1 = e.maxs; @@ -47,10 +47,10 @@ float WarpZoneLib_MoveOutOfSolid(entity e) if (trace_startsolid) { setorigin(e, o); - return FALSE; + return false; } - return TRUE; + return true; } float WarpZoneLib_ExactTrigger_Touch() -- 2.39.2