djcev.com

//

Git Repos / fte_dogmode / qc / monsters / dog.qc

Last update to this file was on 2024-06-15 at 19:50.

Show dog.qc

//==============================================================================
// DOG
//==============================================================================

//======================================================================
// constants
//======================================================================

const float DOG_HEALTH = 25; // id1 25
const float DOG_HEALTH_CORPSE = 20;

const vector DOG_HEAD_MINS = '-9.66 -11.89 -0.2';
const vector DOG_HEAD_MAXS = '6.57 7.96 13.29';
const vector DOG_CORPSE_MINS = '-24.51 -16.5 -50.37';
const vector DOG_CORPSE_MAXS = '28.2 13.81 30';
const vector DOG_CORPSE_Z_MINS = '-16 -16 -24'; // thin 32x32 box on ground
const vector DOG_CORPSE_Z_MAXS = '16 16 -8';

//======================================================================
// forward declarations
//======================================================================

// monster_dog
// float() monster_dog_checkmelee; // attacks, alert sound
float() monster_dog_checkjump;
float() monster_dog_checkattack;
void() monster_dog_sightsound;
void() monster_dog_bite;
void() dog_stand1; void() dog_stand2; // thinking & animation states
void() dog_stand3; void() dog_stand4; void() dog_stand5; void() dog_stand6;
void() dog_stand7; void() dog_stand8; void() dog_stand9;
void() dog_walk1; void() dog_walk2; void() dog_walk3; void() dog_walk4;
void() dog_walk5; void() dog_walk6; void() dog_walk7; void() dog_walk8;
void() dog_run1; void() dog_run2; void() dog_run3; void() dog_run4;
void() dog_run5; void() dog_run6; void() dog_run7; void() dog_run8;
void() dog_run9; void() dog_run10; void() dog_run11; void() dog_run12;
void() dog_atta1; void() dog_atta2; void() dog_atta3; void() dog_atta4;
void() dog_atta5; void() dog_atta6; void() dog_atta7; void() dog_atta8;
void() dog_leap1; void() dog_leap2; void() dog_leap3; void() dog_leap4;
void() dog_leap5; void() dog_leap6; void() dog_leap7; void() dog_leap8;
void() dog_leap9;
void() dog_pain1; void() dog_pain2; void() dog_pain3; void() dog_pain4;
void() dog_pain5; void() dog_pain6;
void() dog_painb1; void() dog_painb2; void() dog_painb3; void() dog_painb4;
void() dog_painb5; void() dog_painb6; void() dog_painb7; void() dog_painb8;
void() dog_painb9; void() dog_painb10; void() dog_painb11; void() dog_painb12;
void() dog_painb13; void() dog_painb14; void() dog_painb15; void() dog_painb16;
void() dog_die1; void() dog_die2; void() dog_die3; void() dog_die4;
void() dog_die5; void() dog_die6; void() dog_die7; void() dog_die8;
void() dog_die9;
void() dog_dieb1; void() dog_dieb2; void() dog_dieb3; void() dog_dieb4;
void() dog_dieb5; void() dog_dieb6; void() dog_dieb7; void() dog_dieb8;
void() dog_dieb9;
void(entity attacker, float damage) monster_dog_pain; // interaction
void(vector dir) monster_dog_destroy;
void() monster_dog_touch_jump;
entity(vector org, vector ang, float sflags, float yaw, float angry)
spawn_monster_dog; // initialization
void(entity e) monster_dog_init;
void() monster_dog;

// gib_head_dog
void(entity act, vector dir, float dmg) throw_gib_head_dog;
void(entity e) gib_head_dog_init;
void() gib_head_dog;

// monster_dead_dog
void(entity e) monster_dead_dog_init;
void() monster_dead_dog;

//======================================================================
// frame macros
//======================================================================

$cd id1/models/dog
$origin 0 0 24
$base base
$skin skin

$frame attack1 attack2 attack3 attack4 attack5 attack6 attack7 attack8

$frame death1 death2 death3 death4 death5 death6 death7 death8 death9

$frame deathb1 deathb2 deathb3 deathb4 deathb5 deathb6 deathb7 deathb8
$frame deathb9

$frame pain1 pain2 pain3 pain4 pain5 pain6

$frame painb1 painb2 painb3 painb4 painb5 painb6 painb7 painb8 painb9 painb10
$frame painb11 painb12 painb13 painb14 painb15 painb16

$frame run1 run2 run3 run4 run5 run6 run7 run8 run9 run10 run11 run12

$frame leap1 leap2 leap3 leap4 leap5 leap6 leap7 leap8 leap9

$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9

$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8

//------------------------------------------------------------------------------

/*QUAKED monster_dog (1 0 0) (-32 -32 -24) (32 32 40) AMBUSH X X TRIGGER_SPAWNED X X X X NOT_ON_EASY NOT_ON_NORMAL NOT_ON_HARD_OR_NIGHTMARE NOT_IN_DEATHMATCH NOT_IN_COOP NOT_IN_SINGLEPLAYER X NOT_ON_HARD_ONLY NOT_ON_NIGHTMARE_ONLY
{
model ("progs/dog.mdl");
}
Rottweiler.

Default health = 25

snd_death(string) : "Path to custom death sound"
snd_pain(string) : "Path to custom pain sound"
snd_sight(string) : "Path to custom sight sound"
snd_attack(string) : "Path to custom attack sound"
snd_idle(string) : "Path to custom idle sound"

mdl_head(string) : "Path to custom head model"
mdl_body(string) : "Path to custom body model"
skin_head(float) : "Skin index of custom head model"
mdl_gib1(string) : "Path to custom 1st gib model"
mdl_gib2(string) : "Path to custom 2nd gib model"
mdl_gib3(string) : "Path to custom 3rd gib model"

effects(choices) : "Add a visual effect to an entity"
0 : "None (Default)"
1 : "Brightfield (yellow particles)"
4 : "Bright light"
8 : "Dim light"

berserk(choices) "Skips certain pain animations similar to skill 3 (Makes a semi-nightmare monster!)"
0 : "Off (Default)"
1 : "Berserk (skip pain animations)"

delay(float) : "Delay spawn in for this amount of time"

wait(choices) : "Play an effect when trigger spawned?"
0 : "Teleport Effects (Default)"
1 : "Spawn Silently"

spawn_angry(Choices)
0 : "Only when trigger spawned, default behavior - not angry"
1 : "Only when trigger spawned, set to 1 to spawn angry at player"

infight_mode(Choices)
0 : "Default behavior, only with different classnames"
1 : "Infight with monsters with the same classname but a different mdl_body"
2 : "Infight with monsters with the same classname and model but a different skin"
3 : "Infight no matter what"

health(integer) : "Set this to a custom health amount"
pain_target(string) : "Fire this target when pain_threshold is reached"
pain_threshold(integer) : "Fire pain_target when health drops below this amount"
sight_trigger(integer) : "1 = Fire target upon seeing the player instead of death"
skin(integer) : "Skin index (default 0) Use this when your custom model has more than one skin to select"
obit_name(string) : "When used with obit_method, this will set part of the text for a custom obituary. e.g. a Super Soldier! Using the examples here, the obituary would read: Player was eviscerated by a Super Solider!"
obit_method(string) : "When used with obit_name, will set part of the text for a custom obituary. e.g. eviscerated - If empty, defaults to killed."
damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by this number (e.g. 4 = Quad damage)"

*/
//----------------------------------------------------------------------
// class monster_dog: base_walkmonster
// {
//--------------------------------------------------------------
// CheckDogMelee
// Returns TRUE if a melee attack would hit right now
//--------------------------------------------------------------
/*
float() monster_dog_checkmelee =
{
if (enemy_range == RANGE_MELEE)
{
// FIXME: check canreach
self.attack_state = AS_MELEE;
return TRUE;
}
return FALSE;
};
*/

//--------------------------------------------------------------
// CheckDogJump
//--------------------------------------------------------------
float() monster_dog_checkjump =
{
local vector dist;
local float d;

if (self.origin_z + self.mins_z >
self.enemy.origin_z + self.enemy.mins_z +
0.75 * self.enemy.size_z)
{
return FALSE;
}

if (self.origin_z + self.maxs_z <
self.enemy.origin_z + self.enemy.mins_z +
0.25 * self.enemy.size_z)
{
return FALSE;
}

dist = self.enemy.origin - self.origin;
dist_z = 0;

d = vlen (dist);

if (d < 80)
return FALSE;

if (d > 150)
return FALSE;

return TRUE;
};

//--------------------------------------------------------------
float() monster_dog_checkattack =
{
// if close enough for slashing, go for it
/*
if (monster_dog_checkmelee())
*/
if (enemy_range == RANGE_MELEE)
{
self.attack_state = AS_MELEE;
return TRUE;
}

if (monster_dog_checkjump())
{
self.attack_state = AS_MISSILE;
return TRUE;
}

return FALSE;
};

//--------------------------------------------------------------
void() monster_dog_sightsound =
{
// dumptruck_ds
sound_sight (self, CHAN_VOICE, "dog/dsight.wav",
VOL_HIGH, ATTN_NORM);
};

//--------------------------------------------------------------
// dog_bite
//--------------------------------------------------------------
void() monster_dog_bite =
{
local vector delta;
local float ldmg;

if (!self.enemy)
return;

ai_charge (10);

if (!can_damage(self, self.enemy))
return;

delta = self.enemy.origin - self.origin;

if (vlen(delta) > 100)
return;

ldmg = (random() + random() + random()) * 8;
t_damage2 (self.enemy, self, self, ldmg);
};

//--------------------------------------------------------------
// Dog standing state
//--------------------------------------------------------------
void() dog_stand1 = [$stand1, dog_stand2] { ai_stand (); };
void() dog_stand2 = [$stand2, dog_stand3] { ai_stand (); };
void() dog_stand3 = [$stand3, dog_stand4] { ai_stand (); };
void() dog_stand4 = [$stand4, dog_stand5] { ai_stand (); };
void() dog_stand5 = [$stand5, dog_stand6] { ai_stand (); };
void() dog_stand6 = [$stand6, dog_stand7] { ai_stand (); };
void() dog_stand7 = [$stand7, dog_stand8] { ai_stand (); };
void() dog_stand8 = [$stand8, dog_stand9] { ai_stand (); };
void() dog_stand9 = [$stand9, dog_stand1] { ai_stand (); };

//--------------------------------------------------------------
// Dog walking state
//--------------------------------------------------------------
void() dog_walk1 = [$walk1, dog_walk2]
{
if (random() < 0.2)
// dumptruck_ds
sound_idle (self, CHAN_VOICE, "dog/idle.wav",
VOL_HIGH, ATTN_IDLE);
ai_walk (8);
};
void() dog_walk2 = [$walk2, dog_walk3] { ai_walk (8); };
void() dog_walk3 = [$walk3, dog_walk4] { ai_walk (8); };
void() dog_walk4 = [$walk4, dog_walk5] { ai_walk (8); };
void() dog_walk5 = [$walk5, dog_walk6] { ai_walk (8); };
void() dog_walk6 = [$walk6, dog_walk7] { ai_walk (8); };
void() dog_walk7 = [$walk7, dog_walk8] { ai_walk (8); };
void() dog_walk8 = [$walk8, dog_walk1] { ai_walk (8); };

//--------------------------------------------------------------
// Dog running state
//--------------------------------------------------------------
void() dog_run1 = [$run1, dog_run2]
{
if (random() < 0.2)
// dumptruck_ds
sound_idle (self, CHAN_VOICE, "dog/idle.wav",
VOL_HIGH, ATTN_IDLE);
ai_run (16);
};
void() dog_run2 = [$run2, dog_run3] { ai_run (32); };
void() dog_run3 = [$run3, dog_run4] { ai_run (32); };
void() dog_run4 = [$run4, dog_run5] { ai_run (20); };
void() dog_run5 = [$run5, dog_run6] { ai_run (64); };
void() dog_run6 = [$run6, dog_run7] { ai_run (32); };
void() dog_run7 = [$run7, dog_run8] { ai_run (16); };
void() dog_run8 = [$run8, dog_run9] { ai_run (32); };
void() dog_run9 = [$run9, dog_run10] { ai_run (32); };
void() dog_run10 = [$run10, dog_run11] { ai_run (20); };
void() dog_run11 = [$run11, dog_run12] { ai_run (64); };
void() dog_run12 = [$run12, dog_run1] { ai_run (32); };

//--------------------------------------------------------------
// Dog attack state
//--------------------------------------------------------------
void() dog_atta1 = [$attack1, dog_atta2] { ai_charge (10); };
void() dog_atta2 = [$attack2, dog_atta3] { ai_charge (10); };
void() dog_atta3 = [$attack3, dog_atta4] { ai_charge (10); };
void() dog_atta4 = [$attack4, dog_atta5]
{
// dumptruck_ds
sound_attack (self, CHAN_VOICE, "dog/dattack1.wav",
VOL_HIGH, ATTN_NORM);
monster_dog_bite ();
};
void() dog_atta5 = [$attack5, dog_atta6] { ai_charge (10); };
void() dog_atta6 = [$attack6, dog_atta7] { ai_charge (10); };
void() dog_atta7 = [$attack7, dog_atta8] { ai_charge (10); };
void() dog_atta8 = [$attack8, dog_run1] { ai_charge (10); };

//--------------------------------------------------------------
// Dog jumping (leaping) state
//--------------------------------------------------------------
void() dog_leap1 = [$leap1, dog_leap2] { ai_face (); };
void() dog_leap2 = [$leap2, dog_leap3]
{
ai_face ();
// fix for instakill bug -- dumptruck_ds
self.worldtype = 0;
self.touch = monster_dog_touch_jump;
makevectors (self.angles);
self.origin_z = self.origin_z + 1;
self.velocity = v_forward * 300 + '0 0 200';
if (self.flags & FL_ONGROUND)
self.flags = self.flags - FL_ONGROUND;
};
void() dog_leap3 = [$leap3, dog_leap4] { };
void() dog_leap4 = [$leap4, dog_leap5] { };
void() dog_leap5 = [$leap5, dog_leap6] { };
void() dog_leap6 = [$leap6, dog_leap7] { };
void() dog_leap7 = [$leap7, dog_leap8] { };
void() dog_leap8 = [$leap8, dog_leap9] { };
void() dog_leap9 = [$leap9, dog_leap9] { };

//--------------------------------------------------------------
// Dog pain state A
//--------------------------------------------------------------
void() dog_pain1 = [$pain1, dog_pain2] { };
void() dog_pain2 = [$pain2, dog_pain3] { };
void() dog_pain3 = [$pain3, dog_pain4] { };
void() dog_pain4 = [$pain4, dog_pain5] { };
void() dog_pain5 = [$pain5, dog_pain6] { };
void() dog_pain6 = [$pain6, dog_run1] { };

//--------------------------------------------------------------
// Dog pain state B
//--------------------------------------------------------------
void() dog_painb1 = [$painb1, dog_painb2] { };
void() dog_painb2 = [$painb2, dog_painb3] { };
void() dog_painb3 = [$painb3, dog_painb4] { ai_pain (4); };
void() dog_painb4 = [$painb4, dog_painb5] { ai_pain (12); };
void() dog_painb5 = [$painb5, dog_painb6] { ai_pain (12); };
void() dog_painb6 = [$painb6, dog_painb7] { ai_pain (2); };
void() dog_painb7 = [$painb7, dog_painb8] { };
void() dog_painb8 = [$painb8, dog_painb9] { ai_pain (4); };
void() dog_painb9 = [$painb9, dog_painb10] { };
void() dog_painb10 = [$painb10, dog_painb11] { ai_pain (10); };
void() dog_painb11 = [$painb11, dog_painb12] { };
void() dog_painb12 = [$painb12, dog_painb13] { };
void() dog_painb13 = [$painb13, dog_painb14] { };
void() dog_painb14 = [$painb14, dog_painb15] { };
void() dog_painb15 = [$painb15, dog_painb16] { };
void() dog_painb16 = [$painb16, dog_run1] { };

//--------------------------------------------------------------
// Dog death state A
//--------------------------------------------------------------
void() dog_die1 = [$death1, dog_die2]
{
base_entity_aligntoground (self);
};
void() dog_die2 = [$death2, dog_die3] { };
void() dog_die3 = [$death3, dog_die4] { };
void() dog_die4 = [$death4, dog_die5] { };
void() dog_die5 = [$death5, dog_die6] { };
void() dog_die6 = [$death6, dog_die7] { };
void() dog_die7 = [$death7, dog_die8] { };
void() dog_die8 = [$death8, dog_die9]
{
become_base_corpse (self, DOG_HEALTH_CORPSE);
setsize (self, DOG_CORPSE_Z_MINS, DOG_CORPSE_Z_MAXS);
};
void() dog_die9 = [$death9, dog_die9] { };

//--------------------------------------------------------------
// Dog death state B
//--------------------------------------------------------------
void() dog_dieb1 = [$deathb1, dog_dieb2]
{
base_entity_aligntoground (self);
};
void() dog_dieb2 = [$deathb2, dog_dieb3] { };
void() dog_dieb3 = [$deathb3, dog_dieb4] { };
void() dog_dieb4 = [$deathb4, dog_dieb5] { };
void() dog_dieb5 = [$deathb5, dog_dieb6] { };
void() dog_dieb6 = [$deathb6, dog_dieb7] { };
void() dog_dieb7 = [$deathb7, dog_dieb8] { };
void() dog_dieb8 = [$deathb8, dog_dieb9]
{
become_base_corpse (self, DOG_HEALTH_CORPSE);
setsize (self, DOG_CORPSE_Z_MINS, DOG_CORPSE_Z_MAXS);
};
void() dog_dieb9 = [$deathb9, dog_dieb9] { };

//==============================================================
// Interaction
//==============================================================

//--------------------------------------------------------------
void(entity attacker, float damage) monster_dog_pain =
{
// dumptruck_ds
sound_pain (self, CHAN_VOICE, "dog/dpain1.wav",
VOL_HIGH, ATTN_NORM);

if (random() > 0.5)
dog_pain1 ();
else
dog_painb1 ();
};

//--------------------------------------------------------------
void(vector dir) monster_dog_destroy =
{
// check if we're dead already
if (self.classgroup & CG_CORPSE)
{
sound (self, CHAN_VOICE, "player/udeath.wav",
VOL_HIGH, ATTN_NORM);

// custom models -- dumptruck_ds
if (self.mdl_gib1 != "")
throw_gib_1 (self, dir, self.health);
else
throw_gib_3 (self, dir, self.health);

if (self.mdl_gib2 != "")
throw_gib_2 (self, dir, self.health);
else
throw_gib_3 (self, dir, self.health);

if (self.mdl_gib3 != "")
throw_gib_3 (self, dir, self.health);
else
throw_gib_3 (self, dir, self.health);

throw_gib_head_dog (self, dir, self.health);

return;
}

// check for gib
if (self.health < -35)
{
sound (self, CHAN_VOICE, "player/udeath.wav",
VOL_HIGH, ATTN_NORM);

// custom models -- dumptruck_ds
if (self.mdl_gib1 != "")
throw_gib_1 (self, dir, self.health);
else
throw_gib_3 (self, dir, self.health);

if (self.mdl_gib2 != "")
throw_gib_2 (self, dir, self.health);
else
throw_gib_3 (self, dir, self.health);

if (self.mdl_gib3 != "")
throw_gib_3 (self, dir, self.health);
else
throw_gib_3 (self, dir, self.health);

throw_gib_head_dog (self, dir, self.health);

base_item_drop_stuff (self);
return;
}

// regular death
// dumptruck_ds
sound_death (self, CHAN_VOICE, "dog/ddeath.wav",
VOL_HIGH, ATTN_NORM);
self.solid = SOLID_NOT;
base_item_drop_stuff (self);

if (random() > 0.5)
dog_die1 ();
else
dog_dieb1 ();
};

//--------------------------------------------------------------
// Dog_JumpTouch
//--------------------------------------------------------------
void() monster_dog_touch_jump =
{
local float ldmg;

if (self.health <= 0)
return;

if (other.takedamage)
{
if (vlen(self.velocity) > 300)
{
if !(self.worldtype)
{
ldmg = 10 + 10 * random();
t_damage2 (other, self, self, ldmg);
if (other.health > 0)
// is the player still alive?
// Preach's instakill bug check
// - dumptruck_ds
self.worldtype = 1;
}
}
}

if (!checkbottom(self))
{
if (self.flags & FL_ONGROUND)
{
// jump randomly to not get hung up
// dprint ("popjump\n");
// 1998-09-16 Sliding/not-jumping on monsters/
// boxes/players fix by Maddes/Kryten start
self.touch = base_monster_touch;
// 1998-09-16 Sliding/not-jumping on monsters/
// boxes/players fix by Maddes/Kryten end
self.think = dog_leap1;
self.nextthink = time + 0.1;

// self.velocity_x = (random() - 0.5) * 600;
// self.velocity_y = (random() - 0.5) * 600;
// self.velocity_z = 200;
// self.flags = self.flags - FL_ONGROUND;
}
// not on ground yet
return;
}

// 1998-09-16 Sliding/not-jumping on monsters/boxes/players
// fix by Maddes/Kryten start
self.touch = base_monster_touch;
// 1998-09-16 Sliding/not-jumping on monsters/boxes/players
// fix by Maddes/Kryten end
self.think = dog_run1;
self.nextthink = time + 0.1;
};

//==============================================================
// Initialization
//==============================================================

//--------------------------------------------------------------
entity(vector org, vector ang, float sflags, float yaw, float angry)
spawn_monster_dog =
{
return spawn_base_monster (org, ang, sflags, yaw, angry,
monster_dog_init);
};

//--------------------------------------------------------------
void(entity e) monster_dog_init =
{
if (e.spawnflags & I_AM_TURRET)
objerror ("monster_dog_init: "
"incompatible spawnflag: TURRET_MODE\n");

if (deathmatch)
{
remove (e);
return;
}

e.classname = "monster_dog";
e.classtype = CT_MONSTER_DOG;

// dumptruck_ds -- model_custom and sounds changes
precache_head_model (e, "progs/h_dog.mdl");
precache_body_model (e, "progs/dog.mdl");
precache_sound_attack (e, "dog/dattack1.wav");
precache_sound_death (e, "dog/ddeath.wav");
precache_sound_pain (e, "dog/dpain1.wav");
precache_sound_sight (e, "dog/dsight.wav");
precache_sound_idle (e, "dog/idle.wav");

precache_gib1 (e, "progs/gib1.mdl");
precache_gib2 (e, "progs/gib2.mdl");
precache_gib3 (e, "progs/gib3.mdl");

// dumptruck_ds

e.solid = SOLID_SLIDEBOX;
e.movetype = MOVETYPE_STEP;

// dumptruck_ds
body_model (e, "progs/dog.mdl");
// setmodel (e, "progs/dog.mdl");

setsize (e, '-32 -32 -24', '32 32 40');

if (!e.health)
//thanks RennyC -- dumptruck_ds
e.health = DOG_HEALTH;

e.checkattack = monster_dog_checkattack;
e.sightsound = monster_dog_sightsound;
e.th_stand = dog_stand1;
e.th_walk = dog_walk1;
e.th_run = dog_run1;
e.th_melee = dog_atta1;
e.th_missile = dog_leap1;

// Berserk test from
// http://celephais.net/board/view_thread.php?id=4&start=3465
// -- dumptruck_ds
if !(e.berserk)
e.th_pain = monster_dog_pain;
else
e.th_pain = sub_nullpain;
e.destroy = monster_dog_destroy;

// walkmonster_start
base_walkmonster_init (e);
};

//--------------------------------------------------------------
void() monster_dog =
{
// new spawnflags for all entities -- iw
if (SUB_Inhibit())
return;

monster_dog_init (self);
};
// };

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

/*QUAKED gib_head_dog (0 0.5 0.8) (-16 -16 0) (16 16 56) SOLID X X X X X X X NOT_ON_EASY NOT_ON_NORMAL NOT_ON_HARD_OR_NIGHTMARE NOT_IN_DEATHMATCH NOT_IN_COOP NOT_IN_SINGLEPLAYER X NOT_ON_HARD_ONLY NOT_ON_NIGHTMARE_ONLY
{
model ("progs/h_dog.mdl");
}
*/
//----------------------------------------------------------------------
// class gib_head_dog: base_gib_head
// {
//--------------------------------------------------------------
// ThrowHead
//--------------------------------------------------------------
void(entity act, vector dir, float dmg) throw_gib_head_dog =
{
base_gib_head_throw (act, dir, dmg, gib_head_dog_init);
};

//--------------------------------------------------------------
void(entity e) gib_head_dog_init =
{
e.classname = "gib_head_dog";
e.classtype = CT_GORE_HEAD_DOG;

// gib_init interprets spawnflags and will set .solid -- CEV
base_gib_head_init (e);

if (e.mdl_head != "")
{
precache_model (e.mdl_head);
setmodel (e, e.mdl_head);
}
else
{
precache_model ("progs/h_dog.mdl");
setmodel (e, "progs/h_dog.mdl");
if (e.solid == SOLID_BBOX)
setsize (e, DOG_HEAD_MINS, DOG_HEAD_MAXS);
else if (e.solid == SOLID_TRIGGER)
setsize (e, '-16 -16 0', '16 16 56');
}

e.frame = 0; // was 1 -- dumptruck_ds
};

//--------------------------------------------------------------
void() gib_head_dog =
{
// new spawnflags for all entities -- iw
if (SUB_Inhibit())
return;

gib_head_dog_init (self);
};
// };

/*QUAKED monster_dead_dog (0 0.5 0.8) (-32 -32 -24) (32 32 64) SOLID X X X X X X X NOT_ON_EASY NOT_ON_NORMAL NOT_ON_HARD_OR_NIGHTMARE NOT_IN_DEATHMATCH NOT_IN_COOP NOT_IN_SINGLEPLAYER X NOT_ON_HARD_ONLY NOT_ON_NIGHTMARE_ONLY
{
model ({"path":"progs/dog.mdl","frame":16});
}
*/
//----------------------------------------------------------------------
// class monster_dead_dog: base_corpse
// {
//--------------------------------------------------------------
void(entity e) monster_dead_dog_init =
{
base_corpse_init (e);

precache_model ("progs/dog.mdl");
setmodel (e, "progs/dog.mdl");

e.frame = $death8;

if (e.solid == SOLID_BBOX)
setsize (e, DOG_CORPSE_MINS, DOG_CORPSE_MAXS);
};

//--------------------------------------------------------------
void() monster_dead_dog =
{
// new spawnflags for all entities -- iw
if (SUB_Inhibit())
return;

monster_dead_dog_init (self);
};
// };

Return to the top of this page or return to the overview of this repo.

Log dog.qc

Date Commit Message Author + -
2024-06-15 Major update, committing as-is, will have bugs cev +104 -37
2024-04-12 Moveable gibs, heads, some bugfixes cev +81 -14
2024-04-05 Player footsteps, shareware monsters, misc? cev +266 -238
2024-02-18 Client/player, projectiles, entrypoints refactor cev +4 -4
2024-01-31 Class based monster refactor & start projectiles cev +477 -381
2024-01-13 Refactored items into classes, fix teleporttrain cev +2 -2
2024-01-09 Continue OO / Class-based refactor cev +3 -3
2023-10-13 New movement code based on SV_RunClientCommand cev +503 -503
2023-10-13 Rename "qc-server" dir to "qc" cev +503  

Return to the top of this page or return to the overview of this repo.