]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Kill more setself
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 22 May 2016 05:02:00 +0000 (15:02 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 22 May 2016 05:02:00 +0000 (15:02 +1000)
qcsrc/common/vehicles/sv_vehicles.qc

index caa82e880217590208284bc7483f711add05ebd5..0b16b15172b0f777048dbfd6ec517021bd071115 100644 (file)
@@ -822,7 +822,6 @@ void vehicles_exit(bool eject)
                if (_vehicle.vehicle_flags & VHF_PLAYERSLOT)
                {
                        _vehicle.vehicle_exit(eject);
-                       setself(this);
                        vehicles_exit_running = false;
                        return;
                }
@@ -1086,11 +1085,9 @@ void vehicles_enter(entity pl, entity veh)
 
        MUTATOR_CALLHOOK(VehicleEnter, pl, veh);
 
-       setself(veh);
        CSQCModel_UnlinkEntity(veh);
        Vehicle info = Vehicles_from(veh.vehicleid);
-       info.vr_enter(info, veh);
-       setself(oldself);
+       WITHSELF(veh, info.vr_enter(info, veh));
 
        antilag_clear(pl, CS(pl));
 }