From: Mario Date: Fri, 26 Apr 2013 15:58:25 +0000 (+1000) Subject: Add a new model for tarbaby X-Git-Tag: xonotic-v0.8.0~241^2^2~280 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c3c67e303e1a6e189be4d29bf1192f8c14523f73;p=xonotic%2Fxonotic-data.pk3dir.git Add a new model for tarbaby --- diff --git a/models/monsters/slime.dpm b/models/monsters/slime.dpm new file mode 100644 index 000000000..095d5f7be 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 index 000000000..4c1cf7382 --- /dev/null +++ b/models/monsters/slime.dpm.framegroups @@ -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 index db8c318f3..000000000 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 index 7271df49f..000000000 --- a/models/monsters/tarbaby.mdl.framegroups +++ /dev/null @@ -1 +0,0 @@ -1 24 10 1 // tarbaby walk 26 24 10 1 // tarbaby run 51 5 10 0 // tarbaby jump 57 3 10 1 // tarbaby fly 61 1 10 0 // tarbaby explode \ No newline at end of file diff --git a/qcsrc/client/monsters.qc b/qcsrc/client/monsters.qc index 2c54fa663..051f0c6e8 100644 --- a/qcsrc/client/monsters.qc +++ b/qcsrc/client/monsters.qc @@ -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: diff --git a/qcsrc/server/monsters/monster/tarbaby.qc b/qcsrc/server/monsters/monster/tarbaby.qc index 6fc0743bd..fe5b62f5e 100644 --- a/qcsrc/server/monsters/monster/tarbaby.qc +++ b/qcsrc/server/monsters/monster/tarbaby.qc @@ -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)) diff --git a/scripts/monsters.shader b/scripts/monsters.shader index dbab45df1..dad8eab49 100644 --- a/scripts/monsters.shader +++ b/scripts/monsters.shader @@ -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 index 000000000..cf755c971 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 index 000000000..4553e8e09 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 index 000000000..2b325eca3 Binary files /dev/null and b/textures/slime_pants.png differ