From 1ba59bdc6b1e1ad0368f34dbd297e40cc42be243 Mon Sep 17 00:00:00 2001 From: TimePath Date: Fri, 30 Jan 2015 10:29:58 +1100 Subject: [PATCH] Fix whitespace for #include --- qcsrc/client/autocvars.qh | 2 +- qcsrc/client/bgmscript.qh | 2 +- qcsrc/client/command/cl_cmd.qh | 2 +- qcsrc/client/credit.txt | 2 +- qcsrc/client/damage.qc | 2 +- qcsrc/client/damage.qh | 2 +- qcsrc/client/defs.qh | 2 +- qcsrc/client/gibs.qh | 2 +- qcsrc/client/hud.qc | 22 ++--- qcsrc/client/mapvoting.qc | 48 +++++------ qcsrc/client/mapvoting.qh | 2 +- qcsrc/client/miscfunctions.qh | 2 +- qcsrc/client/modeleffects.qh | 2 +- qcsrc/client/movetypes.qc | 2 +- qcsrc/client/movetypes.qh | 2 +- qcsrc/client/noise.qh | 2 +- qcsrc/client/particles.qh | 2 +- qcsrc/client/player_skeleton.qh | 2 +- qcsrc/client/prandom.qh | 2 +- qcsrc/client/progs.src | 2 +- qcsrc/client/rubble.qh | 2 +- qcsrc/client/scoreboard.qh | 2 +- qcsrc/client/shownames.qh | 2 +- qcsrc/client/sortlist.qh | 2 +- qcsrc/client/sys-post.qh | 2 +- qcsrc/client/sys-pre.qh | 2 +- qcsrc/client/target_music.qh | 2 +- qcsrc/client/teamradar.qh | 2 +- qcsrc/client/tturrets.qh | 2 +- qcsrc/client/tuba.qh | 2 +- qcsrc/client/vehicles/vehicles.qh | 2 +- qcsrc/client/view.qc | 2 +- qcsrc/client/wall.qh | 2 +- qcsrc/client/waypointsprites.qh | 2 +- qcsrc/client/weapons/projectile.qh | 2 +- qcsrc/common/animdecide.qh | 2 +- qcsrc/common/buffs.qh | 4 +- qcsrc/common/campaign_common.qh | 2 +- qcsrc/common/command/generic.qc | 6 +- qcsrc/common/command/generic.qh | 2 +- qcsrc/common/command/markup.qh | 2 +- qcsrc/common/command/rpn.qh | 2 +- qcsrc/common/command/shared_defs.qh | 2 +- qcsrc/common/constants.qh | 2 +- qcsrc/common/counting.qh | 2 +- qcsrc/common/csqcmodel_settings.qh | 2 +- qcsrc/common/deathtypes.qh | 2 +- qcsrc/common/monsters/all.qh | 2 +- qcsrc/common/monsters/monsters.qh | 2 +- qcsrc/common/monsters/spawn.qc | 2 +- qcsrc/common/monsters/spawn.qh | 2 +- qcsrc/common/monsters/sv_monsters.qc | 22 ++--- qcsrc/common/monsters/sv_monsters.qh | 2 +- qcsrc/common/nades.qc | 4 +- qcsrc/common/nades.qh | 4 +- qcsrc/common/net_notice.qh | 2 +- qcsrc/common/notifications.qh | 4 +- qcsrc/common/playerstats.qh | 2 +- qcsrc/common/stats.qh | 2 +- qcsrc/common/teams.qh | 2 +- qcsrc/common/test.qh | 2 +- qcsrc/common/urllib.qh | 2 +- qcsrc/common/util-pre.qh | 2 +- qcsrc/common/util.qh | 2 +- qcsrc/common/weapons/all.qh | 2 +- qcsrc/common/weapons/calculations.qc | 2 +- qcsrc/common/weapons/calculations.qh | 2 +- qcsrc/common/weapons/config.qc | 2 +- qcsrc/common/weapons/config.qh | 4 +- qcsrc/common/weapons/w_arc.qc | 54 ++++++------ qcsrc/common/weapons/w_blaster.qc | 24 +++--- qcsrc/common/weapons/w_crylink.qc | 22 ++--- qcsrc/common/weapons/w_devastator.qc | 22 ++--- qcsrc/common/weapons/w_electro.qc | 22 ++--- qcsrc/common/weapons/w_fireball.qc | 6 +- qcsrc/common/weapons/w_hagar.qc | 48 +++++------ qcsrc/common/weapons/w_hlac.qc | 10 +-- qcsrc/common/weapons/w_hmg.qc | 2 +- qcsrc/common/weapons/w_hook.qc | 24 +++--- qcsrc/common/weapons/w_machinegun.qc | 6 +- qcsrc/common/weapons/w_minelayer.qc | 18 ++-- qcsrc/common/weapons/w_mortar.qc | 22 ++--- qcsrc/common/weapons/w_porto.qc | 10 +-- qcsrc/common/weapons/w_rifle.qc | 8 +- qcsrc/common/weapons/w_shockwave.qc | 64 +++++++-------- qcsrc/common/weapons/w_shotgun.qc | 2 +- qcsrc/common/weapons/w_tuba.qc | 6 +- qcsrc/common/weapons/w_vaporizer.qc | 10 +-- qcsrc/common/weapons/w_vortex.qc | 10 +-- qcsrc/common/weapons/weapons.qc | 4 +- qcsrc/common/weapons/weapons.qh | 2 +- qcsrc/csqcmodellib/cl_model.qh | 2 +- qcsrc/csqcmodellib/cl_player.qh | 2 +- qcsrc/csqcmodellib/common.qh | 2 +- qcsrc/csqcmodellib/interpolate.qh | 2 +- qcsrc/csqcmodellib/settings.qh | 2 +- qcsrc/csqcmodellib/sv_model.qh | 2 +- qcsrc/dpdefs/csprogsdefs.qh | 2 +- qcsrc/dpdefs/keycodes.qh | 2 +- qcsrc/dpdefs/menudefs.qh | 2 +- qcsrc/dpdefs/progsdefs.qh | 2 +- qcsrc/menu/command/menu_cmd.qh | 2 +- qcsrc/menu/draw.qh | 2 +- qcsrc/menu/oo/base.qh | 2 +- qcsrc/menu/oo/implementation.qh | 2 +- qcsrc/menu/oo/interface.qh | 2 +- qcsrc/menu/progs.src | 2 +- qcsrc/menu/skin.qh | 2 +- qcsrc/menu/sys-post.qh | 2 +- qcsrc/menu/sys-pre.qh | 2 +- .../menu/xonotic/dialog_multiplayer_create.qc | 2 +- .../menu/xonotic/dialog_multiplayer_media.qc | 2 +- .../dialog_multiplayer_media_screenshot.qc | 6 +- .../xonotic/dialog_multiplayer_profile.qc | 2 +- qcsrc/menu/xonotic/dialog_settings_game.qc | 6 +- .../xonotic/dialog_settings_game_crosshair.qc | 6 +- .../xonotic/dialog_settings_game_messages.qc | 4 +- .../xonotic/dialog_settings_game_model.qc | 2 +- .../menu/xonotic/dialog_settings_game_view.qc | 2 +- qcsrc/menu/xonotic/gametypelist.qc | 2 +- qcsrc/menu/xonotic/mainwindow.qc | 8 +- qcsrc/menu/xonotic/serverlist.qc | 36 ++++---- qcsrc/menu/xonotic/slider_particles.qc | 2 +- qcsrc/menu/xonotic/statslist.qc | 14 ++-- qcsrc/server/anticheat.qh | 2 +- qcsrc/server/antilag.qh | 2 +- qcsrc/server/autocvars.qh | 2 +- qcsrc/server/bot/aim.qh | 2 +- qcsrc/server/bot/havocbot/havocbot.qh | 2 +- qcsrc/server/bot/navigation.qh | 2 +- qcsrc/server/campaign.qh | 2 +- qcsrc/server/cheats.qh | 2 +- qcsrc/server/cl_impulse.qh | 2 +- qcsrc/server/command/banning.qh | 2 +- qcsrc/server/command/cmd.qc | 26 +++--- qcsrc/server/command/cmd.qh | 2 +- qcsrc/server/command/common.qh | 2 +- qcsrc/server/command/sv_cmd.qh | 2 +- qcsrc/server/command/vote.qh | 2 +- qcsrc/server/g_damage.qc | 20 ++--- qcsrc/server/g_damage.qh | 2 +- qcsrc/server/g_hook.qh | 2 +- qcsrc/server/g_subs.qh | 2 +- qcsrc/server/g_triggers.qh | 2 +- qcsrc/server/g_violence.qh | 2 +- qcsrc/server/g_world.qc | 6 +- qcsrc/server/g_world.qh | 2 +- qcsrc/server/ipban.qh | 2 +- qcsrc/server/item_key.qh | 2 +- qcsrc/server/mapvoting.qc | 54 ++++++------ qcsrc/server/mapvoting.qh | 2 +- qcsrc/server/movelib.qh | 2 +- qcsrc/server/mutators/base.qh | 2 +- qcsrc/server/mutators/gamemode_ca.qh | 2 +- qcsrc/server/mutators/gamemode_ctf.qh | 2 +- qcsrc/server/mutators/gamemode_cts.qc | 8 +- qcsrc/server/mutators/gamemode_cts.qh | 2 +- qcsrc/server/mutators/gamemode_domination.qc | 2 +- qcsrc/server/mutators/gamemode_domination.qh | 2 +- qcsrc/server/mutators/gamemode_invasion.qc | 24 +++--- qcsrc/server/mutators/gamemode_invasion.qh | 2 +- qcsrc/server/mutators/gamemode_keepaway.qh | 2 +- qcsrc/server/mutators/gamemode_keyhunt.qh | 2 +- qcsrc/server/mutators/gamemode_lms.qh | 2 +- qcsrc/server/mutators/gamemode_nexball.qh | 2 +- qcsrc/server/mutators/gamemode_onslaught.qc | 10 +-- qcsrc/server/mutators/gamemode_race.qc | 6 +- qcsrc/server/mutators/gamemode_race.qh | 2 +- qcsrc/server/mutators/mutator_buffs.qc | 82 +++++++++---------- qcsrc/server/mutators/mutator_buffs.qh | 2 +- qcsrc/server/mutators/mutator_dodging.qh | 2 +- qcsrc/server/mutators/mutator_instagib.qc | 4 +- qcsrc/server/mutators/mutator_nades.qc | 38 ++++----- qcsrc/server/mutators/mutator_nades.qh | 2 +- qcsrc/server/mutators/mutator_nix.qc | 2 +- qcsrc/server/mutators/mutator_overkill.qc | 6 +- qcsrc/server/mutators/mutator_overkill.qh | 2 +- qcsrc/server/mutators/mutators.qh | 2 +- qcsrc/server/mutators/mutators_include.qh | 2 +- qcsrc/server/mutators/sandbox.qc | 4 +- qcsrc/server/pathlib/pathlib.qh | 2 +- qcsrc/server/playerdemo.qh | 2 +- qcsrc/server/portals.qh | 2 +- qcsrc/server/progs.src | 2 +- qcsrc/server/race.qh | 2 +- qcsrc/server/round_handler.qh | 2 +- qcsrc/server/scores.qh | 2 +- qcsrc/server/secret.qh | 2 +- qcsrc/server/spawnpoints.qh | 2 +- qcsrc/server/t_items.qc | 4 +- qcsrc/server/t_items.qh | 2 +- qcsrc/server/t_jumppads.qh | 2 +- qcsrc/server/t_plats.qc | 2 +- qcsrc/server/t_teleporters.qh | 2 +- qcsrc/server/teamplay.qh | 2 +- qcsrc/server/tturrets/include/turrets.qh | 2 +- .../server/tturrets/include/turrets_early.qh | 2 +- qcsrc/server/vehicles/bumblebee.qh | 2 +- qcsrc/server/vehicles/vehicles.qh | 2 +- qcsrc/server/vehicles/vehicles_def.qh | 2 +- qcsrc/server/waypointsprites.qh | 2 +- qcsrc/server/weapons/accuracy.qh | 2 +- qcsrc/server/weapons/common.qc | 8 +- qcsrc/server/weapons/common.qh | 2 +- qcsrc/server/weapons/csqcprojectile.qh | 2 +- qcsrc/server/weapons/hitplot.qh | 2 +- qcsrc/server/weapons/spawning.qh | 2 +- qcsrc/server/weapons/throwing.qc | 6 +- qcsrc/server/weapons/throwing.qh | 2 +- qcsrc/server/weapons/weaponstats.qh | 2 +- qcsrc/server/weapons/weaponsystem.qh | 2 +- qcsrc/warpzonelib/anglestransform.qh | 2 +- qcsrc/warpzonelib/client.qh | 2 +- qcsrc/warpzonelib/common.qh | 2 +- qcsrc/warpzonelib/mathlib.qh | 2 +- qcsrc/warpzonelib/server.qh | 2 +- qcsrc/warpzonelib/util_server.qh | 2 +- qcsrc/whitespace.sh | 8 ++ 218 files changed, 621 insertions(+), 613 deletions(-) create mode 100755 qcsrc/whitespace.sh diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 4ce4efe4e..e35bf82dd 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -469,4 +469,4 @@ vector autocvar_crosshair_rpc_color = '0.2 1.0 0.2'; float autocvar_crosshair_rpc_alpha = 1; float autocvar_crosshair_rpc_size = 1; int autocvar_cl_nade_timer; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/bgmscript.qh b/qcsrc/client/bgmscript.qh index 1590e594d..910ef6b5d 100644 --- a/qcsrc/client/bgmscript.qh +++ b/qcsrc/client/bgmscript.qh @@ -11,4 +11,4 @@ void BGMScript_InitEntity(entity e); float BGMScript(entity e); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/command/cl_cmd.qh b/qcsrc/client/command/cl_cmd.qh index 31da5a299..da34310e3 100644 --- a/qcsrc/client/command/cl_cmd.qh +++ b/qcsrc/client/command/cl_cmd.qh @@ -10,4 +10,4 @@ void Cmd_HUD_Help(); // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void LocalCommand_macro_write_aliases(int fh); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/credit.txt b/qcsrc/client/credit.txt index 1b06bb80d..b07ec4a09 100644 --- a/qcsrc/client/credit.txt +++ b/qcsrc/client/credit.txt @@ -1,3 +1,3 @@ Credits go to Dresk for putting this CSQC scratch source together. -and Urre :o \ No newline at end of file +and Urre :o diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index 7d855e37c..000ef8bcc 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -102,7 +102,7 @@ void DamageEffect(vector hitorg, float dmg, int type, int specnum) { specstr = species_prefix(specnum); specstr = substring(specstr, 0, strlen(specstr) - 1); - effectname = strreplace("BLOOD", specstr, effectname); + effectname = strreplace("BLOOD", specstr, effectname); } else { return; } // objects don't bleed } diff --git a/qcsrc/client/damage.qh b/qcsrc/client/damage.qh index 2498e23ee..7c5c74130 100644 --- a/qcsrc/client/damage.qh +++ b/qcsrc/client/damage.qh @@ -2,4 +2,4 @@ #define DAMAGE_H .float total_damages; // number of effects which currently are attached to a player -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/defs.qh b/qcsrc/client/defs.qh index 4ae2a0696..82c43e2e2 100644 --- a/qcsrc/client/defs.qh +++ b/qcsrc/client/defs.qh @@ -131,4 +131,4 @@ float uid2name_dialog; #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1) float g_balance_porto_secondary; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/gibs.qh b/qcsrc/client/gibs.qh index e863ddf3c..b33a1a5e0 100644 --- a/qcsrc/client/gibs.qh +++ b/qcsrc/client/gibs.qh @@ -24,4 +24,4 @@ void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector void Ent_GibSplash(bool isNew); void GibSplash_Precache(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index e88c25007..492b0d435 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -846,12 +846,12 @@ void HUD_Weapons(void) // Ammo (#1) void DrawNadeScoreBar(vector myPos, vector mySize, vector color) { - + HUD_Panel_DrawProgressBar( myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize.x, mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize.x, - autocvar_hud_panel_ammo_progressbar_name, - getstatf(STAT_NADE_BONUS_SCORE), 0, 0, color, + autocvar_hud_panel_ammo_progressbar_name, + getstatf(STAT_NADE_BONUS_SCORE), 0, 0, color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); } @@ -860,12 +860,12 @@ void DrawAmmoNades(vector myPos, vector mySize, float draw_expanding, float expa { float theAlpha = 1, a, b; vector nade_color, picpos, numpos; - + nade_color = Nade_Color(getstati(STAT_NADE_BONUS_TYPE)); - + a = getstatf(STAT_NADE_BONUS); b = getstatf(STAT_NADE_BONUS_SCORE); - + if(autocvar_hud_panel_ammo_iconalign) { numpos = myPos; @@ -883,10 +883,10 @@ void DrawAmmoNades(vector myPos, vector mySize, float draw_expanding, float expa { if(autocvar_hud_panel_ammo_text) drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); - + if(draw_expanding) drawpic_aspect_skin_expanding(picpos, "nade_nbg", '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL, expand_time); - + drawpic_aspect_skin(picpos, "nade_bg" , '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); drawpic_aspect_skin(picpos, "nade_nbg" , '1 1 0' * mySize.y, nade_color, panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); } @@ -1022,7 +1022,7 @@ void HUD_Ammo(void) columns = ceil((total_ammo_count)/rows); ammo_size = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows); - + vector offset = '0 0 0'; // fteqcc sucks float newSize; @@ -4417,7 +4417,7 @@ void HUD_Buffs(void) { buffs = Buff_Type_first.items; // force first buff } - + float b = 0; // counter to tell other functions that we have buffs entity e; string s = ""; @@ -4450,7 +4450,7 @@ void HUD_Buffs(void) //float is_vertical = (panel_ar < 1); //float buff_iconalign = autocvar_hud_panel_buffs_iconalign; vector buff_offset = '0 0 0'; - + for(e = Buff_Type_first; e; e = e.enemy) if(buffs & e.items) { //DrawNumIcon(pos + buff_offset, mySize, shield, "shield", is_vertical, buff_iconalign, '1 1 1', 1); diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index c40fae42b..28b81fc51 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -50,14 +50,14 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g vector rgb = MapVote_RGB(id); vector offset = pos; float nlines = 0; - + if(mv_avail_start[id] != GTV_AVAILABLE) alpha = 0.2; else if ( mv_avail[id] != GTV_AVAILABLE && mv_top2_alpha) alpha = mv_top2_alpha; else alpha = 1; - + if(id == mv_selection && mv_avail[id] == GTV_AVAILABLE) { drawfill(rect_pos, rect_size, '1 1 1', 0.1, DRAWFLAG_NORMAL); @@ -67,29 +67,29 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g drawfill(rect_pos, rect_size, rgb, 0.1*alpha, DRAWFLAG_NORMAL); drawborderlines(autocvar_scoreboard_border_thickness, rect_pos, rect_size, rgb, alpha, DRAWFLAG_NORMAL); } - + entity title; title = spawn(); - title.message = MapVote_FormatMapItem(id, MapInfo_Type_ToText(MapInfo_Type_FromString(gtype)), + title.message = MapVote_FormatMapItem(id, MapInfo_Type_ToText(MapInfo_Type_FromString(gtype)), _count, tsize, gtv_text_size); title.origin = pos-offset; - + pos.y += gtv_text_size_small.y; pos.y += gtv_text_size.y/2; - + maxh -= gtv_text_size.y; - + entity picent = spawn(); picent.origin = pos-offset; picent.maxs = '1 1 0 ' * min(maxh, desc_padding) * 0.8; - + pos.x += desc_padding; tsize -= desc_padding; - + string thelabel = GameTypeVote_DescriptionByID(id), ts; entity last = title; entity next = world; - if( thelabel != "") + if( thelabel != "") { float i,n = tokenizebyseparator(thelabel, "\n"); for(i = 0; i < n && maxh > (nlines+1)*gtv_text_size_small.y; ++i) @@ -111,15 +111,15 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g } } } - + maxh -= max(nlines*gtv_text_size_small.y,picent.maxs.y); if ( maxh > 0 ) offset.y += maxh/2; - drawstring(title.origin+offset, title.message, gtv_text_size, rgb, alpha, DRAWFLAG_NORMAL); - + drawstring(title.origin+offset, title.message, gtv_text_size, rgb, alpha, DRAWFLAG_NORMAL); + if(pic != "") drawpic(picent.origin+offset, pic, picent.maxs, '1 1 1', alpha, DRAWFLAG_NORMAL); - + for ( last = title.chain; last ; ) { drawstring(last.origin+offset, last.message, gtv_text_size_small, '1 1 1', alpha, DRAWFLAG_NORMAL); @@ -127,7 +127,7 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g last = last.chain; remove(next); } - + remove(picent); remove(title); } @@ -242,7 +242,7 @@ float MapVote_Selection(vector topleft, vector cellsize, float rows, float colum if ( mv_selection_keyboard ) return mv_selection; - + return mv_mouse_selection; } @@ -266,7 +266,7 @@ void MapVote_Draw() vector mpos = mv_mousepos + getmousepos(); mpos.x = bound(0, mpos.x, vid_conwidth); mpos.y = bound(0, mpos.y, vid_conheight); - + if ( mpos.x != mv_mousepos.x || mpos.y != mv_mousepos.y ) mv_selection_keyboard = 0; mv_mousepos = mpos; @@ -456,7 +456,7 @@ void MapVote_ReadMask() mask = ReadShort(); else mask = ReadLong(); - + for(i = 0, power = 1; i < mv_num_maps; ++i, power *= 2) mv_avail[i] = (mask & power) ? GTV_AVAILABLE : GTV_FORBIDDEN; } @@ -500,7 +500,7 @@ void MapVote_Init() mv_timeout = ReadCoord(); gametypevote = ReadByte(); - + float mv_real_num_maps = mv_num_maps - mv_abstain; if(gametypevote) @@ -511,7 +511,7 @@ void MapVote_Init() gtv_text_size = hud_fontsize*1.4; gtv_text_size_small = hud_fontsize*1.1; - + if (mv_real_num_maps > 8 ) mv_columns = 3; else @@ -581,7 +581,7 @@ void MapVote_SendChoice(float index) int MapVote_MoveLeft(int pos) { int imp; - if ( pos < 0 ) + if ( pos < 0 ) imp = mv_num_maps - 1; else imp = pos < 1 ? mv_num_maps - 1 : pos - 1; @@ -592,7 +592,7 @@ int MapVote_MoveLeft(int pos) int MapVote_MoveRight(int pos) { int imp; - if ( pos < 0 ) + if ( pos < 0 ) imp = 0; else imp = pos >= mv_num_maps - 1 ? 0 : pos + 1; @@ -603,7 +603,7 @@ int MapVote_MoveRight(int pos) int MapVote_MoveUp(int pos) { int imp; - if ( pos < 0 ) + if ( pos < 0 ) imp = mv_num_maps - 1; else { @@ -622,7 +622,7 @@ int MapVote_MoveUp(int pos) int MapVote_MoveDown(int pos) { int imp; - if ( pos < 0 ) + if ( pos < 0 ) imp = 0; else { diff --git a/qcsrc/client/mapvoting.qh b/qcsrc/client/mapvoting.qh index 94717a202..8a4133e50 100644 --- a/qcsrc/client/mapvoting.qh +++ b/qcsrc/client/mapvoting.qh @@ -78,4 +78,4 @@ void MapVote_UpdateVotes(); void Ent_MapVote(); void Net_MapVote_Picture(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/miscfunctions.qh b/qcsrc/client/miscfunctions.qh index 323fbd0c7..6c643962a 100644 --- a/qcsrc/client/miscfunctions.qh +++ b/qcsrc/client/miscfunctions.qh @@ -162,4 +162,4 @@ void Accuracy_LoadColors(); vector Accuracy_GetColor(float accuracy); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/modeleffects.qh b/qcsrc/client/modeleffects.qh index df500b86b..f40cfef55 100644 --- a/qcsrc/client/modeleffects.qh +++ b/qcsrc/client/modeleffects.qh @@ -9,4 +9,4 @@ void ModelEffect_Draw(); void Ent_ModelEffect(bool isNew); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/movetypes.qc b/qcsrc/client/movetypes.qc index d58b1ceff..2f62ae6dc 100644 --- a/qcsrc/client/movetypes.qc +++ b/qcsrc/client/movetypes.qc @@ -61,7 +61,7 @@ float _Movetype_CheckWater(entity ent) // SV_CheckWater void _Movetype_CheckWaterTransition(entity ent) // SV_CheckWaterTransition { float contents = pointcontents(ent.move_origin); - + if(!ent.move_watertype) { // just spawned here diff --git a/qcsrc/client/movetypes.qh b/qcsrc/client/movetypes.qh index 0145f551d..3294ce427 100644 --- a/qcsrc/client/movetypes.qh +++ b/qcsrc/client/movetypes.qh @@ -41,4 +41,4 @@ const int MOVETYPE_FLY_WORLDONLY = 33; const int FL_ITEM = 256; const int FL_ONGROUND = 512; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/noise.qh b/qcsrc/client/noise.qh index d0196be08..2b18adee5 100644 --- a/qcsrc/client/noise.qh +++ b/qcsrc/client/noise.qh @@ -6,4 +6,4 @@ float Noise_Brown(entity e, float dt); float Noise_Pink(entity e, float dt); float Noise_White(entity e, float dt); float Noise_Burst(entity e, float dt, float p); // +1 or -1 -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/particles.qh b/qcsrc/client/particles.qh index ea9c5b660..12c999ba2 100644 --- a/qcsrc/client/particles.qh +++ b/qcsrc/client/particles.qh @@ -29,4 +29,4 @@ void Draw_Snow(); void Ent_RainOrSnow(); void Net_ReadVortexBeamParticle(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/player_skeleton.qh b/qcsrc/client/player_skeleton.qh index 65dec0a36..6c95ce231 100644 --- a/qcsrc/client/player_skeleton.qh +++ b/qcsrc/client/player_skeleton.qh @@ -10,4 +10,4 @@ void skeleton_loadinfo(entity e); .float bone_aim[MAX_AIM_BONES]; .float bone_aimweight[MAX_AIM_BONES]; .float fixbone; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/prandom.qh b/qcsrc/client/prandom.qh index 3ba1c475b..a7653a505 100644 --- a/qcsrc/client/prandom.qh +++ b/qcsrc/client/prandom.qh @@ -21,4 +21,4 @@ void prandom_debug(); #define psrandom(x) #define prandom_debug() #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/progs.src b/qcsrc/client/progs.src index 650c16c4f..505a5cf9b 100644 --- a/qcsrc/client/progs.src +++ b/qcsrc/client/progs.src @@ -72,4 +72,4 @@ weapons/projectile.qc // TODO ../warpzonelib/anglestransform.qc ../warpzonelib/client.qc ../warpzonelib/common.qc -../warpzonelib/mathlib.qc \ No newline at end of file +../warpzonelib/mathlib.qc diff --git a/qcsrc/client/rubble.qh b/qcsrc/client/rubble.qh index b907adc25..5ff1b5577 100644 --- a/qcsrc/client/rubble.qh +++ b/qcsrc/client/rubble.qh @@ -3,4 +3,4 @@ .float creationtime; void RubbleLimit(string cname, float limit, void() deleteproc); entity RubbleNew(string cname); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/scoreboard.qh b/qcsrc/client/scoreboard.qh index f2b155fb1..c0326eb78 100644 --- a/qcsrc/client/scoreboard.qh +++ b/qcsrc/client/scoreboard.qh @@ -11,4 +11,4 @@ void HUD_InitScores(); void HUD_UpdatePlayerPos(entity pl); void HUD_UpdateTeamPos(entity Team); float HUD_WouldDrawScoreboard(void); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/shownames.qh b/qcsrc/client/shownames.qh index 4074f7a70..f196f8f83 100644 --- a/qcsrc/client/shownames.qh +++ b/qcsrc/client/shownames.qh @@ -6,4 +6,4 @@ .float sameteam; .float fadedelay; .float pointtime; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/sortlist.qh b/qcsrc/client/sortlist.qh index 17512342e..1b8428713 100644 --- a/qcsrc/client/sortlist.qh +++ b/qcsrc/client/sortlist.qh @@ -19,4 +19,4 @@ entity Sort_Spawn(); a.sort_prev = b; \ b.sort_next = a -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/sys-post.qh b/qcsrc/client/sys-post.qh index c2b43cdf0..5dc83ef95 100644 --- a/qcsrc/client/sys-post.qh +++ b/qcsrc/client/sys-post.qh @@ -4,4 +4,4 @@ #pragma noref 0 #undef ATTEN_NORM -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/sys-pre.qh b/qcsrc/client/sys-pre.qh index c8e8c9d07..9764040b3 100644 --- a/qcsrc/client/sys-pre.qh +++ b/qcsrc/client/sys-pre.qh @@ -5,4 +5,4 @@ #pragma noref 1 -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/target_music.qh b/qcsrc/client/target_music.qh index 5a1538902..c685214be 100644 --- a/qcsrc/client/target_music.qh +++ b/qcsrc/client/target_music.qh @@ -19,4 +19,4 @@ void Ent_TriggerMusic_Think(); void Ent_TriggerMusic_Remove(); void Ent_ReadTriggerMusic(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/teamradar.qh b/qcsrc/client/teamradar.qh index 777098a99..31defc8ef 100644 --- a/qcsrc/client/teamradar.qh +++ b/qcsrc/client/teamradar.qh @@ -52,4 +52,4 @@ void teamradar_loadcvars(); void Ent_RadarLink(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/tturrets.qh b/qcsrc/client/tturrets.qh index 767e5112d..6316d795b 100644 --- a/qcsrc/client/tturrets.qh +++ b/qcsrc/client/tturrets.qh @@ -6,4 +6,4 @@ void ent_turret(); void turrets_precache(); .entity tur_head; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/tuba.qh b/qcsrc/client/tuba.qh index e84300972..81517b4e4 100644 --- a/qcsrc/client/tuba.qh +++ b/qcsrc/client/tuba.qh @@ -25,4 +25,4 @@ void Ent_TubaNote_StopSound(); void Ent_TubaNote(float bIsNew); void Tuba_Precache(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/vehicles/vehicles.qh b/qcsrc/client/vehicles/vehicles.qh index 19bce0c7e..7e509e91e 100644 --- a/qcsrc/client/vehicles/vehicles.qh +++ b/qcsrc/client/vehicles/vehicles.qh @@ -6,4 +6,4 @@ void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang); void Vehicles_Precache(); void Net_AuXair2(bool bIsNew); void Net_VehicleSetup(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 6efd6c54a..da621ebff 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1491,7 +1491,7 @@ void CSQC_UpdateView(float w, float h) if(zoomscript_caught) f = 1; - else + else f = current_zoomfraction; if(f) diff --git a/qcsrc/client/wall.qh b/qcsrc/client/wall.qh index 4a3955e6f..984b54c88 100644 --- a/qcsrc/client/wall.qh +++ b/qcsrc/client/wall.qh @@ -12,4 +12,4 @@ void Ent_Wall_Draw(); void Ent_Wall_Remove(); void Ent_Wall(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/waypointsprites.qh b/qcsrc/client/waypointsprites.qh index aff39639e..3822793da 100644 --- a/qcsrc/client/waypointsprites.qh +++ b/qcsrc/client/waypointsprites.qh @@ -83,4 +83,4 @@ void WaypointSprite_Load_Frames(string ext); void WaypointSprite_Load(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/client/weapons/projectile.qh b/qcsrc/client/weapons/projectile.qh index c6076f2fe..3a4cdcb04 100644 --- a/qcsrc/client/weapons/projectile.qh +++ b/qcsrc/client/weapons/projectile.qh @@ -32,4 +32,4 @@ void Ent_Projectile(); void Projectile_Precache(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/animdecide.qh b/qcsrc/common/animdecide.qh index 885a11608..9dc7cf7db 100644 --- a/qcsrc/common/animdecide.qh +++ b/qcsrc/common/animdecide.qh @@ -48,4 +48,4 @@ const int ANIMACTION_PAIN2 = 3; // pain const int ANIMACTION_SHOOT = 4; // shoot const int ANIMACTION_TAUNT = 5; // taunt const int ANIMACTION_MELEE = 6; // melee -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/buffs.qh b/qcsrc/common/buffs.qh index a36ae3f6c..a629de607 100644 --- a/qcsrc/common/buffs.qh +++ b/qcsrc/common/buffs.qh @@ -61,7 +61,7 @@ void buff_Init_Compat(entity ent, int replacement); BUFF_SPAWNFUNC(e##_team1, b, NUM_TEAM_1) \ BUFF_SPAWNFUNC(e##_team2, b, NUM_TEAM_2) \ BUFF_SPAWNFUNC(e##_team3, b, NUM_TEAM_3) \ - BUFF_SPAWNFUNC(e##_team4, b, NUM_TEAM_4) + BUFF_SPAWNFUNC(e##_team4, b, NUM_TEAM_4) BUFF_SPAWNFUNCS(resistance, BUFF_RESISTANCE) BUFF_SPAWNFUNCS(ammo, BUFF_AMMO) @@ -94,4 +94,4 @@ int Buff_Type_FromName(string buff_name); int Buff_Type_FromSprite(string buff_sprite); int Buff_Skin(int buff_id); string Buff_Sprite(int buff_id); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/campaign_common.qh b/qcsrc/common/campaign_common.qh index 21af40149..3f494a463 100644 --- a/qcsrc/common/campaign_common.qh +++ b/qcsrc/common/campaign_common.qh @@ -31,4 +31,4 @@ void CampaignFile_Unload(); // Sets up the campaign for the n-th array item (meaning: campaign_offset+nth // level) using localcmd() void CampaignSetup(float n); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index 931e2f679..7f302e0a2 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -278,7 +278,7 @@ void GenericCommand_dumpweapons(float request) // WEAPONTODO: make this work wit wep_config_file = -1; wep_config_alsoprint = -1; string filename = argv(1); - + if(filename == "") { filename = "weapons_dump.cfg"; @@ -290,7 +290,7 @@ void GenericCommand_dumpweapons(float request) // WEAPONTODO: make this work wit wep_config_alsoprint = true; } wep_config_file = fopen(filename, FILE_WRITE); - + if(wep_config_file >= 0) { Dump_Weapon_Settings(); @@ -308,7 +308,7 @@ void GenericCommand_dumpweapons(float request) // WEAPONTODO: make this work wit #endif return; } - + default: case CMD_REQUEST_USAGE: { diff --git a/qcsrc/common/command/generic.qh b/qcsrc/common/command/generic.qh index 8858ab74f..0bb09b4e7 100644 --- a/qcsrc/common/command/generic.qh +++ b/qcsrc/common/command/generic.qh @@ -34,4 +34,4 @@ void Curl_URI_Get_Callback(int id, float status, string data); int curl_uri_get_pos; float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL + 1]; string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL + 1]; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/command/markup.qh b/qcsrc/common/command/markup.qh index 5f85499a6..e6ac7cfbd 100644 --- a/qcsrc/common/command/markup.qh +++ b/qcsrc/common/command/markup.qh @@ -12,4 +12,4 @@ string markup_from[NUM_MARKUPS]; string markup_to[NUM_MARKUPS]; string GenericCommand_markup(string s2); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/command/rpn.qh b/qcsrc/common/command/rpn.qh index 44bd66733..a28f2946a 100644 --- a/qcsrc/common/command/rpn.qh +++ b/qcsrc/common/command/rpn.qh @@ -14,4 +14,4 @@ string rpn_stack[MAX_RPN_STACK]; void GenericCommand_rpn(float request, float argc, string command); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/command/shared_defs.qh b/qcsrc/common/command/shared_defs.qh index e7edd3543..0056565a6 100644 --- a/qcsrc/common/command/shared_defs.qh +++ b/qcsrc/common/command/shared_defs.qh @@ -9,4 +9,4 @@ // identifiers for subfunction requests by the command code structure const int CMD_REQUEST_COMMAND = 1; const int CMD_REQUEST_USAGE = 2; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 9e33205af..45a65abbe 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -323,4 +323,4 @@ const int URI_GET_URLLIB_END = 191; const int GTV_AVAILABLE = 0; // for later use in per-map gametype filtering const int GTV_FORBIDDEN = 2; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/counting.qh b/qcsrc/common/counting.qh index 77149f26b..17c5f89bc 100644 --- a/qcsrc/common/counting.qh +++ b/qcsrc/common/counting.qh @@ -218,4 +218,4 @@ string process_time(float outputtype, float seconds) } return ""; } -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/csqcmodel_settings.qh b/qcsrc/common/csqcmodel_settings.qh index 983df2403..5efbc179e 100644 --- a/qcsrc/common/csqcmodel_settings.qh +++ b/qcsrc/common/csqcmodel_settings.qh @@ -81,4 +81,4 @@ const float CSQCPLAYER_FORCE_UPDATES = 0.25; #endif #define CSQCMODEL_EF_RESPAWNGHOST EF_SELECTABLE -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/deathtypes.qh b/qcsrc/common/deathtypes.qh index 0bf387389..301d66576 100644 --- a/qcsrc/common/deathtypes.qh +++ b/qcsrc/common/deathtypes.qh @@ -136,4 +136,4 @@ const int HITTYPE_SPLASH = 0x200; // automatically set by RadiusDamage const int HITTYPE_BOUNCE = 0x400; const int HITTYPE_RESERVED2 = 0x800; const int HITTYPE_RESERVED = 0x1000; // unused yet -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/monsters/all.qh b/qcsrc/common/monsters/all.qh index fec3f630d..c79a4e656 100644 --- a/qcsrc/common/monsters/all.qh +++ b/qcsrc/common/monsters/all.qh @@ -8,4 +8,4 @@ #include "monster/wyvern.qc" #include "monster/shambler.qc" -//#endif \ No newline at end of file +//#endif diff --git a/qcsrc/common/monsters/monsters.qh b/qcsrc/common/monsters/monsters.qh index c21b237bf..6fa9dfaf7 100644 --- a/qcsrc/common/monsters/monsters.qh +++ b/qcsrc/common/monsters/monsters.qh @@ -68,4 +68,4 @@ int MON_LAST; #undef REGISTER_MONSTER ACCUMULATE_FUNCTION(RegisterMonsters, register_monsters_done); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/monsters/spawn.qc b/qcsrc/common/monsters/spawn.qc index 85498f801..8aee54b98 100644 --- a/qcsrc/common/monsters/spawn.qc +++ b/qcsrc/common/monsters/spawn.qc @@ -75,7 +75,7 @@ entity spawnmonster (string monster, float monster_id, entity spawnedby, entity } //monster = strcat("$ spawnfunc_monster_", monster); - + entity oldself = self; self = e; monster_initialize(monster_id); diff --git a/qcsrc/common/monsters/spawn.qh b/qcsrc/common/monsters/spawn.qh index eff27541e..2ebdcc54e 100644 --- a/qcsrc/common/monsters/spawn.qh +++ b/qcsrc/common/monsters/spawn.qh @@ -2,4 +2,4 @@ #define SPAWN_H entity spawnmonster (string monster, float monster_id, entity spawnedby, entity own, vector orig, float respwn, float invincible, float moveflag); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 59bcfa5d0..28430e961 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -502,7 +502,7 @@ vector monster_pickmovetarget(entity targ) vector targ_origin = ((self.enemy.absmin + self.enemy.absmax) * 0.5); targ_origin = WarpZone_RefSys_TransformOrigin(self.enemy, self, targ_origin); // origin of target as seen by the monster (us) WarpZone_TraceLine(self.origin, targ_origin, MOVE_NOMONSTERS, self); - + if((self.enemy == world) || (self.enemy.deadflag != DEAD_NO || self.enemy.health < 1) || (self.enemy.frozen) @@ -516,19 +516,19 @@ vector monster_pickmovetarget(entity targ) self.enemy = world; self.pass_distance = 0; } - + if(self.enemy) { /*WarpZone_TrailParticles(world, particleeffectnum("red_pass"), self.origin, targ_origin); print("Trace origin: ", vtos(targ_origin), "\n"); print("Target origin: ", vtos(self.enemy.origin), "\n"); print("My origin: ", vtos(self.origin), "\n"); */ - + self.monster_movestate = MONSTER_MOVE_ENEMY; self.last_trace = time + 1.2; return targ_origin; } - + /*makevectors(self.angles); self.monster_movestate = MONSTER_MOVE_ENEMY; self.last_trace = time + 1.2; @@ -753,7 +753,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ WarpZone_RefSys_Copy(self.enemy, self); WarpZone_RefSys_AddInverse(self.enemy, self); // wz1^-1 ... wzn^-1 receiver 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); } @@ -793,7 +793,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ { 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)); - + /*&if(self.flags & FL_FLY || self.flags & FL_SWIM) movelib_move_simple(v_forward, ((self.enemy) ? runspeed : walkspeed), 0.6); else @@ -820,9 +820,9 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ if (vlen(self.velocity) <= 30) self.frame = manim_idle; } - + self.steerto = steerlib_attract2(self.moveto, 0.5, 500, 0.95); - + vector real_angle = vectoangles(self.steerto) - self.angles; float turny = 25; if(self.state == MONSTER_STATE_ATTACK_MELEE) @@ -1078,11 +1078,11 @@ void monster_setupcolors(entity mon) void monster_changeteam(entity ent, float newteam) { if(!teamplay) { return; } - + ent.team = newteam; ent.monster_attack = true; // new team, activate attacking monster_setupcolors(ent); - + if(ent.sprite) { WaypointSprite_UpdateTeamRadar(ent.sprite, RADARICON_DANGER, ((newteam) ? Team_ColorRGB(newteam) : '1 0 0')); @@ -1241,7 +1241,7 @@ float monster_initialize(float mon_id) if(mon.spawnflags & MONSTER_SIZE_BROKEN) if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) self.scale *= 1.3; - + setsize(self, mon.mins * self.scale, mon.maxs * self.scale); if(!self.ticrate) diff --git a/qcsrc/common/monsters/sv_monsters.qh b/qcsrc/common/monsters/sv_monsters.qh index 2ec816f7d..f6b149816 100644 --- a/qcsrc/common/monsters/sv_monsters.qh +++ b/qcsrc/common/monsters/sv_monsters.qh @@ -98,4 +98,4 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ void monster_setupcolors(entity mon); float Monster_SkillModifier(); void MonsterTouch (); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/nades.qc b/qcsrc/common/nades.qc index 28a88b6e4..4225a19f0 100644 --- a/qcsrc/common/nades.qc +++ b/qcsrc/common/nades.qc @@ -57,7 +57,7 @@ void healer_setup() setmodel(self, "models/ctf/shield.md3"); setorigin(self, self.origin); - + float model_radius = self.maxs.x; vector size = '1 1 1' * self.healer_radius / 2; setsize(self,-size,size); @@ -93,4 +93,4 @@ void ent_healer() healer_setup(); } } -#endif // CSQC \ No newline at end of file +#endif // CSQC diff --git a/qcsrc/common/nades.qh b/qcsrc/common/nades.qh index 5033a7d05..d11e4eabf 100644 --- a/qcsrc/common/nades.qh +++ b/qcsrc/common/nades.qh @@ -99,7 +99,7 @@ string Nade_TrailEffect(float proj, float nade_team) case PROJECTILE_NADE_MONSTER: return "nade_red"; case PROJECTILE_NADE_MONSTER_BURN: return "nade_red_burn"; } - + return ""; } @@ -111,4 +111,4 @@ float healer_send(entity to, float sf); // misc functions void ent_healer(); #endif // CSQC -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/net_notice.qh b/qcsrc/common/net_notice.qh index 41820bf0c..ba3b9817b 100644 --- a/qcsrc/common/net_notice.qh +++ b/qcsrc/common/net_notice.qh @@ -14,4 +14,4 @@ void sv_notice_join(); void cl_notice_read(); #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 45d04f44d..1cb1adf51 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -734,7 +734,7 @@ void Send_Notification_WOCOVA( MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SUICIDE, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Suicide in ^COUNT"), "") \ MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout begins in ^COUNT"), "") \ MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout ends in ^COUNT"), "") \ - MSG_CENTER_NOTIF(1, CENTER_WEAPON_MINELAYER_LIMIT, 0, 1, "f1", NO_CPID, "0 0", _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "") + MSG_CENTER_NOTIF(1, CENTER_WEAPON_MINELAYER_LIMIT, 0, 1, "f1", NO_CPID, "0 0", _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "") #define MULTITEAM_MULTI2(default,prefix,anncepre,infopre,centerpre) \ MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \ @@ -1649,4 +1649,4 @@ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done); #undef MSG_CHOICE_NOTIF #undef NOTIF_ADD_AUTOCVAR -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/playerstats.qh b/qcsrc/common/playerstats.qh index e7a187e86..e77cdbff5 100644 --- a/qcsrc/common/playerstats.qh +++ b/qcsrc/common/playerstats.qh @@ -116,4 +116,4 @@ void PlayerStats_PlayerDetail(void); void PlayerStats_PlayerDetail_CheckUpdate(void); void PlayerStats_PlayerDetail_Handler(entity fh, entity p, float status); #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index a55b946f7..481713cc9 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -291,4 +291,4 @@ const int STAT_MOVEVARS_MAXAIRSPEED = 252; const int STAT_MOVEVARS_STEPHEIGHT = 253; const int STAT_MOVEVARS_AIRACCEL_QW = 254; const int STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION = 255; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/teams.qh b/qcsrc/common/teams.qh index 67fc37ad5..074835d5e 100644 --- a/qcsrc/common/teams.qh +++ b/qcsrc/common/teams.qh @@ -168,4 +168,4 @@ float Team_TeamToNumber(float teamid) #define APP_TEAM_NUM_4(num,prefix) ((num == NUM_TEAM_1) ? prefix##RED : ((num == NUM_TEAM_2) ? prefix##BLUE : ((num == NUM_TEAM_3) ? prefix##YELLOW : prefix##PINK))) #define APP_TEAM_ENT_2(ent,prefix) ((ent.team == NUM_TEAM_1) ? prefix##RED : prefix##BLUE) #define APP_TEAM_ENT_4(ent,prefix) ((ent.team == NUM_TEAM_1) ? prefix##RED : ((ent.team == NUM_TEAM_2) ? prefix##BLUE : ((ent.team == NUM_TEAM_3) ? prefix##YELLOW : prefix##PINK))) -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/test.qh b/qcsrc/common/test.qh index 4ada66e6b..edc2f5bf3 100644 --- a/qcsrc/common/test.qh +++ b/qcsrc/common/test.qh @@ -8,4 +8,4 @@ void TEST_Fail(string cond); float TEST_RunAll(); float TEST_Run(string test); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/urllib.qh b/qcsrc/common/urllib.qh index 87dcf8dde..d58a0b1aa 100644 --- a/qcsrc/common/urllib.qh +++ b/qcsrc/common/urllib.qh @@ -19,4 +19,4 @@ float url_URI_Get_Callback(int id, float status, string data); #define NUM_URL_ID (URI_GET_URLLIB_END - URI_GET_URLLIB + 1) void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index b0327b4bd..1537c75fb 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -31,4 +31,4 @@ const bool true = 1; const bool false = 0; #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index 5656c9653..4de610f26 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -445,4 +445,4 @@ vector bezier_quadratic_getderivative(vector a, vector p, vector b, float t); // Returns the correct difference between two always increasing numbers #define COMPARE_INCREASING(to,from) (to < from ? from + to + 2 : to - from) -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 62f3997ad..b4ee1e25d 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -39,4 +39,4 @@ #include "w_hmg.qc" #include "w_rpc.qc" -//#endif \ No newline at end of file +//#endif diff --git a/qcsrc/common/weapons/calculations.qc b/qcsrc/common/weapons/calculations.qc index 82adfdb1a..46bb8a6d4 100644 --- a/qcsrc/common/weapons/calculations.qc +++ b/qcsrc/common/weapons/calculations.qc @@ -152,7 +152,7 @@ vector W_CalculateSpread(vector forward, float spread, float spreadfactor, float if(spread <= 0) return forward; sstyle = spreadstyle; //autocvar_g_projectiles_spread_style; - + if(sstyle == 0) { // this is the baseline for the spread value! diff --git a/qcsrc/common/weapons/calculations.qh b/qcsrc/common/weapons/calculations.qh index 71cdc21ac..d91d22c67 100644 --- a/qcsrc/common/weapons/calculations.qh +++ b/qcsrc/common/weapons/calculations.qh @@ -2,4 +2,4 @@ #define CALCULATIONS_H vector damage_explosion_calcpush(vector explosion_f, vector target_v, float speedfactor); vector W_CalculateSpread(vector forward, float spread, float spreadfactor, float spreadstyle); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/weapons/config.qc b/qcsrc/common/weapons/config.qc index 885923e5f..a314f036b 100644 --- a/qcsrc/common/weapons/config.qc +++ b/qcsrc/common/weapons/config.qc @@ -39,7 +39,7 @@ void Dump_Weapon_Settings(void) // step 3: sort queue heapsort(WEP_CONFIG_COUNT, W_Config_Queue_Swap, W_Config_Queue_Compare, world); - + // step 4: write queue WEP_CONFIG_WRITETOFILE(sprintf( "// {{{ #%d: %s%s\n", diff --git a/qcsrc/common/weapons/config.qh b/qcsrc/common/weapons/config.qh index bf9f08368..4e968ec4e 100644 --- a/qcsrc/common/weapons/config.qh +++ b/qcsrc/common/weapons/config.qh @@ -32,7 +32,7 @@ string wep_config_queue[MAX_WEP_CONFIG]; #define WEP_CONFIG_WRITE_CVARS_BOTH(wepname,name) \ WEP_CONFIG_WRITE_CVARS_PRI(wepname, name) \ WEP_CONFIG_WRITE_CVARS_SEC(wepname, name) - + #define WEP_CONFIG_WRITE_CVARS(wepid,wepname,mode,name) WEP_CONFIG_WRITE_CVARS_##mode(wepname, name) #define WEP_CONFIG_WRITE_PROPS_string(wepname,name) \ @@ -46,4 +46,4 @@ string wep_config_queue[MAX_WEP_CONFIG]; cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) } #define WEP_CONFIG_WRITE_PROPS(wepid,wepname,type,prop,name) WEP_CONFIG_WRITE_PROPS_##type(wepname,name) -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index 3d2bdf4a1..d8faa7be9 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -187,22 +187,22 @@ void Reset_ArcBeam(entity player, vector forward) } float Arc_GetHeat_Percent(entity player) -{ +{ if ( WEP_CVAR(arc, overheat_max) <= 0 || WEP_CVAR(arc, overheat_max) <= 0 ) { player.arc_overheat = 0; return 0; } - + if ( player.arc_beam ) return player.arc_beam.beam_heat/WEP_CVAR(arc, overheat_max); - + if ( player.arc_overheat > time ) { - return (player.arc_overheat-time) / WEP_CVAR(arc, overheat_max) + return (player.arc_overheat-time) / WEP_CVAR(arc, overheat_max) * player.arc_cooldown; } - + return 0; } void Arc_Player_SetHeat(entity player) @@ -218,8 +218,8 @@ void W_Arc_Beam_Think(void) remove(self); return; } - - + + float burst = 0; if( self.owner.BUTTON_ATCK2 || self.beam_bursting) { @@ -253,21 +253,21 @@ void W_Arc_Beam_Think(void) { cooldown_speed = self.beam_heat / WEP_CVAR(arc, beam_refire); } - + if ( cooldown_speed ) { self.owner.arc_overheat = time + self.beam_heat / cooldown_speed; self.owner.arc_cooldown = cooldown_speed; } - + if ( WEP_CVAR(arc, overheat_max) > 0 && self.beam_heat >= WEP_CVAR(arc, overheat_max) ) { - pointparticles( particleeffectnum("arc_overheat"), + pointparticles( particleeffectnum("arc_overheat"), self.beam_start, self.beam_wantdir, 1 ); sound(self, CH_WEAPON_A, "weapons/arc_stop.wav", VOL_BASE, ATTN_NORM); } } - + if(self == self.owner.arc_beam) { self.owner.arc_beam = world; } entity oldself = self; self = self.owner; @@ -280,7 +280,7 @@ void W_Arc_Beam_Think(void) remove(self); return; } - + // decrease ammo float coefficient = frametime; if(!(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)) @@ -341,7 +341,7 @@ void W_Arc_Beam_Think(void) // note that if we do this, it'll always be corrected to a maximum angle by beam_maxangle handling - float segments; + float segments; if(self.beam_dir != w_shotdir) { // calculate how much we're going to move the end of the beam to the want position @@ -390,7 +390,7 @@ void W_Arc_Beam_Think(void) if(WEP_CVAR(arc, beam_degreespersegment)) { segments = bound( - 1, + 1, ( min( angle, @@ -545,7 +545,7 @@ void W_Arc_Beam_Think(void) new_beam_type = ARC_BT_HIT; } - break; + break; } else if(trace_fraction != 1) { @@ -620,12 +620,12 @@ void Arc_Smoke() else if ( self.arc_beam && WEP_CVAR(arc, overheat_max) > 0 && self.arc_beam.beam_heat > WEP_CVAR(arc, overheat_min) ) { - if ( random() < (self.arc_beam.beam_heat-WEP_CVAR(arc, overheat_min)) / + if ( random() < (self.arc_beam.beam_heat-WEP_CVAR(arc, overheat_min)) / ( WEP_CVAR(arc, overheat_max)-WEP_CVAR(arc, overheat_min) ) ) pointparticles( particleeffectnum("arc_smoke"), smoke_origin, '0 0 0', 1 ); } - - if ( self.arc_smoke_sound && ( self.arc_overheat <= time || + + if ( self.arc_smoke_sound && ( self.arc_overheat <= time || !( self.BUTTON_ATCK || self.BUTTON_ATCK2 ) ) || self.switchweapon != WEP_ARC ) { self.arc_smoke_sound = 0; @@ -667,7 +667,7 @@ float W_Arc(float req) if ( self.arc_overheat <= time ) if(self.BUTTON_ATCK || self.BUTTON_ATCK2 || self.arc_beam.beam_bursting ) { - + if(self.arc_BUTTON_ATCK_prev) { #if 0 @@ -683,7 +683,7 @@ float W_Arc(float req) if(weapon_prepareattack(!!self.BUTTON_ATCK2, 0)) { W_Arc_Beam(!!self.BUTTON_ATCK2); - + if(!self.arc_BUTTON_ATCK_prev) { weapon_thinkf(WFRAME_FIRE1, WEP_CVAR(arc, beam_animtime), w_ready); @@ -691,10 +691,10 @@ float W_Arc(float req) } } } - + return true; } - + if(self.arc_BUTTON_ATCK_prev != 0) { sound(self, CH_WEAPON_A, "weapons/arc_stop.wav", VOL_BASE, ATTN_NORM); @@ -810,7 +810,7 @@ void Draw_ArcBeam_callback(vector start, vector hit, vector end) // draw primary beam render vector top = hitorigin + (thickdir * thickness); vector bottom = hitorigin - (thickdir * thickness); - + vector last_top = WarpZone_TransformOrigin(WarpZone_trace_transform, Draw_ArcBeam_callback_last_top); vector last_bottom = WarpZone_TransformOrigin(WarpZone_trace_transform, Draw_ArcBeam_callback_last_bottom); @@ -850,7 +850,7 @@ void Draw_ArcBeam_callback(vector start, vector hit, vector end) trailparticles(beam, beam.beam_traileffect, start, hitorigin); } - // set up for the next + // set up for the next Draw_ArcBeam_callback_last_thickness = thickness; Draw_ArcBeam_callback_last_top = WarpZone_UnTransformOrigin(WarpZone_trace_transform, top); Draw_ArcBeam_callback_last_bottom = WarpZone_UnTransformOrigin(WarpZone_trace_transform, bottom); @@ -893,7 +893,7 @@ void Draw_ArcBeam(void) // Currently we have to replicate nearly the same method of figuring // out the shotdir that the server does... Ideally in the future we // should be able to acquire this from a generalized function built - // into a weapon system for client code. + // into a weapon system for client code. // find where we are aiming makevectors(warpzone_save_view_angles); @@ -987,7 +987,7 @@ void Draw_ArcBeam(void) if(self.beam_degreespersegment) { segments = bound( - 1, + 1, ( min( angle, @@ -1035,7 +1035,7 @@ void Draw_ArcBeam(void) if(self.beam_degreespersegment) { segments = bound( - 1, + 1, ( min( angle, diff --git a/qcsrc/common/weapons/w_blaster.qc b/qcsrc/common/weapons/w_blaster.qc index 4fe6c156c..7de776dda 100644 --- a/qcsrc/common/weapons/w_blaster.qc +++ b/qcsrc/common/weapons/w_blaster.qc @@ -68,7 +68,7 @@ void W_Blaster_Touch(void) self.projectiledeathtype, other ); - + remove(self); } @@ -112,7 +112,7 @@ void W_Blaster_Attack( setorigin(missile, w_shotorg); setsize(missile, '0 0 0', '0 0 0'); - + W_SetupProjVelocity_Explicit( missile, w_shotdir, @@ -132,7 +132,7 @@ void W_Blaster_Attack( missile.touch = W_Blaster_Touch; missile.flags = FL_PROJECTILE; missile.missile_flags = MIF_SPLASH; - missile.projectiledeathtype = atk_deathtype; + missile.projectiledeathtype = atk_deathtype; missile.think = W_Blaster_Think; missile.nextthink = time + atk_delay; @@ -165,7 +165,7 @@ float W_Blaster(float request) return true; } - + case WR_THINK: { if(self.BUTTON_ATCK) @@ -223,8 +223,8 @@ float W_Blaster(float request) } return true; } - - case WR_INIT: + + case WR_INIT: { precache_model("models/weapons/g_laser.md3"); precache_model("models/weapons/v_laser.md3"); @@ -233,30 +233,30 @@ float W_Blaster(float request) BLASTER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } - + case WR_SETUP: { self.ammo_field = ammo_none; return true; } - + case WR_CHECKAMMO1: case WR_CHECKAMMO2: { return true; // laser has infinite ammo } - + case WR_CONFIG: { BLASTER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } - + case WR_SUICIDEMESSAGE: { return WEAPON_BLASTER_SUICIDE; } - + case WR_KILLMESSAGE: { return WEAPON_BLASTER_MURDER; @@ -278,7 +278,7 @@ float W_Blaster(float request) if(!w_issilent) { sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM); } return true; } - + case WR_INIT: { precache_sound("weapons/laserimpact.wav"); diff --git a/qcsrc/common/weapons/w_crylink.qc b/qcsrc/common/weapons/w_crylink.qc index 30decbf9b..ee4878fd4 100644 --- a/qcsrc/common/weapons/w_crylink.qc +++ b/qcsrc/common/weapons/w_crylink.qc @@ -123,9 +123,9 @@ void W_Crylink_LinkExplode(entity e, entity e2) if(e == e.realowner.crylink_lastgroup) e.realowner.crylink_lastgroup = world; - + float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY); - + RadiusDamage(e, e.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * a, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * a, WEP_CVAR_BOTH(crylink, isprimary, radius), world, world, WEP_CVAR_BOTH(crylink, isprimary, force) * a, e.projectiledeathtype, other); W_Crylink_LinkExplode(e.queuenext, e2); @@ -241,7 +241,7 @@ void W_Crylink_LinkJoinEffect_Think(void) if(n >= 2) { float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY); - + if(WEP_CVAR_BOTH(crylink, isprimary, joinexplode)) { n /= WEP_CVAR_BOTH(crylink, isprimary, shots); @@ -279,7 +279,7 @@ float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad) else ++hit_enemy; } - + head = head.chain; } @@ -306,7 +306,7 @@ void W_Crylink_Touch(void) f *= a; float totaldamage = RadiusDamage(self, self.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * f, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * f, WEP_CVAR_BOTH(crylink, isprimary, radius), world, world, WEP_CVAR_BOTH(crylink, isprimary, force) * f, self.projectiledeathtype, other); - + if(totaldamage && ((WEP_CVAR_BOTH(crylink, isprimary, linkexplode) == 2) || ((WEP_CVAR_BOTH(crylink, isprimary, linkexplode) == 1) && !W_Crylink_Touch_WouldHitFriendly(self, WEP_CVAR_BOTH(crylink, isprimary, radius))))) { if(self == self.realowner.crylink_lastgroup) @@ -434,7 +434,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); other = proj; MUTATOR_CALLHOOK(EditProjectile); @@ -550,7 +550,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); other = proj; MUTATOR_CALLHOOK(EditProjectile); @@ -574,7 +574,7 @@ float W_Crylink(float req) 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); - + return true; } case WR_THINK: @@ -612,7 +612,7 @@ float W_Crylink(float req) vector pos; entity linkjoineffect; float isprimary = (self.crylink_waitrelease == 1); - + pos = W_Crylink_LinkJoin(self.crylink_lastgroup, WEP_CVAR_BOTH(crylink, isprimary, joinspread) * WEP_CVAR_BOTH(crylink, isprimary, speed)); linkjoineffect = spawn(); @@ -632,7 +632,7 @@ float W_Crylink(float req) } } } - + return true; } case WR_INIT: @@ -709,7 +709,7 @@ float W_Crylink(float req) if(!w_issilent) sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM); } - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_devastator.qc b/qcsrc/common/weapons/w_devastator.qc index 8286ec1d3..dd167aac2 100644 --- a/qcsrc/common/weapons/w_devastator.qc +++ b/qcsrc/common/weapons/w_devastator.qc @@ -126,7 +126,7 @@ void W_Devastator_DoRemoteExplode(void) WEP_CVAR(devastator, remote_jump_radius), false ); - + while(head) { if(head.takedamage && (head == self.realowner)) @@ -137,7 +137,7 @@ void W_Devastator_DoRemoteExplode(void) // we handled this as a rocketjump :) handled_as_rocketjump = true; - // modify velocity + // modify velocity head.velocity_x *= 0.9; head.velocity_y *= 0.9; head.velocity_z = bound( @@ -321,13 +321,13 @@ void W_Devastator_Damage(entity inflictor, entity attacker, float damage, float { if(self.health <= 0) return; - + if(!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions return; // g_projectiles_damage says to halt - + self.health = self.health - damage; self.angles = vectoangles(self.velocity); - + if(self.health <= 0) W_PrepareExplosionByDamage(attacker, W_Devastator_Explode); } @@ -374,7 +374,7 @@ void W_Devastator_Attack(void) missile.nextthink = time; missile.cnt = time + WEP_CVAR(devastator, lifetime); missile.flags = FL_PROJECTILE; - missile.missile_flags = MIF_SPLASH; + missile.missile_flags = MIF_SPLASH; CSQCProjectile(missile, WEP_CVAR(devastator, guiderate) == 0 && WEP_CVAR(devastator, speedaccel) == 0, PROJECTILE_ROCKET, false); // because of fly sound @@ -419,10 +419,10 @@ float W_Devastator(float req) targ = targ.chain; } } - + if(self.BUTTON_ATCK2) self.BUTTON_ATCK = false; } - + return true; } #else @@ -520,7 +520,7 @@ float W_Devastator(float req) // dprint(ftos(desirabledamage),"\n"); if(self.BUTTON_ATCK2 == true) self.BUTTON_ATCK = false; } - + return true; } #endif @@ -559,7 +559,7 @@ float W_Devastator(float req) sound(self, CH_WEAPON_B, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM); } } - + return true; } case WR_INIT: @@ -664,7 +664,7 @@ float W_Devastator(float req) pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1); if(!w_issilent) sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM); - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_electro.qc b/qcsrc/common/weapons/w_electro.qc index 8e567efaf..eadfa0b3b 100644 --- a/qcsrc/common/weapons/w_electro.qc +++ b/qcsrc/common/weapons/w_electro.qc @@ -90,15 +90,15 @@ void W_Electro_TriggerCombo(vector org, float rad, entity own) } } } - + // change owner to whoever caused the combo explosion e.realowner = own; e.takedamage = DAMAGE_NO; e.classname = "electro_orb_chain"; - + // now set the next one to trigger as well e.think = W_Electro_ExplodeCombo; - + // delay combo chains, looks cooler e.nextthink = ( @@ -120,7 +120,7 @@ void W_Electro_ExplodeCombo(void) W_Electro_TriggerCombo(self.origin, WEP_CVAR(electro, combo_comboradius), self.realowner); self.event_damage = func_null; - + RadiusDamage( self, self.realowner, @@ -148,7 +148,7 @@ void W_Electro_Explode(void) self.event_damage = func_null; self.takedamage = DAMAGE_NO; - + if(self.movetype == MOVETYPE_BOUNCE) { RadiusDamage( @@ -215,7 +215,7 @@ void W_Electro_Bolt_Think(void) // now set the next one to trigger as well e.think = W_Electro_ExplodeCombo; - + // delay combo chains, looks cooler e.nextthink = ( @@ -414,7 +414,7 @@ void W_Electro_CheckAttack(void) weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack); return; } - // WEAPONTODO: when the player releases the button, cut down the length of refire2? + // WEAPONTODO: when the player releases the button, cut down the length of refire2? w_ready(); } @@ -451,7 +451,7 @@ float W_Electro(float req) if(random() < 0.03) self.bot_secondary_electromooth = 0; } } - + return true; } case WR_THINK: @@ -469,10 +469,10 @@ float W_Electro(float req) WEP_ACTION(self.weapon, WR_RELOAD); return false; } - + return true; } - + if(self.BUTTON_ATCK) { if(weapon_prepareattack(0, WEP_CVAR_PRI(electro, refire))) @@ -599,7 +599,7 @@ float W_Electro(float req) sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_NORM); } } - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_fireball.qc b/qcsrc/common/weapons/w_fireball.qc index bdef5af5b..d09800913 100644 --- a/qcsrc/common/weapons/w_fireball.qc +++ b/qcsrc/common/weapons/w_fireball.qc @@ -371,7 +371,7 @@ float W_Fireball(float req) if(random() < 0.01) self.bot_primary_fireballmooth = 1; } } - + return true; } case WR_THINK: @@ -393,7 +393,7 @@ float W_Fireball(float req) weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(fireball, animtime), w_ready); } } - + return true; } case WR_INIT: @@ -465,7 +465,7 @@ float W_Fireball(float req) if(!w_issilent) sound(self, CH_SHOTS, "weapons/fireball_impact2.wav", VOL_BASE, ATTEN_NORM * 0.25); // long range boom } - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_hagar.qc b/qcsrc/common/weapons/w_hagar.qc index ff55145d6..1085c315a 100644 --- a/qcsrc/common/weapons/w_hagar.qc +++ b/qcsrc/common/weapons/w_hagar.qc @@ -79,11 +79,11 @@ 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) - && (inflictor.projectiledeathtype & HITTYPE_SECONDARY) + && (inflictor.projectiledeathtype & HITTYPE_SECONDARY) && (self.projectiledeathtype & HITTYPE_SECONDARY)); - + if(is_linkexplode) is_linkexplode = (is_linkexplode && WEP_CVAR_SEC(hagar, load_linkexplode)); else @@ -94,7 +94,7 @@ void W_Hagar_Damage(entity inflictor, entity attacker, float damage, float death self.health = self.health - damage; self.angles = vectoangles(self.velocity); - + if(self.health <= 0) W_PrepareExplosionByDamage(attacker, self.think); } @@ -135,13 +135,13 @@ void W_Hagar_Attack(void) missile.classname = "missile"; 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.touch = W_Hagar_Touch; missile.use = W_Hagar_Explode; missile.think = adaptor_think2use_hittype_splash; @@ -156,7 +156,7 @@ void W_Hagar_Attack(void) missile.angles = vectoangles(missile.velocity); missile.flags = FL_PROJECTILE; - missile.missile_flags = MIF_SPLASH; + missile.missile_flags = MIF_SPLASH; CSQCProjectile(missile, true, PROJECTILE_HAGAR, true); @@ -178,7 +178,7 @@ void W_Hagar_Attack2(void) missile.classname = "missile"; 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); @@ -200,7 +200,7 @@ void W_Hagar_Attack2(void) missile.angles = vectoangles(missile.velocity); missile.flags = FL_PROJECTILE; - missile.missile_flags = MIF_SPLASH; + missile.missile_flags = MIF_SPLASH; CSQCProjectile(missile, true, PROJECTILE_HAGAR_BOUNCING, true); @@ -238,7 +238,7 @@ void W_Hagar_Attack2_Load_Release(void) missile.classname = "missile"; 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); @@ -254,13 +254,13 @@ void W_Hagar_Attack2_Load_Release(void) setorigin(missile, w_shotorg); setsize(missile, '0 0 0', '0 0 0'); missile.movetype = MOVETYPE_FLY; - missile.missile_flags = MIF_SPLASH; - + missile.missile_flags = MIF_SPLASH; + // per-shot spread calculation: the more shots there are, the less spread is applied (based on the bias cvar) - spread_pershot = ((shots - 1) / (WEP_CVAR_SEC(hagar, load_max) - 1)); + spread_pershot = ((shots - 1) / (WEP_CVAR_SEC(hagar, load_max) - 1)); spread_pershot = (1 - (spread_pershot * WEP_CVAR_SEC(hagar, load_spread_bias))); spread_pershot = (WEP_CVAR_SEC(hagar, spread) * spread_pershot * g_weaponspreadfactor); - + // pattern spread calculation s = '0 0 0'; if(counter == 0) @@ -272,7 +272,7 @@ void W_Hagar_Attack2_Load_Release(void) s.z = v_forward.y; } 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); missile.angles = vectoangles(missile.velocity); @@ -291,7 +291,7 @@ void W_Hagar_Attack2_Load_Release(void) void W_Hagar_Attack2_Load(void) { // loadable hagar secondary attack, must always run each frame - + if(time < game_starttime) return; @@ -367,7 +367,7 @@ void W_Hagar_Attack2_Load(void) self.hagar_warning = true; } } - + // release if player let go of button or if they've held it in too long if(!self.BUTTON_ATCK2 || ((loaded || !enough_ammo) && self.hagar_loadstep < time && WEP_CVAR_SEC(hagar, load_hold) >= 0)) { @@ -401,7 +401,7 @@ float W_Hagar(float req) 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); - + return true; } case WR_THINK: @@ -429,7 +429,7 @@ float W_Hagar(float req) weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(hagar, refire), w_ready); } } - + return true; } case WR_GONETHINK: @@ -440,7 +440,7 @@ float W_Hagar(float req) self.weaponentity.state = WS_READY; W_Hagar_Attack2_Load_Release(); } - + return true; } case WR_INIT: @@ -463,7 +463,7 @@ float W_Hagar(float req) W_DecreaseAmmo(WEP_CVAR_SEC(hagar, ammo) * self.hagar_load * -1); // give back ammo if necessary self.hagar_load = 0; } - + return true; } case WR_CHECKAMMO1: @@ -493,14 +493,14 @@ float W_Hagar(float req) // if we have any rockets loaded when we die, release them if(self.hagar_load && WEP_CVAR_SEC(hagar, load_releasedeath)) W_Hagar_Attack2_Load_Release(); - + 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; } case WR_SUICIDEMESSAGE: @@ -537,7 +537,7 @@ float W_Hagar(float req) else sound(self, CH_SHOTS, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM); } - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_hlac.qc b/qcsrc/common/weapons/w_hlac.qc index c4e80a4a4..38f04841a 100644 --- a/qcsrc/common/weapons/w_hlac.qc +++ b/qcsrc/common/weapons/w_hlac.qc @@ -56,9 +56,9 @@ void W_HLAC_Touch(void) PROJECTILE_TOUCH; self.event_damage = func_null; - + isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY); - + RadiusDamage(self, self.realowner, WEP_CVAR_BOTH(hlac, isprimary, damage), WEP_CVAR_BOTH(hlac, isprimary, edgedamage), WEP_CVAR_BOTH(hlac, isprimary, radius), world, world, WEP_CVAR_BOTH(hlac, isprimary, force), self.projectiledeathtype, other); remove(self); @@ -149,7 +149,7 @@ void W_HLAC_Attack2(void) missile.nextthink = time + WEP_CVAR_SEC(hlac, lifetime); missile.flags = FL_PROJECTILE; - missile.missile_flags = MIF_SPLASH; + missile.missile_flags = MIF_SPLASH; missile.projectiledeathtype = WEP_HLAC | HITTYPE_SECONDARY; CSQCProjectile(missile, true, PROJECTILE_HLAC, true); @@ -235,7 +235,7 @@ float W_HLAC(float req) weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(hlac, animtime), w_ready); } } - + return true; } case WR_INIT: @@ -293,7 +293,7 @@ float W_HLAC(float req) 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; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_hmg.qc b/qcsrc/common/weapons/w_hmg.qc index ada439e8e..8190411cd 100644 --- a/qcsrc/common/weapons/w_hmg.qc +++ b/qcsrc/common/weapons/w_hmg.qc @@ -96,7 +96,7 @@ float W_HeavyMachineGun(float req) self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false); else self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false); - + return true; } case WR_THINK: diff --git a/qcsrc/common/weapons/w_hook.qc b/qcsrc/common/weapons/w_hook.qc index 976c396b0..5d52dabae 100644 --- a/qcsrc/common/weapons/w_hook.qc +++ b/qcsrc/common/weapons/w_hook.qc @@ -112,12 +112,12 @@ void W_Hook_Damage(entity inflictor, entity attacker, float damage, float deatht { if(self.health <= 0) return; - + if(!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions - return; // g_projectiles_damage says to halt - + return; // g_projectiles_damage says to halt + self.health = self.health - damage; - + if(self.health <= 0) W_PrepareExplosionByDamage(self.realowner, W_Hook_Explode2); } @@ -150,7 +150,7 @@ void W_Hook_Attack2(void) gren.think = adaptor_think2use_hittype_splash; gren.use = W_Hook_Explode2; gren.touch = W_Hook_Touch2; - + gren.takedamage = DAMAGE_YES; gren.health = WEP_CVAR_SEC(hook, health); gren.damageforcescale = WEP_CVAR_SEC(hook, damageforcescale); @@ -176,7 +176,7 @@ void W_Hook_Attack2(void) float W_Hook(float req) { float hooked_time_max, hooked_fuel; - + switch(req) { case WR_AIM: @@ -196,7 +196,7 @@ float W_Hook(float req) { W_DecreaseAmmo(WEP_CVAR_PRI(hook, ammo)); self.hook_state |= HOOK_FIRING; - weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(hook, animtime), w_ready); + weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(hook, animtime), w_ready); } } @@ -221,13 +221,13 @@ float W_Hook(float req) if(self.hook && self.hook.state == 1) { - hooked_time_max = WEP_CVAR_PRI(hook, hooked_time_max); + hooked_time_max = WEP_CVAR_PRI(hook, hooked_time_max); if(hooked_time_max > 0) { if( time > self.hook_time_hooked + hooked_time_max ) self.hook_state |= HOOK_REMOVING; } - + hooked_fuel = WEP_CVAR_PRI(hook, hooked_ammo); if(hooked_fuel > 0) { @@ -253,7 +253,7 @@ float W_Hook(float req) } else { - self.hook_time_hooked = time; + self.hook_time_hooked = time; self.hook_time_fueldecrease = time + WEP_CVAR_PRI(hook, hooked_time_free); } @@ -282,7 +282,7 @@ float W_Hook(float req) self.hook_state &= ~HOOK_WAITING_FOR_RELEASE; } } - + return true; } case WR_INIT: @@ -347,7 +347,7 @@ float W_Hook(float req) pointparticles(particleeffectnum("hookbomb_explode"), org2, '0 0 0', 1); if(!w_issilent) sound(self, CH_SHOTS, "weapons/hookbomb_impact.wav", VOL_BASE, ATTN_NORM); - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_machinegun.qc b/qcsrc/common/weapons/w_machinegun.qc index 4ff30d698..14a59e398 100644 --- a/qcsrc/common/weapons/w_machinegun.qc +++ b/qcsrc/common/weapons/w_machinegun.qc @@ -246,7 +246,7 @@ float W_MachineGun(float req) self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false); else self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false); - + return true; } case WR_THINK: @@ -298,7 +298,7 @@ float W_MachineGun(float req) weapon_thinkf(WFRAME_FIRE2, WEP_CVAR(machinegun, first_refire), w_ready); } } - + return true; } case WR_INIT: @@ -385,7 +385,7 @@ float W_MachineGun(float req) sound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTN_NORM); else if(w_random < 0.2) sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM); - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_minelayer.qc b/qcsrc/common/weapons/w_minelayer.qc index 790dbe047..2fe0172a9 100644 --- a/qcsrc/common/weapons/w_minelayer.qc +++ b/qcsrc/common/weapons/w_minelayer.qc @@ -218,7 +218,7 @@ void W_MineLayer_Think(void) self.movetype = MOVETYPE_NONE; } } - + // our lifetime has expired, it's time to die - mine_time just allows us to play a sound for this // TODO: replace this mine_trigger.wav sound with a real countdown if((time > self.cnt) && (!self.mine_time) && (self.cnt > 0)) @@ -294,15 +294,15 @@ void W_MineLayer_Damage(entity inflictor, entity attacker, float damage, float d { if(self.health <= 0) return; - + float is_from_enemy = (inflictor.realowner != self.realowner); - + if(!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, (is_from_enemy ? 1 : -1))) return; // g_projectiles_damage says to halt - + self.health = self.health - damage; self.angles = vectoangles(self.velocity); - + if(self.health <= 0) W_PrepareExplosionByDamage(attacker, W_MineLayer_Explode); } @@ -375,7 +375,7 @@ void W_MineLayer_Attack(void) // common properties other = mine; MUTATOR_CALLHOOK(EditProjectile); - + self.minelayer_mines = W_MineLayer_Count(self); } @@ -503,7 +503,7 @@ float W_MineLayer(float req) // dprint(ftos(desirabledamage),"\n"); if(self.BUTTON_ATCK2 == true) self.BUTTON_ATCK = false; } - + return true; } case WR_THINK: @@ -528,7 +528,7 @@ float W_MineLayer(float req) if(W_MineLayer_PlacedMines(true)) sound(self, CH_WEAPON_B, "weapons/mine_det.wav", VOL_BASE, ATTN_NORM); } - + return true; } case WR_INIT: @@ -602,7 +602,7 @@ float W_MineLayer(float req) pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1); if(!w_issilent) sound(self, CH_SHOTS, "weapons/mine_exp.wav", VOL_BASE, ATTN_NORM); - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_mortar.qc b/qcsrc/common/weapons/w_mortar.qc index 3b1dde49e..34b5e5747 100644 --- a/qcsrc/common/weapons/w_mortar.qc +++ b/qcsrc/common/weapons/w_mortar.qc @@ -103,12 +103,12 @@ void W_Mortar_Grenade_Damage(entity inflictor, entity attacker, float damage, fl { if(self.health <= 0) return; - + if(!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions return; // g_projectiles_damage says to halt - + self.health = self.health - damage; - + if(self.health <= 0) W_PrepareExplosionByDamage(attacker, self.use); } @@ -198,10 +198,10 @@ void W_Mortar_Grenade_Touch2(void) pointparticles(particleeffectnum("hagar_bounce"), self.origin, self.velocity, 1); self.projectiledeathtype |= HITTYPE_BOUNCE; self.gl_bouncecnt += 1; - + if(WEP_CVAR_SEC(mortar, lifetime_bounce) && self.gl_bouncecnt == 1) self.nextthink = time + WEP_CVAR_SEC(mortar, lifetime_bounce); - + } else if(WEP_CVAR_SEC(mortar, type) == 2 && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE))) // stick { @@ -346,7 +346,7 @@ float W_Mortar(float req) if(random() < 0.02) self.bot_secondary_grenademooth = 0; } } - + return true; } /*case WR_CALCINFO: @@ -357,11 +357,11 @@ float W_Mortar(float req) // for the range calculation, closer to 1 is better wepinfo_pri_range_max = 2000 * wepinfo_pri_speed; - wepinfo_pri_range = wepinfo_pri_speed * WEP_CVAR_PRI(mortar, - + wepinfo_pri_range = wepinfo_pri_speed * WEP_CVAR_PRI(mortar, + wepinfo_sec_refire = max3(sys_frametime, WEP_CVAR_SEC(mortar, refire), WEP_CVAR_SEC(mortar, animtime)); wepinfo_sec_dps = (WEP_CVAR_SEC(mortar, damage) * (1 / wepinfo_sec_refire)); - + wepinfo_sec_dps = (WEP_CVAR_SEC(mortar, damage) * (1 / max3(sys_frametime, WEP_CVAR_SEC(mortar, refire), WEP_CVAR_SEC(mortar, animtime)))); wepinfo_ter_dps = 0; */ @@ -399,7 +399,7 @@ float W_Mortar(float req) weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(mortar, animtime), w_ready); } } - + return true; } case WR_INIT: @@ -470,7 +470,7 @@ float W_Mortar(float req) pointparticles(particleeffectnum("grenade_explode"), org2, '0 0 0', 1); if(!w_issilent) sound(self, CH_SHOTS, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM); - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_porto.qc b/qcsrc/common/weapons/w_porto.qc index a5c95aa40..0010449a0 100644 --- a/qcsrc/common/weapons/w_porto.qc +++ b/qcsrc/common/weapons/w_porto.qc @@ -255,11 +255,11 @@ void W_Porto_Attack(float type) gren.scale = 4; setorigin(gren, w_shotorg); setsize(gren, '0 0 0', '0 0 0'); - + gren.nextthink = time + WEP_CVAR_BOTH(porto, (type <= 0), lifetime); gren.think = W_Porto_Think; gren.touch = W_Porto_Touch; - + if(self.items & IT_STRENGTH) W_SetupProjVelocity_Basic(gren, WEP_CVAR_BOTH(porto, (type <= 0), speed) * autocvar_g_balance_powerup_strength_force, 0); else @@ -290,7 +290,7 @@ float W_Porto(float req) //vector v_angle_save; if(g_nexball) { return w_nexball_weapon(req); } - + switch(req) { case WR_AIM: @@ -300,7 +300,7 @@ float W_Porto(float req) if(!WEP_CVAR(porto, secondary)) if(bot_aim(WEP_CVAR_PRI(porto, speed), 0, WEP_CVAR_PRI(porto, lifetime), false)) self.BUTTON_ATCK = true; - + return true; } case WR_CONFIG: @@ -363,7 +363,7 @@ float W_Porto(float req) weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(porto, animtime), w_ready); } } - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_rifle.qc b/qcsrc/common/weapons/w_rifle.qc index aa3c74af9..ccc87fdc7 100644 --- a/qcsrc/common/weapons/w_rifle.qc +++ b/qcsrc/common/weapons/w_rifle.qc @@ -136,7 +136,7 @@ void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animt float W_Rifle(float req) { float ammo_amount; - + switch(req) { case WR_AIM: @@ -161,7 +161,7 @@ float W_Rifle(float req) if(random() < 0.03) self.bot_secondary_riflemooth = 0; } } - + return true; } case WR_THINK: @@ -198,7 +198,7 @@ float W_Rifle(float req) } } } - + return true; } case WR_INIT: @@ -282,7 +282,7 @@ float W_Rifle(float req) else if(w_random < 0.5) sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM); } - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_shockwave.qc b/qcsrc/common/weapons/w_shockwave.qc index 15b4545e2..24b8634b9 100644 --- a/qcsrc/common/weapons/w_shockwave.qc +++ b/qcsrc/common/weapons/w_shockwave.qc @@ -121,24 +121,24 @@ void W_Shockwave_Melee_Think(void) // set start time of melee if(!self.cnt) { - self.cnt = time; + self.cnt = time; W_PlayStrengthSound(self.realowner); } // update values for v_* vectors makevectors(self.realowner.v_angle); - + // calculate swing percentage based on time meleetime = WEP_CVAR(shockwave, melee_time) * W_WeaponRateFactor(); swing = bound(0, (self.cnt + meleetime - time) / meleetime, 10); f = ((1 - swing) * WEP_CVAR(shockwave, melee_traces)); - - // perform the traces needed for this frame + + // perform the traces needed for this frame for(i=self.swing_prev; i < f; ++i) { swing_factor = ((1 - (i / WEP_CVAR(shockwave, melee_traces))) * 2 - 1); - - targpos = (self.realowner.origin + self.realowner.view_ofs + + targpos = (self.realowner.origin + self.realowner.view_ofs + (v_forward * WEP_CVAR(shockwave, melee_range)) + (v_up * swing_factor * WEP_CVAR(shockwave, melee_swing_up)) + (v_right * swing_factor * WEP_CVAR(shockwave, melee_swing_side))); @@ -151,22 +151,22 @@ void W_Shockwave_Melee_Think(void) self.realowner, ANTILAG_LATENCY(self.realowner) ); - + // draw lightning beams for debugging #ifdef DEBUG_SHOCKWAVE - te_lightning2(world, targpos, self.realowner.origin + self.realowner.view_ofs + v_forward * 5 - v_up * 5); + te_lightning2(world, targpos, self.realowner.origin + self.realowner.view_ofs + v_forward * 5 - v_up * 5); te_customflash(targpos, 40, 2, '1 1 1'); #endif - + is_player = (IS_PLAYER(trace_ent) || trace_ent.classname == "body" || (trace_ent.flags & FL_MONSTER)); if((trace_fraction < 1) // if trace is good, apply the damage and remove self if necessary - && (trace_ent.takedamage == DAMAGE_AIM) + && (trace_ent.takedamage == DAMAGE_AIM) && (trace_ent != self.swing_alreadyhit) && (is_player || WEP_CVAR(shockwave, melee_nonplayerdamage))) { target_victim = trace_ent; // so it persists through other calls - + if(is_player) // this allows us to be able to nerf the non-player damage done in e.g. assault or onslaught swing_damage = (WEP_CVAR(shockwave, melee_damage) * min(1, swing_factor + 1)); else @@ -176,10 +176,10 @@ void W_Shockwave_Melee_Think(void) Damage( target_victim, self.realowner, - self.realowner, + self.realowner, swing_damage, - (WEP_SHOCKWAVE | HITTYPE_SECONDARY), - (self.realowner.origin + self.realowner.view_ofs), + (WEP_SHOCKWAVE | HITTYPE_SECONDARY), + (self.realowner.origin + self.realowner.view_ofs), (v_forward * WEP_CVAR(shockwave, melee_force)) ); @@ -211,7 +211,7 @@ void W_Shockwave_Melee_Think(void) } } } - + if(time >= self.cnt + meleetime) { // melee is finished @@ -220,7 +220,7 @@ void W_Shockwave_Melee_Think(void) } else { - // set up next frame + // set up next frame self.swing_prev = i; self.nextthink = time; } @@ -249,7 +249,7 @@ float W_Shockwave_Attack_CheckSpread( float spreadlimit; float distance_of_attack = vlen(sw_shotorg - attack_endpos); float distance_from_line = vlen(targetorg - nearest_on_line); - + spreadlimit = (distance_of_attack ? min(1, (vlen(sw_shotorg - nearest_on_line) / distance_of_attack)) : 1); spreadlimit = ( @@ -315,7 +315,7 @@ float W_Shockwave_Attack_CheckHit( { if(!head) { return false; } float i; - + for(i = 0; i <= queue; ++i) { if(shockwave_hit[i] == head) @@ -357,7 +357,7 @@ void W_Shockwave_Attack(void) entity head; 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)); vector attack_endpos = (w_shotorg + (w_shotdir * WEP_CVAR(shockwave, blast_distance))); @@ -389,19 +389,19 @@ void W_Shockwave_Attack(void) ), false ); - + while(head) { if(head.takedamage) { float distance_to_head = vlen(attack_hitpos - head.WarpZone_findradius_nearest); - + if((head == self) && (distance_to_head <= WEP_CVAR(shockwave, blast_jump_radius))) { // ======================== // BLAST JUMP CALCULATION // ======================== - + // calculate importance of distance and accuracy for this attack multiplier_from_accuracy = (1 - (distance_to_head ? @@ -477,7 +477,7 @@ void W_Shockwave_Attack(void) // ========================== // BLAST SPLASH CALCULATION // ========================== - + // calculate importance of distance and accuracy for this attack multiplier_from_accuracy = (1 - (distance_to_head ? @@ -549,14 +549,14 @@ void W_Shockwave_Attack(void) // BLAST CONE CALCULATION // ======================== - // if it's a player, use the view origin as reference (stolen from RadiusDamage functions in g_damage.qc) + // if it's a player, use the view origin as reference (stolen from RadiusDamage functions in g_damage.qc) center = CENTER_OR_VIEWOFS(head); // find the closest point on the enemy to the center of the attack float ang; // angle between shotdir and h float h; // hypotenuse, which is the distance between attacker to head float a; // adjacent side, which is the distance between attacker and the point on w_shotdir that is closest to head.origin - + h = vlen(center - self.origin); ang = acos(dotproduct(normalize(center - self.origin), w_shotdir)); a = h * cos(ang); @@ -565,7 +565,7 @@ void W_Shockwave_Attack(void) vector nearest_on_line = (w_shotorg + a * w_shotdir); vector nearest_to_attacker = WarpZoneLib_NearestPointOnBox(center + head.mins, center + head.maxs, nearest_on_line); - if((vlen(head.WarpZone_findradius_dist) <= WEP_CVAR(shockwave, blast_distance)) + if((vlen(head.WarpZone_findradius_dist) <= WEP_CVAR(shockwave, blast_distance)) && (W_Shockwave_Attack_IsVisible(head, nearest_on_line, w_shotorg, attack_endpos))) { // calculate importance of distance and accuracy for this attack @@ -635,7 +635,7 @@ void W_Shockwave_Attack(void) head = shockwave_hit[i-1]; final_force = shockwave_hit_force[i-1]; final_damage = shockwave_hit_damage[i-1]; - + Damage( head, self, @@ -660,7 +660,7 @@ void W_Shockwave_Attack(void) vlen(final_force) )); #endif - + shockwave_hit[i-1] = world; shockwave_hit_force[i-1] = '0 0 0'; shockwave_hit_damage[i-1] = 0; @@ -677,7 +677,7 @@ float W_Shockwave(float req) { self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false); } else { self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false); } - + return true; } case WR_THINK: @@ -704,7 +704,7 @@ float W_Shockwave(float req) weapon_thinkf(WFRAME_FIRE1, 0, W_Shockwave_Melee); } } - + return true; } case WR_INIT: @@ -798,7 +798,7 @@ void Draw_Shockwave() new_max_dist = vlen(new_min_end - endpos); new_max_end = (new_min_end + (deviation * new_max_dist)); //te_lightning2(world, new_end, prev_min_end); - + if(counter == 0) { @@ -853,7 +853,7 @@ void Net_ReadShockwaveParticle(void) entity shockwave; shockwave = spawn(); shockwave.draw = Draw_Shockwave; - + shockwave.sw_shotorg_x = ReadCoord(); shockwave.sw_shotorg_y = ReadCoord(); shockwave.sw_shotorg_z = ReadCoord(); shockwave.sw_shotdir_x = ReadCoord(); shockwave.sw_shotdir_y = ReadCoord(); shockwave.sw_shotdir_z = ReadCoord(); diff --git a/qcsrc/common/weapons/w_shotgun.qc b/qcsrc/common/weapons/w_shotgun.qc index 7f54543cd..5415b4a6f 100644 --- a/qcsrc/common/weapons/w_shotgun.qc +++ b/qcsrc/common/weapons/w_shotgun.qc @@ -280,7 +280,7 @@ float W_Shotgun(float req) // attempt forcing playback of the anim by switching to another anim (that we never play) here... weapon_thinkf(WFRAME_FIRE1, 0, W_Shotgun_Attack2); } - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_tuba.qc b/qcsrc/common/weapons/w_tuba.qc index 54959949a..0b70b8572 100644 --- a/qcsrc/common/weapons/w_tuba.qc +++ b/qcsrc/common/weapons/w_tuba.qc @@ -382,7 +382,7 @@ float W_Tuba(float req) else self.BUTTON_ATCK2 = 1; } - + return true; } case WR_THINK: @@ -411,7 +411,7 @@ float W_Tuba(float req) self = oldself; } } - + return true; } case WR_INIT: @@ -457,7 +457,7 @@ float W_Tuba(float req) self.weaponentity.state = WS_INUSE; weapon_thinkf(WFRAME_RELOAD, 0.5, w_ready); } - + return true; } case WR_CHECKAMMO1: diff --git a/qcsrc/common/weapons/w_vaporizer.qc b/qcsrc/common/weapons/w_vaporizer.qc index 869c8ec7c..0e78dbae9 100644 --- a/qcsrc/common/weapons/w_vaporizer.qc +++ b/qcsrc/common/weapons/w_vaporizer.qc @@ -113,7 +113,7 @@ void W_Vaporizer_Attack(void) WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, v); break; } - + W_DecreaseAmmo(((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo))); } @@ -133,7 +133,7 @@ float W_Vaporizer(float req) 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 - + return true; } case WR_THINK: @@ -158,7 +158,7 @@ float W_Vaporizer(float req) { // handle refire manually, so that primary and secondary can be fired without conflictions (important for instagib) self.jump_interval = time + WEP_CVAR_SEC(vaporizer, refire) * W_WeaponRateFactor(); - + // decrease ammo for the laser? if(WEP_CVAR_SEC(vaporizer, ammo)) W_DecreaseAmmo(WEP_CVAR_SEC(vaporizer, ammo)); @@ -176,12 +176,12 @@ float W_Vaporizer(float req) WEP_CVAR_SEC(vaporizer, delay), WEP_CVAR_SEC(vaporizer, lifetime) ); - + // now do normal refire weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready); } } - + return true; } case WR_INIT: diff --git a/qcsrc/common/weapons/w_vortex.qc b/qcsrc/common/weapons/w_vortex.qc index f421786d8..374256403 100644 --- a/qcsrc/common/weapons/w_vortex.qc +++ b/qcsrc/common/weapons/w_vortex.qc @@ -76,7 +76,7 @@ void SendCSQCVortexBeamParticle(float charge) { void W_Vortex_Attack(float issecondary) { float mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, myammo, charge; - + mydmg = WEP_CVAR_BOTH(vortex, !issecondary, damage); myforce = WEP_CVAR_BOTH(vortex, !issecondary, force); mymindist = WEP_CVAR_BOTH(vortex, !issecondary, damagefalloff_mindist); @@ -110,7 +110,7 @@ void W_Vortex_Attack(float issecondary) FireRailgunBullet(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_VORTEX); if(yoda && flying) - Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA); + Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA); //beam and muzzle flash done on client SendCSQCVortexBeamParticle(charge); @@ -142,7 +142,7 @@ float W_Vortex(float req) { if(WEP_CVAR(vortex, charge) && self.vortex_charge < WEP_CVAR(vortex, charge_limit)) self.vortex_charge = min(1, self.vortex_charge + WEP_CVAR(vortex, charge_rate) * frametime / W_TICSPERFRAME); - + if(WEP_CVAR_SEC(vortex, chargepool)) if(self.vortex_chargepool_ammo < 1) { @@ -237,7 +237,7 @@ float W_Vortex(float req) } } } - + return true; } case WR_INIT: @@ -309,7 +309,7 @@ float W_Vortex(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; } case WR_INIT: diff --git a/qcsrc/common/weapons/weapons.qc b/qcsrc/common/weapons/weapons.qc index 15b64095f..b9079a58f 100644 --- a/qcsrc/common/weapons/weapons.qc +++ b/qcsrc/common/weapons/weapons.qc @@ -232,7 +232,7 @@ string W_UndeprecateName(string s) switch ( s ) { case "nex" : return "vortex"; - case "rocketlauncher" : return "devastator"; + case "rocketlauncher" : return "devastator"; case "laser" : return "blaster"; case "minstanex" : return "vaporizer"; case "grenadelauncher": return "mortar"; @@ -372,4 +372,4 @@ int GetAmmoStat(.float ammotype) } } #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/common/weapons/weapons.qh b/qcsrc/common/weapons/weapons.qh index 3868ac3e8..2835c47d9 100644 --- a/qcsrc/common/weapons/weapons.qh +++ b/qcsrc/common/weapons/weapons.qh @@ -209,4 +209,4 @@ void register_weapons_done(); #undef REGISTER_WEAPON ACCUMULATE_FUNCTION(RegisterWeapons, register_weapons_done); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/csqcmodellib/cl_model.qh b/qcsrc/csqcmodellib/cl_model.qh index c527cc1f2..c2aca6f7a 100644 --- a/qcsrc/csqcmodellib/cl_model.qh +++ b/qcsrc/csqcmodellib/cl_model.qh @@ -52,4 +52,4 @@ void CSQCModel_InterpolateAnimation_1To2_Note(float sf, float set_times); void CSQCModel_InterpolateAnimation_2To4_Do(); void CSQCModel_InterpolateAnimation_1To2_Do(); // will overwrite lerpfrac, lerpfrac3, lerpfrac4, and possibly clear frame*time if they are undisplayed according to lerpfracs -#endif \ No newline at end of file +#endif diff --git a/qcsrc/csqcmodellib/cl_player.qh b/qcsrc/csqcmodellib/cl_player.qh index f656d64f3..55e63cf56 100644 --- a/qcsrc/csqcmodellib/cl_player.qh +++ b/qcsrc/csqcmodellib/cl_player.qh @@ -38,4 +38,4 @@ void CSQCPlayer_SetCamera(); float CSQCPlayer_PreUpdate(); float CSQCPlayer_PostUpdate(); float CSQCPlayer_IsLocalPlayer(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/csqcmodellib/common.qh b/qcsrc/csqcmodellib/common.qh index 2cb251482..de02e7a6d 100644 --- a/qcsrc/csqcmodellib/common.qh +++ b/qcsrc/csqcmodellib/common.qh @@ -94,4 +94,4 @@ const int CSQCMODEL_PROPERTY_SIZE = 32768; #else #define ALLPROPERTIES ALLPROPERTIES_COMMON #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/csqcmodellib/interpolate.qh b/qcsrc/csqcmodellib/interpolate.qh index 912d83c87..5ee57850c 100644 --- a/qcsrc/csqcmodellib/interpolate.qh +++ b/qcsrc/csqcmodellib/interpolate.qh @@ -49,4 +49,4 @@ void InterpolateOrigin_Do(); // in case we interpolate that: .vector v_angle; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/csqcmodellib/settings.qh b/qcsrc/csqcmodellib/settings.qh index 41a04feb5..73f1e7905 100644 --- a/qcsrc/csqcmodellib/settings.qh +++ b/qcsrc/csqcmodellib/settings.qh @@ -27,4 +27,4 @@ const float CSQCPLAYER_FORCE_UPDATES = 0.25; //vector PL_CROUCH_MIN = ...; //vector PL_CROUCH_MAX = ...; //vector PL_CROUCH_VIEW_OFS = ...; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/csqcmodellib/sv_model.qh b/qcsrc/csqcmodellib/sv_model.qh index 4b9293e55..73e03e862 100644 --- a/qcsrc/csqcmodellib/sv_model.qh +++ b/qcsrc/csqcmodellib/sv_model.qh @@ -41,4 +41,4 @@ void CSQCModel_UnlinkEntity(); #undef CSQCMODEL_PROPERTY #undef CSQCMODEL_ENDIF #undef CSQCMODEL_IF -#endif \ No newline at end of file +#endif diff --git a/qcsrc/dpdefs/csprogsdefs.qh b/qcsrc/dpdefs/csprogsdefs.qh index 23196bef7..516a8cc7c 100644 --- a/qcsrc/dpdefs/csprogsdefs.qh +++ b/qcsrc/dpdefs/csprogsdefs.qh @@ -1444,4 +1444,4 @@ vector gettaginfo_forward; vector gettaginfo_right; vector gettaginfo_up; float checkpvs(vector viewpos, entity viewee) = #240; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/dpdefs/keycodes.qh b/qcsrc/dpdefs/keycodes.qh index 6c562fcb4..d01371c4c 100644 --- a/qcsrc/dpdefs/keycodes.qh +++ b/qcsrc/dpdefs/keycodes.qh @@ -147,4 +147,4 @@ float K_MOUSE13 = 526; float K_MOUSE14 = 527; float K_MOUSE15 = 528; float K_MOUSE16 = 529; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/dpdefs/menudefs.qh b/qcsrc/dpdefs/menudefs.qh index 7ef710106..be1785205 100644 --- a/qcsrc/dpdefs/menudefs.qh +++ b/qcsrc/dpdefs/menudefs.qh @@ -566,4 +566,4 @@ string getextresponse(void) = #624; const string cvar_string(string name) = #71; const string cvar_defstring(string name) = #89; float stringwidth(string text, float handleColors, vector size) = #468; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/dpdefs/progsdefs.qh b/qcsrc/dpdefs/progsdefs.qh index fadb67d9c..30ebe1bdf 100644 --- a/qcsrc/dpdefs/progsdefs.qh +++ b/qcsrc/dpdefs/progsdefs.qh @@ -505,4 +505,4 @@ void(entity e) setspawnparms = #78; // set parm1... to the // for coop respawn //============================================================================ -#endif \ No newline at end of file +#endif diff --git a/qcsrc/menu/command/menu_cmd.qh b/qcsrc/menu/command/menu_cmd.qh index 0a94a9a4b..364b13690 100644 --- a/qcsrc/menu/command/menu_cmd.qh +++ b/qcsrc/menu/command/menu_cmd.qh @@ -2,4 +2,4 @@ #define MENU_CMD_H void GameCommand(string command); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/menu/draw.qh b/qcsrc/menu/draw.qh index ec8f858fd..873ccb6df 100644 --- a/qcsrc/menu/draw.qh +++ b/qcsrc/menu/draw.qh @@ -41,4 +41,4 @@ vector globalToBoxSize(vector v, vector scale); float draw_TextWidth_WithColors(string s, vector size); float draw_TextWidth_WithoutColors(string s, vector size); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/menu/oo/base.qh b/qcsrc/menu/oo/base.qh index ba8db3959..55af8adb8 100644 --- a/qcsrc/menu/oo/base.qh +++ b/qcsrc/menu/oo/base.qh @@ -28,4 +28,4 @@ entity spawnObject() Object_vtbl = spawnVtbl(e, null_entity); return e; } -#endif \ No newline at end of file +#endif diff --git a/qcsrc/menu/oo/implementation.qh b/qcsrc/menu/oo/implementation.qh index 6eced2f97..42a74be24 100644 --- a/qcsrc/menu/oo/implementation.qh +++ b/qcsrc/menu/oo/implementation.qh @@ -29,4 +29,4 @@ // for the implementation #define SUPER(cname) (cname##_vtbl.vtblbase) -#endif \ No newline at end of file +#endif diff --git a/qcsrc/menu/oo/interface.qh b/qcsrc/menu/oo/interface.qh index cdc469a5e..e24bb3f9a 100644 --- a/qcsrc/menu/oo/interface.qh +++ b/qcsrc/menu/oo/interface.qh @@ -26,4 +26,4 @@ #define ATTRIBARRAY(cname,name,type,cnt) .type name[cnt]; #define ENDCLASS(cname) .float instanceOf##cname; #define SUPER(cname) -#endif \ No newline at end of file +#endif diff --git a/qcsrc/menu/progs.src b/qcsrc/menu/progs.src index dc74a02ce..e18aacd84 100644 --- a/qcsrc/menu/progs.src +++ b/qcsrc/menu/progs.src @@ -34,4 +34,4 @@ xonotic/util.qc ../common/weapons/weapons.qc // TODO -../warpzonelib/mathlib.qc \ No newline at end of file +../warpzonelib/mathlib.qc diff --git a/qcsrc/menu/skin.qh b/qcsrc/menu/skin.qh index f19256833..84f9029c0 100644 --- a/qcsrc/menu/skin.qh +++ b/qcsrc/menu/skin.qh @@ -27,4 +27,4 @@ #undef SKINFLOAT #undef SKINVECTOR #undef SKINBEGIN -#endif \ No newline at end of file +#endif diff --git a/qcsrc/menu/sys-post.qh b/qcsrc/menu/sys-post.qh index aaa78d9ba..2b4120e8b 100644 --- a/qcsrc/menu/sys-post.qh +++ b/qcsrc/menu/sys-post.qh @@ -2,4 +2,4 @@ #define SYS_POST_H #pragma noref 0 -#endif \ No newline at end of file +#endif diff --git a/qcsrc/menu/sys-pre.qh b/qcsrc/menu/sys-pre.qh index 8fa3faae4..333d5c6bc 100644 --- a/qcsrc/menu/sys-pre.qh +++ b/qcsrc/menu/sys-pre.qh @@ -2,4 +2,4 @@ #define SYS_PRE_H #pragma noref 1 -#endif \ No newline at end of file +#endif diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc index a9e57b537..04c67e727 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc @@ -31,7 +31,7 @@ void GameType_ConfigureSliders(entity e, entity l, string pLabel, float pMin, fl else { e.configureXonoticTextSlider(e, pCvar); - + // clear old values float i; for(i = 0; i <= e.nValues; ++i); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media.qc index a0b49b1f6..1ec0c76e9 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media.qc @@ -5,7 +5,7 @@ CLASS(XonoticMediaTab) EXTENDS(XonoticTab) ATTRIB(XonoticMediaTab, intendedWidth, float, 0.9) ATTRIB(XonoticMediaTab, rows, float, 23) ATTRIB(XonoticMediaTab, columns, float, 3) - ATTRIB(XonoticMediaTab, name, string, "Media") + ATTRIB(XonoticMediaTab, name, string, "Media") ENDCLASS(XonoticMediaTab) entity makeXonoticMediaTab(); #endif diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc index 6132719db..89a76b608 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc @@ -6,7 +6,7 @@ CLASS(XonoticScreenshotBrowserTab) EXTENDS(XonoticTab) ATTRIB(XonoticScreenshotBrowserTab, rows, float, 21) ATTRIB(XonoticScreenshotBrowserTab, columns, float, 6.5) ATTRIB(XonoticScreenshotBrowserTab, name, string, "ScreenshotBrowser") - + METHOD(XonoticScreenshotBrowserTab, loadPreviewScreenshot, void(entity, string)) ATTRIB(XonoticScreenshotBrowserTab, screenshotImage, entity, NULL) ATTRIB(XonoticScreenshotBrowserTab, currentScrPath, string, string_null) @@ -51,7 +51,7 @@ void XonoticScreenshotBrowserTab_fill(entity me) me.TD(me, 1, 1, e = makeXonoticButton(_("Refresh"), '0 0 0')); e.onClick = ScreenshotList_Refresh_Click; e.onClickEntity = slist; - + /*me.TR(me); me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Filter:")); me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null)); @@ -62,7 +62,7 @@ void XonoticScreenshotBrowserTab_fill(entity me) me.TD(me, 1, 1, e = makeXonoticButton(_("Refresh"), '0 0 0')); e.onClick = ScreenshotList_Refresh_Click; e.onClickEntity = slist;*/ - + me.gotoRC(me, 1.5, 0); me.TD(me, me.rows - 2.5, me.columns, slist); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc index 73b5e3344..bf891ac9f 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc @@ -114,7 +114,7 @@ void XonoticProfileTab_fill(entity me) me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, "cl_allow_uid2name", _("Allow player statistics to use your nickname"))); setDependent(e, "cl_allow_uidtracking", 1, 1); me.gotoRC(me, 4, 3.1); // TOP RIGHT - //me.gotoRC(me, 12.5, 3.1); // BOTTOM RIGHT + //me.gotoRC(me, 12.5, 3.1); // BOTTOM RIGHT //me.gotoRC(me, 12.5, 0); // BOTTOM LEFT me.TDempty(me, 0.25); me.TD(me, 9, 2.5, statslist = makeXonoticStatsList()); diff --git a/qcsrc/menu/xonotic/dialog_settings_game.qc b/qcsrc/menu/xonotic/dialog_settings_game.qc index 2f48c2a50..5fb563ebd 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game.qc @@ -22,7 +22,7 @@ void XonoticGameSettingsTab_fill(entity me) { entity mc; mc = makeXonoticTabController(me.rows - 2.5); - + me.TR(me); me.TDempty(me, 0.25); me.TD(me, 1, 1, mc.makeTabButton(mc, _("View"), makeXonoticGameViewSettingsTab())); @@ -34,13 +34,13 @@ void XonoticGameSettingsTab_fill(entity me) me.gotoRC(me, 1.5, 0); me.TD(me, me.rows - 1.5, me.columns, mc); - + /* makeXonoticGameViewSettingsTab())); makeXonoticGameGeneralSettingsTab())); makeXonoticGameCrosshairSettingsTab())); - + makeXonoticGameWeaponSettingsTab())); l"), makeXonoticGamePlayermodelSettingsTab())); makeXonoticGameHUDSettingsTab())); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc index 3e164c11f..7e3415141 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc @@ -99,7 +99,7 @@ void XonoticGameCrosshairSettingsTab_fill(entity me) setDependentAND(e, "crosshair_ring", 1, 1, "crosshair_enabled", 1, 2); me.TD(me, 1, 1.8, e = makeXonoticSlider(0.1, 1, 0.1, "crosshair_ring_alpha")); setDependentAND(e, "crosshair_ring", 1, 1, "crosshair_enabled", 1, 2); - + me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center crosshair dot"))); setDependent(e, "crosshair_enabled", 1, 2); @@ -152,9 +152,9 @@ void XonoticGameCrosshairSettingsTab_fill(entity me) e.addValue(e, ZCTX(_("HTTST^Enemies")), "1.25"); e.configureXonoticTextSliderValues(e); setDependent(e, "crosshair_enabled", 1, 2);*/ - + /*me.TR(me); - + me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0')); e.onClick = Dialog_Close; diff --git a/qcsrc/menu/xonotic/dialog_settings_game_messages.qc b/qcsrc/menu/xonotic/dialog_settings_game_messages.qc index 4f1ac65c5..f1707bd3f 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_messages.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_messages.qc @@ -96,10 +96,10 @@ void XonoticGameMessageSettingsTab_fill(entity me) makeMulti(e, "notification_CENTER_POWERUP_SHIELD notification_CENTER_POWERUP_SPEED notification_CENTER_POWERUP_STRENGTH notification_CENTER_POWERDOWN_INVISIBILITY notification_CENTER_POWERDOWN_SHIELD notification_CENTER_POWERDOWN_SPEED notification_CENTER_POWERDOWN_STRENGTH notification_CENTER_SUPERWEAPON_BROKEN notification_CENTER_SUPERWEAPON_LOST notification_CENTER_SUPERWEAPON_PICKUP notification_INFO_POWERUP_INVISIBILITY notification_INFO_POWERUP_SHIELD notification_INFO_POWERUP_SPEED notification_INFO_POWERUP_STRENGTH"); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_CENTER_ITEM_WEAPON_DONTHAVE", _("Weapon centerprint notifications"))); - makeMulti(e, "notification_CENTER_ITEM_WEAPON_DROP notification_CENTER_ITEM_WEAPON_GOT notification_CENTER_ITEM_WEAPON_NOAMMO notification_CENTER_ITEM_WEAPON_PRIMORSEC notification_CENTER_ITEM_WEAPON_UNAVAILABLE"); + makeMulti(e, "notification_CENTER_ITEM_WEAPON_DROP notification_CENTER_ITEM_WEAPON_GOT notification_CENTER_ITEM_WEAPON_NOAMMO notification_CENTER_ITEM_WEAPON_PRIMORSEC notification_CENTER_ITEM_WEAPON_UNAVAILABLE"); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_INFO_ITEM_WEAPON_DONTHAVE", _("Weapon info message notifications"))); - makeMulti(e, "notification_INFO_ITEM_WEAPON_DROP notification_INFO_ITEM_WEAPON_GOT notification_INFO_ITEM_WEAPON_NOAMMO notification_INFO_ITEM_WEAPON_PRIMORSEC notification_INFO_ITEM_WEAPON_UNAVAILABLE"); + makeMulti(e, "notification_INFO_ITEM_WEAPON_DROP notification_INFO_ITEM_WEAPON_GOT notification_INFO_ITEM_WEAPON_NOAMMO notification_INFO_ITEM_WEAPON_PRIMORSEC notification_INFO_ITEM_WEAPON_UNAVAILABLE"); me.gotoRC(me, 9, 3.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Announcers"))); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_model.qc b/qcsrc/menu/xonotic/dialog_settings_game_model.qc index c2aedc1f7..1f9a23f2e 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_model.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_model.qc @@ -28,7 +28,7 @@ void XonoticGameModelSettingsTab_fill(entity me) { entity e; //float i; - + // Note that this is pretty terrible currently due to the lack of options for this tab... // There is really not many other decent places for these options, additionally // later I would like quite a few more options in this tab. diff --git a/qcsrc/menu/xonotic/dialog_settings_game_view.qc b/qcsrc/menu/xonotic/dialog_settings_game_view.qc index 3fd451265..44e741934 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_view.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_view.qc @@ -71,7 +71,7 @@ void XonoticGameViewSettingsTab_fill(entity me) me.TR(me); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating"))); - + me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:"))); me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov")); diff --git a/qcsrc/menu/xonotic/gametypelist.qc b/qcsrc/menu/xonotic/gametypelist.qc index a3b79631e..45f493bb9 100644 --- a/qcsrc/menu/xonotic/gametypelist.qc +++ b/qcsrc/menu/xonotic/gametypelist.qc @@ -83,7 +83,7 @@ void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, flo draw_Picture(me.columnIconOrigin * eX, GameType_GetIcon(i), me.columnIconSize * eX + eY, '1 1 1', SKINALPHA_LISTBOX_SELECTED); s1 = GameType_GetName(i); - + if(_MapInfo_GetTeamPlayBool(GameType_GetID(i))) s2 = _("teamplay"); else diff --git a/qcsrc/menu/xonotic/mainwindow.qc b/qcsrc/menu/xonotic/mainwindow.qc index 6fa40bfac..45a0f93dc 100644 --- a/qcsrc/menu/xonotic/mainwindow.qc +++ b/qcsrc/menu/xonotic/mainwindow.qc @@ -117,11 +117,11 @@ void MainWindow_configureMainWindow(entity me) i = spawnXonoticHUDInfoMessagesDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - + i = spawnXonoticHUDPhysicsDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - + me.screenshotViewerDialog = i = spawnXonoticScreenshotViewerDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); @@ -143,7 +143,7 @@ void MainWindow_configureMainWindow(entity me) me.cvarsDialog = i = spawnXonoticCvarsDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - + me.resetDialog = i = spawnXonoticResetDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); @@ -167,7 +167,7 @@ void MainWindow_configureMainWindow(entity me) me.serverInfoDialog = i = spawnXonoticServerInfoDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - + me.demostartconfirmDialog = i = spawnXonoticDemoStartConfirmDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 98f0aba1b..db0fbfe41 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -65,14 +65,14 @@ entity makeXonoticServerList(); #ifndef IMPLEMENTATION float autocvar_menu_slist_categories; -float autocvar_menu_slist_categories_onlyifmultiple; +float autocvar_menu_slist_categories_onlyifmultiple; float autocvar_menu_slist_purethreshold; float autocvar_menu_slist_modimpurity; float autocvar_menu_slist_recommendations; float autocvar_menu_slist_recommendations_maxping; -float autocvar_menu_slist_recommendations_minfreeslots; +float autocvar_menu_slist_recommendations_minfreeslots; float autocvar_menu_slist_recommendations_minhumans; -float autocvar_menu_slist_recommendations_purethreshold; +float autocvar_menu_slist_recommendations_purethreshold; // server cache fields #define SLIST_FIELDS \ @@ -111,7 +111,7 @@ float IsServerInList(string list, string srv); entity RetrieveCategoryEnt(float catnum); float CheckCategoryOverride(float cat); -float CheckCategoryForEntry(float entry); +float CheckCategoryForEntry(float entry); float m_gethostcachecategory(float entry) { return CheckCategoryOverride(CheckCategoryForEntry(entry)); } void RegisterSLCategories(); @@ -265,7 +265,7 @@ float CheckCategoryOverride(float cat) entity catent = RetrieveCategoryEnt(cat); if(catent) { - float override = (autocvar_menu_slist_categories ? catent.cat_enoverride : catent.cat_dioverride); + float override = (autocvar_menu_slist_categories ? catent.cat_enoverride : catent.cat_dioverride); if(override) { return override; } else { return cat; } } @@ -306,7 +306,7 @@ float CheckCategoryForEntry(float entry) if(autocvar_menu_slist_recommendations) { string cname = gethostcachestring(SLIST_FIELD_CNAME, entry); - + if(IsPromoted(cname)) { return CAT_RECOMMENDED; } else { @@ -321,21 +321,21 @@ float CheckCategoryForEntry(float entry) if( ///// check for minimum free slots (freeslots >= autocvar_menu_slist_recommendations_minfreeslots) - + && // check for purity requirement ( (autocvar_menu_slist_recommendations_purethreshold < 0) || (impure <= autocvar_menu_slist_recommendations_purethreshold) ) - + && // check for minimum amount of humans ( gethostcachenumber(SLIST_FIELD_NUMHUMANS, entry) >= autocvar_menu_slist_recommendations_minhumans ) - + && // check for maximum latency ( gethostcachenumber(SLIST_FIELD_PING, entry) @@ -358,7 +358,7 @@ float CheckCategoryForEntry(float entry) { // old servers which don't report their mod name are considered modified now case "": { return CAT_MODIFIED; } - + case "xpm": { return CAT_XPM; } case "minstagib": case "instagib": { return CAT_INSTAGIB; } @@ -367,9 +367,9 @@ float CheckCategoryForEntry(float entry) //case "newtoys": { return CAT_NEWTOYS; } // "cts" is allowed as compat, xdf is replacement - case "cts": + case "cts": case "xdf": { return CAT_DEFRAG; } - + default: { dprintf("Found strange mod type: %s\n", modtype); return CAT_MODIFIED; } } } @@ -554,7 +554,7 @@ void XonoticServerList_refreshServerList(entity me, float mode) if(me.currentSortOrder < 0) { listflags |= SLSF_DESCENDING; } sethostcachesort(me.currentSortField, listflags); } - + resorthostcache(); if(mode >= REFRESHSERVERLIST_ASK) refreshhostcache(mode >= REFRESHSERVERLIST_RESET); @@ -624,7 +624,7 @@ void XonoticServerList_draw(entity me) { float itemcount = gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT); me.nItems = itemcount; - + //float visible = floor(me.scrollPos / me.itemHeight); // ^ unfortunately no such optimization can be made-- we must process through the // entire list, otherwise there is no way to know which item is first in its category. @@ -737,7 +737,7 @@ void XonoticServerList_draw(entity me) me.selectedServer = strzone(gethostcachestring(SLIST_FIELD_CNAME, me.selectedItem)); } } - + if(owned) { if(me.selectedServer != me.ipAddressBox.text) @@ -1011,7 +1011,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float SET_YRANGE(me.categoriesHeight / (me.categoriesHeight + 1), 1); } } - + if(isSelected) draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED); @@ -1203,11 +1203,11 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float draw_Picture(iconPos, n, iconSize, '1 1 1', 1); } iconPos.x += iconSize.x; - + // -------------- // RENDER TEXT // -------------- - + // ping s = ftos(p); draw_Text(me.realUpperMargin * eY + (me.columnPingOrigin + me.columnPingSize - draw_TextWidth(s, 0, me.realFontSize)) * eX, s, me.realFontSize, theColor, theAlpha, 0); diff --git a/qcsrc/menu/xonotic/slider_particles.qc b/qcsrc/menu/xonotic/slider_particles.qc index db29f556d..818dcb84b 100644 --- a/qcsrc/menu/xonotic/slider_particles.qc +++ b/qcsrc/menu/xonotic/slider_particles.qc @@ -42,7 +42,7 @@ void XonoticParticlesSlider_saveCvars(entity me) tokenize_console(me.getIdentifier(me)); cvar_set("cl_particles_quality", argv(0)); cvar_set("r_drawparticles_drawdistance", argv(1)); - cvar_set("cl_damageeffect", argv(2)); + cvar_set("cl_damageeffect", argv(2)); } } #endif diff --git a/qcsrc/menu/xonotic/statslist.qc b/qcsrc/menu/xonotic/statslist.qc index f80e8ffa0..99c850f13 100644 --- a/qcsrc/menu/xonotic/statslist.qc +++ b/qcsrc/menu/xonotic/statslist.qc @@ -175,7 +175,7 @@ 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); - + 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)); @@ -193,7 +193,7 @@ void XonoticStatsList_getStats(entity me) { 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 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); else @@ -212,10 +212,10 @@ void XonoticStatsList_getStats(entity me) else { float dividerpos = strstrofs(e, "/", 0); - + string gametype = substring(e, 0, dividerpos); if(gametype == "overall") { continue; } - + string event = substring(e, (dividerpos + 1), strlen(e) - (dividerpos + 1)); // if we are ranked, read these sets of possible options @@ -251,7 +251,7 @@ void XonoticStatsList_getStats(entity me) data = sprintf("%d%%", stof(data)); break; } - + #if 0 case "favorite-map": { @@ -261,7 +261,7 @@ void XonoticStatsList_getStats(entity me) break; } #endif - + default: continue; // nothing to see here } @@ -321,7 +321,7 @@ void XonoticStatsList_drawListBoxItem(entity me, float i, vector absSize, float string data = bufstr_get(me.listStats, i); string s = car(data); string d = cdr(data); - + s = substring(s, 3, strlen(s) - 3); s = strreplace("_", " ", s); s = draw_TextShortenToWidth(s, 0.5 * me.columnNameSize, 0, me.realFontSize); diff --git a/qcsrc/server/anticheat.qh b/qcsrc/server/anticheat.qh index 33fd0ddec..6b9e4e385 100644 --- a/qcsrc/server/anticheat.qh +++ b/qcsrc/server/anticheat.qh @@ -15,4 +15,4 @@ void anticheat_startframe(); void anticheat_endframe(); void anticheat_fixangle(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/antilag.qh b/qcsrc/server/antilag.qh index d02a96311..e1123e786 100644 --- a/qcsrc/server/antilag.qh +++ b/qcsrc/server/antilag.qh @@ -12,4 +12,4 @@ void antilag_clear(entity e); #define ANTILAG_LATENCY(e) min(0.4, e.ping * 0.001) // add one ticrate? -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index e8266948a..bcb9d28d7 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -882,4 +882,4 @@ float autocvar_g_buffs_vampire_damage_steal; float autocvar_g_buffs_invisible_alpha; float autocvar_g_buffs_flight_gravity; float autocvar_g_buffs_jump_height; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/bot/aim.qh b/qcsrc/server/bot/aim.qh index eafd2d2f7..fb191a91c 100644 --- a/qcsrc/server/bot/aim.qh +++ b/qcsrc/server/bot/aim.qh @@ -97,4 +97,4 @@ float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, f vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, float shotdelay); .void(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4) lag_func; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/bot/havocbot/havocbot.qh b/qcsrc/server/bot/havocbot/havocbot.qh index 467e5fc2e..2d3d32913 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qh +++ b/qcsrc/server/bot/havocbot/havocbot.qh @@ -63,4 +63,4 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplay .entity draggedby; .float ladder_time; .entity ladder_entity; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/bot/navigation.qh b/qcsrc/server/bot/navigation.qh index 10d32ce18..08e1c53ac 100644 --- a/qcsrc/server/bot/navigation.qh +++ b/qcsrc/server/bot/navigation.qh @@ -76,4 +76,4 @@ void navigation_unstuck(); void botframe_updatedangerousobjects(float maxupdate); entity navigation_findnearestwaypoint(entity ent, float walkfromwp); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/campaign.qh b/qcsrc/server/campaign.qh index b107729ef..f5228c269 100644 --- a/qcsrc/server/campaign.qh +++ b/qcsrc/server/campaign.qh @@ -16,4 +16,4 @@ void CampaignLevelWarp(float n); float campaign_bots_may_start; // campaign mode: bots shall spawn but wait for the player to spawn before they do anything // in other game modes, this is ignored -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/cheats.qh b/qcsrc/server/cheats.qh index 925033c80..625a304bd 100644 --- a/qcsrc/server/cheats.qh +++ b/qcsrc/server/cheats.qh @@ -14,4 +14,4 @@ float CheatCommand(float argc); float CheatFrame(); void Drag_MoveDrag(entity from, entity to); // call this from CopyBody -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/cl_impulse.qh b/qcsrc/server/cl_impulse.qh index c604c56b2..ced811946 100644 --- a/qcsrc/server/cl_impulse.qh +++ b/qcsrc/server/cl_impulse.qh @@ -37,4 +37,4 @@ */ void ImpulseCommands (void); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/command/banning.qh b/qcsrc/server/command/banning.qh index 3386d5769..b4b251e9b 100644 --- a/qcsrc/server/command/banning.qh +++ b/qcsrc/server/command/banning.qh @@ -16,4 +16,4 @@ float Ban_Delete(float i); // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void BanCommand_macro_write_aliases(float fh); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 9e5389a9e..4a8b59eba 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -223,7 +223,7 @@ void ClientCommand_mobedit(float request, float argc) { makevectors(self.v_angle); WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self); - + if(!autocvar_g_monsters_edit) { sprint(self, "Monster property editing is not enabled.\n"); return; } if(trace_ent.flags & FL_MONSTER) { @@ -265,7 +265,7 @@ void ClientCommand_mobkill(float request) { makevectors(self.v_angle); WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self); - + if(trace_ent.flags & FL_MONSTER) { if(trace_ent.realowner != self) @@ -278,7 +278,7 @@ void ClientCommand_mobkill(float request) return; } } - + default: sprint(self, "Incorrect parameters for ^2mobkill^7\n"); case CMD_REQUEST_USAGE: @@ -299,22 +299,22 @@ void ClientCommand_mobspawn(float request, float argc) entity e; string tospawn; float moveflag, monstercount = 0; - + moveflag = (argv(2) ? stof(argv(2)) : 1); // follow owner if not defined tospawn = strtolower(argv(1)); - + if(tospawn == "list") { sprint(self, monsterlist_reply); return; } - + FOR_EACH_MONSTER(e) { if(e.realowner == self) ++monstercount; } - + if(autocvar_g_monsters_max <= 0 || autocvar_g_monsters_max_perplayer <= 0) { sprint(self, "Monster spawning is disabled.\n"); return; } else if(!IS_PLAYER(self)) { sprint(self, "You can't spawn monsters while spectating.\n"); return; } else if(MUTATOR_CALLHOOK(AllowMobSpawning)) { sprint(self, "Monster spawning is currently disabled by a mutator.\n"); return; } @@ -329,7 +329,7 @@ void ClientCommand_mobspawn(float request, float argc) { float found = 0, i; entity mon; - + for(i = MON_FIRST; i <= MON_LAST; ++i) { mon = get_monsterinfo(i); @@ -343,20 +343,20 @@ void ClientCommand_mobspawn(float request, float argc) if(found || tospawn == "random") { 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_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); - + sprint(self, strcat("Spawned ", e.monster_name, "\n")); - + return; } } } - + default: sprint(self, "Incorrect parameters for ^2mobspawn^7\n"); case CMD_REQUEST_USAGE: diff --git a/qcsrc/server/command/cmd.qh b/qcsrc/server/command/cmd.qh index 490361b45..3eabab763 100644 --- a/qcsrc/server/command/cmd.qh +++ b/qcsrc/server/command/cmd.qh @@ -18,4 +18,4 @@ string MapVote_Suggest(string m); // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void ClientCommand_macro_write_aliases(float fh); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/command/common.qh b/qcsrc/server/command/common.qh index 4e45af377..e31a42884 100644 --- a/qcsrc/server/command/common.qh +++ b/qcsrc/server/command/common.qh @@ -178,4 +178,4 @@ void CommonCommand_macro_write_aliases(float fh) } -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/command/sv_cmd.qh b/qcsrc/server/command/sv_cmd.qh index 94b254a26..0cc520c2e 100644 --- a/qcsrc/server/command/sv_cmd.qh +++ b/qcsrc/server/command/sv_cmd.qh @@ -17,4 +17,4 @@ float shuffleteams_teams[SHUFFLETEAMS_MAX_TEAMS]; // maximum of 4 teams // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void GameCommand_macro_write_aliases(float fh); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/command/vote.qh b/qcsrc/server/command/vote.qh index 03e535977..ff33f5668 100644 --- a/qcsrc/server/command/vote.qh +++ b/qcsrc/server/command/vote.qh @@ -52,4 +52,4 @@ float restart_mapalreadyrestarted; // bool, indicates whether reset_map() was al .float ready; // flag for if a player is ready void reset_map(float dorespawn); void ReadyCount(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 604762138..d170cf4c0 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -609,7 +609,7 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo RemoveGrapplingHook(head); // add waypoint - if(show_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'); } @@ -622,9 +622,9 @@ void Unfreeze (entity targ) targ.frozen = 0; targ.revive_progress = 0; targ.revival_time = time; - + WaypointSprite_Kill(targ.waypointsprite_attached); - + FOR_EACH_PLAYER(head) if(head.hook.aiment == targ) RemoveGrapplingHook(head); @@ -788,22 +788,22 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float damage = 0; force *= autocvar_g_freezetag_frozen_force; } - + if(targ.frozen && deathtype == DEATH_HURTTRIGGER && !autocvar_g_freezetag_frozen_damage_trigger) { pointparticles(particleeffectnum("teleport"), targ.origin, '0 0 0', 1); - + entity oldself = self; self = targ; entity spot = SelectSpawnPoint (false); - + if(spot) { damage = 0; self.deadflag = DEAD_NO; self.angles = spot.angles; - + self.effects = 0; self.effects |= EF_TELEPORT_BIT; @@ -814,16 +814,16 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float self.punchangle = '0 0 0'; self.punchvector = '0 0 0'; self.oldvelocity = self.velocity; - + self.spawnorigin = spot.origin; setorigin (self, spot.origin + '0 0 1' * (1 - self.mins.z - 24)); // don't reset back to last position, even if new position is stuck in solid self.oldorigin = self.origin; self.prevorigin = self.origin; - + pointparticles(particleeffectnum("teleport"), self.origin, '0 0 0', 1); } - + self = oldself; } diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index 15248515c..4cc3f6f63 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -120,4 +120,4 @@ void Fire_ApplyDamage(entity e); void Fire_ApplyEffect(entity e); void fireburner_think(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/g_hook.qh b/qcsrc/server/g_hook.qh index 55bbdd0e0..aa641a56b 100644 --- a/qcsrc/server/g_hook.qh +++ b/qcsrc/server/g_hook.qh @@ -18,4 +18,4 @@ const float HOOK_WAITING_FOR_RELEASE = 16; void GrappleHookInit(); vector hook_shotorigin[4]; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/g_subs.qh b/qcsrc/server/g_subs.qh index 8cc02ebff..04477e629 100644 --- a/qcsrc/server/g_subs.qh +++ b/qcsrc/server/g_subs.qh @@ -194,4 +194,4 @@ void InitTrigger(); void InitSolidBSPTrigger(); float InitMovingBrushTrigger(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/g_triggers.qh b/qcsrc/server/g_triggers.qh index c7e14392a..35c39f290 100644 --- a/qcsrc/server/g_triggers.qh +++ b/qcsrc/server/g_triggers.qh @@ -385,4 +385,4 @@ void spawnfunc_relay_activatetoggle(); void spawnfunc_target_changelevel_use(); void spawnfunc_target_changelevel(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/g_violence.qh b/qcsrc/server/g_violence.qh index 19072c821..1f1df0683 100644 --- a/qcsrc/server/g_violence.qh +++ b/qcsrc/server/g_violence.qh @@ -7,4 +7,4 @@ float Violence_GibSplash_SendEntity(entity to, float sf); void Violence_GibSplash_At(vector org, vector dir, float type, float amount, entity gibowner, entity attacker); void Violence_GibSplash(entity source, float type, float amount, entity attacker); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 4be378964..65d43baa2 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -801,7 +801,7 @@ void spawnfunc_worldspawn (void) addstat(STAT_VORTEX_CHARGEPOOL, AS_FLOAT, vortex_chargepool_ammo); addstat(STAT_HAGAR_LOAD, AS_INT, hagar_load); - + addstat(STAT_ARC_HEAT, AS_FLOAT, arc_heat_percent); // freeze attacks @@ -1238,7 +1238,7 @@ float DoNextMapOverride(float reinit) string m; m = GameTypeVote_MapInfo_FixName(autocvar_nextmap); cvar_set("nextmap",m); - + if(!m || gametypevote) return false; if(autocvar_sv_vote_gametype) @@ -1246,7 +1246,7 @@ float DoNextMapOverride(float reinit) Map_Goto_SetStr(m); return false; } - + if(MapInfo_CheckMap(m)) { Map_Goto_SetStr(m); diff --git a/qcsrc/server/g_world.qh b/qcsrc/server/g_world.qh index db51c3b1b..3a5e5d5ac 100644 --- a/qcsrc/server/g_world.qh +++ b/qcsrc/server/g_world.qh @@ -14,4 +14,4 @@ const float WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeat void CheckRules_Player(); void IntermissionThink(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/ipban.qh b/qcsrc/server/ipban.qh index 9be8b3d72..e758cbca4 100644 --- a/qcsrc/server/ipban.qh +++ b/qcsrc/server/ipban.qh @@ -8,4 +8,4 @@ float Ban_MaybeEnforceBanOnce(entity client); float BanCommand(string command); void OnlineBanList_URI_Get_Callback(float id, float status, string data); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/item_key.qh b/qcsrc/server/item_key.qh index 4ec3296df..6ab560503 100644 --- a/qcsrc/server/item_key.qh +++ b/qcsrc/server/item_key.qh @@ -23,4 +23,4 @@ float item_keys_usekey(entity l, entity p); * Returns a string with a comma separated list of key names, as specified in keylist. */ string item_keys_keylist(float keylist); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index 12f2db9e2..fd42c99ab 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -16,11 +16,11 @@ #endif float GameTypeVote_AvailabilityStatus(string gtname) -{ +{ float type = MapInfo_Type_FromString(gtname); if( type == 0 ) return GTV_FORBIDDEN; - + if ( autocvar_nextmap != "" ) { if ( !MapInfo_Get_ByName(autocvar_nextmap, false, 0) ) @@ -28,7 +28,7 @@ float GameTypeVote_AvailabilityStatus(string gtname) if (!(MapInfo_Map_supportedGametypes & type)) return GTV_FORBIDDEN; } - + return GTV_AVAILABLE; } @@ -237,7 +237,7 @@ void MapVote_WriteMask() for(i = 0, power = 1; i < mapvote_count; ++i, power *= 2) if(mapvote_maps_availability[i] == GTV_AVAILABLE ) mask |= power; - + if(mapvote_count < 8) WriteByte(MSG_ENTITY, mask); else if (mapvote_count < 16) @@ -272,7 +272,7 @@ float MapVote_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, mapvote_abstain); WriteByte(MSG_ENTITY, mapvote_detail); WriteCoord(MSG_ENTITY, mapvote_timeout); - + if ( gametypevote ) { // gametype vote @@ -394,11 +394,11 @@ float MapVote_Finished(float mappos) } return false; } - + Map_Goto_SetStr(mapvote_maps[mappos]); Map_Goto(0); alreadychangedlevel = true; - + return true; } @@ -406,7 +406,7 @@ void MapVote_CheckRules_1() { float i; - for(i = 0; i < mapvote_count; ++i) + for(i = 0; i < mapvote_count; ++i) if( mapvote_maps_availability[i] == GTV_AVAILABLE ) { //dprint("Map ", ftos(i), ": "); dprint(mapvote_maps[i], "\n"); @@ -444,7 +444,7 @@ float MapVote_CheckRules_2() RandomSelection_Init(); currentPlace = 0; currentVotes = -1; - for(i = 0; i < mapvote_count_real; ++i) + for(i = 0; i < mapvote_count_real; ++i) if ( mapvote_maps_availability[i] == GTV_AVAILABLE ) { RandomSelection_Add(world, i, string_null, 1, mapvote_selections[i]); @@ -459,7 +459,7 @@ float MapVote_CheckRules_2() firstPlace = currentPlace; else firstPlace = RandomSelection_chosen_float; - + //dprint("First place: ", ftos(firstPlace), "\n"); //dprint("First place votes: ", ftos(firstPlaceVotes), "\n"); @@ -615,7 +615,7 @@ void MapVote_Think() GotoNextMap(0); return; } - + if(autocvar_sv_vote_gametype) { GameTypeVote_Start(); } else if(autocvar_nextmap == "") { MapVote_Init(); } } @@ -627,7 +627,7 @@ float GameTypeVote_SetGametype(float type) { if (MapInfo_CurrentGametype() == type) return true; - + float tsave = MapInfo_CurrentGametype(); MapInfo_SwitchGameType(type); @@ -663,17 +663,17 @@ float GameTypeVote_Finished(float pos) { if(!gametypevote || gametypevote_finished) return false; - + if ( !GameTypeVote_SetGametype(MapInfo_Type_FromString(mapvote_maps[pos])) ) { dprint("Selected gametype is not supported by any map"); } - + localcmd("sv_vote_gametype_hook_all\n"); localcmd("sv_vote_gametype_hook_", mapvote_maps[pos], "\n"); - + gametypevote_finished = true; - + return true; } @@ -685,7 +685,7 @@ float GameTypeVote_AddVotable(string nextMode) for(j = 0; j < mapvote_count; ++j) if(mapvote_maps[j] == nextMode) return false; - + mapvote_maps[mapvote_count] = strzone(nextMode); mapvote_maps_suggested[mapvote_count] = false; @@ -694,9 +694,9 @@ float GameTypeVote_AddVotable(string nextMode) mapvote_maps_availability[mapvote_count] = GameTypeVote_AvailabilityStatus(nextMode); mapvote_count += 1; - + return true; - + } float GameTypeVote_Start() @@ -704,15 +704,15 @@ float GameTypeVote_Start() float j; MapVote_ClearAllVotes(); MapVote_UnzoneStrings(); - + mapvote_count = 0; mapvote_timeout = time + autocvar_sv_vote_gametype_timeout; mapvote_abstain = 0; mapvote_detail = !autocvar_g_maplist_votable_nodetail; - + float n = tokenizebyseparator(autocvar_sv_vote_gametype_options, " "); n = min(MAPVOTE_COUNT, n); - + float really_available, which_available; really_available = 0; which_available = -1; @@ -727,9 +727,9 @@ float GameTypeVote_Start() } mapvote_count_real = mapvote_count; - + gametypevote = 1; - + if ( really_available == 0 ) { if ( mapvote_count > 0 ) @@ -745,14 +745,14 @@ float GameTypeVote_Start() MapVote_Finished(which_available); return false; } - + mapvote_count_real = mapvote_count; mapvote_keeptwotime = time + autocvar_sv_vote_gametype_keeptwotime; if(mapvote_count_real < 3 || mapvote_keeptwotime <= time) mapvote_keeptwotime = 0; - + MapVote_Spawn(); - + return true; } diff --git a/qcsrc/server/mapvoting.qh b/qcsrc/server/mapvoting.qh index 4c9360fc5..d2eff1cf0 100644 --- a/qcsrc/server/mapvoting.qh +++ b/qcsrc/server/mapvoting.qh @@ -39,4 +39,4 @@ float mapvote_abstain; .float mapvote; entity mapvote_ent; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/movelib.qh b/qcsrc/server/movelib.qh index 3eeb3a57b..8a4bfd488 100644 --- a/qcsrc/server/movelib.qh +++ b/qcsrc/server/movelib.qh @@ -50,4 +50,4 @@ Yed need to set v_up and v_forward (generally by calling makevectors) before cal void movelib_groundalign4point(float spring_length, float spring_up, float blendrate, float _max); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/base.qh b/qcsrc/server/mutators/base.qh index 0b3868a28..7d36af08e 100644 --- a/qcsrc/server/mutators/base.qh +++ b/qcsrc/server/mutators/base.qh @@ -377,4 +377,4 @@ MUTATOR_HOOKABLE(AccuracyTargetValid); const float MUT_ACCADD_VALID = 0; // return this flag to make the function continue if target is a client const float MUT_ACCADD_INVALID = 1; // return this flag to make the function always continue const float MUT_ACCADD_INDIFFERENT = 2; // return this flag to make the function always return -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_ca.qh b/qcsrc/server/mutators/gamemode_ca.qh index a0f361fec..bf6686d73 100644 --- a/qcsrc/server/mutators/gamemode_ca.qh +++ b/qcsrc/server/mutators/gamemode_ca.qh @@ -2,4 +2,4 @@ #define GAMEMODE_CA_H // should be removed in the future, as other code should not have to care .float caplayer; // 0.5 if scheduled to join the next round -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh index 44caa7bdc..0e5930db2 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qh +++ b/qcsrc/server/mutators/gamemode_ctf.qh @@ -134,4 +134,4 @@ float havocbot_ctf_middlepoint_radius; void havocbot_role_ctf_setrole(entity bot, float role); #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_cts.qc b/qcsrc/server/mutators/gamemode_cts.qc index 1c1ce481b..0886a9ce5 100644 --- a/qcsrc/server/mutators/gamemode_cts.qc +++ b/qcsrc/server/mutators/gamemode_cts.qc @@ -96,7 +96,7 @@ MUTATOR_HOOKFUNCTION(cts_PlayerPhysics) self.movement_y = -M_SQRT1_2 * wishspeed; } } - + return false; } @@ -130,7 +130,7 @@ MUTATOR_HOOKFUNCTION(cts_ResetMap) cvar_set("timelimit", ftos(race_timelimit)); cts_ScoreRules(); } - + return false; } @@ -148,7 +148,7 @@ MUTATOR_HOOKFUNCTION(cts_ClientConnect) { race_PreparePlayer(); self.race_checkpoint = -1; - + if(IS_REAL_CLIENT(self)) { string rr = CTS_RECORD; @@ -195,7 +195,7 @@ MUTATOR_HOOKFUNCTION(cts_PlayerSpawn) self.race_respawn_spotref = spawn_spot; self.race_place = 0; - + return false; } diff --git a/qcsrc/server/mutators/gamemode_cts.qh b/qcsrc/server/mutators/gamemode_cts.qh index b8a075b1d..fa27fe4fc 100644 --- a/qcsrc/server/mutators/gamemode_cts.qh +++ b/qcsrc/server/mutators/gamemode_cts.qh @@ -7,4 +7,4 @@ const float ST_CTS_LAPS = 1; const float SP_CTS_LAPS = 4; const float SP_CTS_TIME = 5; const float SP_CTS_FASTEST = 6; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_domination.qc b/qcsrc/server/mutators/gamemode_domination.qc index 04c20b250..dd6e8b210 100644 --- a/qcsrc/server/mutators/gamemode_domination.qc +++ b/qcsrc/server/mutators/gamemode_domination.qc @@ -596,7 +596,7 @@ void dom_DelayedInit() // Do this check with a delay so we can wait for teams to domination_teams = bound(2, ((autocvar_g_domination_teams_override < 2) ? autocvar_g_domination_default_teams : autocvar_g_domination_teams_override), 4); dom_spawnteams(domination_teams); } - + CheckAllowedTeams(world); domination_teams = ((c4>=0) ? 4 : (c3>=0) ? 3 : 2); diff --git a/qcsrc/server/mutators/gamemode_domination.qh b/qcsrc/server/mutators/gamemode_domination.qh index f0d3cd356..d017b62a4 100644 --- a/qcsrc/server/mutators/gamemode_domination.qh +++ b/qcsrc/server/mutators/gamemode_domination.qh @@ -29,4 +29,4 @@ float pps_pink; // misc globals float domination_roundbased; float domination_teams; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_invasion.qc b/qcsrc/server/mutators/gamemode_invasion.qc index a5e19f67a..fe0d0a7ec 100644 --- a/qcsrc/server/mutators/gamemode_invasion.qc +++ b/qcsrc/server/mutators/gamemode_invasion.qc @@ -67,11 +67,11 @@ void invasion_SpawnChosenMonster(float mon) } else 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; if(spawn_point && spawn_point.target_range) monster.target_range = spawn_point.target_range; - + if(teamplay) if(spawn_point && spawn_point.team && inv_monsters_perteam[spawn_point.team] > 0) monster.team = spawn_point.team; @@ -82,14 +82,14 @@ void invasion_SpawnChosenMonster(float mon) if(inv_monsters_perteam[NUM_TEAM_2] > 0) RandomSelection_Add(world, NUM_TEAM_2, string_null, 1, 1); if(invasion_teams >= 3) if(inv_monsters_perteam[NUM_TEAM_3] > 0) { RandomSelection_Add(world, NUM_TEAM_3, string_null, 1, 1); } if(invasion_teams >= 4) if(inv_monsters_perteam[NUM_TEAM_4] > 0) { RandomSelection_Add(world, NUM_TEAM_4, string_null, 1, 1); } - + monster.team = RandomSelection_chosen_float; } - + if(teamplay) { monster_setupcolors(monster); - + if(monster.sprite) { WaypointSprite_UpdateTeamRadar(monster.sprite, RADARICON_DANGER, ((monster.team) ? Team_ColorRGB(monster.team) : '1 0 0')); @@ -98,7 +98,7 @@ void invasion_SpawnChosenMonster(float mon) monster.sprite.SendFlags |= 1; } } - + monster.monster_attack = false; // it's the player's job to kill all the monsters if(inv_roundcnt >= inv_maxrounds) @@ -157,7 +157,7 @@ float Invasion_CheckWinner() if(inv_numspawned < 1) return 0; // nothing has spawned yet - + if(teamplay) { if(((red_alive > 0) + (blue_alive > 0) + (yellow_alive > 0) + (pink_alive > 0)) > 1) @@ -182,7 +182,7 @@ float Invasion_CheckWinner() if(pink_alive > 0) if(winner_team) { winner_team = 0; } else { winner_team = NUM_TEAM_4; } - } + } else FOR_EACH_PLAYER(head) { @@ -300,7 +300,7 @@ MUTATOR_HOOKFUNCTION(invasion_OnEntityPreSpawn) if(startsWith(self.classname, "monster_")) if(!(self.spawnflags & MONSTERFLAG_SPAWNED)) return true; - + return false; } @@ -360,7 +360,7 @@ MUTATOR_HOOKFUNCTION(invasion_BotShouldAttack) { if(!(checkentity.flags & FL_MONSTER)) return true; - + return false; } @@ -406,7 +406,7 @@ void invasion_DelayedInit() // Do this check with a delay so we can wait for tea invasion_teams = bound(2, autocvar_g_invasion_teams, 4); else invasion_teams = 0; - + independent_players = 1; // to disable extra useless scores invasion_ScoreRules(invasion_teams); @@ -437,7 +437,7 @@ void invasion_Initialize() MON_ACTION(i, MR_PRECACHE); } } - + InitializeEntity(world, invasion_DelayedInit, INITPRIO_GAMETYPE); } diff --git a/qcsrc/server/mutators/gamemode_invasion.qh b/qcsrc/server/mutators/gamemode_invasion.qh index 0162f5d7a..191aef9ad 100644 --- a/qcsrc/server/mutators/gamemode_invasion.qh +++ b/qcsrc/server/mutators/gamemode_invasion.qh @@ -15,4 +15,4 @@ float inv_monsters_perteam[17]; float inv_monsterskill; const float ST_INV_KILLS = 1; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_keepaway.qh b/qcsrc/server/mutators/gamemode_keepaway.qh index 68ea788bb..fd9ed4f2f 100644 --- a/qcsrc/server/mutators/gamemode_keepaway.qh +++ b/qcsrc/server/mutators/gamemode_keepaway.qh @@ -11,4 +11,4 @@ const float SP_KEEPAWAY_BCTIME = 6; void() havocbot_role_ka_carrier; void() havocbot_role_ka_collector; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_keyhunt.qh b/qcsrc/server/mutators/gamemode_keyhunt.qh index c683e71fb..6b27431c2 100644 --- a/qcsrc/server/mutators/gamemode_keyhunt.qh +++ b/qcsrc/server/mutators/gamemode_keyhunt.qh @@ -11,4 +11,4 @@ float kh_Key_AllOwnedByWhichTeam(); typedef void(void) kh_Think_t; void kh_StartRound(); void kh_Controller_SetThink(float t, kh_Think_t func); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_lms.qh b/qcsrc/server/mutators/gamemode_lms.qh index 9bb92c0f2..474e3e197 100644 --- a/qcsrc/server/mutators/gamemode_lms.qh +++ b/qcsrc/server/mutators/gamemode_lms.qh @@ -9,4 +9,4 @@ const float SP_LMS_RANK = 5; float lms_lowest_lives; float lms_next_place; float LMS_NewPlayerLives(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_nexball.qh b/qcsrc/server/mutators/gamemode_nexball.qh index 9cdb6b771..199e15c3b 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qh +++ b/qcsrc/server/mutators/gamemode_nexball.qh @@ -34,4 +34,4 @@ float nb_teams; .float nb_droptime; .float teamtime; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/gamemode_onslaught.qc index 4f33719bb..d1f20f7ee 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/gamemode_onslaught.qc @@ -1333,7 +1333,7 @@ void onslaught_controlpoint_reset() activator = self; SUB_UseTargets(); // to reset the structures, playerspawns etc. - + CSQCMODEL_AUTOUPDATE(); } @@ -1405,7 +1405,7 @@ void spawnfunc_onslaught_controlpoint() self.enemy.colormap = self.colormap; waypoint_spawnforitem(self); - + self.think = onslaught_controlpoint_think; self.nextthink = time; @@ -1415,7 +1415,7 @@ void spawnfunc_onslaught_controlpoint() onslaught_updatelinks(); self.reset = onslaught_controlpoint_reset; - + CSQCMODEL_AUTOINIT(); } @@ -1669,7 +1669,7 @@ MUTATOR_HOOKFUNCTION(ons_MonsterThink) MUTATOR_HOOKFUNCTION(ons_MonsterSpawn) { entity e, ee = world; - + if(self.targetname) { e = find(world,target,self.targetname); @@ -1679,7 +1679,7 @@ MUTATOR_HOOKFUNCTION(ons_MonsterSpawn) ee = e; } } - + if(ee) { activator = ee; diff --git a/qcsrc/server/mutators/gamemode_race.qc b/qcsrc/server/mutators/gamemode_race.qc index 244b9f0e5..7ba832846 100644 --- a/qcsrc/server/mutators/gamemode_race.qc +++ b/qcsrc/server/mutators/gamemode_race.qc @@ -103,7 +103,7 @@ MUTATOR_HOOKFUNCTION(race_PlayerPhysics) self.movement_y = -M_SQRT1_2 * wishspeed; } } - + return false; } @@ -137,7 +137,7 @@ MUTATOR_HOOKFUNCTION(race_ResetMap) cvar_set("timelimit", ftos(race_timelimit)); race_ScoreRules(); } - + return false; } @@ -203,7 +203,7 @@ MUTATOR_HOOKFUNCTION(race_PlayerSpawn) self.race_respawn_spotref = spawn_spot; self.race_place = 0; - + return false; } diff --git a/qcsrc/server/mutators/gamemode_race.qh b/qcsrc/server/mutators/gamemode_race.qh index 4631fd43a..0e20b9b57 100644 --- a/qcsrc/server/mutators/gamemode_race.qh +++ b/qcsrc/server/mutators/gamemode_race.qh @@ -9,4 +9,4 @@ const float ST_RACE_LAPS = 1; const float SP_RACE_LAPS = 4; const float SP_RACE_TIME = 5; const float SP_RACE_FASTEST = 6; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/mutator_buffs.qc b/qcsrc/server/mutators/mutator_buffs.qc index 5efe23790..b2f800a27 100644 --- a/qcsrc/server/mutators/mutator_buffs.qc +++ b/qcsrc/server/mutators/mutator_buffs.qc @@ -66,22 +66,22 @@ void buff_SetCooldown(float cd) void buff_Respawn(entity ent) { if(gameover) { return; } - + vector oldbufforigin = ent.origin; - + 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); setorigin(ent, ((spot.origin + '0 0 200') + (randomvec() * 300))); ent.angles = spot.angles; } - + tracebox(ent.origin, ent.mins * 1.5, self.maxs * 1.5, ent.origin, MOVE_NOMONSTERS, ent); - + setorigin(ent, trace_endpos); // attempt to unstick - + ent.movetype = MOVETYPE_TOSS; - + makevectors(ent.angles); ent.velocity = '0 0 200'; ent.angles = '0 0 0'; @@ -90,9 +90,9 @@ void buff_Respawn(entity ent) pointparticles(particleeffectnum("electro_combo"), oldbufforigin + ((ent.mins + ent.maxs) * 0.5), '0 0 0', 1); pointparticles(particleeffectnum("electro_combo"), CENTER_OR_VIEWOFS(ent), '0 0 0', 1); - + WaypointSprite_Ping(ent.buff_waypoint); - + sound(ent, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere) } @@ -129,11 +129,11 @@ void buff_Touch() } else { return; } // do nothing } - + self.owner = other; self.buff_active = false; self.lifetime = 0; - + Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_BUFF_GOT, self.buffs); Send_Notification(NOTIF_ALL_EXCEPT, other, MSG_INFO, INFO_ITEM_BUFF, other.netname, self.buffs); @@ -176,7 +176,7 @@ void buff_Think() self.color = Buff_Color(self.buffs); self.glowmod = ((self.team) ? Team_ColorRGB(self.team) + '0.1 0.1 0.1' : self.color); self.skin = Buff_Skin(self.buffs); - + setmodel(self, "models/relics/relic.md3"); if(self.buff_waypoint) @@ -206,11 +206,11 @@ void buff_Think() self.owner = world; if(autocvar_g_buffs_randomize) buff_NewType(self, self.buffs); - + if(autocvar_g_buffs_random_location || (self.spawnflags & 1)) buff_Respawn(self); } - + if(self.buff_activetime) if(!gameover) if((round_handler_IsActive() && !round_handler_IsRoundStarted()) || time >= game_starttime) @@ -240,12 +240,12 @@ void buff_Think() if(self.team && !self.buff_waypoint) buff_Waypoint_Spawn(self); - + if(self.lifetime) if(time >= self.lifetime) buff_Respawn(self); } - + self.nextthink = time; //self.angles_y = time * 110.1; } @@ -265,7 +265,7 @@ void buff_Reset() buff_SetCooldown(autocvar_g_buffs_cooldown_activate); buff_Waypoint_Reset(); self.buff_activetime_updated = false; - + if(autocvar_g_buffs_random_location || (self.spawnflags & 1)) buff_Respawn(self); } @@ -273,14 +273,14 @@ void buff_Reset() void buff_Init(entity ent) { if(!cvar("g_buffs")) { remove(self); return; } - + if(!teamplay && self.team) { self.team = 0; } entity oldself = self; self = ent; if(!self.buffs || buff_Available(self.buffs)) buff_NewType(self, 0); - + self.classname = "item_buff"; self.solid = SOLID_TRIGGER; self.flags = FL_ITEM; @@ -300,16 +300,16 @@ void buff_Init(entity ent) buff_SetCooldown(autocvar_g_buffs_cooldown_activate + game_starttime); self.buff_active = !self.buff_activetime; self.pflags = PFLAGS_FULLDYNAMIC; - + if(self.noalign) self.movetype = MOVETYPE_NONE; // reset by random location setmodel(self, "models/relics/relic.md3"); setsize(self, BUFF_MIN, BUFF_MAX); - + if(cvar("g_buffs_random_location") || (self.spawnflags & 1)) buff_Respawn(self); - + self = oldself; } @@ -330,7 +330,7 @@ void buff_SpawnReplacement(entity ent, entity old) setorigin(ent, old.origin); ent.angles = old.angles; ent.noalign = old.noalign; - + buff_Init(ent); } @@ -353,7 +353,7 @@ void buff_Vengeance_DelayedDamage() { if(self.enemy) Damage(self.enemy, self.owner, self.owner, self.dmg, DEATH_BUFF_VENGEANCE, self.enemy.origin, '0 0 0'); - + remove(self); return; } @@ -373,7 +373,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_Calculate) if(random() <= autocvar_g_buffs_medic_survive_chance) if(frag_target.health - autocvar_g_buffs_medic_survive_health > 0) // not if the final result would be less than 0, medic must get health frag_damage = frag_target.health - autocvar_g_buffs_medic_survive_health; - + if(frag_target.buffs & BUFF_VENGEANCE) if(frag_attacker) if(frag_attacker != frag_target) @@ -392,14 +392,14 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_Calculate) if(frag_attacker != frag_target) if(vlen(frag_force)) frag_force = '0 0 0'; - + if(frag_attacker.buffs & BUFF_BASH) if(vlen(frag_force)) if(frag_attacker == frag_target) frag_force *= autocvar_g_buffs_bash_force_self; else frag_force *= autocvar_g_buffs_bash_force; - + if(frag_attacker.buffs & BUFF_DISABILITY) if(frag_target != frag_attacker) frag_target.buff_disability_time = time + autocvar_g_buffs_disability_time; @@ -443,7 +443,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerPhysics) self.stat_sv_maxspeed *= autocvar_g_buffs_speed_speed; self.stat_sv_airspeedlimit_nonqw *= autocvar_g_buffs_speed_speed; } - + if(time < self.buff_disability_time) { self.stat_sv_maxspeed *= autocvar_g_buffs_disability_speed; @@ -479,7 +479,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDies) { Send_Notification(NOTIF_ALL_EXCEPT, self, MSG_INFO, INFO_ITEM_BUFF_LOST, self.netname, self.buffs); self.buffs = 0; - + if(self.buff_model) { remove(self.buff_model); @@ -511,7 +511,7 @@ MUTATOR_HOOKFUNCTION(buffs_RemovePlayer) remove(self.buff_model); self.buff_model = world; } - + // also reset timers here to prevent them continuing after spectating self.buff_disability_time = 0; self.buff_disability_effect_time = 0; @@ -552,24 +552,24 @@ MUTATOR_HOOKFUNCTION(buffs_WeaponRate) { if(self.buffs & BUFF_SPEED) weapon_rate *= autocvar_g_buffs_speed_rate; - + if(time < self.buff_disability_time) weapon_rate *= autocvar_g_buffs_disability_rate; - + return false; } MUTATOR_HOOKFUNCTION(buffs_PlayerThink) { if(gameover || self.deadflag != DEAD_NO) { return false; } - + if(time < self.buff_disability_time) if(time >= self.buff_disability_effect_time) { pointparticles(particleeffectnum("smoking"), self.origin + ((self.mins + self.maxs) * 0.5), '0 0 0', 1); self.buff_disability_effect_time = time + 0.5; } - + if(self.frozen) { if(self.buffs) @@ -578,7 +578,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink) self.buffs = 0; } } - + if((self.buffs & BUFF_INVISIBLE) && (self.oldbuffs & BUFF_INVISIBLE)) if(self.alpha != autocvar_g_buffs_invisible_alpha) self.alpha = autocvar_g_buffs_invisible_alpha; @@ -602,7 +602,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink) if(!self.ammo_nails) { self.ammo_nails = 20; } if(!self.ammo_fuel) { self.ammo_fuel = 20; } } - + if(self.oldbuffs & BUFF_INVISIBLE) { if(time < self.strength_finished && g_instagib) @@ -618,7 +618,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink) self.buff_invisible_prev_alpha = self.alpha; self.alpha = autocvar_g_buffs_invisible_alpha; } - + if(self.oldbuffs & BUFF_FLIGHT) self.gravity = self.buff_flight_prev_gravity; else if(self.buffs & BUFF_FLIGHT) @@ -646,14 +646,14 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink) self.buff_model.color = Buff_Color(self.buffs); self.buff_model.glowmod = ((self.buff_model.team) ? Team_ColorRGB(self.buff_model.team) + '0.1 0.1 0.1' : self.buff_model.color); self.buff_model.skin = Buff_Skin(self.buffs); - + self.effects |= EF_NOSHADOW; } else { remove(self.buff_model); self.buff_model = world; - + self.effects &= ~(EF_NOSHADOW); } } @@ -663,7 +663,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink) self.buff_model.effects = self.effects; self.buff_model.effects |= EF_LOWPRECISION; self.buff_model.effects = self.buff_model.effects & EFMASK_CHEAP; // eat performance - + self.buff_model.alpha = self.alpha; } @@ -698,7 +698,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerRegen) regen_mod_limit = regen_mod_max = autocvar_g_buffs_medic_max; regen_mod_regen = autocvar_g_buffs_medic_regen; } - + if(self.buffs & BUFF_SPEED) regen_mod_regen = autocvar_g_buffs_speed_regen; @@ -750,7 +750,7 @@ void buffs_Initialize() addstat(STAT_BUFFS, AS_INT, buffs); addstat(STAT_MOVEVARS_JUMPVELOCITY, AS_FLOAT, stat_jumpheight); - + InitializeEntity(world, buffs_DelayedInit, INITPRIO_FINDTARGET); } diff --git a/qcsrc/server/mutators/mutator_buffs.qh b/qcsrc/server/mutators/mutator_buffs.qh index 591c81b34..06a76b1bb 100644 --- a/qcsrc/server/mutators/mutator_buffs.qh +++ b/qcsrc/server/mutators/mutator_buffs.qh @@ -29,4 +29,4 @@ const vector BUFF_MAX = ('16 16 20'); // client side options .float cvar_cl_buffs_autoreplace; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/mutator_dodging.qh b/qcsrc/server/mutators/mutator_dodging.qh index 1d13e4516..a8fd66563 100644 --- a/qcsrc/server/mutators/mutator_dodging.qh +++ b/qcsrc/server/mutators/mutator_dodging.qh @@ -8,4 +8,4 @@ float g_dodging; // the jump part of the dodge cannot be ramped .float dodging_single_action; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/mutator_instagib.qc b/qcsrc/server/mutators/mutator_instagib.qc index 127eb0f1e..141172e2f 100644 --- a/qcsrc/server/mutators/mutator_instagib.qc +++ b/qcsrc/server/mutators/mutator_instagib.qc @@ -121,7 +121,7 @@ MUTATOR_HOOKFUNCTION(instagib_MonsterSpawn) // always refill ammo if(self.monsterid == MON_MAGE) self.skin = 1; - + return false; } @@ -250,7 +250,7 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerDamage) if(frag_deathtype & HITTYPE_SECONDARY) { frag_damage = frag_mirrordamage = 0; - + if(frag_target != frag_attacker) { if(frag_target.health > 0) { Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE); } diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator_nades.qc index 41dc285d2..3932ce407 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator_nades.qc @@ -219,7 +219,7 @@ void nade_ice_freeze(entity freezefield, entity frost_target, float freeze_time) 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); } @@ -383,9 +383,9 @@ void nade_heal_think() remove(self); return; } - + self.nextthink = time; - + if(time >= self.nade_special_time) { self.nade_special_time = time+0.25; @@ -420,15 +420,15 @@ void nade_heal_touch() pointparticles(particleeffectnum("healing_fx"), other.origin, '0 0 0', 1); other.health = min(other.health+health_factor, maxhealth); } - other.pauserothealth_finished = max(other.pauserothealth_finished, time + autocvar_g_balance_pause_health_rot); + other.pauserothealth_finished = max(other.pauserothealth_finished, time + autocvar_g_balance_pause_health_rot); } else if ( health_factor < 0 ) { Damage(other,self,self.realowner,-health_factor,DEATH_NADE_HEAL,other.origin,'0 0 0'); } - + } - + if ( IS_REAL_CLIENT(other) || (other.vehicle_flags & VHF_ISVEHICLE) ) { entity show_red = (other.vehicle_flags & VHF_ISVEHICLE) ? other.owner : other; @@ -455,9 +455,9 @@ void nade_heal_boom() healer.healer_radius = autocvar_g_nades_nade_radius; vector size = '1 1 1' * healer.healer_radius / 2; setsize(healer,-size,size); - + Net_LinkEntity(healer, true, 0, healer_send); - + healer.think = nade_heal_think; healer.nextthink = time; healer.SendFlags |= 1; @@ -466,7 +466,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); - + if(autocvar_g_nades_pokenade_monster_lifetime > 0) e.monster_lifetime = time + autocvar_g_nades_pokenade_monster_lifetime; e.monster_skill = MONSTER_SKILL_INSANE; @@ -561,7 +561,7 @@ void nade_touch() remove(self); return; } - + PROJECTILE_TOUCH; //setsize(self, '-2 -2 -2', '2 2 2'); @@ -639,7 +639,7 @@ void nade_damage(entity inflictor, entity attacker, float damage, float deathtyp } self.health -= damage; - + if ( self.nade_type != NADE_TYPE_HEAL || IS_PLAYER(attacker) ) self.realowner = attacker; @@ -767,7 +767,7 @@ float nade_customize() self.traileffectnum = particleeffectnum(Nade_TrailEffect(Nade_ProjectileFromID(self.nade_type, false), self.team)); self.alpha = 1; } - + return true; } @@ -797,7 +797,7 @@ void nade_prime() n.nade_type = ((autocvar_g_nades_client_select) ? self.cvar_cl_nade_type : autocvar_g_nades_nade_type); n.pokenade_type = ((autocvar_g_nades_client_select) ? self.cvar_cl_pokenade_type : autocvar_g_nades_pokenade_monster_type); } - + n.nade_type = bound(1, n.nade_type, NADE_TYPE_LAST); setmodel(n, "models/weapons/v_ok_grenade.md3"); @@ -912,7 +912,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerPreThink) 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) { self.nade_timer = bound(0, (time - self.nade.lifetime) / autocvar_g_nades_nade_lifetime, 1); @@ -961,7 +961,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerPreThink) time_score = autocvar_g_nades_bonus_score_time_flagcarrier; else time_score = autocvar_g_nades_bonus_score_time; - + if(key_count) time_score = autocvar_g_nades_bonus_score_time_flagcarrier * key_count; // multiply by the number of keys the player is holding @@ -975,7 +975,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerPreThink) self.nade_type = autocvar_g_nades_bonus_type; self.pokenade_type = autocvar_g_nades_pokenade_monster_type; } - + self.nade_type = bound(1, self.nade_type, NADE_TYPE_LAST); if(self.bonus_nade_score >= 0 && autocvar_g_nades_bonus_score_max) @@ -1050,7 +1050,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerSpawn) { setorigin(self, self.nade_spawnloc.origin); self.nade_spawnloc.cnt -= 1; - + if(self.nade_spawnloc.cnt <= 0) { remove(self.nade_spawnloc); @@ -1111,7 +1111,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerDamage) Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_NADE, frag_target.netname); Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_REVIVE_SELF); } - + return false; } @@ -1172,7 +1172,7 @@ void nades_Initialize() addstat(STAT_NADE_BONUS_SCORE, AS_FLOAT, bonus_nade_score); addstat(STAT_HEALING_ORB, AS_FLOAT, stat_healing_orb); addstat(STAT_HEALING_ORB_ALPHA, AS_FLOAT, stat_healing_orb_alpha); - + precache_model("models/ok_nade_counter/ok_nade_counter.md3"); precache_model("models/weapons/h_ok_grenade.iqm"); precache_model("models/weapons/v_ok_grenade.md3"); diff --git a/qcsrc/server/mutators/mutator_nades.qh b/qcsrc/server/mutators/mutator_nades.qh index 341c4bb59..1a0dd5252 100644 --- a/qcsrc/server/mutators/mutator_nades.qh +++ b/qcsrc/server/mutators/mutator_nades.qh @@ -27,4 +27,4 @@ void(entity player) nades_Clear; void(entity player, float score) nades_GiveBonus; // Remove all bonus nades from a player void(entity player) nades_RemoveBonus; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/mutator_nix.qc b/qcsrc/server/mutators/mutator_nix.qc index ee337b50a..a0ec6adaa 100644 --- a/qcsrc/server/mutators/mutator_nix.qc +++ b/qcsrc/server/mutators/mutator_nix.qc @@ -65,7 +65,7 @@ void NIX_GiveCurrentWeapon() if(nix_nextchange != self.nix_lastchange_id) // this shall only be called once per round! { self.ammo_shells = self.ammo_nails = self.ammo_rockets = self.ammo_cells = self.ammo_plasma = self.ammo_fuel = 0; - + if(self.items & IT_UNLIMITED_WEAPON_AMMO) { switch(e.ammo_field) diff --git a/qcsrc/server/mutators/mutator_overkill.qc b/qcsrc/server/mutators/mutator_overkill.qc index 868b16d47..1d151fc3e 100644 --- a/qcsrc/server/mutators/mutator_overkill.qc +++ b/qcsrc/server/mutators/mutator_overkill.qc @@ -97,7 +97,7 @@ MUTATOR_HOOKFUNCTION(ok_PlayerRegen) { self.armorvalue = CalcRotRegen(self.armorvalue, autocvar_g_balance_armor_regenstable, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, 1 * frametime * (time > self.ok_pauseregen_finished), 0, 0, 1, 1 * frametime * (time > self.pauserotarmor_finished), autocvar_g_balance_armor_limit); self.health = CalcRotRegen(self.health, autocvar_g_balance_health_regenstable, 0, 100, 1 * frametime * (time > self.ok_pauseregen_finished), 200, 0, autocvar_g_balance_health_rotlinear, 1 * frametime * (time > self.pauserothealth_finished), autocvar_g_balance_health_limit); - + float minf, maxf, limitf; maxf = autocvar_g_balance_fuel_rotstable; @@ -136,7 +136,7 @@ MUTATOR_HOOKFUNCTION(ok_PlayerPreThink) { self.jump_interval = time + WEP_CVAR_PRI(blaster, refire) * W_WeaponRateFactor(); makevectors(self.v_angle); - + W_Blaster_Attack( WEP_BLASTER | HITTYPE_SECONDARY, WEP_CVAR_SEC(vaporizer, shotangle), @@ -189,7 +189,7 @@ MUTATOR_HOOKFUNCTION(ok_PlayerSpawn) } else self.ok_use_ammocharge = 0; - + self.ok_pauseregen_finished = time + 2; return false; diff --git a/qcsrc/server/mutators/mutator_overkill.qh b/qcsrc/server/mutators/mutator_overkill.qh index 9e20df33f..0b418be40 100644 --- a/qcsrc/server/mutators/mutator_overkill.qh +++ b/qcsrc/server/mutators/mutator_overkill.qh @@ -15,4 +15,4 @@ void(entity ent, float wep) ok_DecreaseCharge; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/mutators.qh b/qcsrc/server/mutators/mutators.qh index 3fa9f7432..6d889e24e 100644 --- a/qcsrc/server/mutators/mutators.qh +++ b/qcsrc/server/mutators/mutators.qh @@ -40,4 +40,4 @@ MUTATOR_DECLARATION(mutator_buffs); MUTATOR_DECLARATION(sandbox); MUTATOR_DECLARATION(mutator_overkill); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/mutators_include.qh b/qcsrc/server/mutators/mutators_include.qh index 649fff3e4..da723d927 100644 --- a/qcsrc/server/mutators/mutators_include.qh +++ b/qcsrc/server/mutators/mutators_include.qh @@ -19,4 +19,4 @@ #include "mutator_overkill.qh" #include "mutator_nades.qh" #include "mutator_buffs.qh" -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 63cb1cc19..776ba42e7 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -56,7 +56,7 @@ void sandbox_ObjectFunction_Think() } self.nextthink = time; - + CSQCMODEL_AUTOUPDATE(); } @@ -174,7 +174,7 @@ entity sandbox_ObjectSpawn(float database) setorigin(e, trace_endpos); e.angles_y = self.v_angle.y; } - + oldself = self; self = e; CSQCMODEL_AUTOINIT(); diff --git a/qcsrc/server/pathlib/pathlib.qh b/qcsrc/server/pathlib/pathlib.qh index eb4cee280..d0029bfc4 100644 --- a/qcsrc/server/pathlib/pathlib.qh +++ b/qcsrc/server/pathlib/pathlib.qh @@ -119,4 +119,4 @@ var float pathlib_wpp_waypointcallback(entity wp, entity wp_prev); #include "expandnode.qc" #include "main.qc" #include "path_waypoint.qc" -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/playerdemo.qh b/qcsrc/server/playerdemo.qh index 4fbfdb12f..8aecd483e 100644 --- a/qcsrc/server/playerdemo.qh +++ b/qcsrc/server/playerdemo.qh @@ -8,4 +8,4 @@ float playerdemo_read(); void playerdemo_open_read(string f); void playerdemo_open_write(string f); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/portals.qh b/qcsrc/server/portals.qh index 846ee25f0..68ff068a7 100644 --- a/qcsrc/server/portals.qh +++ b/qcsrc/server/portals.qh @@ -12,4 +12,4 @@ void Portal_ClearWithID(entity own, float id); vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle); void Portal_ClearAll_PortalsOnly(entity own); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/progs.src b/qcsrc/server/progs.src index b2401bce5..85e75cda9 100644 --- a/qcsrc/server/progs.src +++ b/qcsrc/server/progs.src @@ -111,4 +111,4 @@ weapons/weaponsystem.qc ../warpzonelib/common.qc ../warpzonelib/mathlib.qc ../warpzonelib/server.qc -../warpzonelib/util_server.qc \ No newline at end of file +../warpzonelib/util_server.qc diff --git a/qcsrc/server/race.qh b/qcsrc/server/race.qh index 58a7e5950..bfdc9be43 100644 --- a/qcsrc/server/race.qh +++ b/qcsrc/server/race.qh @@ -29,4 +29,4 @@ float race_GetFractionalLapCount(entity e); float race_readTime(string map, float pos); string race_readUID(string map, float pos); string race_readName(string map, float pos); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/round_handler.qh b/qcsrc/server/round_handler.qh index c71b21a68..448788442 100644 --- a/qcsrc/server/round_handler.qh +++ b/qcsrc/server/round_handler.qh @@ -24,4 +24,4 @@ void round_handler_Remove(); #define round_handler_IsRoundStarted() (!round_handler.wait && !round_handler.cnt) #define round_handler_GetEndTime() (round_handler.round_endtime) -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/scores.qh b/qcsrc/server/scores.qh index 5f9857099..ff0555cad 100644 --- a/qcsrc/server/scores.qh +++ b/qcsrc/server/scores.qh @@ -127,4 +127,4 @@ string GetTeamScoreString(float tm, float shortString); * nospectators: exclude spectators */ entity PlayerScore_Sort(.float field, float teams, float strict, float nospectators); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/secret.qh b/qcsrc/server/secret.qh index d1fe4f3be..6e6ae0b9a 100644 --- a/qcsrc/server/secret.qh +++ b/qcsrc/server/secret.qh @@ -19,4 +19,4 @@ float secrets_found; * update secrets status. */ void secrets_setstatus(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/spawnpoints.qh b/qcsrc/server/spawnpoints.qh index 6f180128e..beab71c7a 100644 --- a/qcsrc/server/spawnpoints.qh +++ b/qcsrc/server/spawnpoints.qh @@ -6,4 +6,4 @@ float spawnpoint_nag; float SpawnEvent_Send(entity to, float sf); entity Spawn_FilterOutBadSpots(entity firstspot, float mindist, float teamcheck); entity SelectSpawnPoint (float anypoint); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 8b5f507c1..c2add840f 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -425,7 +425,7 @@ void Item_Respawn (void) self.think = Item_Think; self.nextthink = time; - + //pointparticles(particleeffectnum("item_respawn"), self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1); pointparticles(particleeffectnum("item_respawn"), self.origin + 0.5 * (self.mins + self.maxs), '0 0 0', 1); } @@ -1139,7 +1139,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, Item_Reset(); Net_LinkEntity(self, false, 0, ItemSend); - + self.SendFlags |= ISF_SIZE; if(self.angles) self.SendFlags |= ISF_ANGLES; diff --git a/qcsrc/server/t_items.qh b/qcsrc/server/t_items.qh index f72221407..bb914234e 100644 --- a/qcsrc/server/t_items.qh +++ b/qcsrc/server/t_items.qh @@ -169,4 +169,4 @@ void GiveRot(entity e, float v0, float v1, .float rotfield, float rottime, .floa float GiveItems(entity e, float beginarg, float endarg); #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/t_jumppads.qh b/qcsrc/server/t_jumppads.qh index e51732448..9d66e9890 100644 --- a/qcsrc/server/t_jumppads.qh +++ b/qcsrc/server/t_jumppads.qh @@ -52,4 +52,4 @@ void spawnfunc_trigger_push(); void spawnfunc_target_push(); void spawnfunc_info_notnull(); void spawnfunc_target_position(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index 6a64420c6..22b4cf669 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -436,7 +436,7 @@ void spawnfunc_func_train() if (!InitMovingBrushTrigger()) return; self.effects |= EF_LOWPRECISION; - + if (self.spawnflags & 2) { self.platmovetype_turn = true; diff --git a/qcsrc/server/t_teleporters.qh b/qcsrc/server/t_teleporters.qh index 4bde2db15..03e3c3f29 100644 --- a/qcsrc/server/t_teleporters.qh +++ b/qcsrc/server/t_teleporters.qh @@ -68,4 +68,4 @@ entity teleport_first; void spawnfunc_trigger_teleport (void); void WarpZone_PostTeleportPlayer_Callback(entity pl); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/teamplay.qh b/qcsrc/server/teamplay.qh index e6146aa60..8ce6eae61 100644 --- a/qcsrc/server/teamplay.qh +++ b/qcsrc/server/teamplay.qh @@ -52,4 +52,4 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam); void SV_ChangeTeam(float _color); void ShufflePlayerOutOfTeam (float source_team); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/tturrets/include/turrets.qh b/qcsrc/server/tturrets/include/turrets.qh index b9c3501d4..50bfa326c 100644 --- a/qcsrc/server/tturrets/include/turrets.qh +++ b/qcsrc/server/tturrets/include/turrets.qh @@ -30,4 +30,4 @@ //#include "../units/unit_hive.qc" /// Swarm AI #endif // TTURRETS_ENABLED -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/tturrets/include/turrets_early.qh b/qcsrc/server/tturrets/include/turrets_early.qh index 181d44166..4c5d95f9e 100644 --- a/qcsrc/server/tturrets/include/turrets_early.qh +++ b/qcsrc/server/tturrets/include/turrets_early.qh @@ -472,4 +472,4 @@ const int TNSF_ANIM = 128; const int TNSF_FULL_UPDATE = 16777215; #endif // TTURRETS_ENABLED -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/vehicles/bumblebee.qh b/qcsrc/server/vehicles/bumblebee.qh index 18d90aa3b..727cbf2a6 100644 --- a/qcsrc/server/vehicles/bumblebee.qh +++ b/qcsrc/server/vehicles/bumblebee.qh @@ -139,4 +139,4 @@ void bumblebee_read_extra(); void vehicle_bumblebee_assemble(); #endif //CSQC -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/vehicles/vehicles.qh b/qcsrc/server/vehicles/vehicles.qh index 5c64d6b9f..e6b976096 100644 --- a/qcsrc/server/vehicles/vehicles.qh +++ b/qcsrc/server/vehicles/vehicles.qh @@ -11,4 +11,4 @@ #include "bumblebee.qc" #endif #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/vehicles/vehicles_def.qh b/qcsrc/server/vehicles/vehicles_def.qh index 6a55456ab..080f891f4 100644 --- a/qcsrc/server/vehicles/vehicles_def.qh +++ b/qcsrc/server/vehicles/vehicles_def.qh @@ -76,4 +76,4 @@ void(entity e, vector force, vector force_pos) physics_addforce = #541; // apply void(entity e, vector torque) physics_addtorque = #542; // add relative torque #endif // VEHICLES_USE_ODE #endif // VEHICLES_ENABLED -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/waypointsprites.qh b/qcsrc/server/waypointsprites.qh index db310a003..430e5832b 100644 --- a/qcsrc/server/waypointsprites.qh +++ b/qcsrc/server/waypointsprites.qh @@ -110,4 +110,4 @@ void WaypointSprite_ClearOwned(); void WaypointSprite_PlayerDead(); void WaypointSprite_PlayerGone(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/weapons/accuracy.qh b/qcsrc/server/weapons/accuracy.qh index 37b76ee0c..03f002f6a 100644 --- a/qcsrc/server/weapons/accuracy.qh +++ b/qcsrc/server/weapons/accuracy.qh @@ -26,4 +26,4 @@ void accuracy_add(entity e, float w, float fired, float hit); // helper float accuracy_isgooddamage(entity attacker, entity targ); float accuracy_canbegooddamage(entity attacker); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index eaa321f53..c37fce0ab 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -48,7 +48,7 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp float is_from_contents = (deathtype == DEATH_SLIME || deathtype == DEATH_LAVA); float is_from_owner = (inflictor == projowner); float is_from_exception = (exception != -1); - + //dprint(strcat("W_CheckProjectileDamage: from_contents ", ftos(is_from_contents), " : from_owner ", ftos(is_from_owner), " : exception ", strcat(ftos(is_from_exception), " (", ftos(exception), "). \n"))); if(autocvar_g_projectiles_damage <= -2) @@ -68,7 +68,7 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp return (exception); // if exception is detected, allow it to override else if(!is_from_contents) return false; // otherwise, only allow damage from contents - } + } else if(autocvar_g_projectiles_damage == 1) { if(is_from_exception) @@ -89,13 +89,13 @@ void W_PrepareExplosionByDamage(entity attacker, void() explode) { self.takedamage = DAMAGE_NO; self.event_damage = func_null; - + if(IS_CLIENT(attacker) && !autocvar_g_projectiles_keep_owner) { self.owner = attacker; self.realowner = attacker; } - + // do not explode NOW but in the NEXT FRAME! // because recursive calls to RadiusDamage are not allowed self.nextthink = time; diff --git a/qcsrc/server/weapons/common.qh b/qcsrc/server/weapons/common.qh index 6618367ed..341f4ff35 100644 --- a/qcsrc/server/weapons/common.qh +++ b/qcsrc/server/weapons/common.qh @@ -7,4 +7,4 @@ void W_GiveWeapon (entity e, float wep); void W_PlayStrengthSound(entity player); float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtype, float exception); void W_PrepareExplosionByDamage(entity attacker, void() explode); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/weapons/csqcprojectile.qh b/qcsrc/server/weapons/csqcprojectile.qh index 7f4bd4632..c2ecc3e4d 100644 --- a/qcsrc/server/weapons/csqcprojectile.qh +++ b/qcsrc/server/weapons/csqcprojectile.qh @@ -7,4 +7,4 @@ void CSQCProjectile(entity e, float clientanimate, float type, float docull); void UpdateCSQCProjectile(entity e); void UpdateCSQCProjectileAfterTeleport(entity e); void CSQCProjectile_Check(entity e); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/weapons/hitplot.qh b/qcsrc/server/weapons/hitplot.qh index 2c37622f8..3b111f1c5 100644 --- a/qcsrc/server/weapons/hitplot.qh +++ b/qcsrc/server/weapons/hitplot.qh @@ -6,4 +6,4 @@ void W_HitPlotAnalysis(entity player, vector screenforward, vector screenright, vector screenup); void W_HitPlotOpen(entity player); void W_HitPlotClose(entity player); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/weapons/spawning.qh b/qcsrc/server/weapons/spawning.qh index 2e3efb62b..e9cfad94e 100644 --- a/qcsrc/server/weapons/spawning.qh +++ b/qcsrc/server/weapons/spawning.qh @@ -4,4 +4,4 @@ string W_Apply_Weaponreplace(string in); void weapon_defaultspawnfunc(float wpn); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index b77a7b90d..6b47a8822 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -50,7 +50,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto wep.owner = wep.enemy = own; wep.flags |= FL_TOSSED; wep.colormap = own.colormap; - + W_DropEvent(WR_DROP,own,wpn,wep); if(WepSet_FromWeapon(wpn) & WEPSET_SUPERWEAPONS) @@ -92,7 +92,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto wep.savenextthink = wep.nextthink; wep.nextthink = min(wep.nextthink, time + 0.5); wep.pickup_anyway = true; // these are ALWAYS pickable - + //wa = W_AmmoItemCode(wpn); if(ammotype == ammo_none) { @@ -194,7 +194,7 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce) W_SwitchWeapon_Force(self, w_getbestweapon(self)); a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo); - + if(!a) return; Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_WEAPON_DROP, a, w); } diff --git a/qcsrc/server/weapons/throwing.qh b/qcsrc/server/weapons/throwing.qh index b1d4cbb00..4994d02ae 100644 --- a/qcsrc/server/weapons/throwing.qh +++ b/qcsrc/server/weapons/throwing.qh @@ -13,4 +13,4 @@ float W_IsWeaponThrowable(float w); void W_ThrowWeapon(vector velo, vector delta, float doreduce); void SpawnThrownWeapon(vector org, float w); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/weapons/weaponstats.qh b/qcsrc/server/weapons/weaponstats.qh index 29c4ef98f..0018f1906 100644 --- a/qcsrc/server/weapons/weaponstats.qh +++ b/qcsrc/server/weapons/weaponstats.qh @@ -11,4 +11,4 @@ void WeaponStats_LogDamage(float awep, float abot, float vwep, float vbot, float void WeaponStats_LogKill(float awep, float abot, float vwep, float vbot); #define WEAPONSTATS_GETINDEX(awep,abot,vwep,vbot) (((vwep) + (awep) * (WEP_LAST - WEP_FIRST + 1) - (WEP_FIRST + WEP_FIRST * (WEP_LAST - WEP_FIRST + 1))) * 4 + (abot) * 2 + (vbot)) -#endif \ No newline at end of file +#endif diff --git a/qcsrc/server/weapons/weaponsystem.qh b/qcsrc/server/weapons/weaponsystem.qh index 20370d1b8..bb0cea798 100644 --- a/qcsrc/server/weapons/weaponsystem.qh +++ b/qcsrc/server/weapons/weaponsystem.qh @@ -40,4 +40,4 @@ float weapon_prepareattack_do(float secondary, float attacktime); void weapon_thinkf(float fr, float t, void() func); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/warpzonelib/anglestransform.qh b/qcsrc/warpzonelib/anglestransform.qh index e65430230..053847101 100644 --- a/qcsrc/warpzonelib/anglestransform.qh +++ b/qcsrc/warpzonelib/anglestransform.qh @@ -33,4 +33,4 @@ vector AnglesTransform_ToVAngles(vector v); // transformed = original * transform + postshift vector AnglesTransform_Multiply_GetPostShift(vector sf0, vector st0, vector t1, vector st1); vector AnglesTransform_PrePostShift_GetPostShift(vector sf, vector t, vector st); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/warpzonelib/client.qh b/qcsrc/warpzonelib/client.qh index 4b6aac4ab..a9f0fe1c2 100644 --- a/qcsrc/warpzonelib/client.qh +++ b/qcsrc/warpzonelib/client.qh @@ -13,4 +13,4 @@ void WarpZone_Shutdown(); vector warpzone_save_view_origin; vector warpzone_save_view_angles; -#endif \ No newline at end of file +#endif diff --git a/qcsrc/warpzonelib/common.qh b/qcsrc/warpzonelib/common.qh index c6ebb8b2d..7742db8b9 100644 --- a/qcsrc/warpzonelib/common.qh +++ b/qcsrc/warpzonelib/common.qh @@ -104,4 +104,4 @@ entity WarpZone_RefSys_SpawnSameRefSys(entity me); // spawn().R = me.R #ifndef BITXOR_ASSIGN # define BITXOR_ASSIGN(a,b) ((a) = ((a) | (b)) - ((a) & (b))) #endif -#endif \ No newline at end of file +#endif diff --git a/qcsrc/warpzonelib/mathlib.qh b/qcsrc/warpzonelib/mathlib.qh index 659f43776..7eebd032c 100644 --- a/qcsrc/warpzonelib/mathlib.qh +++ b/qcsrc/warpzonelib/mathlib.qh @@ -101,4 +101,4 @@ const float M_2_PI = 0.63661977236758134308; /* 2/pi */ const float M_2_SQRTPI = 1.12837916709551257390; /* 2/sqrt(pi) */ const float M_SQRT2 = 1.41421356237309504880; /* sqrt(2) */ const float M_SQRT1_2 = 0.70710678118654752440; /* 1/sqrt(2) */ -#endif \ No newline at end of file +#endif diff --git a/qcsrc/warpzonelib/server.qh b/qcsrc/warpzonelib/server.qh index 359a29a1f..88ad6f508 100644 --- a/qcsrc/warpzonelib/server.qh +++ b/qcsrc/warpzonelib/server.qh @@ -15,4 +15,4 @@ float WarpZone_Projectile_Touch_ImpactFilter_Callback(); void WarpZone_PlayerPhysics_FixVAngle(void); void WarpZone_PostInitialize_Callback(void); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/warpzonelib/util_server.qh b/qcsrc/warpzonelib/util_server.qh index e6f1071e7..38df7fe0c 100644 --- a/qcsrc/warpzonelib/util_server.qh +++ b/qcsrc/warpzonelib/util_server.qh @@ -4,4 +4,4 @@ float WarpZoneLib_MoveOutOfSolid(entity e); float WarpZoneLib_ExactTrigger_Touch(); void WarpZoneLib_ExactTrigger_Init(); -#endif \ No newline at end of file +#endif diff --git a/qcsrc/whitespace.sh b/qcsrc/whitespace.sh new file mode 100755 index 000000000..a017dc84f --- /dev/null +++ b/qcsrc/whitespace.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +find . -type f -print0 | \ + xargs -0 sed -i \ + `# strip trailing spaces` \ + -e 's/[[:space:]]*$//' \ + `# line feed at EOF for #include to work properly` \ + -e '$a\' -- 2.39.2