From: Mario Date: Fri, 25 Dec 2015 00:46:42 +0000 (+1000) Subject: Use an org local instead of multi-line setorigin X-Git-Tag: xonotic-v0.8.2~1388 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c978f36186ed9d776636cda35173aa9f4d383666;p=xonotic%2Fxonotic-data.pk3dir.git Use an org local instead of multi-line setorigin --- diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 97bfe9153..987b50c41 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -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) diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index acc213d39..179876c32 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -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; diff --git a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc index b86880dd2..f68b07188 100644 --- a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc @@ -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; diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qc b/qcsrc/common/vehicles/vehicle/spiderbot.qc index b13c8b3ac..be552b372 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot.qc +++ b/qcsrc/common/vehicles/vehicle/spiderbot.qc @@ -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);