Git Repos / fte_dogmode / commit d5ecdd6
Commit: d5ecdd6a98f23c3ec3a1c8396d1c4cde9989976e
Parent: 750c1086ef1928cec621d29d77a13003531f503a
Author: Cameron Vanderzanden, 2024-04-12 18:56
Committer: Cameron Vanderzanden, 2024-04-12 18:56
Commit Message
Moveable gibs, heads, some bugfixes Started reworking the corpses, gibs, and heads by tying the objects from deadstuff mod into the standard autogenerated gibs. Gibs and heads now move around (a little bit) when the player touches them, gibs fade out instead of suddenly disappear, and damage knockback direction is passed down to velocity_for_damage for directional gibs. (The function I wrote for that could use improvement, more variation). Next on the list is to rework monster corpses, tying those into deadstuff the same way gibs and heads are. I've also fixed a few bugs (not all of which I remember) and messed with projectile and player stuck-in-object checking a bit. (It's still not great).
Change List
Diff qc/base_entities.qc
diff --git a/qc/base_entities.qc b/qc/base_entities.qc
index 2fc1c5d..6f8e3c3 100644
--- a/qc/base_entities.qc
+++ b/qc/base_entities.qc
@@ -78,7 +78,7 @@ entity damage_attacker; // set by T_Damage
.string pain_target; // dumptruck_ds
.void(entity src, float amount) pain; // th_pain
-.void() destroy; // th_die
+.void(vector dir) destroy; // th_die
#ifdef SSQC
// Called by the engine whenever an entity needs to be (re)sent to a client's
@@ -100,7 +100,7 @@ entity damage_attacker; // set by T_Damage
// base entity
#ifdef SSQC
float(entity src, entity dest) can_damage;
-void(entity targ, entity inflictor, entity attacker) killed;
+void(entity targ, entity inflictor, entity attacker, vector dir) killed;
void(entity inflictor, entity attacker, float damage, entity ignore)
t_radiusdamage2;
void(entity attacker, float damage) t_beamdamage2;
@@ -109,7 +109,9 @@ void(entity targ, entity inflictor, entity attacker, float damage) t_damage2;
#if defined(CSQC) || defined(SSQC)
void() sub_null; // Subs
void(entity attacker, float damage) sub_nullpain;
+void(vector dir) sub_nulldestroy;
void() sub_remove;
+void() sub_remove_fade;
void(entity doas, void() f) sub_runvoidas;
float(entity doas, float() f) sub_runfloatas;
float(entity toucher) sub_checkvalidtouch;
@@ -199,13 +201,15 @@ void() noclass;
//--------------------------------------------------------------
// Killed
//--------------------------------------------------------------
- void(entity targ, entity inflictor, entity attacker) killed =
+ void(entity targ, entity inflictor, entity attacker, vector dir)
+ killed =
{
local entity stemp = self;
self = targ;
- if (self.health < -99)
+ if (self.flags & FL_CLIENT && self.health < -99)
// don't let sbar look bad if a player
+ // also limits gib speed (velocity_for_damage) -- CEV
self.health = -99;
if (self.movetype == MOVETYPE_NONE ||
@@ -215,7 +219,13 @@ void() noclass;
{
// doors, triggers, missiles, etc
if (self.destroy)
- self.destroy ();
+ {
+ // origin, absmin/max, and other properties
+ // are different for brush entities so figure
+ // dir from the inflictor's angles -- CEV
+ makevectors (inflictor.angles);
+ self.destroy (normalize(v_forward));
+ }
self = stemp;
return;
}
@@ -238,7 +248,7 @@ void() noclass;
sub_death_use ();
if (self.destroy)
- self.destroy ();
+ self.destroy (dir);
self = stemp;
};
@@ -348,7 +358,7 @@ void() noclass;
t_damage2 =
{
local entity stemp;
- local vector dir;
+ local vector dir = '0 0 0';
local float save;
local float take;
local float ignore_armor; // johnfitz
@@ -444,12 +454,13 @@ void() noclass;
targ.dmg_inflictor = inflictor;
}
- // figure momentum add
+ // apply momentum change to players and monsters -- CEV
if (inflictor != world && (
targ.movetype == MOVETYPE_WALK ||
targ.movetype == MOVETYPE_STEP ||
targ.movetype == MOVETYPE_FLY))
{
+ // figure momentum direction
dir = targ.origin -
(inflictor.absmin + inflictor.absmax) * 0.5;
dir = normalize (dir);
@@ -511,7 +522,7 @@ void() noclass;
if (targ.health <= 0)
{
- killed (targ, inflictor, attacker);
+ killed (targ, inflictor, attacker, dir);
return;
}
@@ -602,12 +613,33 @@ void() noclass;
};
//--------------------------------------------------------------
+ void(vector dir) sub_nulldestroy =
+ {
+ // no-op
+ };
+
+ //--------------------------------------------------------------
void() sub_remove =
{
remove (self);
};
//--------------------------------------------------------------
+ void() sub_remove_fade =
+ {
+ if (self.alpha <= 0)
+ {
+ remove (self);
+ }
+ else
+ {
+ self.alpha -= 0.05;
+ self.think = sub_remove_fade;
+ self.nextthink = time + 0.1;
+ }
+ };
+
+ //--------------------------------------------------------------
// SUB_CallAsSelf
//--------------------------------------------------------------
void(entity doas, void() f) sub_runvoidas =
Return to the top of this page or return to the overview of this repo.
Diff qc/base_gore.qc
diff --git a/qc/base_gore.qc b/qc/base_gore.qc
new file mode 100644
index 0000000..3205da7
--- /dev/null
+++ b/qc/base_gore.qc
@@ -0,0 +1,505 @@
+//==============================================================================
+// base_gore.qc -- corpses, gibs, heads. the meaty bits. -- CEV
+//==============================================================================
+
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//
+// deadstuff version 1.0 - tony collen - manero@canweb.net -
+// EfNet IRC #QuakeEd or #Trinity
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+//======================================================================
+// constants
+//======================================================================
+
+const float GIB_SOLID = 1; // spawnflags: solid
+const float GIB_DYNAMIC = 2; // non-static, moveable gibs
+
+const vector GIB_1_MINS = '-3.57 -8.06 -3.34';
+const vector GIB_1_MAXS = '3.69 8.31 30';
+const vector GIB_2_MINS = '-12.68 -14.83 -6.19';
+const vector GIB_2_MAXS = '13.53 14.57 30';
+const vector GIB_3_MINS = '-18.95 -15.92 -3.13';
+const vector GIB_3_MAXS = '13.17 15.66 30';
+
+//======================================================================
+// forward declarations
+//======================================================================
+
+void(vector org, vector vel, float damage) spawn_blood;
+void(float damage) spawn_touchblood;
+void(vector org, vector vel) spawn_chunk;
+entity(vector org, vector vel) spawn_meatspray;
+vector(vector dir, float dmg) velocity_for_damage;
+
+// base_corpse
+strip void() base_corpse;
+
+// base_gib
+void() base_gib_touch;
+entity(entity src, vector org, vector vel, float sflags, .string gibfield,
+ void(entity) initfn) spawn_base_gib;
+void(entity e) base_gib_init;
+strip void() base_gib;
+
+// gib_misc_1
+void(entity src, vector dir, float dmg) throw_gib_1;
+entity(entity src, vector org, vector vel, float sflags) spawn_gib_misc_1;
+void(entity e) gib_misc_1_init;
+void() gib_misc_1;
+
+// gib_misc_2
+void(entity src, vector dir, float dmg) throw_gib_2;
+entity(entity src, vector org, vector vel, float sflags) spawn_gib_misc_2;
+void(entity e) gib_misc_2_init;
+void() gib_misc_2;
+
+// gib_misc_3
+void(entity src, vector dir, float dmg) throw_gib_3;
+entity(entity src, vector org, vector vel, float sflags) spawn_gib_misc_3;
+void(entity e) gib_misc_3_init;
+void() gib_misc_3;
+
+// base_gib_head
+void(entity act, vector dir, float dmg, void(entity e) initfn)
+ base_gib_head_throw;
+void(entity e) base_gib_head_init;
+strip void() base_gib_head;
+
+//------------------------------------------------------------------------------
+
+//----------------------------------------------------------------------
+// SpawnBlood
+//----------------------------------------------------------------------
+void(vector org, vector vel, float damage) spawn_blood =
+{
+ particle (org, vel * 0.1, 73, damage * 2);
+};
+
+//----------------------------------------------------------------------
+// spawn_touchblood
+//----------------------------------------------------------------------
+void(float damage) spawn_touchblood =
+{
+ // wall_velocity
+ local vector vel;
+
+ vel = normalize (self.velocity);
+ vel = normalize (vel + v_up * (random() - 0.5) +
+ v_right * (random() - 0.5));
+ // TODO CEV when was the last time a trace was called?
+ vel = vel + 2 * trace_plane_normal;
+ vel = (vel * 200) * 0.2;
+
+ spawn_blood (self.origin + vel * 0.01, vel, damage);
+};
+
+//----------------------------------------------------------------------
+// SpawnChunk
+//----------------------------------------------------------------------
+void(vector org, vector vel) spawn_chunk =
+{
+ particle (org, vel * 0.02, 0, 10);
+};
+
+//----------------------------------------------------------------------
+// SpawnMeatSpray
+//----------------------------------------------------------------------
+entity(vector org, vector vel) spawn_meatspray =
+{
+ // reusing the "zombiechunk" projectile -- CEV
+ local entity e = spawn_projectile_zombiechunk (self, org, vel);
+ // override some defaults, notably solid and force damage to 0 -- CEV
+ e.solid = SOLID_NOT;
+ e.direct_damage = 0;
+ e.velocity_z += 250 + 50 * random ();
+ e.nextthink = time + 1;
+ return e;
+};
+
+//----------------------------------------------------------------------
+vector(vector dir, float dmg) velocity_for_damage =
+{
+ local vector startdir = dir;
+
+ if (dmg == 0 || dir == '0 0 0')
+ {
+ // original id1 behavior -- CEV
+ dir_x = 100 * crandom ();
+ dir_y = 100 * crandom ();
+ dir_z = 200 + 100 * random ();
+
+ if (dmg > -50)
+ dir = dir * 0.7;
+ else if (dmg > -200)
+ dir = dir * 2;
+ else
+ dir = dir * 10;
+ }
+ else
+ {
+ // I'm sure there's a better way to do this -- CEV
+ dir_x = dir_x * (4 * fabs(dmg) * random());
+ dir_y = dir_y * (4 * fabs(dmg) * random());
+ if (dir_z > 0)
+ dir_z = 250 + 2 * ((fabs(dmg) * fabs(dir_z)));
+ else
+ dir_z = 250 + 2 * ((fabs(dmg) * (random() * 0.5)));
+ }
+
+ dprint (sprintf("velocity_for_damage: damage is %g, startdir is %v, "
+ "dir is %v\n", dmg, startdir, dir));
+
+ return dir;
+};
+
+//----------------------------------------------------------------------
+// class base_corpse: base_mapentity
+// {
+// https://www.insideqc.com/qctut/qctut-33.shtml
+// TODO CEV
+ //--------------------------------------------------------------
+ strip void() base_corpse =
+ {
+ base_corpse_init (self);
+ };
+// };
+
+//----------------------------------------------------------------------
+// class base_gib: base_mapentity
+// {
+ //--------------------------------------------------------------
+ // Inspired by Ivana Gibson's kickable gibs [1] and similar
+ // functions found in other mods (Scarlet, etc) -- CEV
+ // [1]: https://www.insideqc.com/qctut/lesson-52.shtml
+ //--------------------------------------------------------------
+ void() base_gib_touch =
+ {
+ // only run if the object has come to rest -- CEV
+ if (self.velocity)
+ return;
+
+ // only run if touched by a player or monster -- CEV
+ if (other.classtype != CT_PLAYER && !(other.flags & FL_MONSTER))
+ return;
+
+ local float other_spd;
+ other_spd = vlen ([other.velocity_x, other.velocity_y, 0]);
+
+ // only run if other is moving fast enough to disturb
+ // stationary objects -- CEV
+ if (other_spd < 200)
+ return;
+
+ // clamp speed to PM_MAXSPEED (320) -- CEV
+ other_spd = min (other_spd, PM_MAXSPEED);
+
+ // this is the same method t_damage uses to find damage
+ // knockback direction -- CEV
+ local vector dir;
+ dir = self.origin - (other.absmin + other.absmax) * 0.5;
+ dir = normalize (dir);
+
+ self.flags &= ~FL_ONGROUND;
+
+ if (self.avelocity_y == 0)
+ // a little spin, as a treat. Rotating in the other
+ // axes seem to cause gibs to move into the floor -- CEV
+ self.avelocity_y = 100 * crandom ();
+
+ // move in direction at half of other's speed (so this will
+ // usually be 160) -- CEV
+ self.velocity += dir * (other_spd * 0.5);
+
+ // MOVETYPE_BOUNCE entities stop when impacting the ground if
+ // Z velocity is 60 or less. I don't want moveable gibs to
+ // be flying around, so set a fixed Z velocity a little above
+ // that 60 threshold -- CEV
+ self.velocity_z = 75;
+ };
+
+ //--------------------------------------------------------------
+ entity(entity src, vector org, vector vel, float sflags,
+ .string gibfield, void(entity) initfn) spawn_base_gib =
+ {
+ local entity e = spawn ();
+ e.owner = src;
+ e.spawnflags = sflags;
+ e.origin = org;
+ e.velocity = vel;
+ if (src.gibfield && src.gibfield != "")
+ e.gibfield = src.gibfield;
+ initfn (e);
+ return e;
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) base_gib_init =
+ {
+ if (!(e.flags & FL_CLIENT))
+ base_mapentity_init (e);
+
+ if (e.spawnflags & GIB_SOLID)
+ {
+ e.solid = SOLID_BBOX;
+ }
+ else if (e.spawnflags & GIB_DYNAMIC)
+ {
+ e.movetype = MOVETYPE_BOUNCE;
+ e.takedamage = DAMAGE_NO;
+ e.solid = SOLID_TRIGGER;
+ e.touch = base_gib_touch;
+ if (e.flags & FL_CLIENT)
+ e.flags = e.flags - (e.flags & FL_ONGROUND);
+ else
+ e.flags = 0;
+ }
+ else
+ {
+ e.solid = SOLID_NOT;
+ }
+ };
+
+ strip void() base_gib =
+ {
+ base_gib_init (self);
+ };
+// };
+
+/*QUAKED gib_misc_1 (0 0.5 0.8) (-8 -8 -8) (8 8 8) 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/gib1.mdl");
+}*/
+//----------------------------------------------------------------------
+// class gib_misc_1: base_gib
+// {
+ //--------------------------------------------------------------
+ // 'self' in this context is the thing being gibbed -- CEV
+ //--------------------------------------------------------------
+ void(entity src, vector dir, float dmg) throw_gib_1 =
+ {
+ local entity e = spawn_gib_misc_1 (src, src.origin + '0 0 24',
+ velocity_for_damage(dir, dmg), GIB_DYNAMIC);
+ e.avelocity_x = random() * 600;
+ e.avelocity_y = random() * 600;
+ e.avelocity_z = random() * 600;
+ e.alpha = 1.0;
+ e.think = sub_remove_fade;
+ e.ltime = time;
+ e.nextthink = time + 10 + random() * 10;
+ };
+
+ //--------------------------------------------------------------
+ entity(entity src, vector org, vector vel, float sflags)
+ spawn_gib_misc_1 =
+ {
+ return spawn_base_gib (src, org, vel, sflags, mdl_gib2,
+ gib_misc_1_init);
+ };
+
+
+ //--------------------------------------------------------------
+ void(entity e) gib_misc_1_init =
+ {
+ e.classname = "gib_misc_1";
+ e.classtype = CT_GORE_GIB1;
+
+ // this will set e.solid
+ base_gib_init (e);
+
+ if (e.mdl_gib1 != "")
+ {
+ precache_model (e.mdl_gib1);
+ setmodel (e, e.mdl_gib1);
+ }
+ else
+ {
+ precache_model ("progs/gib1.mdl");
+ setmodel (e, "progs/gib1.mdl");
+ if (e.solid == SOLID_BBOX || e.solid == SOLID_TRIGGER)
+ setsize (e, GIB_1_MINS, GIB_1_MAXS);
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_misc_1 =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_misc_1_init (self);
+ };
+// };
+
+/*QUAKED gib_misc_2 (0 0.5 0.8) (-8 -8 -8) (8 8 8) 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/gib2.mdl");
+}*/
+//----------------------------------------------------------------------
+// class gib_misc_2: base_gib
+// {
+ //--------------------------------------------------------------
+ // 'self' in this context is the thing being gibbed -- CEV
+ //--------------------------------------------------------------
+ void(entity src, vector dir, float dmg) throw_gib_2 =
+ {
+ local entity e = spawn_gib_misc_2 (src, src.origin + '0 0 24',
+ velocity_for_damage(dir, dmg), GIB_DYNAMIC);
+ e.avelocity_x = random() * 600;
+ e.avelocity_y = random() * 600;
+ e.avelocity_z = random() * 600;
+ e.alpha = 1.0;
+ e.think = sub_remove_fade;
+ e.ltime = time;
+ e.nextthink = time + 10 + random() * 10;
+ };
+
+ //--------------------------------------------------------------
+ entity(entity src, vector org, vector vel, float sflags)
+ spawn_gib_misc_2 =
+ {
+ return spawn_base_gib (src, org, vel, sflags, mdl_gib2,
+ gib_misc_2_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_misc_2_init =
+ {
+ e.classname = "gib_misc_2";
+ e.classtype = CT_GORE_GIB2;
+
+ // this will set e.solid
+ base_gib_init (e);
+
+ if (e.mdl_gib2 != "")
+ {
+ precache_model (e.mdl_gib2);
+ setmodel (e, e.mdl_gib2);
+ }
+ else
+ {
+ precache_model ("progs/gib2.mdl");
+ setmodel (e, "progs/gib2.mdl");
+ if (e.solid == SOLID_BBOX || e.solid == SOLID_TRIGGER)
+ setsize (e, GIB_2_MINS, GIB_2_MAXS);
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_misc_2 =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_misc_2_init (self);
+ };
+// };
+
+/*QUAKED gib_misc_3 (0 0.5 0.8) (-8 -8 -8) (8 8 8) 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/gib3.mdl");
+}*/
+//----------------------------------------------------------------------
+// class gib_misc_3: base_gib
+// {
+ //--------------------------------------------------------------
+ // 'self' in this context is the thing being gibbed -- CEV
+ //--------------------------------------------------------------
+ void(entity src, vector dir, float dmg) throw_gib_3 =
+ {
+ local entity e = spawn_gib_misc_3 (src, src.origin + '0 0 24',
+ velocity_for_damage(dir, dmg), GIB_DYNAMIC);
+ e.avelocity_x = random() * 600;
+ e.avelocity_y = random() * 600;
+ e.avelocity_z = random() * 600;
+ e.alpha = 1.0;
+ e.think = sub_remove_fade;
+ e.ltime = time;
+ e.nextthink = time + 10 + random() * 10;
+ };
+
+ //--------------------------------------------------------------
+ entity(entity src, vector org, vector vel, float sflags)
+ spawn_gib_misc_3 =
+ {
+ return spawn_base_gib (src, org, vel, sflags, mdl_gib3,
+ gib_misc_3_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_misc_3_init =
+ {
+ e.classname = "gib_misc_3";
+ e.classtype = CT_GORE_GIB3;
+
+ // this will set e.solid
+ base_gib_init (e);
+
+ if (e.mdl_gib3 != "")
+ {
+ precache_model (e.mdl_gib3);
+ setmodel (e, e.mdl_gib3);
+ }
+ else
+ {
+ precache_model ("progs/gib3.mdl");
+ setmodel (e, "progs/gib3.mdl");
+ if (e.solid == SOLID_BBOX || e.solid == SOLID_TRIGGER)
+ setsize (e, GIB_3_MINS, GIB_3_MAXS);
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_misc_3 =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_misc_3_init (self);
+ };
+// };
+
+//----------------------------------------------------------------------
+// class base_gib_head: base_gib
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg, void(entity e) initfn)
+ base_gib_head_throw =
+ {
+ act.skin = act.skin_head;
+ act.nextthink = -1;
+ act.spawnflags = GIB_DYNAMIC;
+ act.view_ofs = '0 0 8';
+
+ act.origin_z = act.origin_z - 24;
+ act.avelocity = crandom() * '0 600 0';
+ act.velocity = velocity_for_damage (dir, dmg);
+
+ if (initfn)
+ initfn (act);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) base_gib_head_init =
+ {
+ base_gib_init (e);
+ };
+
+ //--------------------------------------------------------------
+ strip void() base_gib_head =
+ {
+ base_gib_head_init (self);
+ };
+// };
Return to the top of this page or return to the overview of this repo.
Diff qc/base_proj.qc
diff --git a/qc/base_proj.qc b/qc/base_proj.qc
index 4b9dc92..2d15315 100644
--- a/qc/base_proj.qc
+++ b/qc/base_proj.qc
@@ -357,7 +357,7 @@ strip void() base_projectile_qcphys;
if (other)
if (other.health)
// TODO CEV
- if (other.classname == "monster_shambler")
+ if (other.classtype == CT_MONSTER_SHAMBLER)
// mostly immune
t_damage2 (other, self, self.owner,
self.direct_damage * 0.5);
@@ -433,9 +433,6 @@ strip void() base_projectile_qcphys;
if (base_projectile_check_touch())
return;
- if (!self || self == world)
- return;
-
if (self.aflag & PROJECTILE_EXPLOSIVE)
base_projectile_touch_explosive ();
else
@@ -527,24 +524,23 @@ strip void() base_projectile_qcphys;
if (trace_allsolid || trace_startsolid)
{
+ // we're stuck in something or other
dprint (sprintf("base_projectile_qcphys_physics: "
- "classname %s in a solid at %v\n",
- self.classname, trace_endpos));
-
- if (self.movetype == MOVETYPE_BOUNCE)
- {
- // TODO CEV figure out what to do here
- return;
- }
- else
- {
- // in the world so just explode
- local entity oldother2 = other;
- other = world;
+ "missile classname %s in solid entity %s "
+ "at %v\n", self.classname, trace_ent.classname,
+ trace_endpos));
+
+ self.solid = SOLID_NOT;
+ local entity oldother2 = other;
+ other = trace_ent;
+ if (self.destroy)
+ self.destroy ('0 0 0');
+ else if (self.touch)
self.touch ();
- other = oldother2;
- return;
- }
+ else
+ remove (self);
+ other = oldother2;
+ return;
}
// clear to accept the move
Return to the top of this page or return to the overview of this repo.
Diff qc/base_trigger.qc
diff --git a/qc/base_trigger.qc b/qc/base_trigger.qc
index 8196d5e..bbb35a0 100644
--- a/qc/base_trigger.qc
+++ b/qc/base_trigger.qc
@@ -6,6 +6,7 @@
// forward declarations
//======================================================================
+// base_trigger
void(entity e) sub_checkwaiting;
void() sub_endwaiting;
void(entity e) base_trigger_point_init;
Return to the top of this page or return to the overview of this repo.
Diff qc/defs_builtins.qc
diff --git a/qc/defs_builtins.qc b/qc/defs_builtins.qc
index cf04b72..386b875 100644
--- a/qc/defs_builtins.qc
+++ b/qc/defs_builtins.qc
@@ -604,7 +604,8 @@ float(vector position, string text, vector size, vector rgb, float alpha,
// Draws an shader within the given 2d screen box. Software engines may omit
// support for rgb+alpha, but must support rescaling, and must clip to the
// screen without crashing. -- copied from fteextensions.qc -- CEV
-float(vector position, string pic, vector size, vector rgb, float alpha, optional float drawflag) drawpic = #322;
+float(vector position, string pic, vector size, vector rgb, float alpha,
+ optional float drawflag) drawpic = #322;
// copied from fteextension.qc -- CEV
// Draws a solid block over the given 2d box, with given colour, alpha,
Return to the top of this page or return to the overview of this repo.
Diff qc/defs_ctypes.qc
diff --git a/qc/defs_ctypes.qc b/qc/defs_ctypes.qc
index 6890887..662008c 100644
--- a/qc/defs_ctypes.qc
+++ b/qc/defs_ctypes.qc
@@ -68,20 +68,22 @@ enum
CT_FUNC_WALL, // func_wall
// gibs
- CT_GIB_HEAD_ARMY, // deadstuff
- CT_GIB_HEAD_DEMON, //
- CT_GIB_HEAD_DOG, //
- CT_GIB_HEAD_ENFORCER, //
- CT_GIB_HEAD_HELL_KNIGHT, //
- CT_GIB_HEAD_KNIGHT, //
- CT_GIB_HEAD_OGRE, //
- CT_GIB_HEAD_PLAYER, //
- CT_GIB_HEAD_SHALRATH, //
- CT_GIB_HEAD_SHAMBLER, //
- CT_GIB_HEAD_WIZARD, //
- CT_GIB_MISC_1, //
- CT_GIB_MISC_2, //
- CT_GIB_MISC_3, //
+ CT_GORE_HEAD, // deadstuff
+ CT_GORE_HEAD_ARMY, //
+ CT_GORE_HEAD_DEMON, //
+ CT_GORE_HEAD_DOG, //
+ CT_GORE_HEAD_ENFORCER, //
+ CT_GORE_HEAD_HELL_KNIGHT, //
+ CT_GORE_HEAD_KNIGHT, //
+ CT_GORE_HEAD_OGRE, //
+ CT_GORE_HEAD_PLAYER, //
+ CT_GORE_HEAD_SHALRATH, //
+ CT_GORE_HEAD_SHAMBLER, //
+ CT_GORE_HEAD_WIZARD, //
+ CT_GORE_HEAD_ZOMBIE, //
+ CT_GORE_GIB1, //
+ CT_GORE_GIB2, //
+ CT_GORE_GIB3, //
// hazards
CT_HAZARD_LTRAIL_START, // DOE lightning trail
Return to the top of this page or return to the overview of this repo.
Diff qc/func/breakable.qc
diff --git a/qc/func/breakable.qc b/qc/func/breakable.qc
index 1252387..616db69 100644
--- a/qc/func/breakable.qc
+++ b/qc/func/breakable.qc
@@ -36,12 +36,12 @@ const float BREAKABLE_NO_MONSTERS = 1;
// base_breakable
void() sub_dislodge_resting_entities;
-void(string templatename) base_breakable_template_single_debris;
-void() base_breakable_single_debris;
-void() base_breakable_make_templates_debris;
-void() base_breakable_make_debris;
-void() base_breakable_die;
-void() base_breakable_destroy;
+void(vector dir, string templatename) base_breakable_template_single_debris;
+void(vector dir) base_breakable_single_debris;
+void(vector dir) base_breakable_make_templates_debris;
+void(vector dir) base_breakable_make_debris;
+void(vector dir) base_breakable_die;
+void(vector dir) base_breakable_destroy;
void() base_breakable_use;
void(entity e) base_breakable_template_setup;
void(entity e) base_breakable_init;
@@ -82,7 +82,8 @@ void() func_breakable;
};
//--------------------------------------------------------------
- void(string templatename) base_breakable_template_single_debris =
+ void(vector dir, string templatename)
+ base_breakable_template_single_debris =
{
local entity new;
@@ -97,12 +98,12 @@ void() func_breakable;
// dumptruck_ds
setmodel (new, new.model);
setsize (new, '0 0 0', '0 0 0');
- new.velocity = velocity_for_damage (self.health * 2);
new.movetype = MOVETYPE_BOUNCE;
new.solid = SOLID_NOT;
new.avelocity_x = random() * 600;
new.avelocity_y = random() * 600;
new.avelocity_z = random() * 600;
+ new.velocity = velocity_for_damage (dir, self.health * 2);
new.think = sub_remove;
new.ltime = time;
new.nextthink = time + 10 + random() * 10;
@@ -110,7 +111,7 @@ void() func_breakable;
};
//--------------------------------------------------------------
- void() base_breakable_single_debris =
+ void(vector dir) base_breakable_single_debris =
{
local entity new;
@@ -130,7 +131,7 @@ void() func_breakable;
// dumptruck_ds
setmodel (new, self.mdl_debris);
setsize (new, '0 0 0', '0 0 0');
- new.velocity = velocity_for_damage (self.health * 2);
+ new.velocity = velocity_for_damage (dir, self.health * 2);
new.movetype = MOVETYPE_BOUNCE;
new.solid = SOLID_NOT;
new.avelocity_x = random() * 600;
@@ -158,7 +159,7 @@ void() func_breakable;
// if (self.style == 2)
// new.skin = 2;
// and so on, up until 31. As far as I can tell new.skin
- // was always set to the same value as this.style. So I've
+ // was always set to the same value as self.style. So I've
// simplified the block into the code below.
// New debris skins start at 3 and continue through 31
// according to comments left by dumptruck_ds -- CEV
@@ -172,7 +173,7 @@ void() func_breakable;
//--------------------------------------------------------------
// template system from Qmaster -- dumptruck_ds
//--------------------------------------------------------------
- void() base_breakable_make_templates_debris =
+ void(vector dir) base_breakable_make_templates_debris =
{
local float count = 0;
local string break_template = "";
@@ -208,7 +209,7 @@ void() func_breakable;
for (float j = 0; j < count; j++)
{
base_breakable_template_single_debris
- (break_template);
+ (dir, break_template);
}
}
@@ -222,17 +223,17 @@ void() func_breakable;
//==============================================================
//--------------------------------------------------------------
- void() base_breakable_make_debris =
+ void(vector dir) base_breakable_make_debris =
{
for (float i = 0; i < self.cnt; i++)
- base_breakable_single_debris ();
+ base_breakable_single_debris (dir);
};
//--------------------------------------------------------------
// dumptruck_ds -- set the spawnflag for cosmetic explosion
// effect; use "dmg" value to hurt the player
//--------------------------------------------------------------
- void() base_breakable_die =
+ void(vector dir) base_breakable_die =
{
// what is this brace doing here? -- TODO CEV
{
@@ -262,9 +263,9 @@ void() func_breakable;
if (self.spawnflags & BREAK_EXPLODE)
{
if (self.spawnflags & BREAK_CUSTOM)
- base_breakable_make_templates_debris ();
+ base_breakable_make_templates_debris (dir);
else
- base_breakable_make_debris ();
+ base_breakable_make_debris (dir);
// to let us use noise2
// func_explobox_explode_silent ();
@@ -289,7 +290,7 @@ void() func_breakable;
{
if (self.switchshadstyle)
lightstyle (self.switchshadstyle, "m");
- base_breakable_make_templates_debris ();
+ base_breakable_make_templates_debris (dir);
if (self)
remove (self);
}
@@ -297,7 +298,7 @@ void() func_breakable;
{
if (self.switchshadstyle)
lightstyle (self.switchshadstyle, "m");
- base_breakable_make_debris ();
+ base_breakable_make_debris (dir);
if (self)
remove (self);
}
@@ -305,11 +306,11 @@ void() func_breakable;
};
//--------------------------------------------------------------
- void() base_breakable_destroy =
+ void(vector dir) base_breakable_destroy =
{
activator = damage_attacker;
sub_usetargets ();
- base_breakable_die ();
+ base_breakable_die (dir);
};
//--------------------------------------------------------------
@@ -320,7 +321,7 @@ void() func_breakable;
activator = other;
sub_usetargets ();
- base_breakable_die ();
+ base_breakable_die ('0 0 0');
};
//--------------------------------------------------------------
Return to the top of this page or return to the overview of this repo.
Diff qc/func/button.qc
diff --git a/qc/func/button.qc b/qc/func/button.qc
index 4ae2346..4d79c87 100644
--- a/qc/func/button.qc
+++ b/qc/func/button.qc
@@ -12,7 +12,7 @@ void() func_button_think_done;
void() func_button_think_return;
void() func_button_blocked;
void() func_button_fire;
-void() func_button_destroy;
+void(vector dir) func_button_destroy;
void() func_button_use;
void() func_button_touch;
void(entity b) func_button_lock;
@@ -102,7 +102,7 @@ When a button is touched, it moves some distance in the direction of it's angle,
};
//--------------------------------------------------------------
- void() func_button_destroy =
+ void(vector dir) func_button_destroy =
{
if (self.estate != STATE_ACTIVE)
return;
Return to the top of this page or return to the overview of this repo.
Diff qc/func/door.qc
diff --git a/qc/func/door.qc b/qc/func/door.qc
index a492a95..6cc66a2 100644
--- a/qc/func/door.qc
+++ b/qc/func/door.qc
@@ -51,7 +51,7 @@ void() func_door_group_go_down;
void() func_door_group_go_up;
void() func_door_fire;
void() func_door_use;
-void() func_door_destroy;
+void(vector dir) func_door_destroy;
void() func_door_unlock;
void() func_door_touch;
void(entity e, float closealldoors) func_door_estate_lock;
@@ -378,7 +378,7 @@ Key doors are always wait -1.
};
//--------------------------------------------------------------
- void() func_door_destroy =
+ void(vector dir) func_door_destroy =
{
local entity oself = self;
Return to the top of this page or return to the overview of this repo.
Diff qc/func/door_secret.qc
diff --git a/qc/func/door_secret.qc b/qc/func/door_secret.qc
index 8cdc43a..415b59c 100644
--- a/qc/func/door_secret.qc
+++ b/qc/func/door_secret.qc
@@ -19,7 +19,7 @@ const float SECRET_YES_SHOOT = 16; // shootable even if targeted
// func_door_secret
void() func_door_secret_blocked;
void(entity attacker, float damage) func_door_secret_pain;
-void() func_door_secret_destroy;
+void(vector dir) func_door_secret_destroy;
void() func_door_secret_think;
void() func_door_secret_touch;
void() func_door_secret_use;
@@ -71,7 +71,7 @@ If a secret door has a targetname, it will only be opened by it's botton or trig
};
//--------------------------------------------------------------
- void() func_door_secret_destroy =
+ void(vector dir) func_door_secret_destroy =
{
if (self.takedamage == DAMAGE_YES)
func_door_secret_use ();
Return to the top of this page or return to the overview of this repo.
Diff qc/func/elvtr_button.qc
diff --git a/qc/func/elvtr_button.qc b/qc/func/elvtr_button.qc
index 3f1feab..8fbe437 100644
--- a/qc/func/elvtr_button.qc
+++ b/qc/func/elvtr_button.qc
@@ -28,7 +28,7 @@ void() func_elvtr_button_done;
void() func_elvtr_button_return;
void() func_elvtr_button_fire;
void() func_elvtr_button_blocked;
-void() func_elvtr_button_destroy;
+void(vector dir) func_elvtr_button_destroy;
void() func_elvtr_button_touch;
void() func_elvtr_button_use;
void(entity e) func_elvtr_button_init;
@@ -121,7 +121,7 @@ When a button is touched, it moves some distance in the direction of it's angle,
};
//--------------------------------------------------------------
- void() func_elvtr_button_destroy =
+ void(vector dir) func_elvtr_button_destroy =
{
self.enemy = damage_attacker;
self.health = self.max_health;
Return to the top of this page or return to the overview of this repo.
Diff qc/func/explobox.qc
diff --git a/qc/func/explobox.qc b/qc/func/explobox.qc
index a2fc3d8..0fd07a8 100644
--- a/qc/func/explobox.qc
+++ b/qc/func/explobox.qc
@@ -8,7 +8,7 @@
// func_explobox
void() func_explobox_explode_silent;
-void() func_explobox_destroy;
+void(vector dir) func_explobox_destroy;
// void() func_explobox_think =
void(entity e) func_explobox_init;
void() func_explobox;
@@ -42,7 +42,7 @@ Keys:
};
//--------------------------------------------------------------
- void() func_explobox_destroy =
+ void(vector dir) func_explobox_destroy =
{
// for some reason, time + 0.2 doesn't work
self.think = func_explobox_explode_silent;
Return to the top of this page or return to the overview of this repo.
Diff qc/func/fall2.qc
diff --git a/qc/func/fall2.qc b/qc/func/fall2.qc
index 85eac25..e31f0bd 100644
--- a/qc/func/fall2.qc
+++ b/qc/func/fall2.qc
@@ -196,7 +196,7 @@ Able to .target other entities, including other func_fall2s
// debris to spawn
self.cnt = self.count;
// removes self
- base_breakable_die ();
+ base_breakable_die ('0 0 0');
return;
}
}
Return to the top of this page or return to the overview of this repo.
Diff qc/gore.qc
diff --git a/qc/gore.qc b/qc/gore.qc
deleted file mode 100644
index 78f5c9e..0000000
--- a/qc/gore.qc
+++ /dev/null
@@ -1,74 +0,0 @@
-//==============================================================================
-// gore.qc -- the meaty bits
-//==============================================================================
-
-//------------------------------------------------------------------------------
-
-//----------------------------------------------------------------------
-vector() wall_velocity =
-{
- local vector vel;
-
- vel = normalize (self.velocity);
- vel = normalize (vel + v_up*(random()- 0.5) +
- v_right * (random() - 0.5));
- vel = vel + 2 * trace_plane_normal;
- vel = vel * 200;
-
- return vel;
-};
-
-//----------------------------------------------------------------------
-// SpawnMeatSpray
-//----------------------------------------------------------------------
-void(vector org, vector vel) spawn_meatspray =
-{
- local entity missile;
-
- missile = spawn ();
- missile.owner = self;
- missile.movetype = MOVETYPE_BOUNCE;
- missile.solid = SOLID_NOT;
-
- makevectors (self.angles);
-
- missile.velocity = vel;
- missile.velocity_z = missile.velocity_z + 250 + 50 * random ();
-
- missile.avelocity = '3000 1000 2000';
-
- // set missile duration
- missile.nextthink = time + 1;
- missile.think = sub_remove;
-
- setmodel (missile, "progs/zom_gib.mdl");
- setsize (missile, '0 0 0', '0 0 0');
- setorigin (missile, org);
-};
-
-//----------------------------------------------------------------------
-// SpawnBlood
-//----------------------------------------------------------------------
-void(vector org, vector vel, float damage) spawn_blood =
-{
- particle (org, vel * 0.1, 73, damage * 2);
-};
-
-//----------------------------------------------------------------------
-// spawn_touchblood
-//----------------------------------------------------------------------
-void(float damage) spawn_touchblood =
-{
- local vector vel;
-
- vel = wall_velocity() * 0.2;
- spawn_blood (self.origin + vel * 0.01, vel, damage);
-};
-
-//----------------------------------------------------------------------
-// SpawnChunk
-//----------------------------------------------------------------------
-void(vector org, vector vel) spawn_chunk =
-{
- particle (org, vel * 0.02, 0, 10);
-};
Return to the top of this page or return to the overview of this repo.
Diff qc/math.qc
diff --git a/qc/math.qc b/qc/math.qc
index 7a6a0c7..b97ebf2 100644
--- a/qc/math.qc
+++ b/qc/math.qc
@@ -213,7 +213,7 @@ vector(vector ang) normalize_angles180 =
//======================================================================
//----------------------------------------------------------------------
-// was in weapons.qc -- CEV
+// returns -1 to 1 (I think); was in weapons.qc -- CEV
//----------------------------------------------------------------------
float() crandom =
{
Return to the top of this page or return to the overview of this repo.
Diff qc/misc/deadstuff.qc
diff --git a/qc/misc/deadstuff.qc b/qc/misc/deadstuff.qc
index c098a60..8b13789 100644
--- a/qc/misc/deadstuff.qc
+++ b/qc/misc/deadstuff.qc
@@ -1,647 +1 @@
-//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-// deadstuff.qc -- misc gore
-// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
-//
-// deadstuff version 1.0 - tony collen - manero@canweb.net -
-// EfNet IRC #QuakeEd or #Trinity
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-//======================================================================
-// forward declarations
-//======================================================================
-
-// gib_head_demon
-void(entity e) gib_head_demon_init;
-void() gib_head_demon;
-
-// gib_head_dog
-void(entity e) gib_head_dog_init;
-void() gib_head_dog;
-
-// gib_head_army
-void(entity e) gib_head_army_init;
-void() gib_head_army;
-
-// gib_head_hell_knight
-void(entity e) gib_head_hell_knight_init;
-void() gib_head_hell_knight;
-
-// gib_head_knight
-void(entity e) gib_head_knight_init
-void() gib_head_knight;
-
-// gib_head_enforcer
-void(entity e) gib_head_enforcer_init;
-void() gib_head_enforcer;
-
-// gib_head_ogre
-void(entity e) gib_head_ogre_init;
-void() gib_head_ogre;
-
-// gib_head_player
-void(entity e) gib_head_player_init;
-void() gib_head_player;
-
-// gib_head_shalrath
-void(entity e) gib_head_shalrath_init;
-void() gib_head_shalrath;
-
-// gib_head_shambler
-void(entity e) gib_head_shambler_init;
-void() gib_head_shambler;
-
-// gib_head_wizard
-void(entity e) gib_head_wizard_init;
-void() gib_head_wizard;
-
-// gib_misc_1
-void(entity e) gib_misc_1_init;
-void() gib_misc_1;
-
-// gib_misc_2
-void(entity e) gib_misc_2_init;
-void() gib_misc_2;
-
-// gib_misc_3
-void(entity e) gib_misc_3_init;
-void() gib_misc_3;
-
-//------------------------------------------------------------------------------
-
-/*QUAKED gib_head_demon (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_demon.mdl");
-}
-*/
-//----------------------------------------------------------------------
-// class gib_head_demon: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_demon_init =
- {
- e.classname = "gib_head_demon";
- e.classtype = CT_GIB_HEAD_DEMON;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_demon.mdl");
- setmodel (e, "progs/h_demon.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-13.64 -16.77 -0.11', '17.44 16.22 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_demon =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_demon_init (self);
- };
-// };
-
-/*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_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_dog_init =
- {
- e.classname = "gib_head_dog";
- e.classtype = CT_GIB_HEAD_DOG;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_dog.mdl");
- setmodel (e, "progs/h_dog.mdl");
- e.frame = 0; // was 1 -- dumptruck_ds
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-9.66 -11.89 -0.2', '6.57 7.96 13.29');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_dog =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_dog_init (self);
- };
-// };
-
-/*QUAKED gib_head_army (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_guard.mdl");
-}
-*/
-//----------------------------------------------------------------------
-// class gib_head_army: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_army_init =
- {
- e.classname = "gib_head_army";
- e.classtype = CT_GIB_HEAD_ARMY;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_guard.mdl");
- setmodel (e, "progs/h_guard.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-9.67 -8.27 -0.28', '4.05 4.8 13.41');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_army =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_army_init (self);
- };
-// };
-
-/*QUAKED gib_head_hell_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_hellkn.mdl");
-}*/
-//----------------------------------------------------------------------
-// class gib_head_hell_knight: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_hell_knight_init =
- {
- e.classname = "gib_head_hell_knight";
- e.classtype = CT_GIB_HEAD_HELL_KNIGHT;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_hellkn.mdl");
- setmodel (e, "progs/h_hellkn.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-7.9 -12.97 -0.63', '10.55 8.87 21.06');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_hell_knight =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_hell_knight_init (self);
- };
-// };
-
-/*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_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_knight_init =
- {
- e.classname = "gib_head_knight";
- e.classtype = CT_GIB_HEAD_KNIGHT;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_knight.mdl");
- setmodel (e, "progs/h_knight.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-8.17 -7.47 -0.13', '8.36 6.5 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_knight =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_knight_init (self);
- };
-// };
-
-/*QUAKED gib_head_enforcer (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_mega.mdl");
-}
-*/
-//----------------------------------------------------------------------
-// class gib_head_enforcer: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_enforcer_init =
- {
- e.classname = "gib_head_enforcer";
- e.classtype = CT_GIB_HEAD_ENFORCER;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_mega.mdl");
- setmodel (e, "progs/h_mega.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-10.63 -10.23 -0.05', '9.27 8.25 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_enforcer =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_enforcer_init (self);
- };
-// };
-
-/*QUAKED gib_head_ogre (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_ogre.mdl");
-}*/
-//----------------------------------------------------------------------
-// class gib_head_ogre: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_ogre_init =
- {
- e.classname = "gib_head_ogre";
- e.classtype = CT_GIB_HEAD_OGRE;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_ogre.mdl");
- setmodel (e, "progs/h_ogre.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-12.35 -15.7 -0.17', '10.67 13.88 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_ogre =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_ogre_init (self);
- };
-// };
-
-/*QUAKED gib_head_player (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_player.mdl");
-}*/
-//----------------------------------------------------------------------
-// class gib_head_player: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_player_init =
- {
- e.classname = "gib_head_player";
- e.classtype = CT_GIB_HEAD_PLAYER;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_player.mdl");
- setmodel (e, "progs/h_player.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-9.67 -12.38 -2.1', '11.49 50.7 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_player =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_player_init (self);
- };
-// };
-
-/*QUAKED gib_head_shalrath (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_shal.mdl");
-}*/
-//----------------------------------------------------------------------
-// class gib_head_shalrath: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_shalrath_init =
- {
- e.classname = "gib_head_shalrath";
- e.classtype = CT_GIB_HEAD_SHALRATH;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_shal.mdl");
- setmodel (e, "progs/h_shal.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-19.85 -19.09 -1.44', '13.72 16.8 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_shalrath =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_shalrath_init (self);
- };
-// };
-
-/*QUAKED gib_head_shambler (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_shams.mdl");
-}*/
-//----------------------------------------------------------------------
-// class gib_head_shambler: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_shambler_init =
- {
- e.classname = "gib_head_shambler";
- e.classtype = CT_GIB_HEAD_SHAMBLER;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_shams.mdl");
- setmodel (e, "progs/h_shams.mdl");
- e.frame = 0; // was 1, caused an error -- dumptruck_ds
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-15.15 -20.638 -0.45', '21.44 21.76 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_shambler =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_shambler_init (self);
- };
-// };
-
-/*QUAKED gib_head_wizard (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_wizard.mdl");
-}*/
-//----------------------------------------------------------------------
-// class gib_head_wizard: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_head_wizard_init =
- {
- e.classname = "gib_head_wizard";
- e.classtype = CT_GIB_HEAD_WIZARD;
-
- base_mapentity_init (e);
-
- precache_model ("progs/h_wizard.mdl");
- setmodel (e, "progs/h_wizard.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-10.41 -8.66 -0.54', '6.52 10.82 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_head_wizard =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_head_wizard_init (self);
- };
-// };
-
-/*QUAKED gib_misc_1 (0 0.5 0.8) (-8 -8 -8) (8 8 8) 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/gib1.mdl");
-}*/
-//----------------------------------------------------------------------
-// class gib_misc_1: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_misc_1_init =
- {
- e.classname = "gib_misc_1";
- e.classtype = CT_GIB_MISC_1;
-
- base_mapentity_init (e);
-
- precache_model ("progs/gib1.mdl");
- setmodel (e, "progs/gib1.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-3.57 -8.06 -3.34', '3.69 8.31 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_misc_1 =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_misc_1_init (self);
- };
-// };
-
-/*QUAKED gib_misc_2 (0 0.5 0.8) (-8 -8 -8) (8 8 8) 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/gib2.mdl");
-}*/
-//----------------------------------------------------------------------
-// class gib_misc_2: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_misc_2_init =
- {
- e.classname = "gib_misc_2";
- e.classtype = CT_GIB_MISC_2;
-
- base_mapentity_init (e);
-
- precache_model ("progs/gib2.mdl");
- setmodel (e, "progs/gib2.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-12.68 -14.83 -6.19', '13.53 14.57 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_misc_2 =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_misc_2_init (self);
- };
-// };
-
-/*QUAKED gib_misc_3 (0 0.5 0.8) (-8 -8 -8) (8 8 8) 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/gib3.mdl");
-}*/
-//----------------------------------------------------------------------
-// class gib_misc_3: base_mapentity
-// {
- //--------------------------------------------------------------
- void(entity e) gib_misc_3_init =
- {
- e.classname = "gib_misc_3";
- e.classtype = CT_GIB_MISC_3;
-
- base_mapentity_init (e);
-
- precache_model ("progs/gib3.mdl");
- setmodel (e, "progs/gib3.mdl");
- e.frame = 0;
-
- if (e.spawnflags & 1)
- {
- e.solid = SOLID_BBOX;
- setsize (e, '-18.95 -15.92 -3.13', '13.17 15.66 30');
- }
- else
- {
- e.solid = SOLID_NOT;
- }
- };
-
- //--------------------------------------------------------------
- void() gib_misc_3 =
- {
- // new spawnflags for all entities -- iw
- if (SUB_Inhibit())
- return;
-
- gib_misc_3_init (self);
- };
-// };
Return to the top of this page or return to the overview of this repo.
Diff qc/misc/explobox.qc
diff --git a/qc/misc/explobox.qc b/qc/misc/explobox.qc
index 43dda02..68bd5ab 100644
--- a/qc/misc/explobox.qc
+++ b/qc/misc/explobox.qc
@@ -7,7 +7,7 @@
//======================================================================
// base_explobox
-void() base_explobox_destroy;
+void(vector dir) base_explobox_destroy;
void(entity e) base_explobox_init;
strip void() base_explobox;
@@ -25,7 +25,7 @@ void() misc_explobox2;
// class base_explobox: base_mapentity
// {
//--------------------------------------------------------------
- void() base_explobox_destroy =
+ void(vector dir) base_explobox_destroy =
{
self.takedamage = DAMAGE_NO;
self.classname = "explo_box";
Return to the top of this page or return to the overview of this repo.
Diff qc/misc/infight.qc
diff --git a/qc/misc/infight.qc b/qc/misc/infight.qc
index dfee324..25e4c68 100644
--- a/qc/misc/infight.qc
+++ b/qc/misc/infight.qc
@@ -48,10 +48,7 @@ void() misc_infight;
// was FoundTargetForEntity (t1) -- CEV
if (t1.classgroup & CG_MONSTER)
{
- dprint ("misc_infight_make_angry_at: "
- "TODO CEV!\n");
- // TODO FIXME CEV
- // sub_runvoidas (t1, ai_findtarget);
+ sub_runfloatas (t1, ai_findtarget);
}
else
{
Return to the top of this page or return to the overview of this repo.
Diff qc/misc/play.qc
diff --git a/qc/misc/play.qc b/qc/misc/play.qc
index ad8b49d..e999bf4 100644
--- a/qc/misc/play.qc
+++ b/qc/misc/play.qc
@@ -442,18 +442,18 @@ Use noise key for a custom sound.
// -- dumptruck_ds -- thanks to Spike for helping with errors
if (self.style == 1)
{
- throw_gib ("progs/gib1.mdl", random() * -80);
- throw_gib ("progs/gib2.mdl", random() * -80);
- throw_gib ("progs/gib3.mdl", random() * -80);
- throw_gib ("progs/gib1.mdl", random() * -75);
- throw_gib ("progs/gib2.mdl", random() * -75);
- throw_gib ("progs/gib3.mdl", random() * -75);
+ throw_gib_1 (self, '0 0 0', random() * -80);
+ throw_gib_2 (self, '0 0 0', random() * -80);
+ throw_gib_3 (self, '0 0 0', random() * -80);
+ throw_gib_1 (self, '0 0 0', random() * -75);
+ throw_gib_2 (self, '0 0 0', random() * -75);
+ throw_gib_3 (self, '0 0 0', random() * -75);
}
else
{
- throw_gib ("progs/gib1.mdl", random() * -65);
- throw_gib ("progs/gib2.mdl", random() * -65);
- throw_gib ("progs/gib3.mdl", random() * -65);
+ throw_gib_1 (self, '0 0 0', random() * -65);
+ throw_gib_2 (self, '0 0 0', random() * -65);
+ throw_gib_3 (self, '0 0 0', random() * -65);
}
if (self.fly_sound != 1)
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/boss2.qc
diff --git a/qc/monsters/boss2.qc b/qc/monsters/boss2.qc
index 1a6877c..ec1cc69 100644
--- a/qc/monsters/boss2.qc
+++ b/qc/monsters/boss2.qc
@@ -16,7 +16,7 @@ const float NO_LAVASPLASH = 2;
// monster_boss2
void() monster_boss2_face; // AI & firing
void(vector p) monster_boss2_missile;
-void() monster_boss2_gib; // thinking & animation below
+void(vector dir) monster_boss2_gib; // thinking & animation below
void() boss2_idle1; void() boss2_idle2; void() boss2_idle3; void() boss2_idle4;
void() boss2_idle5; void() boss2_idle6; void() boss2_idle7; void() boss2_idle8;
void() boss2_idle9; void() boss2_idle10; void() boss2_idle11;
@@ -58,7 +58,7 @@ void() boss2_death4; void() boss2_death5; void() boss2_death6;
void() boss2_death7; void() boss2_death8; void() boss2_death9;
void() boss2_death10;
void(entity attacker, float damage) monster_boss2_pain; // interaction
-void() monster_boss2_destroy;
+void(vector dir) monster_boss2_destroy;
void() monster_boss2_use;
void(entity e) monster_boss2_init; // initialization
void() monster_boss2;
@@ -157,7 +157,7 @@ $frame shockc9 shockc10
//--------------------------------------------------------------
// GibBoss2
//--------------------------------------------------------------
- void() monster_boss2_gib =
+ void(vector dir) monster_boss2_gib =
{
sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NORM);
// throw tons of meat chunks
@@ -183,52 +183,15 @@ $frame shockc9 shockc10
r = random ();
if (r < 0.3)
- {
- // custom models -- dumptruck_ds
- if (self.mdl_gib1 != "")
- {
- throw_gib(self.mdl_gib1,
- -120);
- }
- else
- {
- throw_gib ("progs/gib1."
- "mdl", -120);
- }
- }
+ throw_gib_1 (self, dir, -120);
else if (r < 0.5)
- {
- // custom models -- dumptruck_ds
- if (self.mdl_gib2 != "")
- {
- throw_gib(self.mdl_gib2,
- -120);
- }
- else
- {
- throw_gib ("progs/gib2."
- "mdl", -120);
- }
- }
- else if (r < 0.7)
- {
- throw_gib ("progs/lavaball.mdl",
- -120);
- }
+ throw_gib_2 (self, dir, -120);
+ // FIXME TODO CEV
+ // else if (r < 0.7)
+ // throw_gib ("progs/lavaball.mdl",
+ // -120);
else
- {
- // custom models -- dumptruck_ds
- if (self.mdl_gib3 != "")
- {
- throw_gib(self.mdl_gib3,
- -120);
- }
- else
- {
- throw_gib ("progs/gib3."
- "mdl", -120);
- }
- }
+ throw_gib_3 (self, dir, -120);
y = y + 32;
}
x = x + 32;
@@ -506,12 +469,12 @@ $frame shockc9 shockc10
//--------------------------------------------------------------
// boss2_die
//--------------------------------------------------------------
- void() monster_boss2_destroy =
+ void(vector dir) monster_boss2_destroy =
{
if (self.health < -50)
{
// if health under -15
- monster_boss2_gib ();
+ monster_boss2_gib (dir);
return;
}
else
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/demon.qc
diff --git a/qc/monsters/demon.qc b/qc/monsters/demon.qc
index b53b21b..f6a5290 100644
--- a/qc/monsters/demon.qc
+++ b/qc/monsters/demon.qc
@@ -3,6 +3,15 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float DEMON1_HEALTH = 300; // id1 300
+
+const vector DEMON1_HEAD_MINS = '-13.64 -16.77 -0.11';
+const vector DEMON1_HEAD_MAXS = '17.44 16.22 30';
+
+//======================================================================
// forward declarations
//======================================================================
@@ -33,11 +42,16 @@ void() dem1_die1; void() dem1_die2; void() dem1_die3; void() dem1_die4;
void() dem1_die5; void() dem1_die6; void() dem1_die7; void() dem1_die8;
void() dem1_die9;
void(entity attacker, float damage) monster_demon1_pain; // interaction
-void() monster_demon1_destroy;
+void(vector dir) monster_demon1_destroy;
void() monster_demon1_touch;
void(entity e) monster_demon1_init; // initialization
void() monster_demon1;
+// gib_head_demon
+void(entity act, vector dir, float dmg) throw_gib_head_demon;
+void(entity e) gib_head_demon_init;
+void() gib_head_demon;
+
// monster_dead_demon
void() monster_dead_demon;
@@ -403,38 +417,29 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
//--------------------------------------------------------------
- void() monster_demon1_destroy =
+ void(vector dir) monster_demon1_destroy =
{
// check for gib
if (self.health < -80)
{
sound (self, CHAN_VOICE, "player/udeath.wav",
1, ATTN_NORM);
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_demon.mdl", self.health);
- // ThrowHead ("progs/h_demon.mdl", self.health);
- // ThrowGib ("progs/gib1.mdl", self.health);
- // ThrowGib ("progs/gib1.mdl", self.health);
- // ThrowGib ("progs/gib1.mdl", self.health);
+ throw_gib_head_demon (self, dir, self.health);
- if (self.mdl_gib1 != "")
- // custom models -- dumptruck_ds
- throw_gib (self.mdl_gib1, self.health);
- else
- throw_gib ("progs/gib1.mdl", self.health);
+ // TODO CEV this doesn't work *quite* right
+ throw_gib_1 (self, dir, self.health);
+ // custom models -- dumptruck_ds
if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
+ throw_gib_2 (self, dir, self.health);
else
- throw_gib ("progs/gib1.mdl", self.health);
+ throw_gib_1 (self, dir, self.health);
if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
+ throw_gib_3 (self, dir, self.health);
else
- throw_gib ("progs/gib1.mdl", self.health);
+ throw_gib_1 (self, dir, self.health);
base_item_drop_stuff (self);
return;
@@ -548,7 +553,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
if (!e.health)
// thanks RennyC -- dumptruck_ds
- e.health = 300;
+ e.health = DEMON1_HEALTH;
e.checkattack = monster_demon1_checkattack;
e.sightsound = monster_demon1_sightsound;
@@ -585,9 +590,63 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
// };
-//----------------------------------------------------------------------
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+/*QUAKED gib_head_demon (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_demon.mdl");
+}
+*/
//----------------------------------------------------------------------
+// class gib_head_demon: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_demon =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_demon_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_head_demon_init =
+ {
+ e.classname = "gib_head_demon";
+ e.classtype = CT_GORE_HEAD_DEMON;
+
+ // 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_demon.mdl");
+ setmodel (e, "progs/h_demon.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, DEMON1_HEAD_MINS, DEMON1_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_head_demon =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_head_demon_init (self);
+ };
+// };
/*QUAKED monster_dead_demon (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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/dog.qc
diff --git a/qc/monsters/dog.qc b/qc/monsters/dog.qc
index 8269691..054db84 100644
--- a/qc/monsters/dog.qc
+++ b/qc/monsters/dog.qc
@@ -3,6 +3,15 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float DOG_HEALTH = 25; // id1 25
+
+const vector DOG_HEAD_MINS = '-9.66 -11.89 -0.2';
+const vector DOG_HEAD_MAXS = '6.57 7.96 13.29';
+
+//======================================================================
// forward declarations
//======================================================================
@@ -38,11 +47,16 @@ 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() monster_dog_destroy;
+void(vector dir) monster_dog_destroy;
void() monster_dog_touch_jump;
void(entity e) monster_dog_init; // initialization
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() monster_dead_dog;
@@ -414,7 +428,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
//--------------------------------------------------------------
- void() monster_dog_destroy =
+ void(vector dir) monster_dog_destroy =
{
// check for gib
if (self.health < -35)
@@ -424,24 +438,21 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
// custom models -- dumptruck_ds
if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
+ throw_gib_1 (self, dir, self.health);
else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_3 (self, dir, self.health);
if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
+ throw_gib_2 (self, dir, self.health);
else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_3 (self, dir, self.health);
if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
+ throw_gib_3 (self, dir, self.health);
else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_3 (self, dir, self.health);
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_dog.mdl", self.health);
+ throw_gib_head_dog (self, dir, self.health);
base_item_drop_stuff (self);
return;
@@ -565,7 +576,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
if (!e.health)
//thanks RennyC -- dumptruck_ds
- e.health = 25;
+ e.health = DOG_HEALTH;
e.checkattack = monster_dog_checkattack;
e.sightsound = monster_dog_sightsound;
@@ -599,7 +610,63 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
// };
-/* Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds */
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// 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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/enforcer.qc
diff --git a/qc/monsters/enforcer.qc b/qc/monsters/enforcer.qc
index c2e8f20..89d7b3b 100644
--- a/qc/monsters/enforcer.qc
+++ b/qc/monsters/enforcer.qc
@@ -3,6 +3,15 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float ENFORCER_HEALTH = 80; // id1 80
+
+const vector ENFORCER_HEAD_MINS = '-10.63 -10.23 -0.05';
+const vector ENFORCER_HEAD_MAXS = '9.27 8.25 30';
+
+//======================================================================
// forward declarations
//======================================================================
@@ -64,10 +73,15 @@ void() enf_dief1; void() enf_dief2; void() enf_dief3; void() enf_dief4;
void() enf_dief5; void() enf_dief6; void() enf_dief7; void() enf_dief8;
void() enf_dief9; void() enf_dief10; void() enf_dief11;
void(entity attacker, float damage) monster_enforcer_pain; // interaction
-void() monster_enforcer_destroy;
+void(vector dir) monster_enforcer_destroy;
void(entity e) monster_enforcer_init; // initialization
void() monster_enforcer;
+// gib_head_enforcer
+void(entity act, vector dir, float dmg) throw_gib_head_enforcer;
+void(entity e) gib_head_enforcer_init;
+void() gib_head_enforcer;
+
// monster_dead_enforcer
void() monster_dead_enforcer;
@@ -794,38 +808,18 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
//--------------------------------------------------------------
// enf_die
//--------------------------------------------------------------
- void() monster_enforcer_destroy =
+ void(vector dir) monster_enforcer_destroy =
{
// check for gib
if (self.health < -35)
{
sound (self, CHAN_VOICE, "player/udeath.wav",
1, ATTN_NORM);
- // dumptruck_ds custom_mdls
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_mega.mdl", self.health);
-
- // throw_gib ("progs/gib1.mdl", self.health);
- // throw_gib ("progs/gib2.mdl", self.health);
- // throw_gib ("progs/gib3.mdl", self.health);
-
- // custom models -- dumptruck_ds
- if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
- else
- throw_gib ("progs/gib1.mdl", self.health);
- if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
- else
- throw_gib ("progs/gib2.mdl", self.health);
-
- if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
- else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_head_enforcer (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;
@@ -900,7 +894,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
if (!e.health)
// thanks RennyC -- dumptruck_ds
- e.health = 80;
+ e.health = ENFORCER_HEALTH;
e.sightsound = monster_enforcer_sightsound;
e.think_stand = enf_stand1;
@@ -953,9 +947,64 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
// };
-//======================================================================
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
-//======================================================================
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+/*QUAKED gib_head_enforcer (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_mega.mdl");
+}
+*/
+//----------------------------------------------------------------------
+// class gib_head_enforcer: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_enforcer =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_enforcer_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_head_enforcer_init =
+ {
+ e.classname = "gib_head_enforcer";
+ e.classtype = CT_GORE_HEAD_ENFORCER;
+
+ // 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_mega.mdl");
+ setmodel (e, "progs/h_mega.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, ENFORCER_HEAD_MINS,
+ ENFORCER_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_head_enforcer =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_head_enforcer_init (self);
+ };
+// };
/*QUAKED monster_dead_enforcer (0 0.5 0.8) (-16 -16 -24) (16 16 32) SOLID FACE_UP 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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/fish.qc
diff --git a/qc/monsters/fish.qc b/qc/monsters/fish.qc
index 3bab151..fad7015 100644
--- a/qc/monsters/fish.qc
+++ b/qc/monsters/fish.qc
@@ -3,6 +3,12 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float FISH_HEALTH = 25; // id1 25
+
+//======================================================================
// forward declarations
//======================================================================
@@ -38,7 +44,7 @@ void() fish_death15; void() fish_death16; void() fish_death17;
void() fish_death18; void() fish_death19; void() fish_death20;
void() fish_death21;
void(entity attacker, float damage) monster_fish_pain; // interaction
-void() monster_fish_destroy;
+void(vector dir) monster_fish_destroy;
void(entity e) monster_fish_init; // initialization
void() monster_fish;
@@ -296,7 +302,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
//--------------------------------------------------------------
// fish_die
//--------------------------------------------------------------
- void() monster_fish_destroy =
+ void(vector dir) monster_fish_destroy =
{
if (self.health < -35)
{
@@ -310,27 +316,26 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
// custom models -- dumptruck_ds
if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
+ throw_gib_1 (self, dir, self.health);
else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_3 (self, dir, self.health);
if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
+ throw_gib_2 (self, dir, self.health);
else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_3 (self, dir, self.health);
if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
+ throw_gib_3 (self, dir, self.health);
else
- throw_gib ("progs/gib3.mdl", self.health);
-
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_dog.mdl", self.health);
+ throw_gib_3 (self, dir, self.health);
base_item_drop_stuff (self);
- sub_remove ();
+
+ // no fish heads -- CEV
+ remove (self);
+ // self.think = sub_remove;
+ // self.nextthink = time + 0.1;
}
else
{
@@ -380,7 +385,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
if (!e.health)
// thanks RennyC -- dumptruck_ds
- e.health = 25;
+ e.health = FISH_HEALTH;
e.think_stand = fish_stand1;
e.think_walk = fish_walk1;
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/hknight.qc
diff --git a/qc/monsters/hknight.qc b/qc/monsters/hknight.qc
index 84102dd..dad8e9a 100644
--- a/qc/monsters/hknight.qc
+++ b/qc/monsters/hknight.qc
@@ -5,6 +5,15 @@
// hknight_type is now .animtype -- CEV
//======================================================================
+// constants
+//======================================================================
+
+const float HELL_KNIGHT_HEALTH = 250; // id1 250
+
+const vector HELL_KNIGHT_HEAD_MINS = '-7.9 -12.97 -0.63';
+const vector HELL_KNIGHT_HEAD_MAXS = '10.55 8.87 21.06';
+
+//======================================================================
// forward declarations
//======================================================================
@@ -79,10 +88,15 @@ void() hkn_dieb1; void() hkn_dieb2; void() hkn_dieb3; void() hkn_dieb4;
void() hkn_dieb5; void() hkn_dieb6; void() hkn_dieb7; void() hkn_dieb8;
void() hkn_dieb9;
void(entity attacker, float damage) monster_hell_knight_pain; // interaction
-void() monster_hell_knight_destroy;
+void(vector dir) monster_hell_knight_destroy;
void(entity e) monster_hell_knight_init;// initialization
void() monster_hell_knight;
+// gib_head_hell_knight
+void(entity act, vector dir, float dmg) throw_gib_head_hell_knight;
+void(entity e) gib_head_hell_knight_init;
+void() gib_head_hell_knight;
+
// monster_dead_hell_knight
void() monster_dead_hell_knight;
@@ -862,38 +876,18 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
//--------------------------------------------------------------
// hknight_die
//--------------------------------------------------------------
- void() monster_hell_knight_destroy =
+ void(vector dir) monster_hell_knight_destroy =
{
// check for gib
if (self.health < -40)
{
sound (self, CHAN_VOICE, "player/udeath.wav",
1, ATTN_NORM);
- // dumptruck_ds custom_mdls
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_hellkn.mdl", self.health);
-
- // throw_gib ("progs/gib1.mdl", self.health);
- // throw_gib ("progs/gib2.mdl", self.health);
- // throw_gib ("progs/gib3.mdl", self.health);
-
- // custom models -- dumptruck_ds
- if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
- else
- throw_gib ("progs/gib1.mdl", self.health);
-
- if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
- else
- throw_gib ("progs/gib2.mdl", self.health);
-
- if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
- else
- throw_gib ("progs/gib3.mdl", self.health);
+
+ throw_gib_head_hell_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;
@@ -967,7 +961,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
// thanks RennyC -- dumptruck_ds
if (!e.health)
- e.health = 250;
+ e.health = HELL_KNIGHT_HEALTH;
if (!e.proj_speed_mod)
e.proj_speed_mod = 1;
@@ -1014,7 +1008,63 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
// };
-/* Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds */
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+/*QUAKED gib_head_hell_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_hellkn.mdl");
+}*/
+//----------------------------------------------------------------------
+// class gib_head_hell_knight: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_hell_knight =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_hell_knight_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_head_hell_knight_init =
+ {
+ e.classname = "gib_head_hell_knight";
+ e.classtype = CT_GORE_HEAD_HELL_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_hellkn.mdl");
+ setmodel (e, "progs/h_hellkn.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, HELL_KNIGHT_HEAD_MINS,
+ HELL_KNIGHT_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_head_hell_knight =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_head_hell_knight_init (self);
+ };
+// };
/*QUAKED monster_dead_hell_knight (0 0.5 0.8) (-16 -16 -24) (16 16 32) 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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/knight.qc
diff --git a/qc/monsters/knight.qc b/qc/monsters/knight.qc
index 77418ea..ff4506e 100644
--- a/qc/monsters/knight.qc
+++ b/qc/monsters/knight.qc
@@ -3,6 +3,15 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float KNIGHT_HEALTH = 75; // id1 75
+
+const vector KNIGHT_HEAD_MINS = '-8.17 -7.47 -0.13';
+const vector KNIGHT_HEAD_MAXS = '8.36 6.5 30';
+
+//======================================================================
// forward declarations
//======================================================================
@@ -38,10 +47,15 @@ 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() monster_knight_destroy;
+void(vector dir) monster_knight_destroy;
void(entity e) monster_knight_init; // initialization
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() monster_dead_knight;
@@ -387,7 +401,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
//--------------------------------------------------------------
// knight_die
//--------------------------------------------------------------
- void() monster_knight_destroy =
+ void(vector dir) monster_knight_destroy =
{
// check for gib
if (self.health < -40)
@@ -395,31 +409,10 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
sound (self, CHAN_VOICE, "player/udeath.wav",
1, ATTN_NORM);
- // dumptruck_ds custom_mdls
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_knight.mdl", self.health);
-
- // ThrowGib ("progs/gib1.mdl", self.health);
- // ThrowGib ("progs/gib2.mdl", self.health);
- // ThrowGib ("progs/gib3.mdl", self.health);
-
- // custom models -- dumptruck_ds
- if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
- else
- throw_gib ("progs/gib1.mdl", self.health);
-
- if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
- else
- throw_gib ("progs/gib2.mdl", self.health);
-
- if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
- else
- throw_gib ("progs/gib3.mdl", self.health);
+ 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;
@@ -480,7 +473,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
if (!e.health)
// thanks RennyC -- dumptruck_ds
- e.health = 75;
+ e.health = KNIGHT_HEALTH;
e.sightsound = monster_knight_sightsound;
e.think_stand = kn_stand1;
@@ -511,7 +504,62 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
// };
-/* Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds */
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// 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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/ogre.qc
diff --git a/qc/monsters/ogre.qc b/qc/monsters/ogre.qc
index 788724f..994e313 100644
--- a/qc/monsters/ogre.qc
+++ b/qc/monsters/ogre.qc
@@ -10,6 +10,11 @@ const float MONSTER_FLAK_OGRE = 4;
const float FL_NOSELECT = 8192; // ignored by entity selector
const float OGRE_DEFAULT_ELEVATION = 30;// angle to fire at if enemy too far
+const float OGRE_HEALTH = 200; // id1 200
+
+const vector OGRE_HEAD_MINS = '-12.35 -15.7 -0.17';
+const vector OGRE_HEAD_MAXS = '10.67 13.88 30';
+
//======================================================================
// forward declarations
//======================================================================
@@ -70,7 +75,7 @@ void() ogre_bdie1; void() ogre_bdie2; void() ogre_bdie3; void() ogre_bdie4;
void() ogre_bdie5; void() ogre_bdie6; void() ogre_bdie7; void() ogre_bdie8;
void() ogre_bdie9; void() ogre_bdie10;
void(entity attacker, float damage) monster_ogre_pain; // interaction
-void() monster_ogre_destroy;
+void(vector dir) monster_ogre_destroy;
void(entity e) monster_ogre_init; // initialization
void() monster_ogre;
@@ -86,6 +91,11 @@ void() ogre_mm_t_seek7; void() ogre_mm_t_seek8; void() ogre_mm_t_seek9;
void(entity e) monster_ogre_marksman_init;// initialization
void() monster_ogre_marksman;
+// gib_head_ogre
+void(entity act, vector dir, float dmg) throw_gib_head_ogre;
+void(entity e) gib_head_ogre_init;
+void() gib_head_ogre;
+
// monster_dead_ogre
void() monster_dead_ogre;
@@ -838,7 +848,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
//--------------------------------------------------------------
// ogre_die
//--------------------------------------------------------------
- void() monster_ogre_destroy =
+ void(vector dir) monster_ogre_destroy =
{
// check for gib
if (self.health < -80)
@@ -846,31 +856,23 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
sound (self, CHAN_VOICE, "player/udeath.wav",
1, ATTN_NORM);
- // dumptruck_ds custom_mdls
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_ogre.mdl", self.health);
-
- // ThrowGib ("progs/gib3.mdl", self.health);
- // ThrowGib ("progs/gib3.mdl", self.health);
- // ThrowGib ("progs/gib3.mdl", self.health);
+ throw_gib_head_ogre (self, dir, self.health);
// custom models -- dumptruck_ds
if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
+ throw_gib_1 (self, dir, self.health);
else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_3 (self, dir, self.health);
if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
+ throw_gib_2 (self, dir, self.health);
else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_3 (self, dir, self.health);
if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
+ throw_gib_3 (self, dir, self.health);
else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_3 (self, dir, self.health);
base_item_drop_stuff (self);
return;
@@ -942,7 +944,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
// thanks RennyC -- dumptruck_ds
if (!e.health)
- e.health = 200;
+ e.health = OGRE_HEALTH;
e.checkattack = monster_ogre_checkattack;
e.sightsound = monster_ogre_sightsound;
@@ -1220,7 +1222,62 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
// };
-/* Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds */
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+/*QUAKED gib_head_ogre (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_ogre.mdl");
+}*/
+//----------------------------------------------------------------------
+// class gib_head_ogre: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_ogre =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_ogre_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_head_ogre_init =
+ {
+ e.classname = "gib_head_ogre";
+ e.classtype = CT_GORE_HEAD_OGRE;
+
+ // 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_ogre.mdl");
+ setmodel (e, "progs/h_ogre.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, OGRE_HEAD_MINS, OGRE_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_head_ogre =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_head_ogre_init (self);
+ };
+// };
/*QUAKED monster_dead_ogre (0 0.5 0.8) (-32 -32 -24) (32 32 64) 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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/oldone.qc
diff --git a/qc/monsters/oldone.qc b/qc/monsters/oldone.qc
index 2c5a1eb..4e596fa 100644
--- a/qc/monsters/oldone.qc
+++ b/qc/monsters/oldone.qc
@@ -7,7 +7,7 @@
//======================================================================
// monster_oldone
-void() monster_oldone_finale1; // endgame
+void(vector dir) monster_oldone_finale1;// endgame
void() monster_oldone_finale2;
void() monster_oldone_finale3;
void() monster_oldone_finale4;
@@ -31,7 +31,7 @@ void() old_thrash12; void() old_thrash13; void() old_thrash14;
void() old_thrash15; void() old_thrash16; void() old_thrash17;
void() old_thrash18; void() old_thrash19; void() old_thrash20;
void(entity attacker, float damage) monster_oldone_pain; // interaction
-void() monster_oldone_destroy;
+void(vector dir) monster_oldone_destroy;
void(entity e) monster_oldone_init;
void() monster_oldone;
@@ -63,7 +63,7 @@ $frame shake15 shake16 shake17 shake18 shake19 shake20
// class monster_oldone: base_walkmonster
// {
//--------------------------------------------------------------
- void() monster_oldone_finale1 =
+ void(vector dir) monster_oldone_finale1 =
{
local entity pos, pl;
local entity timer;
@@ -155,6 +155,7 @@ $frame shake15 shake16 shake17 shake18 shake19 shake20
{
// throw tons of meat chunks
local vector oldo;
+ local vector dir = '0 0 0';
local float x, y, z;
local float r;
local entity n;
@@ -178,14 +179,11 @@ $frame shake15 shake16 shake17 shake18 shake19 shake20
r = random ();
if (r < 0.3)
- throw_gib ("progs/gib1.mdl",
- -999);
+ throw_gib_1 (self, dir, -999);
else if (r < 0.6)
- throw_gib ("progs/gib2.mdl",
- -999);
+ throw_gib_2 (self, dir, -999);
else
- throw_gib ("progs/gib3.mdl",
- -999);
+ throw_gib_3 (self, dir, -999);
y = y + 32;
}
x = x + 32;
@@ -329,7 +327,7 @@ $frame shake15 shake16 shake17 shake18 shake19 shake20
// Deathmatch Dimension; Customised intermission message is
// handled in client.qc -- comment from DMD's QC source
//--------------------------------------------------------------
- void() monster_oldone_destroy =
+ void(vector dir) monster_oldone_destroy =
{
self.solid = SOLID_NOT;
killed_monsters = killed_monsters + 1;
@@ -368,14 +366,11 @@ $frame shake15 shake16 shake17 shake18 shake19 shake20
r = random ();
if (r < 0.3)
- throw_gib ("progs/gib1.mdl",
- gibpow);
+ throw_gib_1 (self, dir, gibpow);
else if (r < 0.6)
- throw_gib ("progs/gib2.mdl",
- gibpow);
+ throw_gib_2 (self, dir, gibpow);
else
- throw_gib ("progs/gib3.mdl",
- gibpow);
+ throw_gib_3 (self, dir, gibpow);
y = y + 32;
}
x = x + 32;
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/oldone2.qc
diff --git a/qc/monsters/oldone2.qc b/qc/monsters/oldone2.qc
index 4ccae12..5d1cba6 100644
--- a/qc/monsters/oldone2.qc
+++ b/qc/monsters/oldone2.qc
@@ -49,7 +49,9 @@ void() old2_twitch22; void() old2_twitch23; void() old2_twitch24;
void() old2_twitch25; void() old2_twitch26; void() old2_twitch27;
void() old2_twitch28;
void(entity attacker, float damage) monster_oldone2_pain; // interaction
-void() monster_oldone2_destroy;
+void() monster_oldone2_think_destroy;
+void(vector dir) monster_oldone2_destroy_twitch1;
+void(vector dir) monster_oldone2_destroy;
void(entity e) monster_oldone2_init; // initialization
void() monster_oldone2;
@@ -295,7 +297,7 @@ $frame shake15 shake16 shake17 shake18 shake19 shake20
void() old2_twitch25 = [$shake17, old2_twitch26] { };
void() old2_twitch26 = [$shake18, old2_twitch27] { };
void() old2_twitch27 = [$shake19, old2_twitch28] { };
- void() old2_twitch28 = [$shake20, monster_oldone2_destroy] { };
+ void() old2_twitch28 = [$shake20, monster_oldone2_think_destroy] { };
//==============================================================
// Interaction
@@ -317,9 +319,21 @@ $frame shake15 shake16 shake17 shake18 shake19 shake20
};
//--------------------------------------------------------------
+ void() monster_oldone2_think_destroy =
+ {
+ monster_oldone2_destroy ('0 0 0');
+ };
+
+ //--------------------------------------------------------------
+ void(vector dir) monster_oldone2_destroy_twitch1 =
+ {
+ old2_twitch1 ();
+ };
+
+ //--------------------------------------------------------------
// oldone2_die
//--------------------------------------------------------------
- void() monster_oldone2_destroy =
+ void(vector dir) monster_oldone2_destroy =
{
// 1998-07-30 Shub kill count fix by Maddes start
// Already done by FL_MONSTER
@@ -348,35 +362,11 @@ $frame shake15 shake16 shake17 shake18 shake19 shake20
r = random ();
if (r < 0.3)
- {
- // custom models -- dumptruck_ds
- if (self.mdl_gib1 != "")
- throw_gib(self.mdl_gib1,
- -120);
- else
- throw_gib("progs/gib1."
- "mdl", -120);
- }
+ throw_gib_1 (self, dir, -120);
else if (r < 0.6)
- {
- // custom models -- dumptruck_ds
- if (self.mdl_gib2 != "")
- throw_gib(self.mdl_gib2,
- -120);
- else
- throw_gib("progs/gib2."
- "mdl", -120);
- }
+ throw_gib_2 (self, dir, -120);
else
- {
- // custom models -- dumptruck_ds
- if (self.mdl_gib3 != "")
- throw_gib(self.mdl_gib3,
- -120);
- else
- throw_gib("progs/gib3."
- "mdl", -120);
- }
+ throw_gib_3 (self, dir, -120);
y = y + 32;
}
x = x + 32;
@@ -446,7 +436,7 @@ $frame shake15 shake16 shake17 shake18 shake19 shake20
e.sightsound = monster_oldone2_sightsound;
e.think_run = old2_atk1;
e.pain = monster_oldone2_pain;
- e.destroy = old2_twitch1;
+ e.destroy = monster_oldone2_destroy_twitch1;
e.think = old2_idle1;
e.nextthink = time + 0.1;
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/playerclient.qc
diff --git a/qc/monsters/playerclient.qc b/qc/monsters/playerclient.qc
index 9c7cbd6..b2d7d3c 100644
--- a/qc/monsters/playerclient.qc
+++ b/qc/monsters/playerclient.qc
@@ -3,8 +3,18 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float PLAYER_HEALTH = 100; // id1 100
+
+const vector PLAYER_HEAD_MINS = '-9.67 -12.38 -2.1';
+const vector PLAYER_HEAD_MAXS = '11.49 50.7 30';
+
+//======================================================================
// globals
//======================================================================
+
float modelindex_eyes;
float modelindex_player;
@@ -41,6 +51,16 @@ float modelindex_player;
.string deathtype; // keeps track of how the player died
+#ifdef SSQC
+// DP_INPUTBUTTONS (in qw we set 1 to equal 3 to match zquake/fuhquake/mvdsv)
+.float button3;
+.float button4;
+.float button5;
+.float button6;
+.float button7;
+.float button8;
+#endif
+
//======================================================================
// forward declarations
//======================================================================
@@ -121,7 +141,8 @@ void() player_postthink_powerups;
void() player_postthink;
float(entity to, float fl) player_sendentity; // object interaction
void(entity attacker, float damage) player_pain;
-void() player_destroy;
+void(vector dir) player_destroy_gib;
+void(vector dir) player_destroy;
void() player_touch;
entity() player_init_selectspawnpoint; // initialization
void() player_init_level_parms;
@@ -129,6 +150,11 @@ void() player_respawn;
void(entity e) player_init;
strip void() player;
+// gib_head_player
+void(entity act, vector dir, float dmg) throw_gib_head_player;
+void(entity e) gib_head_player_init;
+void() gib_head_player;
+
// player_dead_axe
void() player_dead_axe;
@@ -1880,6 +1906,9 @@ $frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
{
local float do_ladder_physics = FALSE;
+ if (self.button4)
+ dprint ("player_prethink: button4!\n");
+
// note that this code block is here, before the tests
// which check whether the player is dead, so that the
// player's gravity will be correctly updated even if
@@ -2295,9 +2324,36 @@ $frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
};
//--------------------------------------------------------------
+ // gib_player
+ //--------------------------------------------------------------
+ void(vector dir) player_destroy_gib =
+ {
+ throw_gib_head_player (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);
+
+ self.deadflag = DEAD_DEAD;
+
+ if (damage_attacker.classname == "teledeath")
+ sound (self, CHAN_VOICE, "player/teledth1.wav",
+ 1, ATTN_NONE);
+ else if (damage_attacker.classname == "teledeath2")
+ sound (self, CHAN_VOICE, "player/teledth1.wav",
+ 1, ATTN_NONE);
+ else
+ if (random() < 0.5)
+ sound (self, CHAN_VOICE, "player/gib.wav",
+ 1, ATTN_NONE);
+ else
+ sound (self, CHAN_VOICE, "player/udeath.wav",
+ 1, ATTN_NONE);
+ };
+
+ //--------------------------------------------------------------
// PlayerDie
//--------------------------------------------------------------
- void() player_destroy =
+ void(vector dir) player_destroy =
{
local float i;
@@ -2338,7 +2394,7 @@ $frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
if (self.health < -40)
{
- gib_player ();
+ player_destroy_gib (dir);
return;
}
@@ -2540,7 +2596,7 @@ $frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
e.classname = "player";
e.classtype = CT_PLAYER;
- e.health = 100;
+ e.health = PLAYER_HEALTH;
e.takedamage = DAMAGE_AIM;
e.solid = SOLID_SLIDEBOX;
// e.solid = SOLID_BBOX;
@@ -2649,123 +2705,66 @@ $frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
};
// };
-//==============================================================================
-//==============================================================================
-//==============================================================================
-//==============================================================================
-//==============================================================================
-//==============================================================================
-//==============================================================================
-//==============================================================================
-
-//==============================================================================
-// Player Gibs
-//==============================================================================
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-//----------------------------------------------------------------------
-vector(float dm) velocity_for_damage =
+/*QUAKED gib_head_player (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
{
- local vector v;
-
- v_x = 100 * crandom ();
- v_y = 100 * crandom ();
- v_z = 200 + 100 * random ();
-
- if (dm > -50)
- {
- // dprint ("level 1\n");
- v = v * 0.7;
- }
- else if (dm > -200)
- {
- // dprint ("level 3\n");
- v = v * 2;
- }
- else
- {
- v = v * 10;
- }
-
- return v;
-};
-
+model ("progs/h_player.mdl");
+}*/
//----------------------------------------------------------------------
-void(string gibname, float dm) throw_gib =
-{
- local entity new;
-
- new = spawn ();
- new.origin = self.origin;
- setmodel (new, gibname);
- setsize (new, '0 0 0', '0 0 0');
- new.velocity = velocity_for_damage (dm);
- new.movetype = MOVETYPE_BOUNCE;
- new.solid = SOLID_NOT;
- new.avelocity_x = random() * 600;
- new.avelocity_y = random() * 600;
- new.avelocity_z = random() * 600;
- new.think = sub_remove;
- new.ltime = time;
- new.nextthink = time + 10 + random() * 10;
- new.frame = 0;
- new.flags = 0;
-};
+// class gib_head_player: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_player =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_player_init);
+ };
-//----------------------------------------------------------------------
-void(string gibname, float dm) throw_head =
-{
- setmodel (self, gibname);
-
- // dumptruck_ds custom_mdl changes
- self.skin = self.skin_head;
- if !(self.skin_head)
- self.skin_head = 0;
- // end dumptruck_ds
-
- self.frame = 0;
- self.nextthink = -1;
- self.movetype = MOVETYPE_BOUNCE;
- self.takedamage = DAMAGE_NO;
- self.solid = SOLID_NOT;
- self.view_ofs = '0 0 8';
- setsize (self, '-16 -16 0', '16 16 56');
- self.velocity = velocity_for_damage (dm);
- self.origin_z = self.origin_z - 24;
- self.flags = self.flags - (self.flags & FL_ONGROUND);
- self.avelocity = crandom() * '0 600 0';
-};
+ //--------------------------------------------------------------
+ void(entity e) gib_head_player_init =
+ {
+ // don't reset class if passed a client entity -- CEV
+ if (!(e.flags & FL_CLIENT))
+ {
+ e.classname = "gib_head_player";
+ e.classtype = CT_GORE_HEAD_PLAYER;
+ }
-//----------------------------------------------------------------------
-void() gib_player =
-{
- throw_head ("progs/h_player.mdl", self.health);
- throw_gib ("progs/gib1.mdl", self.health);
- throw_gib ("progs/gib2.mdl", self.health);
- throw_gib ("progs/gib3.mdl", self.health);
+ // gib_init interprets spawnflags and will set .solid -- CEV
+ base_gib_head_init (e);
- self.deadflag = DEAD_DEAD;
+ if (e.mdl_head != "")
+ {
+ precache_model (e.mdl_head);
+ setmodel (e, e.mdl_head);
+ }
+ else
+ {
+ precache_model ("progs/h_player.mdl");
+ setmodel (e, "progs/h_player.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, PLAYER_HEAD_MINS, PLAYER_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
- if (damage_attacker.classname == "teledeath")
- {
- sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
- return;
- }
+ e.frame = 0;
+ };
- if (damage_attacker.classname == "teledeath2")
+ //--------------------------------------------------------------
+ void() gib_head_player =
{
- sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
- return;
- }
-
- if (random() < 0.5)
- sound (self, CHAN_VOICE, "player/gib.wav", 1, ATTN_NONE);
- else
- sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NONE);
-};
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
-//======================================================================
-// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
-//======================================================================
+ gib_head_player_init (self);
+ };
+// };
/*QUAKED player_dead_axe (0 0.5 0.8) (-16 -16 -24) (16 16 32) 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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/shalrath.qc
diff --git a/qc/monsters/shalrath.qc b/qc/monsters/shalrath.qc
index d980838..0b71961 100644
--- a/qc/monsters/shalrath.qc
+++ b/qc/monsters/shalrath.qc
@@ -3,6 +3,15 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float SHALRATH_HEALTH = 400; // id1 400
+
+const vector SHALRATH_HEAD_MINS = '-19.85 -19.09 -1.44';
+const vector SHALRATH_HEAD_MAXS = '13.72 16.8 30';
+
+//======================================================================
// forward declarations
//======================================================================
@@ -28,10 +37,15 @@ void() shal_pain5;
void() shal_death1; void() shal_death2; void() shal_death3; void() shal_death4;
void() shal_death5; void() shal_death6; void() shal_death7;
void(entity attacker, float damage) monster_shalrath_pain; // interaction
-void() monster_shalrath_destroy;
+void(vector dir) monster_shalrath_destroy;
void(entity e) monster_shalrath_init; // initialization
void() monster_shalrath;
+// gib_head_shalrath
+void(entity act, vector dir, float dmg) throw_gib_head_shalrath;
+void(entity e) gib_head_shalrath_init;
+void() gib_head_shalrath;
+
// monster_dead_shalrath
void() monster_dead_shalrath;
@@ -289,7 +303,7 @@ homing(float) : "Amount that the projectile should home in target. 1 is default,
//--------------------------------------------------------------
// shalrath_die
//--------------------------------------------------------------
- void() monster_shalrath_destroy =
+ void(vector dir) monster_shalrath_destroy =
{
// check for gib
if (self.health < -90)
@@ -297,31 +311,10 @@ homing(float) : "Amount that the projectile should home in target. 1 is default,
sound (self, CHAN_VOICE, "player/udeath.wav",
1, ATTN_NORM);
- // dumptruck_ds custom_mdls
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_shal.mdl", self.health);
-
- // throw_gib ("progs/gib1.mdl", self.health);
- // throw_gib ("progs/gib2.mdl", self.health);
- // throw_gib ("progs/gib3.mdl", self.health);
-
- // custom models -- dumptruck_ds
- if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
- else
- throw_gib ("progs/gib1.mdl", self.health);
-
- if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
- else
- throw_gib ("progs/gib2.mdl", self.health);
-
- if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
- else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_head_shalrath (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;
@@ -376,7 +369,7 @@ homing(float) : "Amount that the projectile should home in target. 1 is default,
if (!e.health)
// thanks RennyC -- dumptruck_ds
- e.health = 400;
+ e.health = SHALRATH_HEALTH;
if (!e.proj_speed_mod)
e.proj_speed_mod = 1;
@@ -422,9 +415,63 @@ homing(float) : "Amount that the projectile should home in target. 1 is default,
};
// };
-//----------------------------------------------------------------------
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+/*QUAKED gib_head_shalrath (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_shal.mdl");
+}*/
//----------------------------------------------------------------------
+// class gib_head_shalrath: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_shalrath =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_shalrath_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_head_shalrath_init =
+ {
+ e.classname = "gib_head_shalrath";
+ e.classtype = CT_GORE_HEAD_SHALRATH;
+
+ // 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_shal.mdl");
+ setmodel (e, "progs/h_shal.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, SHALRATH_HEAD_MINS,
+ SHALRATH_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_head_shalrath =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_head_shalrath_init (self);
+ };
+// };
/*QUAKED monster_dead_shalrath (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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/shambler.qc
diff --git a/qc/monsters/shambler.qc b/qc/monsters/shambler.qc
index ede17a7..9ec9846 100644
--- a/qc/monsters/shambler.qc
+++ b/qc/monsters/shambler.qc
@@ -3,6 +3,15 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float SHAMBLER_HEALTH = 600; // id1 600
+
+const vector SHAMBLER_HEAD_MINS = '-15.15 -20.638 -0.45';
+const vector SHAMBLER_HEAD_MAXS = '21.44 21.76 30';
+
+//======================================================================
// forward declarations
//======================================================================
@@ -67,10 +76,15 @@ void() sham_death1; void() sham_death2; void() sham_death3; void() sham_death4;
void() sham_death5; void() sham_death6; void() sham_death7; void() sham_death8;
void() sham_death9; void() sham_death10; void() sham_death11;
void(entity attacker, float damage) monster_shambler_pain; // interaction
-void() monster_shambler_destroy;
+void(vector dir) monster_shambler_destroy;
void(entity e) monster_shambler_init; // initialization
void() monster_shambler;
+// gib_head_shambler
+void(entity act, vector dir, float dmg) throw_gib_head_shambler;
+void(entity e) gib_head_shambler_init;
+void() gib_head_shambler;
+
// monster_dead_shambler
void() monster_dead_shambler;
@@ -831,7 +845,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
//--------------------------------------------------------------
// sham_die
//--------------------------------------------------------------
- void() monster_shambler_destroy =
+ void(vector dir) monster_shambler_destroy =
{
// check for gib
if (self.health < -60)
@@ -839,31 +853,10 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
sound (self, CHAN_VOICE, "player/udeath.wav",
1, ATTN_NORM);
- // dumptruck_ds custom_mdls
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_shams.mdl", self.health);
-
- // throw_gib ("progs/gib1.mdl", self.health);
- // throw_gib ("progs/gib2.mdl", self.health);
- // throw_gib ("progs/gib3.mdl", self.health);
-
- // custom models -- dumptruck_ds
- if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
- else
- throw_gib ("progs/gib1.mdl", self.health);
-
- if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
- else
- throw_gib ("progs/gib2.mdl", self.health);
-
- if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
- else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_head_shambler (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;
@@ -927,7 +920,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
if (!e.health)
// thanks RennyC -- dumptruck_ds
- e.health = 600;
+ e.health = SHAMBLER_HEALTH;
if (e.proj_speed_mod <= 0)
e.proj_speed_mod = 1;
@@ -976,7 +969,63 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
// };
-/* Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds */
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+/*QUAKED gib_head_shambler (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_shams.mdl");
+}*/
+//----------------------------------------------------------------------
+// class gib_head_shambler: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_shambler =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_shambler_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_head_shambler_init =
+ {
+ e.classname = "gib_head_shambler";
+ e.classtype = CT_GORE_HEAD_SHAMBLER;
+
+ // 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_shams.mdl");
+ setmodel (e, "progs/h_shams.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, SHAMBLER_HEAD_MINS,
+ SHAMBLER_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
+
+ e.frame = 0; // was 1, caused an error -- dumptruck_ds
+ };
+
+ //--------------------------------------------------------------
+ void() gib_head_shambler =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_head_shambler_init (self);
+ };
+// };
/*QUAKED monster_dead_shambler (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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/soldier.qc
diff --git a/qc/monsters/soldier.qc b/qc/monsters/soldier.qc
index 071ee3f..ef5911a 100644
--- a/qc/monsters/soldier.qc
+++ b/qc/monsters/soldier.qc
@@ -3,6 +3,15 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float ARMY_HEALTH = 30; // id1 30
+
+const vector ARMY_HEAD_MINS = '-9.67 -8.27 -0.28';
+const vector ARMY_HEAD_MAXS = '4.05 4.8 13.41';
+
+//======================================================================
// forward declarations
//======================================================================
@@ -11,7 +20,7 @@ float() monster_army_checkattack;
void() monster_army_sightsound;
void() monster_army_fire;
void(entity attacker, float damage) monster_army_pain;
-void() monster_army_destroy;
+void(vector dir) monster_army_destroy;
void() army_stand1; void() army_stand2; // animation & thinking
void() army_stand3; void() army_stand4; void() army_stand5;
void() army_stand6; void() army_stand7; void() army_stand8;
@@ -52,6 +61,11 @@ void() army_cdie9; void() army_cdie10; void() army_cdie11;
void(entity e) monster_army_init; // initialization
void() monster_army;
+// gib_head_army
+void(entity act, vector dir, float dmg) throw_gib_head_army;
+void(entity e) gib_head_army_init;
+void() gib_head_army;
+
// monster_dead_army
void() monster_dead_army;
@@ -368,7 +382,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
//--------------------------------------------------------------
- void() monster_army_destroy =
+ void(vector dir) monster_army_destroy =
{
// check for gib
if (self.health < -35)
@@ -376,31 +390,10 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
sound (self, CHAN_VOICE, "player/udeath.wav",
1, ATTN_NORM);
- if (self.mdl_head != "")
- // dumptruck_ds custom_mdls
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_guard.mdl", self.health);
-
- // throw_gib ("progs/gib1.mdl", self.health);
- // throw_gib ("progs/gib2.mdl", self.health);
- // throw_gib ("progs/gib3.mdl", self.health);
-
- if (self.mdl_gib1 != "")
- // custom models -- dumptruck_ds
- throw_gib (self.mdl_gib1, self.health);
- else
- throw_gib ("progs/gib1.mdl", self.health);
-
- if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
- else
- throw_gib ("progs/gib2.mdl", self.health);
-
- if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
- else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_head_army (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;
@@ -742,7 +735,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
if (!e.health)
// thanks RennyC -- dumptruck_ds
- e.health = 30;
+ e.health = ARMY_HEALTH;
e.think_stand = army_stand1;
e.think_walk = army_walk1;
@@ -781,7 +774,63 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
// };
-/* Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds */
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+/*QUAKED gib_head_army (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_guard.mdl");
+}
+*/
+//----------------------------------------------------------------------
+// class gib_head_army: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_army =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_army_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_head_army_init =
+ {
+ e.classname = "gib_head_army";
+ e.classtype = CT_GORE_HEAD_ARMY;
+
+ // 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_guard.mdl");
+ setmodel (e, "progs/h_guard.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, ARMY_HEAD_MINS, ARMY_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_head_army =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_head_army_init (self);
+ };
+// };
/*QUAKED monster_dead_army (0 0.5 0.8) (-16 -16 -24) (16 16 32) SOLID FACE_UP 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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/wizard.qc
diff --git a/qc/monsters/wizard.qc b/qc/monsters/wizard.qc
index 257679e..ebe1ca1 100644
--- a/qc/monsters/wizard.qc
+++ b/qc/monsters/wizard.qc
@@ -3,6 +3,15 @@
//==============================================================================
//======================================================================
+// constants
+//======================================================================
+
+const float WIZARD_HEALTH = 80; // id1 80
+
+const vector WIZARD_HEAD_MINS = '-10.41 -8.66 -0.54';
+const vector WIZARD_HEAD_MAXS = '6.52 10.82 30';
+
+//======================================================================
// forward declarations
//======================================================================
@@ -30,10 +39,15 @@ void() wiz_pain1; void() wiz_pain2; void() wiz_pain3; void() wiz_pain4;
void() wiz_death1; void() wiz_death2; void() wiz_death3; void() wiz_death4;
void() wiz_death5; void() wiz_death6; void() wiz_death7; void() wiz_death8;
void(entity attacker, float damage) monster_wizard_pain; // interaction
-void() monster_wizard_destroy;
+void(vector dir) monster_wizard_destroy;
void(entity e) monster_wizard_init; // initialization
void() monster_wizard;
+// gib_head_wizard
+void(entity act, vector dir, float dmg) throw_gib_head_wizard;
+void(entity e) gib_head_wizard_init;
+void() gib_head_wizard;
+
// monster_dead_wizard
void() monster_dead_wizard;
@@ -408,7 +422,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
//--------------------------------------------------------------
// wiz_die
//--------------------------------------------------------------
- void() monster_wizard_destroy =
+ void(vector dir) monster_wizard_destroy =
{
// check for gib
if (self.health < -40)
@@ -416,31 +430,23 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
sound (self, CHAN_VOICE, "player/udeath.wav",
1, ATTN_NORM);
- // dumptruck_ds custom_mdls
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- throw_head ("progs/h_wizard.mdl", self.health);
-
- // throw_gib ("progs/gib2.mdl", self.health);
- // throw_gib ("progs/gib2.mdl", self.health);
- // throw_gib ("progs/gib2.mdl", self.health);
+ throw_gib_head_wizard (self, dir, self.health);
// custom models -- dumptruck_ds
if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
+ throw_gib_1 (self, dir, self.health);
else
- throw_gib ("progs/gib2.mdl", self.health);
+ throw_gib_2 (self, dir, self.health);
if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
+ throw_gib_2 (self, dir, self.health);
else
- throw_gib ("progs/gib2.mdl", self.health);
+ throw_gib_2 (self, dir, self.health);
if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
+ throw_gib_3 (self, dir, self.health);
else
- throw_gib ("progs/gib2.mdl", self.health);
+ throw_gib_2 (self, dir, self.health);
base_item_drop_stuff (self);
return;
@@ -503,7 +509,7 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
if (!e.health)
// thanks RennyC -- dumptruck_ds
- e.health = 80;
+ e.health = WIZARD_HEALTH;
e.checkattack = monster_wizard_checkattack;
e.sightsound = monster_wizard_sightsound;
@@ -535,7 +541,63 @@ damage_mod(float) : "USE WITH CAUTION! Multiply all damage from this monster by
};
// };
-/* Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds */
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+/*QUAKED gib_head_wizard (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_wizard.mdl");
+}*/
+//----------------------------------------------------------------------
+// class gib_head_wizard: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_wizard =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_wizard_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_head_wizard_init =
+ {
+ e.classname = "gib_head_wizard";
+ e.classtype = CT_GORE_HEAD_WIZARD;
+
+ // 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_wizard.mdl");
+ setmodel (e, "progs/h_wizard.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, WIZARD_HEAD_MINS,
+ WIZARD_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_head_wizard =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_head_wizard_init (self);
+ };
+// };
/*QUAKED monster_dead_wizard (0 0.5 0.8) (-16 -16 -24) (16 16 32) 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
{
Return to the top of this page or return to the overview of this repo.
Diff qc/monsters/zombie.qc
diff --git a/qc/monsters/zombie.qc b/qc/monsters/zombie.qc
index 07549a7..f0af859 100644
--- a/qc/monsters/zombie.qc
+++ b/qc/monsters/zombie.qc
@@ -15,6 +15,11 @@ const float ZOMBIE_SPAWN_DEAD_CRUCIFIED = 4;
// const float ZOMBIE_SPAWN_DEAD_CRUCIFIED = 8; // from Zer src, for reference
const float ZOMBIE_SPAWN_SLEEPING = 16; // changed from 2 which was Zer default
+const float ZOMBIE_HEALTH = 61; // pd3 61
+
+const vector ZOMBIE_HEAD_MINS = '-16 -16 0'; // not exact size -- CEV
+const vector ZOMBIE_HEAD_MAXS = '16 16 56';
+
//======================================================================
// forward declarations
//======================================================================
@@ -98,13 +103,18 @@ void() zom_paine21; void() zom_paine22; void() zom_paine23; void() zom_paine24;
void() zom_paine25; void() zom_paine26; void() zom_paine27; void() zom_paine28;
void() zom_paine29; void() zom_paine30;
void(entity attacker, float take) monster_zombie_pain; // interaction
-void() monster_zombie_destroy;
+void(vector dir) monster_zombie_destroy;
void() monster_zombie_use;
void() monster_zombie_decide; // initialization
void() monster_zombie_start;
void(entity e) monster_zombie_init;
void() monster_zombie;
+// gib_head_zombie
+void(entity act, vector dir, float dmg) throw_gib_head_zombie;
+void(entity e) gib_head_zombie_init;
+void() gib_head_zombie;
+
//======================================================================
// frame macros
//======================================================================
@@ -838,9 +848,18 @@ spawnflags(Flags) =
// always reset health
self.health = 60;
if (take >= 60)
- monster_zombie_destroy ();
+ {
+ // work out knockback direction -- CEV
+ vector dir;
+ dir = self.origin - (attacker.absmin +
+ attacker.absmax) * 0.5;
+ dir = normalize (dir);
+ monster_zombie_destroy (dir);
+ }
else
+ {
return;
+ }
}
local float r;
@@ -903,37 +922,15 @@ spawnflags(Flags) =
//--------------------------------------------------------------
// zombie_die
//--------------------------------------------------------------
- void() monster_zombie_destroy =
+ void(vector dir) monster_zombie_destroy =
{
sound_death (self, CHAN_VOICE, "zombie/z_gib.wav",
1, ATTN_NORM);
- // dumptruck_ds custom_mdls
- if (self.mdl_head != "")
- throw_head (self.mdl_head, self.health);
- else
- // commented out dest -- dumptruck_ds
- throw_head ("progs/h_zombie.mdl", self.health);
-
- // throw_gib ("progs/gib1.mdl", self.health/*, self.dest*/);
- // throw_gib ("progs/gib2.mdl", self.health/*, self.dest*/);
- // throw_gib ("progs/gib3.mdl", self.health/*, self.dest*/);
-
- // custom models -- dumptruck_ds
- if (self.mdl_gib1 != "")
- throw_gib (self.mdl_gib1, self.health);
- else
- throw_gib ("progs/gib1.mdl", self.health);
-
- if (self.mdl_gib2 != "")
- throw_gib (self.mdl_gib2, self.health);
- else
- throw_gib ("progs/gib2.mdl", self.health);
-
- if (self.mdl_gib3 != "")
- throw_gib (self.mdl_gib3, self.health);
- else
- throw_gib ("progs/gib3.mdl", self.health);
+ throw_gib_head_zombie (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);
};
@@ -1056,7 +1053,7 @@ spawnflags(Flags) =
// setmodel (e, "progs/zombie.mdl");
setsize (e, '-16 -16 -24', '16 16 40');
- e.health = 61;
+ e.health = ZOMBIE_HEALTH;
if (e.spawnflags & ZOMBIE_SPAWN_CRUCIFIED)
{
@@ -1085,3 +1082,63 @@ spawnflags(Flags) =
monster_zombie_init (self);
};
// };
+
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+// Scenic Dead Monster Patch stuff here from DeadStuff mod -- dumptruck_ds
+//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+/*QUAKED gib_head_zombie (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_zombie.mdl");
+}
+*/
+//----------------------------------------------------------------------
+// class gib_head_zombie: base_gib_head
+// {
+ //--------------------------------------------------------------
+ // ThrowHead
+ //--------------------------------------------------------------
+ void(entity act, vector dir, float dmg) throw_gib_head_zombie =
+ {
+ base_gib_head_throw (act, dir, dmg, gib_head_zombie_init);
+ };
+
+ //--------------------------------------------------------------
+ void(entity e) gib_head_zombie_init =
+ {
+ e.classname = "gib_head_zombie";
+ e.classtype = CT_GORE_HEAD_ZOMBIE;
+
+ // 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_zombie.mdl");
+ setmodel (e, "progs/h_zombie.mdl");
+ if (e.solid == SOLID_BBOX)
+ setsize (e, ZOMBIE_HEAD_MINS, ZOMBIE_HEAD_MAXS);
+ else if (e.solid == SOLID_TRIGGER)
+ setsize (e, '-16 -16 0', '16 16 56');
+ }
+
+ e.frame = 0;
+ };
+
+ //--------------------------------------------------------------
+ void() gib_head_zombie =
+ {
+ // new spawnflags for all entities -- iw
+ if (SUB_Inhibit())
+ return;
+
+ gib_head_zombie_init (self);
+ };
+// };
+
+
Return to the top of this page or return to the overview of this repo.
Diff qc/pmove.qc
diff --git a/qc/pmove.qc b/qc/pmove.qc
index 7d499fa..c805085 100644
--- a/qc/pmove.qc
+++ b/qc/pmove.qc
@@ -279,9 +279,7 @@ void() PM_DanceMove =
// Borrowing FTEQW's pm_airstep cvar here. If false, don't step up
// while in the air (changes stairs) -- CEV
if (!(world_airstep) && !(self.pmove_flags & PMF_ONGROUND))
- {
self.pmove_flags &= ~PMF_SLIDE_STEP;
- }
// no stepping. useful for testing -- CEV
if (world_nostep)
@@ -299,18 +297,32 @@ void() PM_DanceMove =
if (trace_allsolid || trace_startsolid)
{
- // entity is trapped in a solid; attempt to nudge out
+ if (trace_ent.classgroup & CG_PROJECTILE)
+ {
+ // self is in a projectile; call its touch
+ // function (maybe it'll explode)
+ /*
+ #ifdef SSQC
+ dprint (sprintf("PM_DanceMove: in a solid %s\n",
+ trace_ent.classname));
+ #endif
+ PM_DoTouch (trace_ent);
+ */
+ continue;
+ }
+
+ // self is in something else; attempt to nudge out
if (PM_Nudge())
continue;
// nah, we're stuck. don't build up falling damage
// but allow sideways acceleration -- CEV
#if defined(CSQC)
- dprint ("PM_DanceMove: client ");
+ dprint ("PM_DanceMove: client player entity stuck ");
#elif defined(SSQC)
- dprint ("PM_DanceMove: server ");
+ dprint ("PM_DanceMove: server player entity stuck ");
#endif
- dprint ("entity trapped in a solid!\n");
+ dprint (sprintf("in a %s!\n", trace_ent.classname));
self.velocity_z = 0;
break;
}
Return to the top of this page or return to the overview of this repo.
Diff qc/projectiles/grenade.qc
diff --git a/qc/projectiles/grenade.qc b/qc/projectiles/grenade.qc
index 9adf549..cbbddf2 100644
--- a/qc/projectiles/grenade.qc
+++ b/qc/projectiles/grenade.qc
@@ -21,7 +21,7 @@ const vector GRENADE_MAXS = '8 8 8';
//======================================================================
// projectile_grenade
-void() projectile_grenade_destroy;
+void(vector dir) projectile_grenade_destroy;
void() projectile_grenade_think;
entity(entity src, vector org, vector vel) spawn_projectile_grenade;
void(entity e) projectile_grenade_init;
@@ -33,13 +33,13 @@ strip void() projectile_grenade;
// class projectile_grenade: base_projectile_qcphys
// {
//--------------------------------------------------------------
- void() projectile_grenade_destroy =
+ void(vector dir) projectile_grenade_destroy =
{
if (self.aflag & PROJECTILE_DESTROYED)
return;
self.aflag |= PROJECTILE_DESTROYED;
- self.destroy = sub_null;
+ self.destroy = sub_nulldestroy;
self.think = sub_null;
self.touch = sub_null;
projectile_grenade_think ();
Return to the top of this page or return to the overview of this repo.
Diff qc/projectiles/lavaball.qc
diff --git a/qc/projectiles/lavaball.qc b/qc/projectiles/lavaball.qc
index 1d5aa87..2c2befc 100644
--- a/qc/projectiles/lavaball.qc
+++ b/qc/projectiles/lavaball.qc
@@ -21,7 +21,7 @@ const vector LAVABALL_MAXS = '7 7 8';
//======================================================================
// projectile_lavaball
-void() projectile_lavaball_destroy;
+void(vector dir) projectile_lavaball_destroy;
entity(entity src, vector org, vector vel) spawn_projectile_lavaball;
void(entity e) projectile_lavaball_init;
strip void() projectile_lavaball;
@@ -32,13 +32,13 @@ strip void() projectile_lavaball;
// class projectile_lavaball: base_projectile_qcphys
// {
//--------------------------------------------------------------
- void() projectile_lavaball_destroy =
+ void(vector dir) projectile_lavaball_destroy =
{
if (self.aflag & PROJECTILE_DESTROYED)
return;
self.aflag |= PROJECTILE_DESTROYED;
- self.destroy = sub_null;
+ self.destroy = sub_nulldestroy;
self.think = sub_null;
self.touch = sub_null;
base_projectile_touch ();
Return to the top of this page or return to the overview of this repo.
Diff qc/projectiles/multigrenade.qc
diff --git a/qc/projectiles/multigrenade.qc b/qc/projectiles/multigrenade.qc
index d309b94..4a1567e 100644
--- a/qc/projectiles/multigrenade.qc
+++ b/qc/projectiles/multigrenade.qc
@@ -29,7 +29,7 @@ void(entity e) projectile_minigrenade_init;
strip void() projectile_minigrenade;
// projectile_multigrenade
-void() projectile_multigrenade_destroy;
+void(vector dir) projectile_multigrenade_destroy;
void(float offset_angle) projectile_multigrenade_fire;
void() projectile_multigrenade_think;
void() projectile_multigrenade_touch;
@@ -156,13 +156,13 @@ strip void() projectile_multigrenade;
// class projectile_multigrenade: base_doegrenade
// {
//--------------------------------------------------------------
- void() projectile_multigrenade_destroy =
+ void(vector dir) projectile_multigrenade_destroy =
{
if (self.aflag & PROJECTILE_DESTROYED)
return;
self.aflag |= PROJECTILE_DESTROYED;
- self.destroy = sub_null;
+ self.destroy = sub_nulldestroy;
self.think = sub_null;
self.touch = sub_null;
projectile_minigrenade_explode ();
Return to the top of this page or return to the overview of this repo.
Diff qc/projectiles/rocket.qc
diff --git a/qc/projectiles/rocket.qc b/qc/projectiles/rocket.qc
index 609be2b..48c5be2 100644
--- a/qc/projectiles/rocket.qc
+++ b/qc/projectiles/rocket.qc
@@ -21,7 +21,7 @@ const vector ROCKET_MAXS = '9 4 4';
//======================================================================
// projectile_rocket
-void() projectile_rocket_destroy;
+void(vector dir) projectile_rocket_destroy;
entity(entity src, vector org, vector vel, optional float projspeed)
spawn_projectile_rocket;
void(entity e) projectile_rocket_init;
@@ -33,13 +33,13 @@ strip void() projectile_rocket;
// class projectile_rocket: base_projectile_qcphys
// {
//--------------------------------------------------------------
- void() projectile_rocket_destroy =
+ void(vector dir) projectile_rocket_destroy =
{
if (self.aflag & PROJECTILE_DESTROYED)
return;
self.aflag |= PROJECTILE_DESTROYED;
- self.destroy = sub_null;
+ self.destroy = sub_nulldestroy;
self.think = sub_null;
self.touch = sub_null;
base_projectile_touch ();
Return to the top of this page or return to the overview of this repo.
Diff qc/projectiles/voreball.qc
diff --git a/qc/projectiles/voreball.qc b/qc/projectiles/voreball.qc
index 37df959..80d4fdf 100644
--- a/qc/projectiles/voreball.qc
+++ b/qc/projectiles/voreball.qc
@@ -19,7 +19,7 @@ const vector VOREBALL_MAXS = '16 16 16';
//======================================================================
// projectile_voreball
-void() projectile_voreball_destroy;
+void(vector dir) projectile_voreball_destroy;
void() projectile_voreball_touch;
entity(entity src, vector org, vector vel, float basespeed)
spawn_projectile_voreball;
@@ -32,13 +32,13 @@ strip void() projectile_voreball;
// class projectile_voreball: base_projectile_qcphys
// {
//--------------------------------------------------------------
- void() projectile_voreball_destroy =
+ void(vector dir) projectile_voreball_destroy =
{
if (self.aflag & PROJECTILE_DESTROYED)
return;
self.aflag |= PROJECTILE_DESTROYED;
- self.destroy = sub_null;
+ self.destroy = sub_nulldestroy;
self.think = sub_null;
self.touch = sub_null;
projectile_voreball_touch ();
@@ -52,12 +52,8 @@ strip void() projectile_voreball;
if (base_projectile_check_touch())
return;
- if (other)
- if (other.classtype == CT_MONSTER_ZOMBIE)
- t_damage2 (other, self, self,
- self.direct_damage);
- else
- other = world;
+ if (other.classtype == CT_MONSTER_ZOMBIE)
+ t_damage2 (other, self, self, self.direct_damage);
if (self.takedamage)
self.takedamage = DAMAGE_NO;
Return to the top of this page or return to the overview of this repo.
Diff qc/sv_progs.src
diff --git a/qc/sv_progs.src b/qc/sv_progs.src
index f44ad46..b067478 100644
--- a/qc/sv_progs.src
+++ b/qc/sv_progs.src
@@ -25,13 +25,13 @@ cshift.qc // background color shift controller
keylock.qc // common code for entities unlockable with keys
custom_snd.qc // mapper-settable sound FX for monsters - iw
custom_mdls.qc // mapper-settable models for monsters - iw
-gore.qc // spawnblood etc; TODO CEV need to reformat
//----------------------------------------------------------------------
// base classes
//----------------------------------------------------------------------
base_entities.qc // topmost entity classes (+ damage functions)
base_func.qc // base func_ classes
+base_gore.qc // spawnblood etc; TODO CEV need to reformat
base_item.qc // ammo, armor, health, weapons, etc.
base_monster.qc // base monster classes (+ monster AI)
base_proj.qc // projectiles
@@ -183,7 +183,6 @@ hazards/shooter.qc // was in misc.qc
misc/model.qc // Code by Joshua Skelton
misc/air_bubbles.qc // was in misc.qc -- CEV
misc/ambient_sound.qc // misc ambient_ entities w/add. by dumptruck_ds
-misc/deadstuff.qc // misc gore from DeadStuff mod
misc/explobox.qc // was in misc.qc -- CEV
misc/fireball.qc // was in misc.qc -- CEV
misc/infight.qc // was in misc.qc -- CEV
Return to the top of this page or return to the overview of this repo.
Diff qc/triggers/multiple.qc
diff --git a/qc/triggers/multiple.qc b/qc/triggers/multiple.qc
index 185e492..b9d420f 100644
--- a/qc/triggers/multiple.qc
+++ b/qc/triggers/multiple.qc
@@ -17,7 +17,7 @@ const float TRIGGER_MULTIPLE_TURNS_OFF = 2;
// base_multiple
void() base_multiple_think_wait;
void() base_multiple_fire;
-void() base_multiple_destroy;
+void(vector dir) base_multiple_destroy;
void() base_multiple_touch;
void() base_multiple_use;
void(entity e) base_multiple_init;
@@ -108,7 +108,7 @@ void() trigger_once;
//--------------------------------------------------------------
// multi_killed; dumptruck_ds
//--------------------------------------------------------------
- void() base_multiple_destroy =
+ void(vector dir) base_multiple_destroy =
{
// Supa, restore health and do nothing if we're still
// waiting to be activated
Return to the top of this page or return to the overview of this repo.