]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove some more unnecessary WITHSELFs
authorMario <mario@smbclan.net>
Sat, 11 Jun 2016 13:22:32 +0000 (23:22 +1000)
committerMario <mario@smbclan.net>
Sat, 11 Jun 2016 13:22:32 +0000 (23:22 +1000)
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/server/cl_client.qc
qcsrc/server/command/vote.qc
qcsrc/server/g_damage.qc
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/weapons/weaponsystem.qc

index 2709054b9ae11725df4700f7c07716a166b9900d..b5452ba5a8eff372177e4bcd9d98a65cf5a5d1d5 100644 (file)
@@ -1074,7 +1074,7 @@ void vehicles_enter(entity pl, entity veh)
 
        CSQCModel_UnlinkEntity(veh);
        Vehicle info = Vehicles_from(veh.vehicleid);
-       WITHSELF(veh, info.vr_enter(info, veh));
+       info.vr_enter(info, veh);
 
        antilag_clear(pl, CS(pl));
 }
index e212d312467498fe275df03e27a57a808a4389c8..ba3d02577f29d36126fadf06b15192f2cbcc21ba 100644 (file)
@@ -332,7 +332,7 @@ bool racer_frame(entity this)
                crosshair_trace(this);
                w_shotdir.z = normalize(trace_endpos - org).z * 0.5;
                .entity weaponentity = weaponentities[0];
-               WITHSELF(vehic, wep1.wr_think(wep1, vehic, weaponentity, 1));
+               wep1.wr_think(wep1, vehic, weaponentity, 1);
        }
 
        if(autocvar_g_vehicle_racer_rocket_locktarget)
index 1e364e5491e52040cf787b6a9035290a27d3f436..9dbf5825ff20f96f09d0834ed3a0e577894e2806 100644 (file)
@@ -411,7 +411,7 @@ bool raptor_frame(entity this)
                if(PHYS_INPUT_BUTTON_ATCK2(this))
                {
                    .entity weaponentity = weaponentities[1];
-                       WITHSELF(vehic, wep2a.wr_think(wep2a, vehic, weaponentity, 2));
+                       wep2a.wr_think(wep2a, vehic, weaponentity, 2);
                        vehic.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
                        vehic.lip   = time;
                }
@@ -423,7 +423,7 @@ bool raptor_frame(entity this)
                if(PHYS_INPUT_BUTTON_ATCK2(this))
                {
                    .entity weaponentity = weaponentities[1];
-                       WITHSELF(vehic, wep2b.wr_think(wep2b, vehic, weaponentity, 2));
+                       wep2b.wr_think(wep2b, vehic, weaponentity, 2);
                        vehic.delay = time + autocvar_g_vehicle_raptor_flare_refire;
                        vehic.lip   = time;
                }
index fe73c873434ff83504247f1aef55abeca06aa82e..bd12c1e5caddd588656967bc015c58e0143288d6 100644 (file)
@@ -711,7 +711,7 @@ void ClientInit_Spawn()
        setthink(e, ClientInit_CheckUpdate);
        Net_LinkEntity(e, false, 0, ClientInit_SendEntity);
 
-       WITHSELF(e, ClientInit_CheckUpdate(e));
+       ClientInit_CheckUpdate(e);
 }
 
 /*
index bb687486e3396a95d60bd6dfdeed0e7d1ef50eef..b1482999d1e73c71646f63f441e1bbb011d2cd9e 100644 (file)
@@ -340,7 +340,7 @@ void reset_map(bool dorespawn)
        FOREACH_ENTITY_ORDERED(IS_NOT_A_CLIENT(it), {
                if (it.reset)
                {
-                       WITHSELF(it, it.reset(it));
+                       WITHSELF(it, it.reset(it)); // needs WITHSELF, as some spawnfuncs are set to .reset
                        continue;
                }
                if (it.team_saved) it.team = it.team_saved;
index df88116d739082d8fe0065772fa43fd2228a4148..d0415c9e2c8da6ffbb10c092087de3d46b00f079 100644 (file)
@@ -539,7 +539,7 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo
        targ.iceblock = ice;
        targ.revival_time = 0;
 
-       WITHSELF(ice, Ice_Think(ice));
+       Ice_Think(ice);
 
        RemoveGrapplingHook(targ);
 
index d5685ca443f0cceacebd429314bf54118477482b..cf27a8f0db2cd3b291aec544b555168fd3ca8950 100644 (file)
@@ -224,8 +224,8 @@ void assault_roundstart_use(entity this, entity actor, entity trigger)
                else
                        it.team = NUM_TEAM_1;
 
-               // Dubbles as teamchange
-               WITHSELF(it, turret_respawn(it));
+               // Doubles as teamchange
+               turret_respawn(it);
        ));
 }
 void assault_roundstart_use_this(entity this)
index c2bccef95ca571f7001648c5ed11ac8fac6180b9..21057e4a0b525a02a14c995b9294f78b64bee52d 100644 (file)
@@ -767,5 +767,5 @@ void W_DropEvent(.void(Weapon, entity actor) event, entity player, float weapon_
 {
        Weapon w = Weapons_from(weapon_type);
        weapon_dropevent_item = weapon_item;
-       WITHSELF(player, w.event(w, player));
+       w.event(w, player);
 }