]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/unit/raptor.qc
Use SELFPARAM() in every function that uses self
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / unit / raptor.qc
index d2ddea77316b0c83b7d974bc83b02fe3708ea950..14da2b3207c0992b791fa76a4065b2060aeaeecd 100644 (file)
@@ -96,13 +96,13 @@ vector autocvar_g_vehicle_raptor_bouncepain;
 .entity bomb2;
 
 float raptor_altitude(float amax)
-{
+{SELFPARAM();
        tracebox(self.origin, self.mins, self.maxs, self.origin - ('0 0 1' * amax), MOVE_WORLDONLY, self);
        return vlen(self.origin - trace_endpos);
 }
 
 void raptor_bomblet_boom()
-{
+{SELFPARAM();
        RadiusDamage (self, self.realowner, autocvar_g_vehicle_raptor_bomblet_damage,
                                                                        autocvar_g_vehicle_raptor_bomblet_edgedamage,
                                                                        autocvar_g_vehicle_raptor_bomblet_radius, world, world,
@@ -111,7 +111,7 @@ void raptor_bomblet_boom()
 }
 
 void raptor_bomblet_touch()
-{
+{SELFPARAM();
        if(other == self.owner)
                return;
 
@@ -121,7 +121,7 @@ void raptor_bomblet_touch()
 }
 
 void raptor_bomb_burst()
-{
+{SELFPARAM();
        if(self.cnt > time)
        if(autocvar_g_vehicle_raptor_bomblet_alt)
        {
@@ -160,7 +160,7 @@ void raptor_bomb_burst()
 }
 
 void raptor_bombdrop()
-{
+{SELFPARAM();
        entity bomb_1, bomb_2;
 
        bomb_1 = spawn();
@@ -194,7 +194,7 @@ void raptor_bombdrop()
 
 
 void raptor_fire_cannon(entity gun, string tagname)
-{
+{SELFPARAM();
        vehicles_projectile(EFFECT_RAPTOR_MUZZLEFLASH.eent_eff_name, W_Sound("lasergun_fire"),
                                                   gettaginfo(gun, gettagindex(gun, tagname)), normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed,
                                                   autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force,  0,
@@ -202,7 +202,7 @@ void raptor_fire_cannon(entity gun, string tagname)
 }
 
 void raptor_land()
-{
+{SELFPARAM();
        float hgt;
 
        hgt = raptor_altitude(512);
@@ -226,11 +226,11 @@ void raptor_land()
 
        self.nextthink  = time;
 
-       CSQCMODEL_AUTOUPDATE();
+       CSQCMODEL_AUTOUPDATE(self);
 }
 
 void raptor_exit(float eject)
-{
+{SELFPARAM();
        vector spot;
        self.tur_head.exteriormodeltoclient = world;
 
@@ -277,19 +277,19 @@ void raptor_exit(float eject)
 }
 
 void raptor_flare_touch()
-{
+{SELFPARAM();
        remove(self);
 }
 
 void raptor_flare_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{
+{SELFPARAM();
        self.health -= damage;
        if(self.health <= 0)
                remove(self);
 }
 
 void raptor_flare_think()
-{
+{SELFPARAM();
        self.nextthink = time + 0.1;
        entity _missile = findchainentity(enemy, self.owner);
        while(_missile)
@@ -306,7 +306,7 @@ void raptor_flare_think()
 }
 
 float raptor_frame()
-{
+{SELFPARAM();
        entity player, raptor;
        float ftmp = 0;
        vector df;
@@ -647,7 +647,7 @@ float raptor_frame()
 }
 
 float raptor_takeoff()
-{
+{SELFPARAM();
        entity player, raptor;
 
        player = self;
@@ -655,7 +655,7 @@ float raptor_takeoff()
        self   = raptor;
 
        self.nextthink = time;
-       CSQCMODEL_AUTOUPDATE();
+       CSQCMODEL_AUTOUPDATE(self);
        self.nextthink = 0; // will this work?
 
        if(self.sound_nexttime < time)
@@ -703,7 +703,7 @@ float raptor_takeoff()
 }
 
 void raptor_blowup()
-{
+{SELFPARAM();
        self.deadflag   = DEAD_DEAD;
        self.vehicle_exit(VHEF_NORMAL);
        RadiusDamage (self, self.enemy, 250, 15, 250, world, world, 250, DEATH_VH_RAPT_DEATH, world);
@@ -721,7 +721,7 @@ void raptor_blowup()
 }
 
 void raptor_diethink()
-{
+{SELFPARAM();
        if(time >= self.wait)
                self.think = raptor_blowup;
 
@@ -732,20 +732,20 @@ void raptor_diethink()
        }
        self.nextthink = time;
 
-       CSQCMODEL_AUTOUPDATE();
+       CSQCMODEL_AUTOUPDATE(self);
 }
 
 // If we dont do this ever now and then, the raptors rotors
 // stop working, presumably due to angle overflow. cute.
 void raptor_rotor_anglefix()
-{
+{SELFPARAM();
        self.gun1.angles_y = anglemods(self.gun1.angles_y);
        self.gun2.angles_y = anglemods(self.gun2.angles_y);
        self.nextthink = time + 15;
 }
 
 float raptor_impulse(float _imp)
-{
+{SELFPARAM();
        switch(_imp)
        {
                case 1:
@@ -790,13 +790,13 @@ float raptor_impulse(float _imp)
 }
 
 void spawnfunc_vehicle_raptor()
-{
+{SELFPARAM();
        if(!autocvar_g_vehicle_raptor) { remove(self); return; }
        if(!vehicle_initialize(VEH_RAPTOR, false)) { remove(self); return; }
 }
 
 float v_raptor(float req)
-{
+{SELFPARAM();
        switch(req)
        {
                case VR_IMPACT:
@@ -991,7 +991,7 @@ float v_raptor(float req)
 #ifdef CSQC
 
 void RaptorCBShellfragDraw()
-{
+{SELFPARAM();
        if(wasfreed(self))
                return;
 
@@ -1007,7 +1007,7 @@ void RaptorCBShellfragDraw()
 }
 
 void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
-{
+{SELFPARAM();
        entity sfrag;
 
        sfrag = spawn();