]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use an org local instead of multi-line setorigin
authorMario <mario@smbclan.net>
Fri, 25 Dec 2015 00:46:42 +0000 (10:46 +1000)
committerMario <mario@smbclan.net>
Fri, 25 Dec 2015 00:46:42 +0000 (10:46 +1000)
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc

index 97bfe91538f6e2e820f4eb10003e9a771b9054b9..987b50c41702568f02fe5022ef70723ed4af2397 100644 (file)
@@ -930,10 +930,11 @@ MUTATOR_HOOKFUNCTION(nb, PlayerPreThink)
                        self.ballcarried.velocity = self.velocity;
                        self.ballcarried.customizeentityforclient = ball_customize;
 
-                       setorigin(self.ballcarried, self.origin + self.view_ofs +
+                       vector org = self.origin + self.view_ofs +
                                          v_forward * autocvar_g_nexball_viewmodel_offset.x +
                                          v_right * autocvar_g_nexball_viewmodel_offset.y +
-                                         v_up * autocvar_g_nexball_viewmodel_offset.z);
+                                         v_up * autocvar_g_nexball_viewmodel_offset.z;
+                       setorigin(self.ballcarried, org);
 
                        // 'safe passing'
                        if(autocvar_g_nexball_safepass_maxdist)
index acc213d39edb6fc8da16916510eab2d90921cd1a..179876c320a0d65f0fff3cd7288af2ace37f58a6 100644 (file)
@@ -320,7 +320,8 @@ entity vehicle_tossgib(entity _template, vector _vel, string _tag, bool _burn, b
 {SELFPARAM();
        entity _gib = spawn();
        _setmodel(_gib, _template.model);
-       setorigin(_gib, gettaginfo(self, gettagindex(self, _tag)));
+       vector org = gettaginfo(self, gettagindex(self, _tag));
+       setorigin(_gib, org);
        _gib.velocity = _vel;
        _gib.movetype = MOVETYPE_TOSS;
        _gib.solid = SOLID_CORPSE;
index b86880dd27df0d7a80f8b4b1f0c04726de86f0e1..f68b0718884c0ef5954853cfd8f6d9885cac6b72 100644 (file)
@@ -204,8 +204,10 @@ void raptor_bombdrop()
     bomb_1 = spawn();
     bomb_2 = spawn();
 
-    setorigin(bomb_1, gettaginfo(self, gettagindex(self, "bombmount_left")));
-    setorigin(bomb_2, gettaginfo(self, gettagindex(self, "bombmount_right")));
+    vector org = gettaginfo(self, gettagindex(self, "bombmount_left"));
+    setorigin(bomb_1, org);
+    org = gettaginfo(self, gettagindex(self, "bombmount_right"));
+    setorigin(bomb_2, org);
 
     bomb_1.movetype     = bomb_2.movetype   = MOVETYPE_BOUNCE;
     bomb_1.velocity     = bomb_2.velocity   = self.velocity;
index b13c8b3ac4cffac92e5216b08f50285135050953..be552b372d6b743e193da4cc7f4f9eb0f957bc8e 100644 (file)
@@ -449,7 +449,8 @@ void spiderbot_blowup()
        b.angles = self.angles;
        setsize(b, self.mins, self.maxs);
 
-       setorigin(h, gettaginfo(self, gettagindex(self, "tag_head")));
+       vector org = gettaginfo(self, gettagindex(self, "tag_head"));
+       setorigin(h, org);
        h.movetype = MOVETYPE_BOUNCE;
        h.solid = SOLID_BBOX;
        h.velocity = v_up * (500 + random() * 500) + randomvec() * 128;
@@ -464,13 +465,15 @@ void spiderbot_blowup()
        h.think = spiderbot_headfade;
        h.nextthink = time;
 
-       setorigin(g1, gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_hardpoint01")));
+       org = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_hardpoint01"));
+       setorigin(g1, org);
        g1.movetype = MOVETYPE_TOSS;
        g1.solid = SOLID_CORPSE;
        g1.velocity = v_forward * 700 + (randomvec() * 32);
        g1.avelocity = randomvec() * 180;
 
-       setorigin(g2, gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_hardpoint02")));
+       org = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_hardpoint02"));
+       setorigin(g2, org);
        g2.movetype = MOVETYPE_TOSS;
        g2.solid = SOLID_CORPSE;
        g2.velocity = v_forward * 700 + (randomvec() * 32);