From c7e9b42f7acdcbb72758b33371b105054ce5400d Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 7 Aug 2016 21:17:03 +1000 Subject: [PATCH] Run whitespace checker --- qcsrc/client/announcer.qc | 2 +- qcsrc/common/monsters/monster/shambler.qc | 2 +- qcsrc/common/mutators/mutator/buffs/buffs.qc | 2 +- qcsrc/common/mutators/mutator/campcheck/campcheck.qc | 2 +- qcsrc/common/mutators/mutator/midair/midair.qc | 2 +- qcsrc/common/mutators/mutator/multijump/multijump.qc | 2 +- qcsrc/common/mutators/mutator/nades/nades.qc | 2 +- qcsrc/common/mutators/mutator/pinata/pinata.qc | 2 +- qcsrc/common/weapons/calculations.qc | 2 +- qcsrc/common/weapons/weapon/crylink.qc | 2 +- qcsrc/server/cl_client.qc | 4 ++-- qcsrc/server/mutators/mutator/gamemode_ctf.qc | 2 +- qcsrc/server/mutators/mutator/gamemode_cts.qc | 2 +- qcsrc/server/mutators/mutator/gamemode_keepaway.qc | 2 +- qcsrc/server/mutators/mutator/gamemode_keyhunt.qc | 2 +- qcsrc/server/mutators/mutator/gamemode_lms.qc | 2 +- qcsrc/server/mutators/mutator/gamemode_race.qc | 2 +- qcsrc/tools/whitespace.sh | 5 +++-- 18 files changed, 21 insertions(+), 20 deletions(-) diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 9107add6c..62b732bec 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -58,7 +58,7 @@ void Announcer_Countdown(entity this) { Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_GAMESTART, countdown_rounded); Notification annce_num = Announcer_PickNumber(CNT_GAMESTART, countdown_rounded); - if(annce_num != NULL) + if(annce_num != NULL) Local_Notification(MSG_ANNCE, annce_num); } diff --git a/qcsrc/common/monsters/monster/shambler.qc b/qcsrc/common/monsters/monster/shambler.qc index 3018741b0..eb615fb55 100644 --- a/qcsrc/common/monsters/monster/shambler.qc +++ b/qcsrc/common/monsters/monster/shambler.qc @@ -91,7 +91,7 @@ void M_Shambler_Attack_Lightning_Explode(entity this, entity directhitentity) if(this.move_movetype == MOVETYPE_NONE) this.velocity = this.oldvelocity; - RadiusDamage (this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_radius), + RadiusDamage (this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_radius), NULL, NULL, (autocvar_g_monster_shambler_attack_lightning_force), this.projectiledeathtype, directhitentity); FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_shambler_attack_lightning_radius_zap, it != this.realowner && it.takedamage, diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc index e27fa3d7f..29a0a3925 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -681,7 +681,7 @@ MUTATOR_HOOKFUNCTION(buffs, MonsterMove) MUTATOR_HOOKFUNCTION(buffs, PlayerDies) { entity frag_target = M_ARGV(2, entity); - + if(frag_target.buffs) { int buffid = buff_FirstFromFlags(frag_target.buffs).m_id; diff --git a/qcsrc/common/mutators/mutator/campcheck/campcheck.qc b/qcsrc/common/mutators/mutator/campcheck/campcheck.qc index 191f61681..b39a2c165 100644 --- a/qcsrc/common/mutators/mutator/campcheck/campcheck.qc +++ b/qcsrc/common/mutators/mutator/campcheck/campcheck.qc @@ -11,7 +11,7 @@ REGISTER_MUTATOR(campcheck, cvar("g_campcheck")); MUTATOR_HOOKFUNCTION(campcheck, PlayerDies) { entity frag_target = M_ARGV(2, entity); - + Kill_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CPID_CAMPCHECK); } diff --git a/qcsrc/common/mutators/mutator/midair/midair.qc b/qcsrc/common/mutators/mutator/midair/midair.qc index cda6b4c82..1fa69a60e 100644 --- a/qcsrc/common/mutators/mutator/midair/midair.qc +++ b/qcsrc/common/mutators/mutator/midair/midair.qc @@ -10,7 +10,7 @@ MUTATOR_HOOKFUNCTION(midair, PlayerDamage_Calculate) { entity frag_attacker = M_ARGV(1, entity); entity frag_target = M_ARGV(2, entity); - + if(IS_PLAYER(frag_attacker)) if(IS_PLAYER(frag_target)) if(time < frag_target.midair_shieldtime) diff --git a/qcsrc/common/mutators/mutator/multijump/multijump.qc b/qcsrc/common/mutators/mutator/multijump/multijump.qc index 780836d49..d6dc30cee 100644 --- a/qcsrc/common/mutators/mutator/multijump/multijump.qc +++ b/qcsrc/common/mutators/mutator/multijump/multijump.qc @@ -60,7 +60,7 @@ MUTATOR_HOOKFUNCTION(multijump, PlayerJump) int phys_multijump = PHYS_MULTIJUMP(player); - if(!M_ARGV(2, bool) && player.multijump_ready && (PHYS_MULTIJUMP_COUNT(player) < phys_multijump || phys_multijump == -1) && player.velocity_z > PHYS_MULTIJUMP_SPEED(player) && + if(!M_ARGV(2, bool) && player.multijump_ready && (PHYS_MULTIJUMP_COUNT(player) < phys_multijump || phys_multijump == -1) && player.velocity_z > PHYS_MULTIJUMP_SPEED(player) && (!PHYS_MULTIJUMP_MAXSPEED(player) || vdist(player.velocity, <=, PHYS_MULTIJUMP_MAXSPEED(player)))) { if (PHYS_MULTIJUMP(player)) diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 14e2b01ac..fdde99856 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -1429,7 +1429,7 @@ MUTATOR_HOOKFUNCTION(nades, MonsterDies) MUTATOR_HOOKFUNCTION(nades, DropSpecialItems) { entity frag_target = M_ARGV(0, entity); - + if(frag_target.nade) toss_nade(frag_target, true, '0 0 0', time + 0.05); } diff --git a/qcsrc/common/mutators/mutator/pinata/pinata.qc b/qcsrc/common/mutators/mutator/pinata/pinata.qc index 10866a2f1..acdf1718b 100644 --- a/qcsrc/common/mutators/mutator/pinata/pinata.qc +++ b/qcsrc/common/mutators/mutator/pinata/pinata.qc @@ -4,7 +4,7 @@ REGISTER_MUTATOR(pinata, cvar("g_pinata") && !cvar("g_instagib") && !cvar("g_ove MUTATOR_HOOKFUNCTION(pinata, PlayerDies) { entity frag_target = M_ARGV(2, entity); - + FOREACH(Weapons, it != WEP_Null, LAMBDA( if(frag_target.weapons & WepSet_FromWeapon(it)) if(PS(frag_target).m_switchweapon != it) diff --git a/qcsrc/common/weapons/calculations.qc b/qcsrc/common/weapons/calculations.qc index e8307f39d..73d9b938e 100644 --- a/qcsrc/common/weapons/calculations.qc +++ b/qcsrc/common/weapons/calculations.qc @@ -256,7 +256,7 @@ vector W_CalculateSpread(vector forward, float spread, float spreadfactor, float default: error("g_projectiles_spread_style must be 0 (sphere), 1 (flattened sphere), 2 (circle), 3 (gauss 3D), 4 (gauss plane), 5 (linear falloff), 6 (quadratic falloff), 7 (stronger falloff)!"); } - + return '0 0 0'; /* * how to derive falloff functions: diff --git a/qcsrc/common/weapons/weapon/crylink.qc b/qcsrc/common/weapons/weapon/crylink.qc index bb782643a..643aca206 100644 --- a/qcsrc/common/weapons/weapon/crylink.qc +++ b/qcsrc/common/weapons/weapon/crylink.qc @@ -132,7 +132,7 @@ void W_Crylink_LinkExplode(entity e, entity e2, entity directhitentity) 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), + RadiusDamage(e, e.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * a, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * a, WEP_CVAR_BOTH(crylink, isprimary, radius), NULL, NULL, WEP_CVAR_BOTH(crylink, isprimary, force) * a, e.projectiledeathtype, directhitentity); W_Crylink_LinkExplode(e.queuenext, e2, directhitentity); diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index a3082d2b7..c212691db 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -247,7 +247,7 @@ void PutObserverInServer(entity this) // needed for player sounds this.model = ""; FixPlayermodel(this); - } + } setmodel(this, MDL_Null); setsize(this, STAT(PL_CROUCH_MIN, NULL), STAT(PL_CROUCH_MAX, NULL)); this.view_ofs = '0 0 0'; @@ -496,7 +496,7 @@ void PutClientInServer(entity this) PutObserverInServer(this); } else if (IS_PLAYER(this)) { if (this.vehicle) vehicles_exit(this.vehicle, VHEF_RELEASE); - + PlayerState_attach(this); accuracy_resend(this); diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index 7f5b0ccbd..c1f798af6 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -2444,7 +2444,7 @@ MUTATOR_HOOKFUNCTION(ctf, SV_ParseClientCommand) MUTATOR_HOOKFUNCTION(ctf, DropSpecialItems) { entity frag_target = M_ARGV(0, entity); - + if(frag_target.flagcarried) ctf_Handle_Throw(frag_target, NULL, DROP_THROW); } diff --git a/qcsrc/server/mutators/mutator/gamemode_cts.qc b/qcsrc/server/mutators/mutator/gamemode_cts.qc index 28ec506a8..a712e033d 100644 --- a/qcsrc/server/mutators/mutator/gamemode_cts.qc +++ b/qcsrc/server/mutators/mutator/gamemode_cts.qc @@ -283,7 +283,7 @@ MUTATOR_HOOKFUNCTION(cts, PutClientInServer) MUTATOR_HOOKFUNCTION(cts, PlayerDies) { entity frag_target = M_ARGV(2, entity); - + frag_target.respawn_flags |= RESPAWN_FORCE; race_AbandonRaceCheck(frag_target); } diff --git a/qcsrc/server/mutators/mutator/gamemode_keepaway.qc b/qcsrc/server/mutators/mutator/gamemode_keepaway.qc index 407ac6c98..da43b84de 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keepaway.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keepaway.qc @@ -466,7 +466,7 @@ MUTATOR_HOOKFUNCTION(ka, HavocBot_ChooseRole) MUTATOR_HOOKFUNCTION(ka, DropSpecialItems) { entity frag_target = M_ARGV(0, entity); - + if(frag_target.ballcarried) ka_DropEvent(frag_target); } diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index 26b381199..c3acf86e6 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -1384,7 +1384,7 @@ MUTATOR_HOOKFUNCTION(kh, HavocBot_ChooseRole) MUTATOR_HOOKFUNCTION(kh, DropSpecialItems) { entity frag_target = M_ARGV(0, entity); - + kh_Key_DropAll(frag_target, false); } diff --git a/qcsrc/server/mutators/mutator/gamemode_lms.qc b/qcsrc/server/mutators/mutator/gamemode_lms.qc index a86982793..e96e7f2f9 100644 --- a/qcsrc/server/mutators/mutator/gamemode_lms.qc +++ b/qcsrc/server/mutators/mutator/gamemode_lms.qc @@ -176,7 +176,7 @@ MUTATOR_HOOKFUNCTION(lms, PutClientInServer) MUTATOR_HOOKFUNCTION(lms, PlayerDies) { entity frag_target = M_ARGV(2, entity); - + frag_target.respawn_flags |= RESPAWN_FORCE; } diff --git a/qcsrc/server/mutators/mutator/gamemode_race.qc b/qcsrc/server/mutators/mutator/gamemode_race.qc index d9da5b86c..04561db36 100644 --- a/qcsrc/server/mutators/mutator/gamemode_race.qc +++ b/qcsrc/server/mutators/mutator/gamemode_race.qc @@ -319,7 +319,7 @@ MUTATOR_HOOKFUNCTION(rc, PutClientInServer) MUTATOR_HOOKFUNCTION(rc, PlayerDies) { entity frag_target = M_ARGV(2, entity); - + frag_target.respawn_flags |= RESPAWN_FORCE; race_AbandonRaceCheck(frag_target); } diff --git a/qcsrc/tools/whitespace.sh b/qcsrc/tools/whitespace.sh index 566233741..594c60ea2 100755 --- a/qcsrc/tools/whitespace.sh +++ b/qcsrc/tools/whitespace.sh @@ -1,6 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu -cd "$(dirname "$0")" +cd ${0%/*} cd .. function check() { @@ -14,6 +14,7 @@ function check() { check lib check common +check ecs check client check server check menu -- 2.39.2