]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/vehicles/bumblebee.qc
Removed commented out code
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / bumblebee.qc
index 4b0f1d13a4b5b8976eda70b150523fccebd86724..4330966dc7894f2b959b4c51ceedaa302e56e4f4 100644 (file)
@@ -86,7 +86,7 @@ void bumb_fire_cannon(entity _gun, string _tagname, entity _owner)
        vehicles_projectile("bigplasma_muzzleflash", "weapons/flacexp3.wav",
                                                v, normalize(v_forward + randomvec() * autocvar_g_vehicle_bumblebee_cannon_spread) * autocvar_g_vehicle_bumblebee_cannon_speed,
                                                autocvar_g_vehicle_bumblebee_cannon_damage, autocvar_g_vehicle_bumblebee_cannon_radius, autocvar_g_vehicle_bumblebee_cannon_force,  0,
-                                               DEATH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, TRUE, TRUE, _owner);
+                                               DEATH_VH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, TRUE, TRUE, _owner);
 }
 
 float bumb_gunner_frame()
@@ -214,9 +214,7 @@ float bumb_gunner_frame()
 
 void bumb_gunner_exit(float _exitflag)
 {
-
-
-       if(clienttype(self) == CLIENTTYPE_REAL)
+       if(IS_REAL_CLIENT(self))
        {
                msg_entity = self;
                WriteByte(MSG_ONE, SVC_SETVIEWPORT);
@@ -236,7 +234,7 @@ void bumb_gunner_exit(float _exitflag)
        self.movetype       = MOVETYPE_WALK;
        self.effects        &~= EF_NODRAW;
        self.alpha          = 1;
-       self.PlayerPhysplug = SUB_Null;
+       self.PlayerPhysplug = func_null;
        self.view_ofs       = PL_VIEW_OFS;
        self.event_damage   = PlayerDamage;
        self.hud            = HUD_NORMAL;
@@ -307,7 +305,7 @@ float bumb_gunner_enter()
        other.solid             = SOLID_NOT;
        other.movetype          = MOVETYPE_NOCLIP;
        other.alpha             = -1;
-       other.event_damage      = SUB_Null;
+       other.event_damage      = func_null;
        other.view_ofs          = '0 0 0';
        other.hud               = _gun.hud;
        other.PlayerPhysplug    = _gun.PlayerPhysplug;
@@ -341,7 +339,7 @@ float bumb_gunner_enter()
 
 float vehicles_valid_pilot()
 {
-       if(other.classname != "player")
+       if not(IS_PLAYER(other))
                return FALSE;
 
        if(other.deadflag != DEAD_NO)
@@ -350,7 +348,7 @@ float vehicles_valid_pilot()
        if(other.vehicle != world)
                return FALSE;
 
-       if(clienttype(other) != CLIENTTYPE_REAL)
+       if not(IS_REAL_CLIENT(other))
                if(!autocvar_g_vehicles_allow_bots)
                        return FALSE;
 
@@ -561,7 +559,7 @@ float bumb_pilot_frame()
                                                        if(autocvar_g_vehicle_bumblebee_healgun_hps)
                                                                trace_ent.vehicle_health = min(trace_ent.vehicle_health + autocvar_g_vehicle_bumblebee_healgun_hps * frametime, trace_ent.tur_health);
                                                }
-                                               else if(trace_ent.flags & FL_CLIENT)
+                                               else if(IS_CLIENT(trace_ent))
                                                {
                                                        if(trace_ent.health <= autocvar_g_vehicle_bumblebee_healgun_hmax && autocvar_g_vehicle_bumblebee_healgun_hps)
                                                                trace_ent.health = min(trace_ent.health + autocvar_g_vehicle_bumblebee_healgun_hps * frametime, autocvar_g_vehicle_bumblebee_healgun_hmax);
@@ -687,43 +685,14 @@ void bumb_exit(float eject)
        
        spot = vehicles_findgoodexit(spot);
        
+       // Hide beam
+       if(self.gun3.enemy || !wasfreed(self.gun3.enemy)) {
+               self.gun3.enemy.effects |= EF_NODRAW;
+    }
 
        self.owner.velocity = 0.75 * self.vehicle.velocity + normalize(spot - self.vehicle.origin) * 200;
        self.owner.velocity_z += 10;
        setorigin(self.owner, spot);
-
-       /*if(eject)
-       {
-           spot = self.origin + v_forward * 100 + '0 0 64';
-           spot = vehicles_findgoodexit(spot);
-           //setorigin(self.owner , spot);
-           self.owner.velocity = (v_up + v_forward * 0.25) * 250;
-           self.owner.oldvelocity = self.owner.velocity;
-       }
-       else
-       {
-               if(vlen(self.velocity) > autocvar_g_vehicle_bumblebee_speed_forward * 0.5)              
-               {
-                       if(vlen(self.velocity) > autocvar_sv_maxairspeed)
-                               self.owner.velocity = normalize(self.velocity) * autocvar_sv_maxairspeed;
-                       else
-                               self.owner.velocity = self.velocity + v_forward * 100;
-                       
-                       self.owner.velocity_z += 200;
-                       spot = self.origin + v_forward * 128 + '0 0 32';
-                       spot = vehicles_findgoodexit(spot);
-               }
-               else
-               {
-                       self.owner.velocity = self.velocity * 0.5;
-                       self.owner.velocity_z += 10;
-                       spot = self.origin - v_forward * 300 + '0 0 32';
-                       spot = vehicles_findgoodexit(spot);
-               }
-           self.owner.oldvelocity = self.owner.velocity;
-           //setorigin(self.owner , spot);
-       }
-       */
        
        antilag_clear(self.owner);
     self.owner = world;
@@ -735,7 +704,7 @@ void bumb_blowup()
                                 autocvar_g_vehicle_bumblebee_blowup_edgedamage,
                                 autocvar_g_vehicle_bumblebee_blowup_radius, self,
                                 autocvar_g_vehicle_bumblebee_blowup_forceintensity,
-                                DEATH_WAKIBLOWUP, world);
+                                DEATH_VH_BUMB_DEATH, world);
 
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
        pointparticles(particleeffectnum("explosion_large"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
@@ -794,7 +763,7 @@ void bumb_die()
        if(random() > 0.5)
                _body.touch = bumb_blowup;
        else
-               _body.touch = SUB_Null;
+               _body.touch = func_null;
                
        _body.think = bumb_diethink;
        _body.nextthink = time;
@@ -805,7 +774,7 @@ void bumb_die()
        pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1);
        
        self.health                     = 0;
-       self.event_damage       = SUB_Null;
+       self.event_damage       = func_null;
        self.solid                      = SOLID_CORPSE;
        self.takedamage         = DAMAGE_NO;
        self.deadflag           = DEAD_DYING;
@@ -814,7 +783,7 @@ void bumb_die()
        self.colormod           = '0 0 0';
        self.avelocity          = '0 0 0';
        self.velocity           = '0 0 0';
-       self.touch                      = SUB_Null;
+       self.touch                      = func_null;
        self.nextthink          = 0;
 
        setorigin(self, self.pos1);