Proper projectile, and temporary mine model.
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 25 Sep 2010 23:08:30 +0000 (02:08 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 25 Sep 2010 23:08:30 +0000 (02:08 +0300)
models/mine.md3 [new file with mode: 0644]
qcsrc/client/projectile.qc
qcsrc/common/constants.qh
qcsrc/server/w_minelayer.qc

diff --git a/models/mine.md3 b/models/mine.md3
new file mode 100644 (file)
index 0000000..7758e3e
Binary files /dev/null and b/models/mine.md3 differ
index 9a77337..f45a52a 100644 (file)
@@ -279,6 +279,7 @@ void Ent_Projectile()
                        case PROJECTILE_ELECTRO_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
                        case PROJECTILE_GRENADE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
                        case PROJECTILE_GRENADE_BOUNCING: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
+                       case PROJECTILE_MINE: setmodel(self, "models/mine.md3");self.traileffect = particleeffectnum(""); break;
                        case PROJECTILE_LASER: setmodel(self, "models/laser.mdl");self.traileffect = particleeffectnum(""); break;
                        case PROJECTILE_HLAC: setmodel(self, "models/hlac_bullet.md3");self.traileffect = particleeffectnum(""); break;
                        case PROJECTILE_PORTO_RED: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_WIZSPIKE"); self.scale = 4; break;
@@ -330,6 +331,10 @@ void Ent_Projectile()
                                self.move_bounce_factor = g_balance_grenadelauncher_secondary_bouncefactor;
                                self.move_bounce_stopspeed = g_balance_grenadelauncher_secondary_bouncestop;
                                break;
+                       case PROJECTILE_MINE:
+                               self.mins = '-6 -6 -6';
+                               self.maxs = '6 6 6';
+                               break;
                        case PROJECTILE_PORTO_RED:
                                self.colormod = '2 1 1';
                                self.alphamod = 0.5;
@@ -407,6 +412,7 @@ void Projectile_Precache()
        precache_model("models/ebomb.mdl");
        precache_model("models/elaser.mdl");
        precache_model("models/grenademodel.md3");
+       precache_model("models/mine.md3");
        precache_model("models/hagarmissile.mdl");
        precache_model("models/hlac_bullet.md3");
        precache_model("models/laser.mdl");
index 5ebeb54..f03875b 100644 (file)
@@ -454,20 +454,21 @@ float PROJECTILE_CRYLINK = 5;
 float PROJECTILE_ELECTRO_BEAM = 6;
 float PROJECTILE_GRENADE = 7;
 float PROJECTILE_GRENADE_BOUNCING = 8;
-float PROJECTILE_LASER = 9;
-float PROJECTILE_HLAC = 10;
-float PROJECTILE_SEEKER = 11;
-float PROJECTILE_FLAC = 12;
-float PROJECTILE_PORTO_RED = 13;
-float PROJECTILE_PORTO_BLUE = 14;
-float PROJECTILE_HOOKBOMB = 15;
-float PROJECTILE_HAGAR = 16;
-float PROJECTILE_HAGAR_BOUNCING = 17;
-float PROJECTILE_BULLET_GLOWING = 18;
-float PROJECTILE_CRYLINK_BOUNCING = 19;
-float PROJECTILE_FIREBALL = 20;
-float PROJECTILE_FIREMINE = 21;
-float PROJECTILE_BULLET_GLOWING_TRACER = 22;
+float PROJECTILE_MINE = 9;
+float PROJECTILE_LASER = 10;
+float PROJECTILE_HLAC = 11;
+float PROJECTILE_SEEKER = 12;
+float PROJECTILE_FLAC = 13;
+float PROJECTILE_PORTO_RED = 14;
+float PROJECTILE_PORTO_BLUE = 15;
+float PROJECTILE_HOOKBOMB = 16;
+float PROJECTILE_HAGAR = 17;
+float PROJECTILE_HAGAR_BOUNCING = 18;
+float PROJECTILE_BULLET_GLOWING = 19;
+float PROJECTILE_CRYLINK_BOUNCING = 20;
+float PROJECTILE_FIREBALL = 21;
+float PROJECTILE_FIREMINE = 22;
+float PROJECTILE_BULLET_GLOWING_TRACER = 23;
 
 float SPECIES_HUMAN        =  0;
 float SPECIES_ROBOT_SOLID  =  1;
index 80bbd44..6940a57 100644 (file)
@@ -118,7 +118,8 @@ void W_Mine_Think (void)
 void W_Mine_Touch (void)
 {
        PROJECTILE_TOUCH;
-       self.movetype = MOVETYPE_NONE; // locked in place.
+       spamsound (self, CHAN_PROJECTILE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
+       self.movetype = MOVETYPE_NONE; // lock the mine in place
        // TODO: make sure this doesn't cause the mine to get stuck in the air if it falls over a team mate (doesn't explode) and the team mate leaves
 }
 
@@ -174,7 +175,7 @@ void W_Mine_Attack (void)
        mine.cnt = time + cvar("g_balance_minelayer_lifetime");
        mine.flags = FL_PROJECTILE;
 
-       CSQCProjectile(mine, FALSE, PROJECTILE_ROCKET, FALSE);
+       CSQCProjectile(mine, FALSE, PROJECTILE_MINE, FALSE);
 
        // muzzle flash for 1st person view
        flash = spawn ();