]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a new model for tarbaby
authorMario <mario.mario@y7mail.com>
Fri, 26 Apr 2013 15:58:25 +0000 (01:58 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 26 Apr 2013 15:58:25 +0000 (01:58 +1000)
models/monsters/slime.dpm [new file with mode: 0644]
models/monsters/slime.dpm.framegroups [new file with mode: 0644]
models/monsters/tarbaby.mdl [deleted file]
models/monsters/tarbaby.mdl.framegroups [deleted file]
qcsrc/client/monsters.qc
qcsrc/server/monsters/monster/tarbaby.qc
scripts/monsters.shader
textures/slime.png [new file with mode: 0644]
textures/slime_norm.png [new file with mode: 0644]
textures/slime_pants.png [new file with mode: 0644]

diff --git a/models/monsters/slime.dpm b/models/monsters/slime.dpm
new file mode 100644 (file)
index 0000000..095d5f7
Binary files /dev/null and b/models/monsters/slime.dpm differ
diff --git a/models/monsters/slime.dpm.framegroups b/models/monsters/slime.dpm.framegroups
new file mode 100644 (file)
index 0000000..4c1cf73
--- /dev/null
@@ -0,0 +1,11 @@
+/*
+Generated framegroups file for slime
+Used by DarkPlaces to simulate frame groups in DPM models.
+*/
+
+1 36 30 1 // slime idle
+37 71 30 1 // slime walk
+108 51 30 1 // slime attack
+159 2 30 1 // slime fly
+161 61 30 1 // slime pain
+222 61 30 0 // slime die
diff --git a/models/monsters/tarbaby.mdl b/models/monsters/tarbaby.mdl
deleted file mode 100644 (file)
index db8c318..0000000
Binary files a/models/monsters/tarbaby.mdl and /dev/null differ
diff --git a/models/monsters/tarbaby.mdl.framegroups b/models/monsters/tarbaby.mdl.framegroups
deleted file mode 100644 (file)
index 7271df4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1 24 10 1 // tarbaby walk\r26 24 10 1 // tarbaby run\r51 5 10 0 // tarbaby jump\r57 3 10 1 // tarbaby fly\r61 1 10 0 // tarbaby explode
\ No newline at end of file
index 2c54fa66304d61c84063e296637c170cc80cf6d4..051f0c6e82fe4c11ac1b1762734a0f12b1918df9 100644 (file)
@@ -175,7 +175,6 @@ void monster_mid2info(float _mid)
                        mid2info_name = "Spawn";
                        mid2info_min = TARBABY_MIN;
                        mid2info_max = TARBABY_MAX;
-                       if(self) self.scale = 1.3;
                        break;
                }
                case MONSTER_HELLKNIGHT:
index 6fc0743bd9b76e0ddbff03878b9fe403ec6ca1da..fe5b62f5e8009f0a59e0324804bbd49b8620104f 100644 (file)
@@ -1,9 +1,9 @@
 // size
-const vector TARBABY_MIN = '-20 -20 -31';
-const vector TARBABY_MAX = '20 20 20';
+const vector TARBABY_MIN = '-16 -16 -24';
+const vector TARBABY_MAX = '16 16 16';
 
 // model
-string TARBABY_MODEL = "models/monsters/tarbaby.mdl";
+string TARBABY_MODEL = "models/monsters/slime.dpm";
 
 #ifdef SVQC
 // cvars
@@ -14,17 +14,18 @@ float autocvar_g_monster_tarbaby_speed_run;
 
 // animations
 const float tarbaby_anim_walk          = 0;
-const float tarbaby_anim_run           = 1;
+const float tarbaby_anim_idle          = 1;
 const float tarbaby_anim_jump          = 2;
 const float tarbaby_anim_fly           = 3;
-const float tarbaby_anim_explode       = 4;
+const float tarbaby_anim_die           = 4;
+const float tarbaby_anim_pain          = 5;
 
 void tarbaby_think ()
 {
        self.think = tarbaby_think;
        self.nextthink = time + self.ticrate;
        
-       monster_move(autocvar_g_monster_tarbaby_speed_run, autocvar_g_monster_tarbaby_speed_walk, 20, tarbaby_anim_run, tarbaby_anim_walk, tarbaby_anim_walk);
+       monster_move(autocvar_g_monster_tarbaby_speed_run, autocvar_g_monster_tarbaby_speed_walk, 20, tarbaby_anim_walk, tarbaby_anim_walk, tarbaby_anim_idle);
 }
 
 void Tar_JumpTouch ()
@@ -78,7 +79,10 @@ void tarbaby_explode()
        self.think = Monster_Fade;
        self.nextthink = time + 0.1;
        
-       monster_hook_death(); // calling this next frame should be ok...
+       monster_hook_death();
+       
+       self.event_damage = func_null; // reset by monster_hook_death
+       self.takedamage = DAMAGE_NO;
 }
 
 void tarbaby_die ()
@@ -108,7 +112,7 @@ void tarbaby_spawn ()
        self.nextthink                  = time + random() * 0.5 + 0.1;
        self.think                              = tarbaby_think;
        
-       monsters_setframe(tarbaby_anim_walk);
+       monsters_setframe(tarbaby_anim_idle);
        
        monster_setupsounds("tarbaby");
        
@@ -124,10 +128,8 @@ void spawnfunc_monster_tarbaby ()
        if(Monster_CheckAppearFlags(self))
                return;
        
-       self.scale = 1.3;
-       
        if not (monster_initialize(
-                        "Spawn", MONSTER_TARBABY,
+                        "Slime", MONSTER_TARBABY,
                         TARBABY_MIN, TARBABY_MAX,
                         FALSE,
                         tarbaby_die, tarbaby_spawn))
index dbab45df1f6d6df091e18f9f16af34917f8b6ca3..dad8eab49faad96782a4568cf65465f8ee48c6f7 100644 (file)
@@ -30,3 +30,11 @@ mage
                map textures/mage
        }
 }
+slimeDiffuse
+{
+       {
+               map textures/slime
+               alphaFunc GT0
+               rgbGen Vertex
+       }
+}
\ No newline at end of file
diff --git a/textures/slime.png b/textures/slime.png
new file mode 100644 (file)
index 0000000..cf755c9
Binary files /dev/null and b/textures/slime.png differ
diff --git a/textures/slime_norm.png b/textures/slime_norm.png
new file mode 100644 (file)
index 0000000..4553e8e
Binary files /dev/null and b/textures/slime_norm.png differ
diff --git a/textures/slime_pants.png b/textures/slime_pants.png
new file mode 100644 (file)
index 0000000..2b325ec
Binary files /dev/null and b/textures/slime_pants.png differ