]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Some updates to vore (new model, better projectiles)
authorMario <mario.mario@y7mail.com>
Sat, 23 Feb 2013 21:29:39 +0000 (08:29 +1100)
committerMario <mario.mario@y7mail.com>
Sat, 23 Feb 2013 21:29:39 +0000 (08:29 +1100)
models/monsters/mage.dpm [new file with mode: 0644]
models/monsters/mage.dpm.framegroups [new file with mode: 0644]
models/monsters/shalrath.mdl [deleted file]
models/monsters/shalrath.mdl.framegroups [deleted file]
monsters.cfg
qcsrc/client/projectile.qc
qcsrc/common/constants.qh
qcsrc/server/monsters/monster/shalrath.qc
scripts/mage.shader [new file with mode: 0644]
scripts/shaderlist.txt
textures/mage.tga [new file with mode: 0644]

diff --git a/models/monsters/mage.dpm b/models/monsters/mage.dpm
new file mode 100644 (file)
index 0000000..3686b74
Binary files /dev/null and b/models/monsters/mage.dpm differ
diff --git a/models/monsters/mage.dpm.framegroups b/models/monsters/mage.dpm.framegroups
new file mode 100644 (file)
index 0000000..4a72c65
--- /dev/null
@@ -0,0 +1,11 @@
+/*
+Generated framegroups file for mage
+Used by DarkPlaces to simulate frame groups in DPM models.
+*/
+
+1 31 30 1 // mage idle
+32 31 30 1 // mage walk
+63 16 30 1 // mage attack
+79 16 30 1 // mage hit
+95 31 30 0 // mage die
+126 31 60 1 // mage walk
diff --git a/models/monsters/shalrath.mdl b/models/monsters/shalrath.mdl
deleted file mode 100644 (file)
index bfa4ec2..0000000
Binary files a/models/monsters/shalrath.mdl and /dev/null differ
diff --git a/models/monsters/shalrath.mdl.framegroups b/models/monsters/shalrath.mdl.framegroups
deleted file mode 100644 (file)
index 35108f5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1 10 10 1 // shalrath attack\r12 4 10 0 // shalrath pain\r18 5 10 0 // shalrath death\r26 12 10 1 // shalrath walk
\ No newline at end of file
index cddda3c4cdcc16c4a4f87a5fde6dbb317b18f85b..ee23a0b4877f10a85ccd607b19e94a8fd2c14d70 100644 (file)
@@ -159,10 +159,14 @@ set g_monster_fish_speed_run 70 "Rotfish run speed"
 // Vore
 set g_monster_shalrath 1 "Enable Vores"
 set g_monster_shalrath_health 400 "Vore health"
-set g_monster_shalrath_damage 30 "Vore magic attack damage"
 set g_monster_shalrath_drop health "Vore drops this item on death"
 set g_monster_shalrath_drop_size medium "Size of the item Vores drop. Possible values are: small, medium, large"
 set g_monster_shalrath_speed 50 "Vore move speed"
+set g_monster_shalrath_attack_spike_damage 30 "Vore homing spike explosion damage"
+set g_monster_shalrath_attack_spike_radius 60 "Vore homing spike explosion radius"
+set g_monster_shalrath_attack_spike_delay 2 "Delay between Vore homing spike attacks"
+set g_monster_shalrath_melee_damage 30 "Vore magic attack damage"
+set g_monster_shalrath_attack_melee_delay 0.7 "Delay between Vore melee attacks"
 
 // Spawner
 set g_monster_spawner 1 "Enable Monster Spawner"
index fb4fdd5ef24e1fd245486a58d3a69ecf5fae33a8..a0fd4105f751538e06a09d6ef2c702b4975098b9 100644 (file)
@@ -289,6 +289,8 @@ void Ent_Projectile()
                        case PROJECTILE_TAG: setmodel(self, "models/laser.mdl"); self.traileffect = particleeffectnum("TR_ROCKET"); break;
                        case PROJECTILE_FLAC: setmodel(self, "models/hagarmissile.mdl"); self.scale = 0.4; self.traileffect = particleeffectnum("TR_SEEKER"); break;
                        case PROJECTILE_SEEKER: setmodel(self, "models/tagrocket.md3"); self.traileffect = particleeffectnum("TR_SEEKER"); break;
+                       
+                       case PROJECTILE_VORE_SPIKE: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum(""); break;
 
                        case PROJECTILE_RAPTORBOMB:    setmodel(self, "models/vehicles/clusterbomb.md3"); self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(""); break;
                        case PROJECTILE_RAPTORBOMBLET: setmodel(self, "models/vehicles/bomblet.md3");     self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(""); break;
index 8d310a7cc65013a4a59affed622c10b8c5556702..b908bacec7db376eacb42b801b3fef5d244a8ec4 100644 (file)
@@ -362,6 +362,8 @@ float PROJECTILE_WAKICANNON     = 29;
 float PROJECTILE_BUMBLE_GUN     = 30;
 float PROJECTILE_BUMBLE_BEAM    = 31;
 
+float PROJECTILE_VORE_SPIKE            = 32;
+
 float SPECIES_HUMAN        =  0;
 float SPECIES_ROBOT_SOLID  =  1;
 float SPECIES_ALIEN        =  2;
index 86c5b0d30f8b67aa32b1a051875cd1d587f3bd09..76c56d2fefc3e6f792aa9e75d8a692d5430359c8 100644 (file)
@@ -5,14 +5,21 @@ const vector SHALRATH_MAX = '32 32 32';
 // cvars
 float autocvar_g_monster_shalrath;
 float autocvar_g_monster_shalrath_health;
-float autocvar_g_monster_shalrath_damage;
 float autocvar_g_monster_shalrath_speed;
+float autocvar_g_monster_shalrath_attack_spike_damage;
+float autocvar_g_monster_shalrath_attack_spike_radius;
+float autocvar_g_monster_shalrath_attack_spike_delay;
+float autocvar_g_monster_shalrath_attack_melee_damage;
+float autocvar_g_monster_shalrath_attack_melee_delay;
 
 // animations
-#define shalrath_anim_attack   0
-#define shalrath_anim_pain             1
-#define shalrath_anim_death    2
-#define shalrath_anim_walk             3
+#define shalrath_anim_idle             0
+#define shalrath_anim_walk             1
+#define shalrath_anim_attack   2
+#define shalrath_anim_pain             3
+#define shalrath_anim_death    4
+#define shalrath_anim_run              5
+
 
 void() ShalMissile;
 
@@ -24,20 +31,20 @@ void shalrath_think ()
        if(self.delay != -1)
                self.nextthink = self.delay;
        
-       monster_move(autocvar_g_monster_shalrath_speed, autocvar_g_monster_shalrath_speed, 50, shalrath_anim_walk, shalrath_anim_walk, shalrath_anim_walk);
+       monster_move(autocvar_g_monster_shalrath_speed, autocvar_g_monster_shalrath_speed, 50, shalrath_anim_walk, shalrath_anim_run, shalrath_anim_idle);
 }
 
 void shalrath_attack ()
 {
        self.frame = shalrath_anim_attack;
-       self.delay = time + 0.1;
-       self.attack_finished_single = time + 0.7;
+       self.delay = time + 0.2;
+       self.attack_finished_single = time + autocvar_g_monster_shalrath_attack_spike_delay;
        self.monster_delayedattack = ShalMissile;
 }
 
 void shalrathattack_melee ()
 {
-       float bigdmg = 0, rdmg = autocvar_g_monster_shalrath_damage * random();
+       float bigdmg = 0, rdmg = autocvar_g_monster_shalrath_attack_melee_damage * random();
 
        bigdmg = rdmg * self.scale;
 
@@ -49,7 +56,7 @@ void shalrath_attack_melee ()
        self.monster_delayedattack = shalrathattack_melee;
        self.delay = time + 0.2;
        self.frame = shalrath_anim_attack;
-       self.attack_finished_single = time + 0.7;
+       self.attack_finished_single = time + autocvar_g_monster_shalrath_attack_melee_delay;
 }
 
 float shal_missile ()
@@ -85,6 +92,23 @@ void ShalHome ()
        self.think = ShalHome;  
 }
 
+void shal_spike_explode ()
+{
+       self.event_damage = func_null;
+
+       pointparticles(particleeffectnum("explosion_small"), self.origin, '0 0 0', 1);
+       RadiusDamage (self, self.realowner, autocvar_g_monster_shalrath_attack_spike_damage, autocvar_g_monster_shalrath_attack_spike_damage * 0.5, autocvar_g_monster_shalrath_attack_spike_radius, world, 0, DEATH_MONSTER_SHALRATH_MELEE, other);
+
+       remove (self);
+}
+
+void shal_spike_touchexplode()
+{
+       PROJECTILE_TOUCH;
+
+       shal_spike_explode();
+}
+
 void ShalMissile ()
 {
        local   entity  missile = world;
@@ -93,8 +117,6 @@ void ShalMissile ()
        
        self.effects |= EF_MUZZLEFLASH;
 
-       sound (self, CHAN_WEAPON, "weapons/spike.wav", 1, ATTN_NORM);
-
        missile = spawn ();
        missile.owner = missile.realowner = self;
        
@@ -114,9 +136,9 @@ void ShalMissile ()
        missile.velocity = dir * 400;
        missile.avelocity = '300 300 300';
        missile.enemy = self.enemy;
-       missile.touch = W_Plasma_TouchExplode;
+       missile.touch = shal_spike_touchexplode;
        
-       CSQCProjectile(missile, TRUE, PROJECTILE_CRYLINK, TRUE);
+       CSQCProjectile(missile, TRUE, PROJECTILE_VORE_SPIKE, TRUE);
 }
 
 float ShalrathCheckAttack ()
@@ -224,8 +246,8 @@ void spawnfunc_monster_shalrath ()
        self.scale = 1.3;
        
        if not (monster_initialize(
-                        "Vore",
-                        "models/monsters/shalrath.mdl",
+                        "Mage",
+                        "models/monsters/mage.dpm",
                         SHALRATH_MIN, SHALRATH_MAX,
                         FALSE,
                         shalrath_die, shalrath_spawn))
diff --git a/scripts/mage.shader b/scripts/mage.shader
new file mode 100644 (file)
index 0000000..7a235c1
--- /dev/null
@@ -0,0 +1,8 @@
+mage
+{
+       cull none
+
+       {
+               map textures/mage
+       }
+}
index a73e7e2064a38d6966bb223a7b425037d24b8901..c3ac98f2c57142ad9aecadd1d902dbe76ef4a2fc 100644 (file)
@@ -14,3 +14,4 @@ tree
 tuba
 turrets
 weapons
+mage
diff --git a/textures/mage.tga b/textures/mage.tga
new file mode 100644 (file)
index 0000000..89c02fc
Binary files /dev/null and b/textures/mage.tga differ