From 8ae20128ca1e3cbd97b90be3ff11c31ef62a4ef5 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 12 Jun 2016 23:00:40 +1000 Subject: [PATCH] Tidy up the setorigin calls a little --- qcsrc/common/mutators/mutator/overkill/rpc.qc | 2 +- qcsrc/common/physics/movelib.qc | 2 +- qcsrc/common/t_items.qc | 2 +- qcsrc/common/triggers/func/breakable.qc | 2 +- qcsrc/common/triggers/misc/teleport_dest.qc | 4 ++-- qcsrc/common/triggers/platforms.qc | 4 ++-- qcsrc/common/triggers/teleporters.qc | 2 +- qcsrc/common/triggers/trigger/multi.qc | 4 ++-- qcsrc/common/turrets/checkpoint.qc | 2 +- qcsrc/common/turrets/turret/flac_weapon.qc | 2 +- qcsrc/common/turrets/turret/tesla_weapon.qc | 2 +- qcsrc/common/turrets/util.qc | 12 ++++++------ qcsrc/lib/warpzone/common.qc | 2 +- qcsrc/lib/warpzone/server.qc | 2 +- qcsrc/server/g_damage.qc | 2 +- qcsrc/server/g_hook.qc | 2 +- qcsrc/server/g_lights.qc | 4 ++-- qcsrc/server/pathlib/debug.qc | 6 +++--- qcsrc/server/pathlib/main.qc | 4 ++-- qcsrc/server/pathlib/movenode.qc | 2 +- qcsrc/server/steerlib.qc | 2 +- qcsrc/server/weapons/tracing.qc | 2 +- 22 files changed, 34 insertions(+), 34 deletions(-) diff --git a/qcsrc/common/mutators/mutator/overkill/rpc.qc b/qcsrc/common/mutators/mutator/overkill/rpc.qc index 3fc2683c8..c8b964c37 100644 --- a/qcsrc/common/mutators/mutator/overkill/rpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/rpc.qc @@ -129,7 +129,7 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep, entity actor) missile.projectiledeathtype = WEP_RPC.m_id; setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot - setorigin (missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point + setorigin(missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point W_SetupProjVelocity_Basic(missile, WEP_CVAR(rpc, speed), 0); settouch(missile, W_RocketPropelledChainsaw_Touch); diff --git a/qcsrc/common/physics/movelib.qc b/qcsrc/common/physics/movelib.qc index cfdcbfd14..e66e3c9a9 100644 --- a/qcsrc/common/physics/movelib.qc +++ b/qcsrc/common/physics/movelib.qc @@ -232,6 +232,6 @@ void movelib_groundalign4point(entity this, float spring_length, float spring_up this.angles_z = ((1-blendrate) * this.angles.z) + (push_angle.z * blendrate); //a = this.origin; - setorigin(this,r); + setorigin(this, r); } diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 06c2f064f..03fdba42a 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -494,7 +494,7 @@ void Item_Respawn (entity this) sound (this, CH_TRIGGER, SND_SHIELD_RESPAWN, VOL_BASE, ATTEN_NORM); // play respawn sound else sound (this, CH_TRIGGER, SND_ITEMRESPAWN, VOL_BASE, ATTEN_NORM); // play respawn sound - setorigin (this, this.origin); + setorigin(this, this.origin); if (Item_ItemsTime_Allow(this.itemdef) || this.weapons & WEPSET_SUPERWEAPONS) { diff --git a/qcsrc/common/triggers/func/breakable.qc b/qcsrc/common/triggers/func/breakable.qc index 9bbdfd48b..ff3ce35fd 100644 --- a/qcsrc/common/triggers/func/breakable.qc +++ b/qcsrc/common/triggers/func/breakable.qc @@ -104,7 +104,7 @@ void func_breakable_look_destroyed(entity this) else { if (this.origin == '0 0 0') { // probably no origin brush, so don't spawn in the middle of the map.. floorZ = this.absmin.z; - setorigin(this,((this.absmax+this.absmin)*.5)); + setorigin(this, ((this.absmax + this.absmin) * 0.5)); this.origin_z = floorZ; } _setmodel(this, this.mdl_dead); diff --git a/qcsrc/common/triggers/misc/teleport_dest.qc b/qcsrc/common/triggers/misc/teleport_dest.qc index 285f7357f..ab15a6891 100644 --- a/qcsrc/common/triggers/misc/teleport_dest.qc +++ b/qcsrc/common/triggers/misc/teleport_dest.qc @@ -37,8 +37,8 @@ spawnfunc(info_teleport_destination) this.mangle = this.angles; this.angles = '0 0 0'; - //setorigin (this, this.origin + '0 0 27'); // To fix a mappers' habit as old as Quake - setorigin (this, this.origin); + //setorigin(this, this.origin + '0 0 27'); // To fix a mappers' habit as old as Quake + setorigin(this, this.origin); IFTARGETED { diff --git a/qcsrc/common/triggers/platforms.qc b/qcsrc/common/triggers/platforms.qc index 7b2f43f33..c089039a6 100644 --- a/qcsrc/common/triggers/platforms.qc +++ b/qcsrc/common/triggers/platforms.qc @@ -183,13 +183,13 @@ void plat_reset(entity this) { IFTARGETED { - setorigin (this, this.pos1); + setorigin(this, this.pos1); this.state = 4; this.use = plat_use; } else { - setorigin (this, this.pos2); + setorigin(this, this.pos2); this.state = 2; this.use = plat_trigger_use; } diff --git a/qcsrc/common/triggers/teleporters.qc b/qcsrc/common/triggers/teleporters.qc index 475904d21..90a426e63 100644 --- a/qcsrc/common/triggers/teleporters.qc +++ b/qcsrc/common/triggers/teleporters.qc @@ -112,7 +112,7 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle // assuming to allows PL_MIN to PL_MAX box and some more #ifdef SVQC from = player.origin; - setorigin (player, to); + setorigin(player, to); player.oldorigin = to; // don't undo the teleport by unsticking player.angles = to_angles; player.fixangle = true; diff --git a/qcsrc/common/triggers/trigger/multi.qc b/qcsrc/common/triggers/trigger/multi.qc index 9f71eeff3..14d7fda04 100644 --- a/qcsrc/common/triggers/trigger/multi.qc +++ b/qcsrc/common/triggers/trigger/multi.qc @@ -172,14 +172,14 @@ spawnfunc(trigger_multiple) this.event_damage = multi_eventdamage; this.takedamage = DAMAGE_YES; this.solid = SOLID_BBOX; - setorigin (this, this.origin); // make sure it links into the world + setorigin(this, this.origin); // make sure it links into the world } else { if ( !(this.spawnflags & SPAWNFLAG_NOTOUCH) ) { settouch(this, multi_touch); - setorigin (this, this.origin); // make sure it links into the world + setorigin(this, this.origin); // make sure it links into the world } } } diff --git a/qcsrc/common/turrets/checkpoint.qc b/qcsrc/common/turrets/checkpoint.qc index 46526df4d..d0e07bc3f 100644 --- a/qcsrc/common/turrets/checkpoint.qc +++ b/qcsrc/common/turrets/checkpoint.qc @@ -65,7 +65,7 @@ void turret_checkpoint_init(entity this) spawnfunc(turret_checkpoint) { - setorigin(this,this.origin); + setorigin(this, this.origin); setthink(this, turret_checkpoint_init); this.nextthink = time + 0.2; } diff --git a/qcsrc/common/turrets/turret/flac_weapon.qc b/qcsrc/common/turrets/turret/flac_weapon.qc index ada1bf063..e02c18452 100644 --- a/qcsrc/common/turrets/turret/flac_weapon.qc +++ b/qcsrc/common/turrets/turret/flac_weapon.qc @@ -40,7 +40,7 @@ void turret_flac_projectile_think_explode(entity this) { if(this.enemy != world) if(vdist(this.origin - this.enemy.origin, <, this.owner.shot_radius * 3)) - setorigin(this,this.enemy.origin + randomvec() * this.owner.shot_radius); + setorigin(this, this.enemy.origin + randomvec() * this.owner.shot_radius); #ifdef TURRET_DEBUG float d = RadiusDamage (this, this.owner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, world, this.owner.shot_force, this.totalfrags, world); diff --git a/qcsrc/common/turrets/turret/tesla_weapon.qc b/qcsrc/common/turrets/turret/tesla_weapon.qc index a2d11d53c..a2062f555 100644 --- a/qcsrc/common/turrets/turret/tesla_weapon.qc +++ b/qcsrc/common/turrets/turret/tesla_weapon.qc @@ -22,7 +22,7 @@ METHOD(TeslaCoilTurretAttack, wr_think, void(entity thiswep, entity actor, .enti float d = actor.shot_dmg; float r = actor.target_range; entity e = spawn(); - setorigin(e,actor.tur_shotorg); + setorigin(e, actor.tur_shotorg); actor.target_validate_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_MISSILES | TFL_TARGETSELECT_RANGELIMITS | TFL_TARGETSELECT_TEAMCHECK; diff --git a/qcsrc/common/turrets/util.qc b/qcsrc/common/turrets/util.qc index 41e7cd491..5d8ee32b7 100644 --- a/qcsrc/common/turrets/util.qc +++ b/qcsrc/common/turrets/util.qc @@ -114,7 +114,7 @@ void mark_error(vector where,float lifetime) { entity err = new(error_marker); setmodel(err, MDL_MARKER); - setorigin(err,where); + setorigin(err, where); err.movetype = MOVETYPE_NONE; setthink(err, marker_think); err.nextthink = time; @@ -127,7 +127,7 @@ void mark_info(vector where,float lifetime) { entity err = spawn(info_marker); setmodel(err, MDL_MARKER); - setorigin(err,where); + setorigin(err, where); err.movetype = MOVETYPE_NONE; setthink(err, marker_think); err.nextthink = time; @@ -140,7 +140,7 @@ entity mark_misc(vector where,float lifetime) { entity err = spawn(mark_misc); setmodel(err, MDL_MARKER); - setorigin(err,where); + setorigin(err, where); err.movetype = MOVETYPE_NONE; setthink(err, marker_think); err.nextthink = time; @@ -165,7 +165,7 @@ void paint_target(entity onwho, float f_size, vector v_color, float f_time) e.scale = (f_size/512); //setsize(e, '0 0 0', '0 0 0'); //setattachment(e,onwho,""); - setorigin(e,onwho.origin + '0 0 1'); + setorigin(e, onwho.origin + '0 0 1'); e.alpha = 0.15; e.movetype = MOVETYPE_FLY; @@ -184,7 +184,7 @@ void paint_target2(entity onwho, float f_size, vector v_color, float f_time) e.scale = (f_size/512); setsize(e, '0 0 0', '0 0 0'); - setorigin(e,onwho.origin + '0 0 1'); + setorigin(e, onwho.origin + '0 0 1'); e.alpha = 0.15; e.movetype = MOVETYPE_FLY; @@ -202,7 +202,7 @@ void paint_target3(vector where, float f_size, vector v_color, float f_time) setmodel(e, MDL_TUR_C512); // precision set above e.scale = (f_size/512); setsize(e, '0 0 0', '0 0 0'); - setorigin(e,where+ '0 0 1'); + setorigin(e, where + '0 0 1'); e.movetype = MOVETYPE_NONE; e.velocity = '0 0 0'; e.colormod = v_color; diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 704feeb7e..6473e65b1 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -801,7 +801,7 @@ void WarpZoneLib_MoveOutOfSolid_Expand(entity e, vector by) { // hit something // adjust origin in the other direction... - setorigin(e,e.origin - by * (1 - trace_fraction)); + setorigin(e, e.origin - by * (1 - trace_fraction)); } } diff --git a/qcsrc/lib/warpzone/server.qc b/qcsrc/lib/warpzone/server.qc index a84b7a739..39e20d91c 100644 --- a/qcsrc/lib/warpzone/server.qc +++ b/qcsrc/lib/warpzone/server.qc @@ -47,7 +47,7 @@ void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity) { #ifdef SVQC - setorigin (player, to); // NOTE: this also aborts the move, when this is called by touch + setorigin(player, to); // NOTE: this also aborts the move, when this is called by touch player.oldorigin = to; // for DP's unsticking player.angles = to_angles; player.fixangle = true; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 8a4414517..8b7d7c159 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -741,7 +741,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d targ.oldvelocity = targ.velocity; targ.spawnorigin = spot.origin; - setorigin (targ, spot.origin + '0 0 1' * (1 - targ.mins.z - 24)); + setorigin(targ, spot.origin + '0 0 1' * (1 - targ.mins.z - 24)); // don't reset back to last position, even if new position is stuck in solid targ.oldorigin = targ.origin; targ.prevorigin = targ.origin; diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index defd6051e..f5f37c673 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -376,7 +376,7 @@ void FireGrapplingHook(entity actor) //setmodel (missile, MDL_HOOK); // precision set below setsize (missile, '-3 -3 -3', '3 3 3'); - setorigin (missile, org); + setorigin(missile, org); missile.state = 0; // not latched onto anything diff --git a/qcsrc/server/g_lights.qc b/qcsrc/server/g_lights.qc index 98f2c4363..849ba5358 100644 --- a/qcsrc/server/g_lights.qc +++ b/qcsrc/server/g_lights.qc @@ -65,7 +65,7 @@ void dynlight_find_path(entity this) targ = find(world, targetname, this.target); this.target = targ.target; - setorigin (this, targ.origin); + setorigin(this, targ.origin); setthink(this, train_next); this.nextthink = time + 0.1; } @@ -97,7 +97,7 @@ spawnfunc(dynlight) this.lefty = this.light_lev; this.use = dynlight_use; setsize (this, '0 0 0', '0 0 0'); - setorigin (this, this.origin); + setorigin(this, this.origin); //this.pflags = PFLAGS_FULLDYNAMIC; this.solid = SOLID_NOT; //this.blocked = func_null; diff --git a/qcsrc/server/pathlib/debug.qc b/qcsrc/server/pathlib/debug.qc index bd1295172..0a350df2c 100644 --- a/qcsrc/server/pathlib/debug.qc +++ b/qcsrc/server/pathlib/debug.qc @@ -60,7 +60,7 @@ void pathlib_showsquare2(entity node ,vector ncolor,float align) node.solid = SOLID_NOT; setmodel(node, MDL_SQUARE); - setorigin(node,node.origin); + setorigin(node, node.origin); node.colormod = ncolor; if(align) @@ -93,7 +93,7 @@ void pathlib_showsquare(vector where,float goodsquare,float _lifetime) s.angles = vectoangles(trace_plane_normal); s.angles_x -= 90; - setorigin(s,where); + setorigin(s, where); } void pathlib_showedge(vector where,float _lifetime,float rot) @@ -111,7 +111,7 @@ void pathlib_showedge(vector where,float _lifetime,float rot) e.nextthink = _lifetime; e.scale = pathlib_gridsize / 512; e.solid = SOLID_NOT; - setorigin(e,where); + setorigin(e, where); setmodel(e, MDL_EDGE); //traceline(where + '0 0 32',where - '0 0 128',MOVE_WORLDONLY,e); //e.angles = vectoangles(trace_plane_normal); diff --git a/qcsrc/server/pathlib/main.qc b/qcsrc/server/pathlib/main.qc index 319960a93..195e2a55e 100644 --- a/qcsrc/server/pathlib/main.qc +++ b/qcsrc/server/pathlib/main.qc @@ -364,7 +364,7 @@ entity path_build(entity next, vector where, entity prev, entity start) path.owner = start; path.path_next = next; - setorigin(path,where); + setorigin(path, where); if(!next) path.classname = "path_end"; @@ -476,7 +476,7 @@ entity pathlib_astar(entity this, vector from,vector to) open = new(path_end); open.owner = open; - setorigin(open,path.origin); + setorigin(open, path.origin); pathlib_cleanup(); diff --git a/qcsrc/server/pathlib/movenode.qc b/qcsrc/server/pathlib/movenode.qc index 52d0005a1..3059021d1 100644 --- a/qcsrc/server/pathlib/movenode.qc +++ b/qcsrc/server/pathlib/movenode.qc @@ -104,7 +104,7 @@ vector pathlib_walknode(entity this, vector start, vector end, float doedge) a = spawn(); setthink(a, a_think); a.nextthink = time; - setorigin(a,start + movenode_stepup); + setorigin(a, start + movenode_stepup); a.pos1 = trace_endpos; //start - movenode_maxdrop a.cnt = time + 10; diff --git a/qcsrc/server/steerlib.qc b/qcsrc/server/steerlib.qc index 2cccbf41c..0c8c8fdc9 100644 --- a/qcsrc/server/steerlib.qc +++ b/qcsrc/server/steerlib.qc @@ -645,7 +645,7 @@ spawnfunc(flockerspawn) this.enemy = new(FLock Hunter); setmodel(this.enemy, MDL_FLOCKER); - setorigin(this.enemy,this.origin + '0 0 768' + (randomvec() * 128)); + setorigin(this.enemy, this.origin + '0 0 768' + (randomvec() * 128)); this.enemy.scale = 3; this.enemy.effects = EF_LOWPRECISION; diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index 6491d9428..531cf19aa 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -321,7 +321,7 @@ void FireRailgunBullet (entity this, vector start, vector end, float bdamage, fl Damage (ent, this, this, bdamage * f, deathtype, hitloc, ent.railgunforce * ffs); // create a small explosion to throw gibs around (if applicable) - //setorigin (explosion, hitloc); + //setorigin(explosion, hitloc); //RadiusDamage (explosion, this, 10, 0, 50, world, world, 300, deathtype); ent.railgunhitloc = '0 0 0'; -- 2.39.2