]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove a now useless WITHSELF
authorMario <mario@smbclan.net>
Fri, 3 Jun 2016 08:53:16 +0000 (18:53 +1000)
committerMario <mario@smbclan.net>
Fri, 3 Jun 2016 08:53:16 +0000 (18:53 +1000)
qcsrc/common/weapons/weapon/porto.qc
qcsrc/server/race.qc

index c029c220d0cbaddd06e24eee1d8d70bf18e334f4..ac9f759fc75954fd3988ae334ffeafcb03775f2c 100644 (file)
@@ -68,37 +68,37 @@ void W_Porto_Success(entity this)
 string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vector velo);
 void W_Porto_Fail(entity this, float failhard)
 {
-       if(self.realowner == world)
+       if(this.realowner == world)
        {
                objerror("Cannot fail successfully: no owner\n");
                return;
        }
 
        // no portals here!
-       if(self.cnt < 0)
+       if(this.cnt < 0)
        {
-               Portal_ClearWithID(self.realowner, self.portal_id);
+               Portal_ClearWithID(this.realowner, this.portal_id);
        }
 
-       self.realowner.porto_current = world;
+       this.realowner.porto_current = world;
 
-       if(self.cnt < 0 && !failhard && self.realowner.playerid == self.playerid && !IS_DEAD(self.realowner) && !(self.realowner.weapons & WEPSET(PORTO)))
+       if(this.cnt < 0 && !failhard && this.realowner.playerid == this.playerid && !IS_DEAD(this.realowner) && !(this.realowner.weapons & WEPSET(PORTO)))
        {
-               setsize(self, '-16 -16 0', '16 16 32');
-               setorigin(self, self.origin + trace_plane_normal);
-               if(move_out_of_solid(self))
+               setsize(this, '-16 -16 0', '16 16 32');
+               setorigin(this, this.origin + trace_plane_normal);
+               if(move_out_of_solid(this))
                {
-                       self.flags = FL_ITEM;
-                       self.velocity = trigger_push_calculatevelocity(self.origin, self.realowner, 128);
-                       tracetoss(self, self);
-                       if(vdist(trace_endpos - self.realowner.origin, <, 128))
+                       this.flags = FL_ITEM;
+                       this.velocity = trigger_push_calculatevelocity(this.origin, this.realowner, 128);
+                       tracetoss(this, this);
+                       if(vdist(trace_endpos - this.realowner.origin, <, 128))
                        {
-                               W_ThrowNewWeapon(self.realowner, WEP_PORTO.m_id, 0, self.origin, self.velocity);
-                               Send_Notification(NOTIF_ONE, self.realowner, MSG_CENTER, CENTER_PORTO_FAILED);
+                               W_ThrowNewWeapon(this.realowner, WEP_PORTO.m_id, 0, this.origin, this.velocity);
+                               Send_Notification(NOTIF_ONE, this.realowner, MSG_CENTER, CENTER_PORTO_FAILED);
                        }
                }
        }
-       remove(self);
+       remove(this);
 }
 
 void W_Porto_Remove(entity p)
index 34a3d8a2aa6f90685e4bf862fb0c1628e0c82ed6..6fc5cf712a1cdd572d091781a74f5228ac34a0f0 100644 (file)
@@ -570,7 +570,7 @@ void checkpoint_passed(entity this, entity player)
        {
                // do not allow portalling through checkpoints
                trace_plane_normal = normalize(-1 * player.velocity);
-               WITHSELF(player, W_Porto_Fail(player, 0));
+               W_Porto_Fail(player, 0);
                return;
        }
 
@@ -581,7 +581,7 @@ void checkpoint_passed(entity this, entity player)
        {
                oldmsg = this.message;
                this.message = "";
-               SUB_UseTargets(this, player, player); // TODO: should we be using other for the trigger here?
+               SUB_UseTargets(this, player, player);
                this.message = oldmsg;
        }
 
@@ -709,8 +709,7 @@ void checkpoint_use(entity this, entity actor, entity trigger)
        if(trigger.classname == "info_player_deathmatch") // a spawn, a spawn
                return;
 
-       other = actor;
-       checkpoint_passed(this, other);
+       checkpoint_passed(this, actor);
 }
 
 bool race_waypointsprite_visible_for_player(entity this, entity player, entity view)