Git Repos / fte_dogmode / qc / monsters / knight.qc
Last update to this file was on 2024-06-15 at 19:50.
Show knight.qc
//==============================================================================
// KNIGHT
//==============================================================================
//======================================================================
// constants
//======================================================================
const float KNIGHT_HEALTH = 75; // id1 75
const float KNIGHT_HEALTH_CORPSE = 60;
const vector KNIGHT_HEAD_MINS = '-8.17 -7.47 -0.13';
const vector KNIGHT_HEAD_MAXS = '8.36 6.5 30';
const vector KNIGHT_CORPSE_MINS = '-25.56 -14.56 -50.49';
const vector KNIGHT_CORPSE_MAXS = '26.45 40.2 30';
const vector KNIGHT_CORPSE_B_MINS = '-30.36 -45.6 -50.18';
const vector KNIGHT_CORPSE_B_MAXS = '28.29 11.59 30';
const vector KNIGHT_CORPSE_Z_MINS = '-16 -16 -24';
const vector KNIGHT_CORPSE_Z_MAXS = '16 16 -8';
//======================================================================
// forward declarations
//======================================================================
// monster_knight
void() monster_knight_sightsound; // AI & attacks
void() monster_knight_attack; // animation & thinking below
void() kn_stand1; void() kn_stand2; void() kn_stand3; void() kn_stand4;
void() kn_stand5; void() kn_stand6; void() kn_stand7; void() kn_stand8;
void() kn_stand9;
void() kn_walk1; void() kn_walk2; void() kn_walk3; void() kn_walk4;
void() kn_walk5; void() kn_walk6; void() kn_walk7; void() kn_walk8;
void() kn_walk9; void() kn_walk10; void() kn_walk11; void() kn_walk12;
void() kn_walk13; void() kn_walk14;
void() kn_run1; void() kn_run2; void() kn_run3; void() kn_run4;
void() kn_run5; void() kn_run6; void() kn_run7; void() kn_run8;
void() kn_runatk1; void() kn_runatk2; void() kn_runatk3; void() kn_runatk4;
void() kn_runatk5; void() kn_runatk6; void() kn_runatk7; void() kn_runatk8;
void() kn_runatk9; void() kn_runatk10; void() kn_runatk11;
void() kn_atk1; void() kn_atk2; void() kn_atk3; void() kn_atk4;
void() kn_atk5; void() kn_atk6; void() kn_atk7; void() kn_atk8;
void() kn_atk9; void() kn_atk10;
void() kn_bow1; void() kn_bow2; void() kn_bow3; void() kn_bow4;
void() kn_bow5; void() kn_bow6; void() kn_bow7; void() kn_bow8;
void() kn_bow9; void() kn_bow10;
void() kn_pain1; void() kn_pain2; void() kn_pain3;
void() kn_painb1; void() kn_painb2; void() kn_painb3; void() kn_painb4;
void() kn_painb5; void() kn_painb6; void() kn_painb7; void() kn_painb8;
void() kn_painb9; void() kn_painb10; void() kn_painb11;
void() kn_die1; void() kn_die2; void() kn_die3; void() kn_die4;
void() kn_die5; void() kn_die6; void() kn_die7; void() kn_die8;
void() kn_die9; void() kn_die10;
void() kn_dieb1; void() kn_dieb2; void() kn_dieb3; void() kn_dieb4;
void() kn_dieb5; void() kn_dieb6; void() kn_dieb7; void() kn_dieb8;
void() kn_dieb9; void() kn_dieb10; void() kn_dieb11;
void(entity attacker, float damage) monster_knight_pain; // interaction
void(vector dir) monster_knight_destroy;
entity(vector org, vector ang, float sflags, float yaw, float angry)
spawn_monster_knight; // initialization
void(entity e) monster_knight_init;
void() monster_knight;
// gib_head_knight
void(entity act, vector dir, float dmg) throw_gib_head_knight;
void(entity e) gib_head_knight_init
void() gib_head_knight;
// monster_dead_knight
void(entity e) monster_dead_knight_init;
void() monster_dead_knight;
//======================================================================
// frame macros
//======================================================================
$cd id1/models/knight
$origin 0 0 24
$base base
$skin badass3
$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
$frame runb1 runb2 runb3 runb4 runb5 runb6 runb7 runb8
// frame runc1 runc2 runc3 runc4 runc5 runc6
$frame runattack1 runattack2 runattack3 runattack4 runattack5
$frame runattack6 runattack7 runattack8 runattack9 runattack10
$frame runattack11
$frame pain1 pain2 pain3
$frame painb1 painb2 painb3 painb4 painb5 painb6 painb7 painb8 painb9
$frame painb10 painb11
// frame attack1 attack2 attack3 attack4 attack5 attack6 attack7
// frame attack8 attack9 attack10 attack11
$frame attackdummy
$frame attackb1 attackb2 attackb3 attackb4 attackb5
$frame attackb6 attackb7 attackb8 attackb9 attackb10
$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8 walk9
$frame walk10 walk11 walk12 walk13 walk14
$frame kneel1 kneel2 kneel3 kneel4 kneel5
$frame standing2 standing3 standing4 standing5
$frame death1 death2 death3 death4 death5 death6 death7 death8
$frame death9 death10
$frame deathb1 deathb2 deathb3 deathb4 deathb5 deathb6 deathb7 deathb8
$frame deathb9 deathb10 deathb11
//------------------------------------------------------------------------------
/*QUAKED monster_knight (1 0 0) (-16 -16 -24) (16 16 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/knight.mdl");
}
Knight.
Default heath = 75"
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 (SWORD SLASH 1)"
snd_idle(string) : "Path to custom idle sound"
snd_misc(string) : "Path to custom sound (SWORD SLASH 2)"
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_knight: base_walkmonster
// {
//--------------------------------------------------------------
void() monster_knight_sightsound =
{
sound_sight (self, CHAN_VOICE, "knight/ksight.wav",
VOL_HIGH, ATTN_NORM);
};
//--------------------------------------------------------------
// knight_attack
//--------------------------------------------------------------
void() monster_knight_attack =
{
local float len;
// decide if now is a good swing time
len = vlen (self.enemy.origin + self.enemy.view_ofs -
(self.origin + self.view_ofs));
if (len < 80)
kn_atk1 ();
else
kn_runatk1 ();
};
//--------------------------------------------------------------
// Knight Standing functions
//--------------------------------------------------------------
void() kn_stand1 = [$stand1, kn_stand2] { ai_stand (); };
void() kn_stand2 = [$stand2, kn_stand3] { ai_stand (); };
void() kn_stand3 = [$stand3, kn_stand4] { ai_stand (); };
void() kn_stand4 = [$stand4, kn_stand5] { ai_stand (); };
void() kn_stand5 = [$stand5, kn_stand6] { ai_stand (); };
void() kn_stand6 = [$stand6, kn_stand7] { ai_stand (); };
void() kn_stand7 = [$stand7, kn_stand8] { ai_stand (); };
void() kn_stand8 = [$stand8, kn_stand9] { ai_stand (); };
void() kn_stand9 = [$stand9, kn_stand1] { ai_stand (); };
//--------------------------------------------------------------
// Knight Walking functions
//--------------------------------------------------------------
void() kn_walk1 = [$walk1, kn_walk2]
{
if (random() < 0.2)
sound_idle (self, CHAN_VOICE, "knight/idle.wav",
VOL_HIGH, ATTN_IDLE);
ai_walk (3);
};
void() kn_walk2 = [$walk2, kn_walk3] { ai_walk (2); };
void() kn_walk3 = [$walk3, kn_walk4] { ai_walk (3); };
void() kn_walk4 = [$walk4, kn_walk5] { ai_walk (4); };
void() kn_walk5 = [$walk5, kn_walk6] { ai_walk (3); };
void() kn_walk6 = [$walk6, kn_walk7] { ai_walk (3); };
void() kn_walk7 = [$walk7, kn_walk8] { ai_walk (3); };
void() kn_walk8 = [$walk8, kn_walk9] { ai_walk (4); };
void() kn_walk9 = [$walk9, kn_walk10] { ai_walk (3); };
void() kn_walk10 = [$walk10, kn_walk11] { ai_walk (3); };
void() kn_walk11 = [$walk11, kn_walk12] { ai_walk (2); };
void() kn_walk12 = [$walk12, kn_walk13] { ai_walk (3); };
void() kn_walk13 = [$walk13, kn_walk14] { ai_walk (4); };
void() kn_walk14 = [$walk14, kn_walk1] { ai_walk (3); };
//--------------------------------------------------------------
// Knight Running functions
//--------------------------------------------------------------
void() kn_run1 = [$runb1, kn_run2]
{
if (random() < 0.2)
sound_idle (self, CHAN_VOICE, "knight/idle.wav",
VOL_HIGH, ATTN_IDLE);
ai_run (16);
};
void() kn_run2 = [ $runb2, kn_run3] { ai_run (20); };
void() kn_run3 = [ $runb3, kn_run4] { ai_run (13); };
void() kn_run4 = [ $runb4, kn_run5] { ai_run (7); };
void() kn_run5 = [ $runb5, kn_run6] { ai_run (16); };
void() kn_run6 = [ $runb6, kn_run7] { ai_run (20); };
void() kn_run7 = [ $runb7, kn_run8] { ai_run (14); };
void() kn_run8 = [ $runb8, kn_run1] { ai_run (6); };
//--------------------------------------------------------------
// Knight Running Attack
//--------------------------------------------------------------
void() kn_runatk1 = [$runattack1, kn_runatk2]
{
if (random() > 0.5)
sound_misc (self, CHAN_WEAPON, "knight/sword2.wav",
VOL_HIGH, ATTN_NORM);
else
sound_attack (self, CHAN_WEAPON, "knight/sword1.wav",
VOL_HIGH, ATTN_NORM);
ai_charge (20);
};
void() kn_runatk2 = [$runattack2, kn_runatk3] { ai_charge_side (); };
void() kn_runatk3 = [$runattack3, kn_runatk4] { ai_charge_side (); };
void() kn_runatk4 = [$runattack4, kn_runatk5] { ai_charge_side (); };
void() kn_runatk5 = [$runattack5, kn_runatk6] { ai_melee_side (); };
void() kn_runatk6 = [$runattack6, kn_runatk7] { ai_melee_side (); };
void() kn_runatk7 = [$runattack7, kn_runatk8] { ai_melee_side (); };
void() kn_runatk8 = [$runattack8, kn_runatk9] { ai_melee_side (); };
void() kn_runatk9 = [$runattack9, kn_runatk10] { ai_melee_side (); };
void() kn_runatk10 = [$runattack10, kn_runatk11] { ai_charge_side (); };
void() kn_runatk11 = [$runattack11, kn_run1] { ai_charge (10); };
//--------------------------------------------------------------
// Knight Attack
//--------------------------------------------------------------
void() kn_atk1 = [$attackb1, kn_atk2]
{
sound_attack (self, CHAN_WEAPON, "knight/sword1.wav",
VOL_HIGH, ATTN_NORM);
ai_charge (0);
};
void() kn_atk2 = [$attackb2, kn_atk3] { ai_charge (7); };
void() kn_atk3 = [$attackb3, kn_atk4] { ai_charge (4); };
void() kn_atk4 = [$attackb4, kn_atk5] { ai_charge (0); };
void() kn_atk5 = [$attackb5, kn_atk6] { ai_charge (3); };
void() kn_atk6 = [$attackb6, kn_atk7]
{
ai_charge (4);
ai_melee ();
};
void() kn_atk7 = [$attackb7, kn_atk8]
{
ai_charge (1);
ai_melee ();
};
void() kn_atk8 = [$attackb8, kn_atk9]
{
ai_charge (3);
ai_melee ();
};
void() kn_atk9 = [$attackb9, kn_atk10] { ai_charge (1); };
void() kn_atk10 = [$attackb10, kn_run1] { ai_charge (5); };
// void() kn_atk9 = [$attack9, kn_atk10] { };
// void() kn_atk10 = [$attack10, kn_atk11] { };
// void() kn_atk11 = [$attack11, kn_run1] { };
//--------------------------------------------------------------
// Knight Bowing / Kneeling state
//--------------------------------------------------------------
void() kn_bow1 = [$kneel1, kn_bow2] { ai_turn (); };
void() kn_bow2 = [$kneel2, kn_bow3] { ai_turn (); };
void() kn_bow3 = [$kneel3, kn_bow4] { ai_turn (); };
void() kn_bow4 = [$kneel4, kn_bow5] { ai_turn (); };
void() kn_bow5 = [$kneel5, kn_bow5] { ai_turn (); };
void() kn_bow6 = [$kneel4, kn_bow7] { ai_turn (); };
void() kn_bow7 = [$kneel3, kn_bow8] { ai_turn (); };
void() kn_bow8 = [$kneel2, kn_bow9] { ai_turn (); };
void() kn_bow9 = [$kneel1, kn_bow10] { ai_turn (); };
void() kn_bow10 = [$walk1, kn_walk1] { ai_turn (); };
//--------------------------------------------------------------
// Knight Pain state A
//--------------------------------------------------------------
void() kn_pain1 = [$pain1, kn_pain2] { };
void() kn_pain2 = [$pain2, kn_pain3] { };
void() kn_pain3 = [$pain3, kn_run1] { };
//--------------------------------------------------------------
// Knight Pain state B
//--------------------------------------------------------------
void() kn_painb1 = [$painb1, kn_painb2] { ai_painforward (0); };
void() kn_painb2 = [$painb2, kn_painb3] { ai_painforward (3); };
void() kn_painb3 = [$painb3, kn_painb4] { };
void() kn_painb4 = [$painb4, kn_painb5] { };
void() kn_painb5 = [$painb5, kn_painb6] { ai_painforward (2); };
void() kn_painb6 = [$painb6, kn_painb7] { ai_painforward (4); };
void() kn_painb7 = [$painb7, kn_painb8] { ai_painforward (2); };
void() kn_painb8 = [$painb8, kn_painb9] { ai_painforward (5); };
void() kn_painb9 = [$painb9, kn_painb10] { ai_painforward (5); };
void() kn_painb10 = [$painb10, kn_painb11] { ai_painforward (0); };
void() kn_painb11 = [$painb11, kn_run1] { };
//--------------------------------------------------------------
// Knight Death state A
//--------------------------------------------------------------
void() kn_die1 = [$death1, kn_die2]
{
base_entity_aligntoground (self);
};
void() kn_die2 = [$death2, kn_die3] { };
void() kn_die3 = [$death3, kn_die4] { self.solid = SOLID_NOT; };
void() kn_die4 = [$death4, kn_die5] { };
void() kn_die5 = [$death5, kn_die6] { };
void() kn_die6 = [$death6, kn_die7] { };
void() kn_die7 = [$death7, kn_die8] { };
void() kn_die8 = [$death8, kn_die9] { };
void() kn_die9 = [$death9, kn_die10]
{
become_base_corpse (self, KNIGHT_HEALTH_CORPSE);
setsize (self, KNIGHT_CORPSE_Z_MINS, KNIGHT_CORPSE_Z_MAXS);
};
void() kn_die10 = [$death10, kn_die10] { };
//--------------------------------------------------------------
// Knight Death state B
//--------------------------------------------------------------
void() kn_dieb1 = [$deathb1, kn_dieb2]
{
base_entity_aligntoground (self);
};
void() kn_dieb2 = [$deathb2, kn_dieb3] { };
void() kn_dieb3 = [$deathb3, kn_dieb4] { self.solid = SOLID_NOT; };
void() kn_dieb4 = [$deathb4, kn_dieb5] { };
void() kn_dieb5 = [$deathb5, kn_dieb6] { };
void() kn_dieb6 = [$deathb6, kn_dieb7] { };
void() kn_dieb7 = [$deathb7, kn_dieb8] { };
void() kn_dieb8 = [$deathb8, kn_dieb9] { };
void() kn_dieb9 = [$deathb9, kn_dieb10] { };
void() kn_dieb10 = [$deathb10, kn_dieb11]
{
become_base_corpse (self, KNIGHT_HEALTH_CORPSE);
setsize (self, KNIGHT_CORPSE_Z_MINS, KNIGHT_CORPSE_Z_MAXS);
};
void() kn_dieb11 = [$deathb11, kn_dieb11] { };
//==============================================================
// Interaction
//==============================================================
//--------------------------------------------------------------
// knight_pain
//--------------------------------------------------------------
void(entity attacker, float damage) monster_knight_pain =
{
if (self.pain_finished > time)
return;
local float r = random ();
sound_pain (self, CHAN_VOICE, "knight/khurt.wav",
VOL_HIGH, ATTN_NORM);
if (r < 0.85)
{
kn_pain1 ();
self.pain_finished = time + 1;
}
else
{
kn_painb1 ();
self.pain_finished = time + 1;
}
};
//--------------------------------------------------------------
// knight_die
//--------------------------------------------------------------
void(vector dir) monster_knight_destroy =
{
// check if we're dead already
if (self.classgroup & CG_CORPSE)
{
sound (self, CHAN_VOICE, "player/udeath.wav",
VOL_HIGH, ATTN_NORM);
throw_gib_head_knight (self, dir, self.health);
throw_gib_1 (self, dir, self.health);
throw_gib_2 (self, dir, self.health);
throw_gib_3 (self, dir, self.health);
return;
}
// check for gib
if (self.health < -40)
{
sound (self, CHAN_VOICE, "player/udeath.wav",
VOL_HIGH, ATTN_NORM);
throw_gib_head_knight (self, dir, self.health);
throw_gib_1 (self, dir, self.health);
throw_gib_2 (self, dir, self.health);
throw_gib_3 (self, dir, self.health);
base_item_drop_stuff (self);
return;
}
// regular death
sound_death (self, CHAN_VOICE, "knight/kdeath.wav",
VOL_HIGH, ATTN_NORM);
base_item_drop_stuff (self);
if (random() < 0.5)
kn_die1 ();
else
kn_dieb1 ();
};
//==============================================================
// Initialization
//==============================================================
//--------------------------------------------------------------
entity(vector org, vector ang, float sflags, float yaw, float angry)
spawn_monster_knight =
{
return spawn_base_monster (org, ang, sflags, yaw, angry,
monster_knight_init);
};
//--------------------------------------------------------------
void(entity e) monster_knight_init =
{
if (e.spawnflags & I_AM_TURRET)
objerror("Incompatible spawnflag: TURRET_MODE\n");
if (deathmatch)
{
remove (e);
return;
}
e.classname = "monster_knight";
e.classtype = CT_MONSTER_KNIGHT;
// dumptruck_ds custom_mdls
precache_body_model (e, "progs/knight.mdl");
precache_head_model (e, "progs/h_knight.mdl");
// dumptruck_ds
precache_sound_death (e, "knight/kdeath.wav");
precache_sound_pain (e, "knight/khurt.wav");
precache_sound_sight (e, "knight/ksight.wav");
precache_sound_attack (e, "knight/sword1.wav");
precache_sound_misc (e, "knight/sword2.wav");
precache_sound_idle (e, "knight/idle.wav");
precache_gib1 (e, "progs/gib1.mdl");
precache_gib2 (e, "progs/gib2.mdl");
precache_gib3 (e, "progs/gib3.mdl");
e.solid = SOLID_SLIDEBOX;
e.movetype = MOVETYPE_STEP;
// dumptruck_ds custom_mdls
body_model (e, "progs/knight.mdl");
// setmodel (e, "progs/knight.mdl");
setsize (e, '-16 -16 -24', '16 16 40');
if (!e.health)
// thanks RennyC -- dumptruck_ds
e.health = KNIGHT_HEALTH;
e.sightsound = monster_knight_sightsound;
e.th_stand = kn_stand1;
e.th_walk = kn_walk1;
e.th_run = kn_run1;
e.th_melee = kn_atk1;
// Berserk test from
// http://celephais.net/board/view_thread.php?id=4&start=3465
// -- dumptruck_ds
if !(e.berserk)
e.th_pain = monster_knight_pain;
else
e.th_pain = sub_nullpain;
e.destroy = monster_knight_destroy;
// walkmonster_start
base_walkmonster_init (e);
};
//--------------------------------------------------------------
void() monster_knight =
{
// new spawnflags for all entities -- iw
if (SUB_Inhibit())
return;
monster_knight_init (self);
};
// };
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/*QUAKED gib_head_knight (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_knight.mdl");
}*/
//----------------------------------------------------------------------
// class gib_head_knight: base_gib_head
// {
//--------------------------------------------------------------
// ThrowHead
//--------------------------------------------------------------
void(entity act, vector dir, float dmg) throw_gib_head_knight =
{
base_gib_head_throw (act, dir, dmg, gib_head_knight_init);
};
//--------------------------------------------------------------
void(entity e) gib_head_knight_init =
{
e.classname = "gib_head_knight";
e.classtype = CT_GORE_HEAD_KNIGHT;
// 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_knight.mdl");
setmodel (e, "progs/h_knight.mdl");
if (e.solid == SOLID_BBOX)
setsize (e, KNIGHT_HEAD_MINS, KNIGHT_HEAD_MAXS);
else if (e.solid == SOLID_TRIGGER)
setsize (e, '-16 -16 0', '16 16 56');
}
e.frame = 0;
};
//--------------------------------------------------------------
void() gib_head_knight =
{
// new spawnflags for all entities -- iw
if (SUB_Inhibit())
return;
gib_head_knight_init (self);
};
// };
/*QUAKED monster_dead_knight (0 0.5 0.8) (-16 -16 -24) (16 16 32) SOLID ON_SIDE 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/knight.mdl","frame":96});
}
*/
//----------------------------------------------------------------------
// class monster_dead_knight: base_corpse
// {
//--------------------------------------------------------------
void(entity e) monster_dead_knight_init =
{
base_corpse_init (e);
precache_model ("progs/knight.mdl");
setmodel (e, "progs/knight.mdl");
if (e.spawnflags & 2)
{
e.frame = $death10;
if (e.solid == SOLID_BBOX)
setsize (e, KNIGHT_CORPSE_MINS,
KNIGHT_CORPSE_MAXS);
}
else
{
e.frame = $deathb11;
if (e.solid == SOLID_BBOX)
setsize (e, KNIGHT_CORPSE_B_MINS,
KNIGHT_CORPSE_B_MAXS);
}
};
//--------------------------------------------------------------
void() monster_dead_knight =
{
// new spawnflags for all entities -- iw
if (SUB_Inhibit())
return;
monster_dead_knight_init (self);
};
// };
Return to the top of this page or return to the overview of this repo.
Log knight.qc
Date | Commit Message | Author | + | - |
---|---|---|---|---|
2024-06-15 | Major update, committing as-is, will have bugs | cev | +104 | -55 |
2024-04-12 | Moveable gibs, heads, some bugfixes | cev | +77 | -29 |
2024-04-05 | Player footsteps, shareware monsters, misc? | cev | +241 | -197 |
2024-01-31 | Class based monster refactor & start projectiles | cev | +367 | -273 |
2024-01-13 | Refactored items into classes, fix teleporttrain | cev | +2 | -2 |
2024-01-09 | Continue OO / Class-based refactor | cev | +1 | -1 |
2023-10-13 | New movement code based on SV_RunClientCommand | cev | +418 | -418 |
2023-10-13 | Rename "qc-server" dir to "qc" | cev | +418 |
Return to the top of this page or return to the overview of this repo.