Fixed PatchMonsterModel() skin names for certain monsters.

This commit is contained in:
Knightmare66 2021-01-02 15:58:52 -05:00
parent 8c26c2f3de
commit 77a2053b72
16 changed files with 46 additions and 20 deletions

View file

@ -1646,6 +1646,7 @@ int PatchMonsterModel (char *modelname)
qboolean is_vulture = false;
qboolean is_zboss_mech = false;
qboolean is_zboss_pilot = false;
qboolean is_q1monster = false;
qboolean gamedirpakfile = false;
@ -1742,6 +1743,17 @@ int PatchMonsterModel (char *modelname)
is_zboss_pilot = true;
numskins = 12;
}
else if ( !strcmp(modelname, "models/monsters/q1dog/tris.md2") || !strcmp(modelname, "models/monsters/q1enforcer/tris.md2")
|| !strcmp(modelname, "models/monsters/q1fiend/tris.md2") || !strcmp(modelname, "models/monsters/q1freddie/tris.md2")
|| !strcmp(modelname, "models/monsters/q1grunt/tris.md2") || !strcmp(modelname, "models/monsters/q1hknight/tris.md2")
|| !strcmp(modelname, "models/monsters/q1knight/tris.md2") || !strcmp(modelname, "models/monsters/q1ogre/tris.md2")
|| !strcmp(modelname, "models/monsters/q1rotfish/tris.md2") || !strcmp(modelname, "models/monsters/q1scrag/tris.md2")
|| !strcmp(modelname, "models/monsters/q1shalrath/tris.md2") || !strcmp(modelname, "models/monsters/q1shambler/tris.md2")
|| !strcmp(modelname, "models/monsters/q1tarbaby/tris.md2") || !strcmp(modelname, "models/monsters/q1zombie/tris.md2") )
{
is_q1monster = true;
numskins = 4;
}
// end Knightmare
@ -2176,6 +2188,20 @@ int PatchMonsterModel (char *modelname)
Com_strcat (skins[j], sizeof(skins[j]), "custom3_p2.pcx"); break;
}
}
else if (is_q1monster)
{
switch (j)
{
case 0:
Com_strcat (skins[j], sizeof(skins[j]), "skin0.pcx"); break;
case 1:
Com_strcat (skins[j], sizeof(skins[j]), "custom1.pcx"); break;
case 2:
Com_strcat (skins[j], sizeof(skins[j]), "custom2.pcx"); break;
case 3:
Com_strcat (skins[j], sizeof(skins[j]), "custom3.pcx"); break;
}
}
// end Knightmare
else
{

View file

@ -17,7 +17,7 @@ static int sound_sight;
static int sound_idle;
/*static*/ void dog_idle (edict_t *self)
void dog_idle (edict_t *self)
{
if (random() < 0.2)
gi.sound (self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
@ -155,7 +155,7 @@ void dog_pain (edict_t *self, edict_t *other, float kick, int damage)
// MELEE
/*static*/ void dog_bite (edict_t *self)
void dog_bite (edict_t *self)
{
vec3_t aim;
@ -165,7 +165,7 @@ void dog_pain (edict_t *self, edict_t *other, float kick, int damage)
}
/*static*/ void dog_checkrefire (edict_t *self)
void dog_checkrefire (edict_t *self)
{
if (!self->enemy || !self->enemy->inuse || self->enemy->health <= 0)
return;
@ -196,7 +196,7 @@ void dog_melee (edict_t *self)
// LEAP
/*static*/ void dog_jump_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
void dog_jump_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
if (self->health <= 0)
{
@ -234,7 +234,7 @@ void dog_melee (edict_t *self)
}
/*static*/ void dogtakeoff (edict_t *self)
void dogtakeoff (edict_t *self)
{
vec3_t forward;
@ -248,7 +248,7 @@ void dog_melee (edict_t *self)
self->touch = dog_jump_touch;
}
/*static*/ void dogchecklanding (edict_t *self)
void dogchecklanding (edict_t *self)
{
if (self->groundentity)
{

View file

@ -456,7 +456,7 @@ void SP_monster_q1_dog (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1dog/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1dog/tris.md2");

View file

@ -373,7 +373,7 @@ void SP_monster_q1_enforcer (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1enforcer/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1enforcer/tris.md2");

View file

@ -474,7 +474,7 @@ void SP_monster_q1_fiend (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1fiend/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1fiend/tris.md2");

View file

@ -832,7 +832,7 @@ void SP_monster_q1_freddie (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1freddie/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1freddie/tris.md2");

View file

@ -430,7 +430,7 @@ void SP_monster_q1_grunt (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1grunt/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1grunt/tris.md2");

View file

@ -517,7 +517,7 @@ void SP_monster_q1_hknight (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1hknight/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1hknight/tris.md2");

View file

@ -429,7 +429,7 @@ void SP_monster_q1_knight (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1knight/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1knight/tris.md2");

View file

@ -548,7 +548,7 @@ void SP_monster_q1_ogre (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1ogre/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1ogre/tris.md2");

View file

@ -251,7 +251,7 @@ void SP_monster_q1_rotfish (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1rotfish/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1rotfish/tris.md2");

View file

@ -360,7 +360,7 @@ void SP_monster_q1_scrag (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1scrag/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1scrag/tris.md2");

View file

@ -306,7 +306,7 @@ void SP_monster_q1_shalrath (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1shalrath/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1shalrath/tris.md2");

View file

@ -545,7 +545,7 @@ void SP_monster_q1_shambler (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1shambler/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1shambler/tris.md2");

View file

@ -327,7 +327,7 @@ void SP_monster_q1_tarbaby (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1tarbaby/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1tarbaby/tris.md2");

View file

@ -671,7 +671,7 @@ void SP_monster_q1_zombie (edict_t *self)
if ( self->style )
{
PatchMonsterModel("models/monsters/q1zombie/tris.md2");
self->s.skinnum = self->style * 2;
self->s.skinnum = self->style;
}
self->s.modelindex = gi.modelindex ("models/monsters/q1zombie/tris.md2");