]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Tidy up the setorigin calls a little
authorMario <mario@smbclan.net>
Sun, 12 Jun 2016 13:00:40 +0000 (23:00 +1000)
committerMario <mario@smbclan.net>
Sun, 12 Jun 2016 13:00:40 +0000 (23:00 +1000)
22 files changed:
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/physics/movelib.qc
qcsrc/common/t_items.qc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/misc/teleport_dest.qc
qcsrc/common/triggers/platforms.qc
qcsrc/common/triggers/teleporters.qc
qcsrc/common/triggers/trigger/multi.qc
qcsrc/common/turrets/checkpoint.qc
qcsrc/common/turrets/turret/flac_weapon.qc
qcsrc/common/turrets/turret/tesla_weapon.qc
qcsrc/common/turrets/util.qc
qcsrc/lib/warpzone/common.qc
qcsrc/lib/warpzone/server.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_lights.qc
qcsrc/server/pathlib/debug.qc
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/movenode.qc
qcsrc/server/steerlib.qc
qcsrc/server/weapons/tracing.qc

index 3fc2683c89e15480e8ae568af24776d825a5b231..c8b964c37275113969d3e077eb53a93b2201a761 100644 (file)
@@ -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);
index cfdcbfd14700262db5e3911b95c83107e4427c45..e66e3c9a9ce58f19b447a714f6bcd3bdcc7bd3c6 100644 (file)
@@ -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);
 }
 
index 06c2f064fecb5d8f4b91d263863aad9e583d7fa0..03fdba42a8c741edd682c64b5f377744be9b68ab 100644 (file)
@@ -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)
        {
index 9bbdfd48b548dcc1dd217328d970343581673054..ff3ce35fd1199b86ec31c863ef023bda3c720324 100644 (file)
@@ -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);
index 285f7357f4134608adc110cbdfe3212c5e7a580c..ab15a689192c50ac21e2c639b54c3d26f951d8ac 100644 (file)
@@ -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
        {
index 7b2f43f33a108f4abd8ce4608c7e8b782e06ebda..c089039a60bccf1549b1602fb643380c7b64129c 100644 (file)
@@ -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;
        }
index 475904d21eafb3e78597ab056955d237f4cab94c..90a426e630d8e3e0b46dfd271d454470e9216689 100644 (file)
@@ -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;
index 9f71eeff329cfb66c9f28f62466d329de6054dce..14d7fda04b7fbcd4420eee464cda96613497239a 100644 (file)
@@ -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
                }
        }
 }
index 46526df4d615db53dc99f2391b2abc07d24f7805..d0e07bc3f6f1a2a7df06be91cbba78f65472045b 100644 (file)
@@ -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;
 }
index ada1bf0636db0a07596ce4d644b49ba02a0792ef..e02c1845224da5a0b011526b624d0918e569820b 100644 (file)
@@ -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);
index a2d11d53cce9a5a941b63ac0327aca5886d6ddde..a2062f555576ada34292e849007ff43639bad972 100644 (file)
@@ -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;
 
index 41e7cd491ce7d8fb1456b0511b65d08418e4123a..5d8ee32b7d9d77efd46d82c7fa901a737f72876a 100644 (file)
@@ -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;
index 704feeb7e7c8b84a60bef620a15aa7505965be37..6473e65b1de61125d15838854bd001b2831aa9a1 100644 (file)
@@ -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));
        }
 }
 
index a84b7a73984219626a7a91b3d2d62e6abd18d397..39e20d91ce11ac3c1455e14a4d1b253791fca5b7 100644 (file)
@@ -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;
index 8a4414517c38f4cf4edabaf3cf2243b5e647d18c..8b7d7c159406c1b1756fb708227220b2edb643ab 100644 (file)
@@ -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;
index defd6051eb888d0abcbc9581cede959d251919fd..f5f37c673a602bd3940b7fd4c1a6b331d82c9f4e 100644 (file)
@@ -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
 
index 98f2c436392d63f181412115892f6f9c87062ff9..849ba535836e39522cd0dfa500d0c56b4b77a341 100644 (file)
@@ -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;
index bd1295172a5df4a7f8ff22dd4fd924464b401670..0a350df2c2f467f4ed03958639fd31607b7dd133 100644 (file)
@@ -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);
index 319960a938b85b0d80905bb42c94885f01225d1c..195e2a55e8387bc16b701235750aad606c962a8c 100644 (file)
@@ -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();
 
index 52d0005a1efb583aa51887f2da9605918f7e5954..3059021d1238536b9d6b86b627bfbbd623bd6e5e 100644 (file)
@@ -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;
index 2cccbf41c06ab428e75150b64408e15687c708da..0c8c8fdc965dbb6221241622f8af005d1111273e 100644 (file)
@@ -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;
index 6491d9428d587a625b8f4e63c803af1a7db7aad2..531cf19aa52f017bf5cac50907b7178a96bc579f 100644 (file)
@@ -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';