]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/vehicle/raptor.qc
Merge branch 'master' into Mario/fullbright_skins
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / vehicle / raptor.qc
index b0c8863df97396bc838ea2ecab47f9b7cde36ad0..28716fc2669beb3cab84ab078a9a34a2b27d9327 100644 (file)
@@ -114,7 +114,7 @@ void raptor_land(entity this)
 void raptor_exit(entity this, int eject)
 {
        vector spot;
-       this.tur_head.exteriormodeltoclient = world;
+       this.tur_head.exteriormodeltoclient = NULL;
 
        if(!IS_DEAD(this))
        {
@@ -155,7 +155,7 @@ void raptor_exit(entity this, int eject)
        }
 
        antilag_clear(this.owner, CS(this.owner));
-       this.owner = world;
+       this.owner = NULL;
 }
 
 bool raptor_frame(entity this)
@@ -290,7 +290,7 @@ bool raptor_frame(entity this)
        if(autocvar_g_vehicle_raptor_cannon_locktarget == 2)
        {
                if(vehic.gun1.lock_time < time || IS_DEAD(vehic.gun1.enemy) || STAT(FROZEN, vehic.gun1.enemy))
-                       vehic.gun1.enemy = world;
+                       vehic.gun1.enemy = NULL;
 
                if(trace_ent)
                if(trace_ent.movetype)
@@ -341,7 +341,7 @@ bool raptor_frame(entity this)
                                                         (1 / autocvar_g_vehicle_raptor_cannon_locking_releasetime) * frametime,
                                                         autocvar_g_vehicle_raptor_cannon_locked_time);
 
-               if(vehic.lock_target != world)
+               if(vehic.lock_target != NULL)
                if(autocvar_g_vehicle_raptor_cannon_predicttarget)
                if(vehic.lock_strength == 1)
                {
@@ -385,8 +385,6 @@ bool raptor_frame(entity this)
        UpdateAuxiliaryXhair(this, trace_endpos, '0 1 0', 0);
        */
 
-       setself(vehic);
-
        Weapon wep1 = WEP_RAPTOR;
        if(!forbidWeaponUse(this))
        if(PHYS_INPUT_BUTTON_ATCK(this))
@@ -431,8 +429,6 @@ bool raptor_frame(entity this)
                }
        }
 
-       setself(this);
-
        vehic.bomb1.alpha = vehic.bomb2.alpha = (time - vehic.lip) / (vehic.delay - vehic.lip);
        this.vehicle_reload2 = bound(0, vehic.bomb1.alpha * 100, 100);
        this.vehicle_ammo2 = (this.vehicle_reload2 == 100) ? 100 : 0;
@@ -524,7 +520,7 @@ void raptor_blowup(entity this)
 {
        this.deadflag   = DEAD_DEAD;
        this.vehicle_exit(this, VHEF_NORMAL);
-       RadiusDamage (this, this.enemy, 250, 15, 250, world, world, 250, DEATH_VH_RAPT_DEATH.m_id, world);
+       RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_RAPT_DEATH.m_id, NULL);
 
        this.alpha                = -1;
        this.movetype      = MOVETYPE_NONE;
@@ -540,26 +536,26 @@ void raptor_blowup(entity this)
 
 void raptor_diethink(entity this)
 {
-       if(time >= self.wait)
-               setthink(self, raptor_blowup);
+       if(time >= this.wait)
+               setthink(this, raptor_blowup);
 
        if(random() < 0.05)
        {
-               sound (self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
-               Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+               sound (this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
+               Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (this.origin + '0 0 100'), '0 0 0', 1);
        }
-       self.nextthink = time;
+       this.nextthink = time;
 
-       CSQCMODEL_AUTOUPDATE(self);
+       CSQCMODEL_AUTOUPDATE(this);
 }
 
 // If we dont do this ever now and then, the raptors rotors
 // stop working, presumably due to angle overflow. cute.
 void raptor_rotor_anglefix(entity this)
 {
-       self.gun1.angles_y = anglemods(self.gun1.angles_y);
-       self.gun2.angles_y = anglemods(self.gun2.angles_y);
-       self.nextthink = time + 15;
+       this.gun1.angles_y = anglemods(this.gun1.angles_y);
+       this.gun2.angles_y = anglemods(this.gun2.angles_y);
+       this.nextthink = time + 15;
 }
 
 bool raptor_impulse(entity this, int _imp)