Compare commits
No commits in common. "f48bed0dc8a99040ec67f5c423cd6059e911a660" and "cee2b4b67a84172e0f69607af1a165819fed33a4" have entirely different histories.
f48bed0dc8
...
cee2b4b67a
|
@ -23,8 +23,6 @@ s = IO.popen 'expand', mode: "r+" do |io| pipe_in_out io, s end
|
||||||
s = IO.popen style_args, mode: "r+" do |io| pipe_in_out io, s end
|
s = IO.popen style_args, mode: "r+" do |io| pipe_in_out io, s end
|
||||||
s = s.gsub /\b(\w+) \(/, '\1('
|
s = s.gsub /\b(\w+) \(/, '\1('
|
||||||
s = s.gsub /\(\s*(.*)\s*\)/, '(\1)'
|
s = s.gsub /\(\s*(.*)\s*\)/, '(\1)'
|
||||||
s = s.gsub /local /, ''
|
|
||||||
s = s.gsub /\n\n\n/, "\n\n"
|
|
||||||
s = IO.popen 'unexpand', mode: "r+" do |io| pipe_in_out io, s end
|
s = IO.popen 'unexpand', mode: "r+" do |io| pipe_in_out io, s end
|
||||||
30.times do s = s.gsub(/ /, ' ') end
|
30.times do s = s.gsub(/ /, ' ') end
|
||||||
puts s
|
puts s
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
VARIADIC_ARGS = true
|
VARIADIC_ARGS = true
|
||||||
|
|
||||||
[warnings]
|
[warnings]
|
||||||
ALL = true
|
ALL = true
|
||||||
ASSIGN_FUNCTION_TYPES = false
|
ASSIGN_FUNCTION_TYPES = false
|
||||||
USED_UNINITIALIZED = false
|
USED_UNINITIALIZED = false
|
||||||
|
|
||||||
[optimizations]
|
[optimizations]
|
||||||
PEEPHOLE = true
|
PEEPHOLE = true
|
||||||
|
|
20
progs.src
20
progs.src
|
@ -1,23 +1,21 @@
|
||||||
progs.dat
|
progs.dat
|
||||||
|
|
||||||
source/defs.qc
|
source/defs.qc
|
||||||
|
|
||||||
source/fight.qc
|
|
||||||
source/subs.qc
|
source/subs.qc
|
||||||
|
source/fight.qc
|
||||||
source/ai.qc
|
source/ai.qc
|
||||||
source/buttons.qc
|
|
||||||
source/client.qc
|
|
||||||
source/combat.qc
|
source/combat.qc
|
||||||
source/doors.qc
|
|
||||||
source/items.qc
|
source/items.qc
|
||||||
source/misc.qc
|
|
||||||
source/monsters.qc
|
|
||||||
source/plats.qc
|
|
||||||
source/player.qc
|
|
||||||
source/triggers.qc
|
|
||||||
source/weapons.qc
|
source/weapons.qc
|
||||||
source/world.qc
|
source/world.qc
|
||||||
|
source/client.qc
|
||||||
|
source/player.qc
|
||||||
|
source/monsters.qc
|
||||||
|
source/doors.qc
|
||||||
|
source/buttons.qc
|
||||||
|
source/triggers.qc
|
||||||
|
source/plats.qc
|
||||||
|
source/misc.qc
|
||||||
|
|
||||||
source/ogre.qc
|
source/ogre.qc
|
||||||
source/demon.qc
|
source/demon.qc
|
||||||
|
|
77
source/ai.qc
77
source/ai.qc
|
@ -1,10 +1,38 @@
|
||||||
// ai.qc: monster AI functions
|
/*
|
||||||
|
|
||||||
|
.enemy
|
||||||
|
Will be world if not currently angry at anyone.
|
||||||
|
|
||||||
|
.movetarget
|
||||||
|
The next path spot to walk toward. If .enemy, ignore .movetarget.
|
||||||
|
When an enemy is killed, the monster will try to return to it's path.
|
||||||
|
|
||||||
|
.huntt_ime
|
||||||
|
Set to time + something when the player is in sight, but movement straight for
|
||||||
|
him is blocked. This causes the monster to use wall following code for
|
||||||
|
movement direction instead of sighting on the player.
|
||||||
|
|
||||||
|
.ideal_yaw
|
||||||
|
A yaw angle of the intended direction, which will be turned towards at up
|
||||||
|
to 45 deg / state. If the enemy is in view and hunt_time is not active,
|
||||||
|
this will be the exact line towards the enemy.
|
||||||
|
|
||||||
|
.pausetime
|
||||||
|
A monster will leave it's stand state and head towards it's .movetarget when
|
||||||
|
time > .pausetime.
|
||||||
|
|
||||||
|
walkmove(angle, speed) primitive is all or nothing
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// when a monster becomes angry at a player, that monster will be used
|
// when a monster becomes angry at a player, that monster will be used
|
||||||
// as the sight target the next frame so that monsters near that one
|
// as the sight target the next frame so that monsters near that one
|
||||||
// will wake up even if they wouldn't have noticed the player
|
// will wake up even if they wouldn't have noticed the player
|
||||||
//
|
//
|
||||||
|
entity sight_entity;
|
||||||
|
float sight_entity_time;
|
||||||
|
|
||||||
float(float v) anglemod = {
|
float(float v) anglemod = {
|
||||||
while(v >= 360) {
|
while(v >= 360) {
|
||||||
v = v - 360;
|
v = v - 360;
|
||||||
|
@ -34,6 +62,7 @@ The number of seconds to spend standing or bowing for path_stand or path_bow
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
void() movetarget_f = {
|
void() movetarget_f = {
|
||||||
if(!self.targetname) {
|
if(!self.targetname) {
|
||||||
objerror("monster_movetarget: no targetname");
|
objerror("monster_movetarget: no targetname");
|
||||||
|
@ -52,6 +81,7 @@ void() path_corner = {
|
||||||
movetarget_f();
|
movetarget_f();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
t_movetarget
|
t_movetarget
|
||||||
|
@ -61,7 +91,7 @@ moving towards it, change the next destination and continue.
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
void() t_movetarget = {
|
void() t_movetarget = {
|
||||||
entity temp;
|
local entity temp;
|
||||||
|
|
||||||
if(other.movetarget != self) {
|
if(other.movetarget != self) {
|
||||||
return;
|
return;
|
||||||
|
@ -90,6 +120,7 @@ void() t_movetarget = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -104,8 +135,8 @@ returns the range catagorization of an entity reletive to self
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
float(entity targ) range = {
|
float(entity targ) range = {
|
||||||
vector spot1, spot2;
|
local vector spot1, spot2;
|
||||||
float r;
|
local float r;
|
||||||
spot1 = self.origin + self.view_ofs;
|
spot1 = self.origin + self.view_ofs;
|
||||||
spot2 = targ.origin + targ.view_ofs;
|
spot2 = targ.origin + targ.view_ofs;
|
||||||
|
|
||||||
|
@ -130,7 +161,7 @@ returns 1 if the entity is visible to self, even if not infront()
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
float(entity targ) visible = {
|
float(entity targ) visible = {
|
||||||
vector spot1, spot2;
|
local vector spot1, spot2;
|
||||||
|
|
||||||
spot1 = self.origin + self.view_ofs;
|
spot1 = self.origin + self.view_ofs;
|
||||||
spot2 = targ.origin + targ.view_ofs;
|
spot2 = targ.origin + targ.view_ofs;
|
||||||
|
@ -146,6 +177,7 @@ float(entity targ) visible = {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
infront
|
infront
|
||||||
|
@ -154,8 +186,8 @@ returns 1 if the entity is in front(in sight) of self
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
float(entity targ) infront = {
|
float(entity targ) infront = {
|
||||||
vector vec;
|
local vector vec;
|
||||||
float dot;
|
local float dot;
|
||||||
|
|
||||||
makevectors(self.angles);
|
makevectors(self.angles);
|
||||||
vec = normalize(targ.origin - self.origin);
|
vec = normalize(targ.origin - self.origin);
|
||||||
|
@ -167,6 +199,7 @@ float(entity targ) infront = {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void() HuntTarget = {
|
void() HuntTarget = {
|
||||||
|
@ -178,7 +211,7 @@ void() HuntTarget = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() SightSound = {
|
void() SightSound = {
|
||||||
float rsnd;
|
local float rsnd;
|
||||||
|
|
||||||
if(self.classname == "monster_ogre") {
|
if(self.classname == "monster_ogre") {
|
||||||
sound(self, CHAN_VOICE, "ogre/ogwake.wav", 1, ATTN_NORM);
|
sound(self, CHAN_VOICE, "ogre/ogwake.wav", 1, ATTN_NORM);
|
||||||
|
@ -249,8 +282,8 @@ slower noticing monsters.
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
float() FindTarget = {
|
float() FindTarget = {
|
||||||
entity client;
|
local entity client;
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
// if the first spawnflag bit is set, the monster will only wake up on
|
// if the first spawnflag bit is set, the monster will only wake up on
|
||||||
// really seeing the player, not another monster getting angry
|
// really seeing the player, not another monster getting angry
|
||||||
|
@ -317,6 +350,7 @@ float() FindTarget = {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
void(float dist) ai_forward = {
|
void(float dist) ai_forward = {
|
||||||
|
@ -327,6 +361,7 @@ void(float dist) ai_back = {
|
||||||
walkmove((self.angles_y + 180), dist);
|
walkmove((self.angles_y + 180), dist);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
ai_pain
|
ai_pain
|
||||||
|
@ -337,7 +372,7 @@ stagger back a bit
|
||||||
void(float dist) ai_pain = {
|
void(float dist) ai_pain = {
|
||||||
ai_back(dist);
|
ai_back(dist);
|
||||||
/*
|
/*
|
||||||
float away;
|
local float away;
|
||||||
|
|
||||||
away = anglemod(vectoyaw(self.origin - self.enemy.origin)
|
away = anglemod(vectoyaw(self.origin - self.enemy.origin)
|
||||||
+ 180*(random()- 0.5) );
|
+ 180*(random()- 0.5) );
|
||||||
|
@ -365,7 +400,7 @@ The monster is walking it's beat
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void(float dist) ai_walk = {
|
void(float dist) ai_walk = {
|
||||||
vector mtemp;
|
local vector mtemp;
|
||||||
|
|
||||||
movedist = dist;
|
movedist = dist;
|
||||||
|
|
||||||
|
@ -381,6 +416,7 @@ void(float dist) ai_walk = {
|
||||||
movetogoal(dist);
|
movetogoal(dist);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
ai_stand
|
ai_stand
|
||||||
|
@ -425,7 +461,7 @@ ChooseTurn
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void(vector dest3) ChooseTurn = {
|
void(vector dest3) ChooseTurn = {
|
||||||
vector dir, newdir;
|
local vector dir, newdir;
|
||||||
|
|
||||||
dir = self.origin - dest3;
|
dir = self.origin - dest3;
|
||||||
|
|
||||||
|
@ -452,7 +488,7 @@ FacingIdeal
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
float() FacingIdeal = {
|
float() FacingIdeal = {
|
||||||
float delta;
|
local float delta;
|
||||||
|
|
||||||
delta = anglemod(self.angles_y - self.ideal_yaw);
|
delta = anglemod(self.angles_y - self.ideal_yaw);
|
||||||
if(delta > 45 && delta < 315) {
|
if(delta > 45 && delta < 315) {
|
||||||
|
@ -461,6 +497,7 @@ float() FacingIdeal = {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
float() CheckAnyAttack = {
|
float() CheckAnyAttack = {
|
||||||
|
@ -488,6 +525,7 @@ float() CheckAnyAttack = {
|
||||||
return CheckAttack();
|
return CheckAttack();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
ai_run_melee
|
ai_run_melee
|
||||||
|
@ -505,6 +543,7 @@ void() ai_run_melee = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
ai_run_missile
|
ai_run_missile
|
||||||
|
@ -521,6 +560,7 @@ void() ai_run_missile = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
ai_run_slide
|
ai_run_slide
|
||||||
|
@ -529,7 +569,7 @@ Strafe sideways, but stay at aproximately the same range
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void() ai_run_slide = {
|
void() ai_run_slide = {
|
||||||
float ofs;
|
local float ofs;
|
||||||
|
|
||||||
self.ideal_yaw = enemy_yaw;
|
self.ideal_yaw = enemy_yaw;
|
||||||
ChangeYaw();
|
ChangeYaw();
|
||||||
|
@ -548,6 +588,7 @@ void() ai_run_slide = {
|
||||||
walkmove(self.ideal_yaw - ofs, movedist);
|
walkmove(self.ideal_yaw - ofs, movedist);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
ai_run
|
ai_run
|
||||||
|
@ -556,9 +597,9 @@ The monster has an enemy it is trying to kill
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void(float dist) ai_run = {
|
void(float dist) ai_run = {
|
||||||
vector delta;
|
local vector delta;
|
||||||
float axis;
|
local float axis;
|
||||||
float direct, ang_rint, ang_floor, ang_ceil;
|
local float direct, ang_rint, ang_floor, ang_ceil;
|
||||||
|
|
||||||
movedist = dist;
|
movedist = dist;
|
||||||
// see if the enemy is dead
|
// see if the enemy is dead
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
// boss.qc: Chthon, boss of E1
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
BOSS-ONE
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
$cd id1 / models / boss1
|
$cd id1 / models / boss1
|
||||||
$origin 0 0 - 15
|
$origin 0 0 - 15
|
||||||
$base base
|
$base base
|
||||||
|
@ -29,6 +34,7 @@ $frame shockb1 shockb2 shockb3 shockb4 shockb5 shockb6
|
||||||
$frame shockc1 shockc2 shockc3 shockc4 shockc5 shockc6 shockc7 shockc8
|
$frame shockc1 shockc2 shockc3 shockc4 shockc5 shockc6 shockc7 shockc8
|
||||||
$frame shockc9 shockc10
|
$frame shockc9 shockc10
|
||||||
|
|
||||||
|
|
||||||
void() boss_face = {
|
void() boss_face = {
|
||||||
|
|
||||||
// go for another player if multi player
|
// go for another player if multi player
|
||||||
|
@ -181,9 +187,9 @@ void() boss_death10 = [$death9, boss_death10] {
|
||||||
};
|
};
|
||||||
|
|
||||||
void(vector p) boss_missile = {
|
void(vector p) boss_missile = {
|
||||||
vector offang;
|
local vector offang;
|
||||||
vector org, vec, d;
|
local vector org, vec, d;
|
||||||
float t;
|
local float t;
|
||||||
|
|
||||||
offang = vectoangles(self.enemy.origin - self.origin);
|
offang = vectoangles(self.enemy.origin - self.origin);
|
||||||
makevectors(offang);
|
makevectors(offang);
|
||||||
|
@ -216,6 +222,7 @@ void(vector p) boss_missile = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() boss_awake = {
|
void() boss_awake = {
|
||||||
self.solid = SOLID_SLIDEBOX;
|
self.solid = SOLID_SLIDEBOX;
|
||||||
self.movetype = MOVETYPE_STEP;
|
self.movetype = MOVETYPE_STEP;
|
||||||
|
@ -242,6 +249,7 @@ void() boss_awake = {
|
||||||
boss_rise1();
|
boss_rise1();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_boss(1 0 0) (-128 -128 -24) (128 128 256)
|
/*QUAKED monster_boss(1 0 0) (-128 -128 -24) (128 128 256)
|
||||||
*/
|
*/
|
||||||
void() monster_boss = {
|
void() monster_boss = {
|
||||||
|
@ -267,8 +275,11 @@ void() monster_boss = {
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
|
entity le1, le2;
|
||||||
|
float lightning_end;
|
||||||
|
|
||||||
void() lightning_fire = {
|
void() lightning_fire = {
|
||||||
vector p1, p2;
|
local vector p1, p2;
|
||||||
|
|
||||||
if(time >= lightning_end) {
|
if(time >= lightning_end) {
|
||||||
// done here, put the terminals back up
|
// done here, put the terminals back up
|
||||||
|
@ -315,8 +326,8 @@ void() lightning_use = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if((le1.state != STATE_TOP && le1.state != STATE_BOTTOM)
|
if((le1.state != STATE_TOP && le1.state != STATE_BOTTOM)
|
||||||
|| (le2.state != STATE_TOP && le2.state != STATE_BOTTOM)
|
|| (le2.state != STATE_TOP && le2.state != STATE_BOTTOM)
|
||||||
|| (le1.state != le2.state)) {
|
|| (le1.state != le2.state)) {
|
||||||
// dprint("not aligned\n");
|
// dprint("not aligned\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -348,6 +359,7 @@ void() lightning_use = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED event_lightning(0 1 1) (-16 -16 -16) (16 16 16)
|
/*QUAKED event_lightning(0 1 1) (-16 -16 -16) (16 16 16)
|
||||||
Just for boss level.
|
Just for boss level.
|
||||||
*/
|
*/
|
||||||
|
@ -355,3 +367,4 @@ void() event_lightning = {
|
||||||
self.use = lightning_use;
|
self.use = lightning_use;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// buttons.qc: button and multiple button
|
// button and multiple button
|
||||||
|
|
||||||
void() button_wait = {
|
void() button_wait = {
|
||||||
self.state = STATE_TOP;
|
self.state = STATE_TOP;
|
||||||
|
@ -22,10 +22,12 @@ void() button_return = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() button_blocked = {
|
void() button_blocked = {
|
||||||
// do nothing, just don't ome all the way back out
|
// do nothing, just don't ome all the way back out
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() button_fire = {
|
void() button_fire = {
|
||||||
if(self.state == STATE_UP || self.state == STATE_TOP) {
|
if(self.state == STATE_UP || self.state == STATE_TOP) {
|
||||||
return;
|
return;
|
||||||
|
@ -37,6 +39,7 @@ void() button_fire = {
|
||||||
SUB_CalcMove(self.pos2, self.speed, button_wait);
|
SUB_CalcMove(self.pos2, self.speed, button_wait);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() button_use = {
|
void() button_use = {
|
||||||
self.enemy = activator;
|
self.enemy = activator;
|
||||||
button_fire();
|
button_fire();
|
||||||
|
@ -57,6 +60,7 @@ void() button_killed = {
|
||||||
button_fire();
|
button_fire();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED func_button(0 .5 .8) ?
|
/*QUAKED func_button(0 .5 .8) ?
|
||||||
When a button is touched, it moves some distance in the direction of it's angle, triggers all of it's targets, waits some time, then returns to it's original position where it can be triggered again.
|
When a button is touched, it moves some distance in the direction of it's angle, triggers all of it's targets, waits some time, then returns to it's original position where it can be triggered again.
|
||||||
|
|
||||||
|
@ -73,7 +77,7 @@ When a button is touched, it moves some distance in the direction of it's angle,
|
||||||
3) in-out
|
3) in-out
|
||||||
*/
|
*/
|
||||||
void() func_button = {
|
void() func_button = {
|
||||||
float gtemp, ftemp;
|
local float gtemp, ftemp;
|
||||||
|
|
||||||
if(self.sounds == 0) {
|
if(self.sounds == 0) {
|
||||||
precache_sound("buttons/airbut1.wav");
|
precache_sound("buttons/airbut1.wav");
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
// client.qc: player-adjacent functions
|
float modelindex_eyes, modelindex_player;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============================================================================
|
=============================================================================
|
||||||
|
|
||||||
LEVEL CHANGING / INTERMISSION
|
LEVEL CHANGING / INTERMISSION
|
||||||
|
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
float intermission_running;
|
||||||
|
float intermission_exittime;
|
||||||
|
|
||||||
/*QUAKED info_intermission(1 0.5 0.5) (-16 -16 -16) (16 16 16)
|
/*QUAKED info_intermission(1 0.5 0.5) (-16 -16 -16) (16 16 16)
|
||||||
This is the camera point for the intermission.
|
This is the camera point for the intermission.
|
||||||
Use mangle instead of angle, so you can set pitch or roll as well as yaw. 'pitch roll yaw'
|
Use mangle instead of angle, so you can set pitch or roll as well as yaw. 'pitch roll yaw'
|
||||||
|
@ -84,8 +87,8 @@ Returns the entity to view from
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
entity() FindIntermission = {
|
entity() FindIntermission = {
|
||||||
entity spot;
|
local entity spot;
|
||||||
float cyc;
|
local float cyc;
|
||||||
|
|
||||||
// look for info_intermission first
|
// look for info_intermission first
|
||||||
spot = find(world, classname, "info_intermission");
|
spot = find(world, classname, "info_intermission");
|
||||||
|
@ -117,6 +120,8 @@ entity() FindIntermission = {
|
||||||
objerror("FindIntermission: no spot");
|
objerror("FindIntermission: no spot");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
string nextmap;
|
||||||
void() GotoNextMap = {
|
void() GotoNextMap = {
|
||||||
if(cvar("samelevel")) { // if samelevel is set, stay on same level
|
if(cvar("samelevel")) { // if samelevel is set, stay on same level
|
||||||
changelevel(mapname);
|
changelevel(mapname);
|
||||||
|
@ -125,6 +130,7 @@ void() GotoNextMap = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() ExitIntermission = {
|
void() ExitIntermission = {
|
||||||
// skip any text in deathmatch
|
// skip any text in deathmatch
|
||||||
if(deathmatch) {
|
if(deathmatch) {
|
||||||
|
@ -212,7 +218,7 @@ void() IntermissionThink = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() execute_changelevel = {
|
void() execute_changelevel = {
|
||||||
entity pos;
|
local entity pos;
|
||||||
|
|
||||||
intermission_running = 1;
|
intermission_running = 1;
|
||||||
|
|
||||||
|
@ -246,8 +252,9 @@ void() execute_changelevel = {
|
||||||
WriteByte(MSG_ALL, SVC_INTERMISSION);
|
WriteByte(MSG_ALL, SVC_INTERMISSION);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() changelevel_touch = {
|
void() changelevel_touch = {
|
||||||
entity pos;
|
local entity pos;
|
||||||
|
|
||||||
if(other.classname != "player") {
|
if(other.classname != "player") {
|
||||||
return;
|
return;
|
||||||
|
@ -293,6 +300,7 @@ void() trigger_changelevel = {
|
||||||
self.touch = changelevel_touch;
|
self.touch = changelevel_touch;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============================================================================
|
=============================================================================
|
||||||
|
|
||||||
|
@ -323,6 +331,7 @@ void() respawn = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
============
|
============
|
||||||
ClientKill
|
ClientKill
|
||||||
|
@ -351,9 +360,9 @@ Returns the entity to spawn at
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
entity() SelectSpawnPoint = {
|
entity() SelectSpawnPoint = {
|
||||||
entity spot;
|
local entity spot;
|
||||||
entity thing;
|
local entity thing;
|
||||||
float pcount;
|
local float pcount;
|
||||||
|
|
||||||
// testinfo_player_start is only found in regioned levels
|
// testinfo_player_start is only found in regioned levels
|
||||||
spot = find(world, classname, "testplayerstart");
|
spot = find(world, classname, "testplayerstart");
|
||||||
|
@ -418,7 +427,7 @@ called each time a player is spawned
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void() PutClientInServer = {
|
void() PutClientInServer = {
|
||||||
entity spot;
|
local entity spot;
|
||||||
|
|
||||||
spot = SelectSpawnPoint();
|
spot = SelectSpawnPoint();
|
||||||
|
|
||||||
|
@ -478,6 +487,7 @@ void() PutClientInServer = {
|
||||||
spawn_tdeath(self.origin, self);
|
spawn_tdeath(self.origin, self);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============================================================================
|
=============================================================================
|
||||||
|
|
||||||
|
@ -486,18 +496,21 @@ void() PutClientInServer = {
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED info_player_start(1 0 0) (-16 -16 -24) (16 16 24)
|
/*QUAKED info_player_start(1 0 0) (-16 -16 -24) (16 16 24)
|
||||||
The normal starting point for a level.
|
The normal starting point for a level.
|
||||||
*/
|
*/
|
||||||
void() info_player_start = {
|
void() info_player_start = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED info_player_start2(1 0 0) (-16 -16 -24) (16 16 24)
|
/*QUAKED info_player_start2(1 0 0) (-16 -16 -24) (16 16 24)
|
||||||
Only used on start map for the return point from an episode.
|
Only used on start map for the return point from an episode.
|
||||||
*/
|
*/
|
||||||
void() info_player_start2 = {
|
void() info_player_start2 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
saved out by quaked in region mode
|
saved out by quaked in region mode
|
||||||
*/
|
*/
|
||||||
|
@ -529,7 +542,7 @@ go to the next level for deathmatch
|
||||||
only called if a time or frag limit has expired
|
only called if a time or frag limit has expired
|
||||||
*/
|
*/
|
||||||
void() NextLevel = {
|
void() NextLevel = {
|
||||||
entity o;
|
local entity o;
|
||||||
|
|
||||||
if(mapname == "start") {
|
if(mapname == "start") {
|
||||||
if(!cvar("registered")) {
|
if(!cvar("registered")) {
|
||||||
|
@ -577,8 +590,8 @@ Exit deathmatch games upon conditions
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void() CheckRules = {
|
void() CheckRules = {
|
||||||
float timelimit;
|
local float timelimit;
|
||||||
float fraglimit;
|
local float fraglimit;
|
||||||
|
|
||||||
if(gameover) { // someone else quit the game already
|
if(gameover) { // someone else quit the game already
|
||||||
return;
|
return;
|
||||||
|
@ -601,8 +614,8 @@ void() CheckRules = {
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void() PlayerDeathThink = {
|
void() PlayerDeathThink = {
|
||||||
entity old_self;
|
local entity old_self;
|
||||||
float forward;
|
local float forward;
|
||||||
|
|
||||||
if((self.flags & FL_ONGROUND)) {
|
if((self.flags & FL_ONGROUND)) {
|
||||||
forward = vlen(self.velocity);
|
forward = vlen(self.velocity);
|
||||||
|
@ -634,8 +647,9 @@ void() PlayerDeathThink = {
|
||||||
respawn();
|
respawn();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() PlayerJump = {
|
void() PlayerJump = {
|
||||||
vector start, end;
|
local vector start, end;
|
||||||
|
|
||||||
if(self.flags & FL_WATERJUMP) {
|
if(self.flags & FL_WATERJUMP) {
|
||||||
return;
|
return;
|
||||||
|
@ -679,12 +693,15 @@ void() PlayerJump = {
|
||||||
self.velocity_z = self.velocity_z + 270;
|
self.velocity_z = self.velocity_z + 270;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===========
|
===========
|
||||||
WaterMove
|
WaterMove
|
||||||
|
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
|
.float dmgtime;
|
||||||
|
|
||||||
void() WaterMove = {
|
void() WaterMove = {
|
||||||
//dprint(ftos(self.waterlevel));
|
//dprint(ftos(self.waterlevel));
|
||||||
if(self.movetype == MOVETYPE_NOCLIP) {
|
if(self.movetype == MOVETYPE_NOCLIP) {
|
||||||
|
@ -762,7 +779,7 @@ void() WaterMove = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() CheckWaterJump = {
|
void() CheckWaterJump = {
|
||||||
vector start, end;
|
local vector start, end;
|
||||||
|
|
||||||
// check for a jump-out-of-water
|
// check for a jump-out-of-water
|
||||||
makevectors(self.angles);
|
makevectors(self.angles);
|
||||||
|
@ -789,6 +806,7 @@ void() CheckWaterJump = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
PlayerPreThink
|
PlayerPreThink
|
||||||
|
@ -797,8 +815,8 @@ Called every frame before physics are run
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() PlayerPreThink = {
|
void() PlayerPreThink = {
|
||||||
float mspeed, aspeed;
|
local float mspeed, aspeed;
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
if(intermission_running) {
|
if(intermission_running) {
|
||||||
IntermissionThink(); // otherwise a button could be missed between
|
IntermissionThink(); // otherwise a button could be missed between
|
||||||
|
@ -970,6 +988,7 @@ void() CheckPowerups = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
PlayerPostThink
|
PlayerPostThink
|
||||||
|
@ -978,8 +997,8 @@ Called every frame after physics are run
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() PlayerPostThink = {
|
void() PlayerPostThink = {
|
||||||
float mspeed, aspeed;
|
local float mspeed, aspeed;
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
if(self.view_ofs == '0 0 0') {
|
if(self.view_ofs == '0 0 0') {
|
||||||
return; // intermission or finale
|
return; // intermission or finale
|
||||||
|
@ -1013,6 +1032,7 @@ void() PlayerPostThink = {
|
||||||
CheckPowerups();
|
CheckPowerups();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===========
|
===========
|
||||||
ClientConnect
|
ClientConnect
|
||||||
|
@ -1030,6 +1050,7 @@ void() ClientConnect = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===========
|
===========
|
||||||
ClientDisconnect
|
ClientDisconnect
|
||||||
|
@ -1061,8 +1082,8 @@ called when a player dies
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void(entity targ, entity attacker) ClientObituary = {
|
void(entity targ, entity attacker) ClientObituary = {
|
||||||
float rnum;
|
local float rnum;
|
||||||
string deathstring, deathstring2;
|
local string deathstring, deathstring2;
|
||||||
rnum = random();
|
rnum = random();
|
||||||
|
|
||||||
if(targ.classname == "player") {
|
if(targ.classname == "player") {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// combat.qc: entity-entity damage functions
|
//============================================================================
|
||||||
|
|
||||||
float(entity targ, entity attacker) SameTeam = {
|
float(entity targ, entity attacker) SameTeam = {
|
||||||
return targ.team > 0 && targ.team == attacker.team;
|
return targ.team > 0 && targ.team == attacker.team;
|
||||||
|
@ -53,13 +53,14 @@ float(entity targ, entity inflictor) CanDamage = {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
============
|
============
|
||||||
Killed
|
Killed
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void(entity targ, entity attacker) Killed = {
|
void(entity targ, entity attacker) Killed = {
|
||||||
entity oself;
|
local entity oself;
|
||||||
|
|
||||||
oself = self;
|
oself = self;
|
||||||
self = targ;
|
self = targ;
|
||||||
|
@ -94,6 +95,7 @@ void(entity targ, entity attacker) Killed = {
|
||||||
self = oself;
|
self = oself;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
============
|
============
|
||||||
T_Damage
|
T_Damage
|
||||||
|
@ -103,10 +105,10 @@ This should be the only function that ever reduces health.
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage = {
|
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage = {
|
||||||
vector dir;
|
local vector dir;
|
||||||
entity oldself;
|
local entity oldself;
|
||||||
float save;
|
local float save;
|
||||||
float take;
|
local float take;
|
||||||
|
|
||||||
// team play damage avoidance
|
// team play damage avoidance
|
||||||
if(teamplay == 1 && SameTeam(targ, attacker)) {
|
if(teamplay == 1 && SameTeam(targ, attacker)) {
|
||||||
|
@ -212,9 +214,9 @@ T_RadiusDamage
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void(entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDamage = {
|
void(entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDamage = {
|
||||||
float points;
|
local float points;
|
||||||
entity head;
|
local entity head;
|
||||||
vector org;
|
local vector org;
|
||||||
|
|
||||||
head = findradius(inflictor.origin, damage + 40);
|
head = findradius(inflictor.origin, damage + 40);
|
||||||
|
|
||||||
|
@ -252,8 +254,8 @@ T_BeamDamage
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void(entity attacker, float damage) T_BeamDamage = {
|
void(entity attacker, float damage) T_BeamDamage = {
|
||||||
float points;
|
local float points;
|
||||||
entity head;
|
local entity head;
|
||||||
|
|
||||||
head = findradius(attacker.origin, damage + 40);
|
head = findradius(attacker.origin, damage + 40);
|
||||||
|
|
||||||
|
|
168
source/defs.qc
168
source/defs.qc
|
@ -1,5 +1,3 @@
|
||||||
// defs.qc: global definitions
|
|
||||||
|
|
||||||
// system globals ------------------------------------------------------------|
|
// system globals ------------------------------------------------------------|
|
||||||
#pragma noref 1
|
#pragma noref 1
|
||||||
entity self;
|
entity self;
|
||||||
|
@ -77,7 +75,7 @@ void end_sys_globals; // flag for structure dumping
|
||||||
.float modelindex; // model index in the precached list
|
.float modelindex; // model index in the precached list
|
||||||
.vector absmin, absmax; // origin + mins / maxs
|
.vector absmin, absmax; // origin + mins / maxs
|
||||||
|
|
||||||
.float ltime; // time for entity
|
.float ltime; // local time for entity
|
||||||
.float movetype;
|
.float movetype;
|
||||||
.float solid;
|
.float solid;
|
||||||
|
|
||||||
|
@ -135,7 +133,6 @@ void end_sys_globals; // flag for structure dumping
|
||||||
|
|
||||||
.string netname;
|
.string netname;
|
||||||
|
|
||||||
// Will be world if not currently angry at anyone.
|
|
||||||
.entity enemy;
|
.entity enemy;
|
||||||
|
|
||||||
.float flags;
|
.float flags;
|
||||||
|
@ -153,11 +150,7 @@ void end_sys_globals; // flag for structure dumping
|
||||||
.float waterlevel; // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
|
.float waterlevel; // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
|
||||||
.float watertype; // a contents value
|
.float watertype; // a contents value
|
||||||
|
|
||||||
// A yaw angle of the intended direction, which will be turned towards at up
|
|
||||||
// to 45 deg / state. If the enemy is in view and hunt_time is not active,
|
|
||||||
// this will be the exact line towards the enemy.
|
|
||||||
.float ideal_yaw;
|
.float ideal_yaw;
|
||||||
|
|
||||||
.float yaw_speed;
|
.float yaw_speed;
|
||||||
|
|
||||||
.entity aiment;
|
.entity aiment;
|
||||||
|
@ -214,7 +207,7 @@ entity() checkclient = #17; // returns a client to look for
|
||||||
entity(entity start, .string fld, string match) find = #18;
|
entity(entity start, .string fld, string match) find = #18;
|
||||||
string(string s) precache_sound = #19;
|
string(string s) precache_sound = #19;
|
||||||
string(string s) precache_model = #20;
|
string(string s) precache_model = #20;
|
||||||
void(entity client, string s) stuffcmd = #21;
|
void(entity client, string s)stuffcmd = #21;
|
||||||
entity(vector org, float rad) findradius = #22;
|
entity(vector org, float rad) findradius = #22;
|
||||||
void(string s) bprint = #23;
|
void(string s) bprint = #23;
|
||||||
void(entity client, string s) sprint = #24;
|
void(entity client, string s) sprint = #24;
|
||||||
|
@ -236,7 +229,7 @@ float(vector v) pointcontents = #41; // returns a CONTENT_*
|
||||||
float(float f) fabs = #43;
|
float(float f) fabs = #43;
|
||||||
vector(entity e, float speed) aim = #44; // returns the shooting vector
|
vector(entity e, float speed) aim = #44; // returns the shooting vector
|
||||||
float(string s) cvar = #45; // return cvar.value
|
float(string s) cvar = #45; // return cvar.value
|
||||||
void(string s) localcmd = #46; // put string into que
|
void(string s) localcmd = #46; // put string into local que
|
||||||
entity(entity e) nextent = #47; // for looping through all ents
|
entity(entity e) nextent = #47; // for looping through all ents
|
||||||
// start a particle effect
|
// start a particle effect
|
||||||
void(vector o, vector d, float color, float count) particle = #48;
|
void(vector o, vector d, float color, float count) particle = #48;
|
||||||
|
@ -485,33 +478,6 @@ float framecount;
|
||||||
|
|
||||||
float skill;
|
float skill;
|
||||||
|
|
||||||
float enemy_vis, enemy_infront, enemy_range;
|
|
||||||
float enemy_yaw;
|
|
||||||
|
|
||||||
entity lastspawn;
|
|
||||||
|
|
||||||
entity multi_ent;
|
|
||||||
float multi_damage;
|
|
||||||
|
|
||||||
entity shub;
|
|
||||||
|
|
||||||
entity le1, le2;
|
|
||||||
float lightning_end;
|
|
||||||
|
|
||||||
float hknight_type;
|
|
||||||
|
|
||||||
entity bodyque_head;
|
|
||||||
|
|
||||||
float modelindex_eyes, modelindex_player;
|
|
||||||
|
|
||||||
float intermission_running;
|
|
||||||
float intermission_exittime;
|
|
||||||
|
|
||||||
string nextmap;
|
|
||||||
|
|
||||||
entity sight_entity;
|
|
||||||
float sight_entity_time;
|
|
||||||
|
|
||||||
// fields --------------------------------------------------------------------|
|
// fields --------------------------------------------------------------------|
|
||||||
|
|
||||||
// world fields
|
// world fields
|
||||||
|
@ -585,12 +551,8 @@ float sight_entity_time;
|
||||||
.entity trigger_field; // door's trigger entity
|
.entity trigger_field; // door's trigger entity
|
||||||
.string noise4;
|
.string noise4;
|
||||||
|
|
||||||
// A monster will leave its stand state and head towards it's .movetarget when
|
// monsters
|
||||||
// time > .pausetime.
|
|
||||||
.float pausetime;
|
.float pausetime;
|
||||||
|
|
||||||
// The next path spot to walk toward. If .enemy, ignore .movetarget.
|
|
||||||
// When an enemy is killed, the monster will try to return to it's path.
|
|
||||||
.entity movetarget;
|
.entity movetarget;
|
||||||
|
|
||||||
// doors
|
// doors
|
||||||
|
@ -618,79 +580,52 @@ float sight_entity_time;
|
||||||
.float distance;
|
.float distance;
|
||||||
.float volume;
|
.float volume;
|
||||||
|
|
||||||
.float hit_z;
|
|
||||||
|
|
||||||
.float dmgtime;
|
|
||||||
|
|
||||||
.float inpain;
|
|
||||||
|
|
||||||
.float healamount, healtype;
|
|
||||||
|
|
||||||
// functions -----------------------------------------------------------------|
|
// functions -----------------------------------------------------------------|
|
||||||
|
|
||||||
// subs.qc
|
// subs.qc
|
||||||
void(float normal) SUB_AttackFinished;
|
|
||||||
void(vector tdest, float tspeed, void() func) SUB_CalcMove;
|
void(vector tdest, float tspeed, void() func) SUB_CalcMove;
|
||||||
void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt;
|
void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt;
|
||||||
void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove;
|
void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove;
|
||||||
void() SUB_CalcMoveDone;
|
void() SUB_CalcMoveDone;
|
||||||
void() SUB_CalcAngleMoveDone;
|
void() SUB_CalcAngleMoveDone;
|
||||||
void(void() thinkst) SUB_CheckRefire;
|
|
||||||
void() SUB_Null;
|
void() SUB_Null;
|
||||||
void() SUB_UseTargets;
|
void() SUB_UseTargets;
|
||||||
void() SUB_Remove;
|
void() SUB_Remove;
|
||||||
|
|
||||||
// combat.qc
|
// combat.qc
|
||||||
|
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
|
||||||
float(entity e, float healamount, float ignore) T_Heal; // health function
|
float(entity e, float healamount, float ignore) T_Heal; // health function
|
||||||
float(entity targ, entity inflictor) CanDamage;
|
float(entity targ, entity inflictor) CanDamage;
|
||||||
void() T_MissileTouch;
|
|
||||||
void(entity bomb, entity attacker, float rad, entity ignore) T_RadiusDamage;
|
|
||||||
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
|
|
||||||
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
|
|
||||||
|
|
||||||
// weapons.qc
|
|
||||||
void() W_FireAxe;
|
|
||||||
void() W_FireShotgun;
|
|
||||||
void() W_FireSuperShotgun;
|
|
||||||
void() W_FireRocket;
|
|
||||||
void() W_FireLightning;
|
|
||||||
void() W_FireGrenade;
|
|
||||||
void(float ox) W_FireSpikes;
|
|
||||||
void() W_FireSuperSpikes;
|
|
||||||
float() W_BestWeapon;
|
|
||||||
void() W_SetCurrentAmmo;
|
|
||||||
void() W_WeaponFrame;
|
|
||||||
|
|
||||||
void() army_fire;
|
|
||||||
|
|
||||||
float() DemonCheckAttack;
|
float() DemonCheckAttack;
|
||||||
void() Demon_JumpTouch;
|
|
||||||
void(float side) Demon_Melee;
|
|
||||||
|
|
||||||
float() DogCheckAttack;
|
float() DogCheckAttack;
|
||||||
void() dog_leap1;
|
float() W_BestWeapon;
|
||||||
void() dog_run1;
|
float() WizardCheckAttack;
|
||||||
|
|
||||||
void() ShalHome;
|
|
||||||
void() ShalMissile;
|
|
||||||
void() ShalMissileTouch;
|
|
||||||
|
|
||||||
float() crandom;
|
|
||||||
float(entity targ) infront;
|
float(entity targ) infront;
|
||||||
float(entity targ) range;
|
float(entity targ) range;
|
||||||
float(entity targ) visible;
|
float(entity targ) visible;
|
||||||
float(entity targ, entity attacker) SameTeam;
|
float(entity targ, entity attacker) SameTeam;
|
||||||
float(float v) anglemod;
|
float(float v) anglemod;
|
||||||
void() DecodeLevelParms;
|
void() DecodeLevelParms;
|
||||||
void(entity ent) CopyToBodyQue;
|
void() Demon_JumpTouch;
|
||||||
void() InitBodyQue;
|
void() InitBodyQue;
|
||||||
|
void() PlayerDie;
|
||||||
|
void() ShalHome;
|
||||||
|
void() ShalMissile;
|
||||||
|
void() ShalMissileTouch;
|
||||||
void() SuperDamageSound;
|
void() SuperDamageSound;
|
||||||
|
void() T_MissileTouch;
|
||||||
|
void() W_SetCurrentAmmo;
|
||||||
|
void() W_WeaponFrame;
|
||||||
void() ai_face;
|
void() ai_face;
|
||||||
void() armor_touch;
|
void() armor_touch;
|
||||||
|
void() army_fire;
|
||||||
void() bubble_bob;
|
void() bubble_bob;
|
||||||
void() bubble_remove;
|
void() bubble_remove;
|
||||||
void() button_return;
|
void() button_return;
|
||||||
void() button_wait;
|
void() button_wait;
|
||||||
|
void() dog_leap1;
|
||||||
|
void() dog_run1;
|
||||||
void() door_go_down;
|
void() door_go_down;
|
||||||
void() door_go_up;
|
void() door_go_up;
|
||||||
void() fd_secret_done;
|
void() fd_secret_done;
|
||||||
|
@ -706,50 +641,29 @@ void() finale_3;
|
||||||
void() finale_4;
|
void() finale_4;
|
||||||
void() fire_fly;
|
void() fire_fly;
|
||||||
void() fire_touch;
|
void() fire_touch;
|
||||||
|
void() func_train_find;
|
||||||
void() health_touch;
|
void() health_touch;
|
||||||
|
void() hk_idle_sound;
|
||||||
|
void() hknight_char_a1;
|
||||||
|
void() hknight_run1;
|
||||||
|
void() info_player_start;
|
||||||
void() item_megahealth_rot;
|
void() item_megahealth_rot;
|
||||||
|
void() knight_atk1;
|
||||||
|
void() knight_bow1;
|
||||||
|
void() knight_bow6;
|
||||||
|
void() knight_runatk1;
|
||||||
|
void() knight_walk1;
|
||||||
void() make_bubbles;
|
void() make_bubbles;
|
||||||
void() monster_death_use;
|
void() monster_death_use;
|
||||||
void() movetarget_f;
|
void() movetarget_f;
|
||||||
|
|
||||||
void() powerup_touch;
|
|
||||||
void() set_suicide_frame;
|
|
||||||
void(vector org, vector dir) launch_spike;
|
|
||||||
|
|
||||||
void() spike_touch;
|
|
||||||
void() superspike_touch;
|
|
||||||
void() swimmonster_start;
|
|
||||||
void() t_movetarget;
|
|
||||||
|
|
||||||
void() train_next;
|
|
||||||
|
|
||||||
void(entity targ, entity attacker) ClientObituary;
|
|
||||||
void(float num_bubbles) DeathBubbles;
|
|
||||||
void(vector dest) ChooseTurn;
|
|
||||||
void(vector org, vector vec) LaunchLaser;
|
|
||||||
void(vector org, vector vel, float damage) SpawnBlood;
|
|
||||||
void() BecomeExplosion;
|
|
||||||
|
|
||||||
void() hknight_char_a1;
|
|
||||||
void() hknight_run1;
|
|
||||||
|
|
||||||
void() ogre_smash1;
|
void() ogre_smash1;
|
||||||
void() ogre_swing1;
|
void() ogre_swing1;
|
||||||
|
|
||||||
void() plat_center_touch;
|
void() plat_center_touch;
|
||||||
void() plat_crush;
|
void() plat_crush;
|
||||||
void() plat_go_down;
|
void() plat_go_down;
|
||||||
void() plat_go_up;
|
void() plat_go_up;
|
||||||
void() plat_outside_touch;
|
void() plat_outside_touch;
|
||||||
void() plat_trigger_use;
|
void() plat_trigger_use;
|
||||||
|
|
||||||
void() knight_atk1;
|
|
||||||
void() knight_bow1;
|
|
||||||
void() knight_bow6;
|
|
||||||
void() knight_runatk1;
|
|
||||||
void() knight_walk1;
|
|
||||||
|
|
||||||
void() PlayerDie;
|
|
||||||
void() player_axe1;
|
void() player_axe1;
|
||||||
void() player_axeb1;
|
void() player_axeb1;
|
||||||
void() player_axec1;
|
void() player_axec1;
|
||||||
|
@ -768,26 +682,32 @@ void() player_run;
|
||||||
void() player_run;
|
void() player_run;
|
||||||
void() player_shot1;
|
void() player_shot1;
|
||||||
void() player_stand1;
|
void() player_stand1;
|
||||||
|
void() powerup_touch;
|
||||||
|
void() set_suicide_frame;
|
||||||
|
void() shalrath_pain;
|
||||||
void() sham_smash1;
|
void() sham_smash1;
|
||||||
void() sham_swingl1;
|
void() sham_swingl1;
|
||||||
void() sham_swingr1;
|
void() sham_swingr1;
|
||||||
void() sham_swingr1;
|
void() sham_swingr1;
|
||||||
|
void() spike_touch;
|
||||||
|
void() superspike_touch;
|
||||||
|
void() swimmonster_start;
|
||||||
|
void() t_movetarget;
|
||||||
void() tbaby_jump1;
|
void() tbaby_jump1;
|
||||||
void() tbaby_jump5;
|
void() tbaby_jump5;
|
||||||
|
void() train_next;
|
||||||
float() WizardCheckAttack;
|
|
||||||
void() wiz_run1;
|
void() wiz_run1;
|
||||||
void() wiz_side1;
|
void() wiz_side1;
|
||||||
|
void(entity bomb, entity attacker, float rad, entity ignore) T_RadiusDamage;
|
||||||
|
void(entity targ, entity attacker) ClientObituary;
|
||||||
|
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
|
||||||
|
void(float num_bubbles) DeathBubbles;
|
||||||
|
void(float side) Demon_Melee;
|
||||||
|
void(vector dest) ChooseTurn;
|
||||||
void(vector org) spawn_tfog;
|
void(vector org) spawn_tfog;
|
||||||
void(vector org, entity death_owner) spawn_tdeath;
|
void(vector org, entity death_owner) spawn_tdeath;
|
||||||
|
void(vector org, vector vec) LaunchLaser;
|
||||||
void() info_player_start;
|
void(vector org, vector vel, float damage) SpawnBlood;
|
||||||
|
|
||||||
void() func_train_find;
|
|
||||||
|
|
||||||
void(vector p) boss_missile;
|
void(vector p) boss_missile;
|
||||||
|
|
||||||
// EOF
|
// EOF
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
// demon.qc: Fiend
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
DEMON
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / demon3
|
$cd id1 / models / demon3
|
||||||
$scale 0.8
|
$scale 0.8
|
||||||
|
@ -92,6 +98,7 @@ void() demon1_jump10 = [ $leap10, demon1_jump1 ] {
|
||||||
void() demon1_jump11 = [ $leap11, demon1_jump12 ] {};
|
void() demon1_jump11 = [ $leap11, demon1_jump12 ] {};
|
||||||
void() demon1_jump12 = [ $leap12, demon1_run1 ] {};
|
void() demon1_jump12 = [ $leap12, demon1_run1 ] {};
|
||||||
|
|
||||||
|
|
||||||
void() demon1_atta1 = [ $attacka1, demon1_atta2 ] {ai_charge(4);};
|
void() demon1_atta1 = [ $attacka1, demon1_atta2 ] {ai_charge(4);};
|
||||||
void() demon1_atta2 = [ $attacka2, demon1_atta3 ] {ai_charge(0);};
|
void() demon1_atta2 = [ $attacka2, demon1_atta3 ] {ai_charge(0);};
|
||||||
void() demon1_atta3 = [ $attacka3, demon1_atta4 ] {ai_charge(0);};
|
void() demon1_atta3 = [ $attacka3, demon1_atta4 ] {ai_charge(0);};
|
||||||
|
@ -162,10 +169,12 @@ void() demon_die = {
|
||||||
demon1_die1();
|
demon1_die1();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() Demon_MeleeAttack = {
|
void() Demon_MeleeAttack = {
|
||||||
demon1_atta1();
|
demon1_atta1();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_demon1(1 0 0) (-32 -32 -24) (32 32 64) Ambush
|
/*QUAKED monster_demon1(1 0 0) (-32 -32 -24) (32 32 64) Ambush
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -203,6 +212,7 @@ void() monster_demon1 = {
|
||||||
walkmonster_start();
|
walkmonster_start();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
@ -234,8 +244,8 @@ CheckDemonJump
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
float() CheckDemonJump = {
|
float() CheckDemonJump = {
|
||||||
vector dist;
|
local vector dist;
|
||||||
float d;
|
local float d;
|
||||||
|
|
||||||
if(self.origin_z + self.mins_z > self.enemy.origin_z + self.enemy.mins_z
|
if(self.origin_z + self.mins_z > self.enemy.origin_z + self.enemy.mins_z
|
||||||
+ 0.75 * self.enemy.size_z) {
|
+ 0.75 * self.enemy.size_z) {
|
||||||
|
@ -266,7 +276,7 @@ float() CheckDemonJump = {
|
||||||
};
|
};
|
||||||
|
|
||||||
float() DemonCheckAttack = {
|
float() DemonCheckAttack = {
|
||||||
vector vec;
|
local vector vec;
|
||||||
|
|
||||||
// if close enough for slashing, go for it
|
// if close enough for slashing, go for it
|
||||||
if(CheckDemonMelee()) {
|
if(CheckDemonMelee()) {
|
||||||
|
@ -283,11 +293,12 @@ float() DemonCheckAttack = {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
void(float side) Demon_Melee = {
|
void(float side) Demon_Melee = {
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
vector delta;
|
local vector delta;
|
||||||
|
|
||||||
ai_face();
|
ai_face();
|
||||||
walkmove(self.ideal_yaw, 12); // allow a little closing
|
walkmove(self.ideal_yaw, 12); // allow a little closing
|
||||||
|
@ -309,8 +320,9 @@ void(float side) Demon_Melee = {
|
||||||
SpawnMeatSpray(self.origin + v_forward * 16, side * v_right);
|
SpawnMeatSpray(self.origin + v_forward * 16, side * v_right);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() Demon_JumpTouch = {
|
void() Demon_JumpTouch = {
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(self.health <= 0) {
|
if(self.health <= 0) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
// dog.qc: Rottweiler
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
DOG
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
$cd id1 / models / dog
|
$cd id1 / models / dog
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
$base base
|
$base base
|
||||||
|
@ -25,6 +30,7 @@ $frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
|
||||||
|
|
||||||
$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8
|
$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
dog_bite
|
dog_bite
|
||||||
|
@ -32,8 +38,8 @@ dog_bite
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() dog_bite = {
|
void() dog_bite = {
|
||||||
vector delta;
|
local vector delta;
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(!self.enemy) {
|
if(!self.enemy) {
|
||||||
return;
|
return;
|
||||||
|
@ -56,7 +62,7 @@ void() dog_bite = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() Dog_JumpTouch = {
|
void() Dog_JumpTouch = {
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(self.health <= 0) {
|
if(self.health <= 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -89,6 +95,7 @@ void() Dog_JumpTouch = {
|
||||||
self.nextthink = time + 0.1;
|
self.nextthink = time + 0.1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() dog_stand1 = [ $stand1, dog_stand2 ] {ai_stand();};
|
void() dog_stand1 = [ $stand1, dog_stand2 ] {ai_stand();};
|
||||||
void() dog_stand2 = [ $stand2, dog_stand3 ] {ai_stand();};
|
void() dog_stand2 = [ $stand2, dog_stand3 ] {ai_stand();};
|
||||||
void() dog_stand3 = [ $stand3, dog_stand4 ] {ai_stand();};
|
void() dog_stand3 = [ $stand3, dog_stand4 ] {ai_stand();};
|
||||||
|
@ -218,6 +225,7 @@ void() dog_dieb7 = [ $deathb7, dog_dieb8 ] {};
|
||||||
void() dog_dieb8 = [ $deathb8, dog_dieb9 ] {};
|
void() dog_dieb8 = [ $deathb8, dog_dieb9 ] {};
|
||||||
void() dog_dieb9 = [ $deathb9, dog_dieb9 ] {};
|
void() dog_dieb9 = [ $deathb9, dog_dieb9 ] {};
|
||||||
|
|
||||||
|
|
||||||
void() dog_die = {
|
void() dog_die = {
|
||||||
// check for gib
|
// check for gib
|
||||||
if(self.health < -35) {
|
if(self.health < -35) {
|
||||||
|
@ -265,8 +273,8 @@ CheckDogJump
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
float() CheckDogJump = {
|
float() CheckDogJump = {
|
||||||
vector dist;
|
local vector dist;
|
||||||
float d;
|
local float d;
|
||||||
|
|
||||||
if(self.origin_z + self.mins_z > self.enemy.origin_z + self.enemy.mins_z
|
if(self.origin_z + self.mins_z > self.enemy.origin_z + self.enemy.mins_z
|
||||||
+ 0.75 * self.enemy.size_z) {
|
+ 0.75 * self.enemy.size_z) {
|
||||||
|
@ -295,7 +303,7 @@ float() CheckDogJump = {
|
||||||
};
|
};
|
||||||
|
|
||||||
float() DogCheckAttack = {
|
float() DogCheckAttack = {
|
||||||
vector vec;
|
local vector vec;
|
||||||
|
|
||||||
// if close enough for slashing, go for it
|
// if close enough for slashing, go for it
|
||||||
if(CheckDogMelee()) {
|
if(CheckDogMelee()) {
|
||||||
|
@ -311,6 +319,7 @@ float() DogCheckAttack = {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
/*QUAKED monster_dog(1 0 0) (-32 -32 -24) (32 32 40) Ambush
|
/*QUAKED monster_dog(1 0 0) (-32 -32 -24) (32 32 40) Ambush
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// doors.qc: player-triggered moving brush entities
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
DOOR_START_OPEN = 1,
|
DOOR_START_OPEN = 1,
|
||||||
DOOR_DONT_LINK = 4,
|
DOOR_DONT_LINK = 4,
|
||||||
|
@ -43,6 +41,7 @@ void() door_blocked = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() door_hit_top = {
|
void() door_hit_top = {
|
||||||
sound(self, CHAN_VOICE, self.noise1, 1, ATTN_NORM);
|
sound(self, CHAN_VOICE, self.noise1, 1, ATTN_NORM);
|
||||||
self.state = STATE_TOP;
|
self.state = STATE_TOP;
|
||||||
|
@ -87,6 +86,7 @@ void() door_go_up = {
|
||||||
SUB_UseTargets();
|
SUB_UseTargets();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============================================================================
|
=============================================================================
|
||||||
|
|
||||||
|
@ -96,8 +96,8 @@ ACTIVATION FUNCTIONS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() door_fire = {
|
void() door_fire = {
|
||||||
entity oself;
|
local entity oself;
|
||||||
entity starte;
|
local entity starte;
|
||||||
|
|
||||||
if(self.owner != self) {
|
if(self.owner != self) {
|
||||||
objerror("door_fire: self.owner != self");
|
objerror("door_fire: self.owner != self");
|
||||||
|
@ -133,8 +133,9 @@ void() door_fire = {
|
||||||
self = oself;
|
self = oself;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() door_use = {
|
void() door_use = {
|
||||||
entity oself;
|
local entity oself;
|
||||||
|
|
||||||
self.message = ""; // door message are for touch only
|
self.message = ""; // door message are for touch only
|
||||||
self.owner.message = "";
|
self.owner.message = "";
|
||||||
|
@ -145,6 +146,7 @@ void() door_use = {
|
||||||
self = oself;
|
self = oself;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() door_trigger_touch = {
|
void() door_trigger_touch = {
|
||||||
if(other.health <= 0) {
|
if(other.health <= 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -161,8 +163,9 @@ void() door_trigger_touch = {
|
||||||
door_use();
|
door_use();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() door_killed = {
|
void() door_killed = {
|
||||||
entity oself;
|
local entity oself;
|
||||||
|
|
||||||
oself = self;
|
oself = self;
|
||||||
self = self.owner;
|
self = self.owner;
|
||||||
|
@ -172,6 +175,7 @@ void() door_killed = {
|
||||||
self = oself;
|
self = oself;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
door_touch
|
door_touch
|
||||||
|
@ -243,9 +247,10 @@ SPAWNING FUNCTIONS
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
entity(vector fmins, vector fmaxs) spawn_field = {
|
entity(vector fmins, vector fmaxs) spawn_field = {
|
||||||
entity trigger;
|
local entity trigger;
|
||||||
vector t1, t2;
|
local vector t1, t2;
|
||||||
|
|
||||||
trigger = spawn();
|
trigger = spawn();
|
||||||
trigger.movetype = MOVETYPE_NONE;
|
trigger.movetype = MOVETYPE_NONE;
|
||||||
|
@ -259,6 +264,7 @@ entity(vector fmins, vector fmaxs) spawn_field = {
|
||||||
return(trigger);
|
return(trigger);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
float(entity e1, entity e2) EntitiesTouching = {
|
float(entity e1, entity e2) EntitiesTouching = {
|
||||||
if(e1.mins_x > e2.maxs_x) {
|
if(e1.mins_x > e2.maxs_x) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -281,15 +287,17 @@ float(entity e1, entity e2) EntitiesTouching = {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
LinkDoors
|
LinkDoors
|
||||||
|
|
||||||
|
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void() LinkDoors = {
|
void() LinkDoors = {
|
||||||
entity t, starte;
|
local entity t, starte;
|
||||||
vector cmins, cmaxs;
|
local vector cmins, cmaxs;
|
||||||
|
|
||||||
if(self.enemy) {
|
if(self.enemy) {
|
||||||
return; // already linked by another door
|
return; // already linked by another door
|
||||||
|
@ -363,6 +371,7 @@ void() LinkDoors = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED func_door(0 .5 .8) ? START_OPEN x DOOR_DONT_LINK GOLD_KEY SILVER_KEY TOGGLE
|
/*QUAKED func_door(0 .5 .8) ? START_OPEN x DOOR_DONT_LINK GOLD_KEY SILVER_KEY TOGGLE
|
||||||
if two doors touch, they are assumed to be connected and operate as a unit.
|
if two doors touch, they are assumed to be connected and operate as a unit.
|
||||||
|
|
||||||
|
@ -441,6 +450,7 @@ void() func_door =
|
||||||
self.noise2 = "doors/ddoor1.wav";
|
self.noise2 = "doors/ddoor1.wav";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SetMovedir();
|
SetMovedir();
|
||||||
|
|
||||||
self.max_health = self.health;
|
self.max_health = self.health;
|
||||||
|
@ -519,8 +529,9 @@ enum {
|
||||||
SECRET_YES_SHOOT = 16, // shootable even if targeted
|
SECRET_YES_SHOOT = 16, // shootable even if targeted
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() fd_secret_use = {
|
void() fd_secret_use = {
|
||||||
float temp;
|
local float temp;
|
||||||
|
|
||||||
self.health = 10000;
|
self.health = 10000;
|
||||||
|
|
||||||
|
@ -650,6 +661,7 @@ void() secret_touch = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED func_door_secret(0 .5 .8) ? open_once 1st_left 1st_down no_shoot always_shoot
|
/*QUAKED func_door_secret(0 .5 .8) ? open_once 1st_left 1st_down no_shoot always_shoot
|
||||||
Basic secret door. Slides back, then to the side. Angle determines direction.
|
Basic secret door. Slides back, then to the side. Angle determines direction.
|
||||||
wait = # of seconds before coming back
|
wait = # of seconds before coming back
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
// enforcer.qc: Enforcer
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
SOLDIER / PLAYER
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / enforcer
|
$cd id1 / models / enforcer
|
||||||
$origin 0 - 6 24
|
$origin 0 - 6 24
|
||||||
|
@ -31,8 +37,9 @@ $frame paind1 paind2 paind3 paind4 paind5 paind6 paind7 paind8
|
||||||
$frame paind9 paind10 paind11 paind12 paind13 paind14 paind15 paind16
|
$frame paind9 paind10 paind11 paind12 paind13 paind14 paind15 paind16
|
||||||
$frame paind17 paind18 paind19
|
$frame paind17 paind18 paind19
|
||||||
|
|
||||||
|
|
||||||
void() Laser_Touch = {
|
void() Laser_Touch = {
|
||||||
vector org;
|
local vector org;
|
||||||
|
|
||||||
if(other == self.owner) {
|
if(other == self.owner) {
|
||||||
return; // don't explode on owner
|
return; // don't explode on owner
|
||||||
|
@ -61,7 +68,7 @@ void() Laser_Touch = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void(vector org, vector vec) LaunchLaser = {
|
void(vector org, vector vec) LaunchLaser = {
|
||||||
vector vec;
|
local vector vec;
|
||||||
|
|
||||||
if(self.classname == "monster_enforcer") {
|
if(self.classname == "monster_enforcer") {
|
||||||
sound(self, CHAN_WEAPON, "enforcer/enfire.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "enforcer/enfire.wav", 1, ATTN_NORM);
|
||||||
|
@ -89,8 +96,9 @@ void(vector org, vector vec) LaunchLaser = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void() enforcer_fire = {
|
void() enforcer_fire = {
|
||||||
vector org;
|
local vector org;
|
||||||
|
|
||||||
self.effects = self.effects | EF_MUZZLEFLASH;
|
self.effects = self.effects | EF_MUZZLEFLASH;
|
||||||
makevectors(self.angles);
|
makevectors(self.angles);
|
||||||
|
@ -160,8 +168,8 @@ void() enf_atk11 = [ $attack7, enf_atk12 ] {ai_face();};
|
||||||
void() enf_atk12 = [ $attack8, enf_atk13 ] {ai_face();};
|
void() enf_atk12 = [ $attack8, enf_atk13 ] {ai_face();};
|
||||||
void() enf_atk13 = [ $attack9, enf_atk14 ] {ai_face();};
|
void() enf_atk13 = [ $attack9, enf_atk14 ] {ai_face();};
|
||||||
void() enf_atk14 = [ $attack10, enf_run1 ] {ai_face();
|
void() enf_atk14 = [ $attack10, enf_run1 ] {ai_face();
|
||||||
SUB_CheckRefire(enf_atk1);
|
SUB_CheckRefire(enf_atk1);
|
||||||
};
|
};
|
||||||
|
|
||||||
void() enf_paina1 = [ $paina1, enf_paina2 ] {};
|
void() enf_paina1 = [ $paina1, enf_paina2 ] {};
|
||||||
void() enf_paina2 = [ $paina2, enf_paina3 ] {};
|
void() enf_paina2 = [ $paina2, enf_paina3 ] {};
|
||||||
|
@ -204,13 +212,14 @@ void() enf_paind18 = [ $paind18, enf_paind19 ] {};
|
||||||
void() enf_paind19 = [ $paind19, enf_run1 ] {};
|
void() enf_paind19 = [ $paind19, enf_run1 ] {};
|
||||||
|
|
||||||
void(entity attacker, float damage) enf_pain = {
|
void(entity attacker, float damage) enf_pain = {
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
r = random();
|
r = random();
|
||||||
if(self.pain_finished > time) {
|
if(self.pain_finished > time) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(r < 0.5) {
|
if(r < 0.5) {
|
||||||
sound(self, CHAN_VOICE, "enforcer/pain1.wav", 1, ATTN_NORM);
|
sound(self, CHAN_VOICE, "enforcer/pain1.wav", 1, ATTN_NORM);
|
||||||
} else {
|
} else {
|
||||||
|
@ -236,6 +245,7 @@ void(entity attacker, float damage) enf_pain = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void() enf_die1 = [ $death1, enf_die2 ] {};
|
void() enf_die1 = [ $death1, enf_die2 ] {};
|
||||||
void() enf_die2 = [ $death2, enf_die3 ] {};
|
void() enf_die2 = [ $death2, enf_die3 ] {};
|
||||||
void() enf_die3 = [ $death3, enf_die4 ]
|
void() enf_die3 = [ $death3, enf_die4 ]
|
||||||
|
@ -267,6 +277,7 @@ void() enf_fdie9 = [ $fdeath9, enf_fdie10 ] {};
|
||||||
void() enf_fdie10 = [ $fdeath10, enf_fdie11 ] {};
|
void() enf_fdie10 = [ $fdeath10, enf_fdie11 ] {};
|
||||||
void() enf_fdie11 = [ $fdeath11, enf_fdie11 ] {};
|
void() enf_fdie11 = [ $fdeath11, enf_fdie11 ] {};
|
||||||
|
|
||||||
|
|
||||||
void() enf_die = {
|
void() enf_die = {
|
||||||
// check for gib
|
// check for gib
|
||||||
if(self.health < -35) {
|
if(self.health < -35) {
|
||||||
|
@ -287,6 +298,7 @@ void() enf_die = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_enforcer(1 0 0) (-16 -16 -24) (16 16 40) Ambush
|
/*QUAKED monster_enforcer(1 0 0) (-16 -16 -24) (16 16 40) Ambush
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// fight.qc: monster attack functions
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@ -9,8 +8,12 @@ When it decides it can't attack, it goes into hunt mode.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
float enemy_vis, enemy_infront, enemy_range;
|
||||||
|
float enemy_yaw;
|
||||||
|
|
||||||
|
|
||||||
void() knight_attack = {
|
void() knight_attack = {
|
||||||
float len;
|
local float len;
|
||||||
|
|
||||||
// decide if now is a good swing time
|
// decide if now is a good swing time
|
||||||
len = vlen(self.enemy.origin + self.enemy.view_ofs - (self.origin + self.view_ofs));
|
len = vlen(self.enemy.origin + self.enemy.view_ofs - (self.origin + self.view_ofs));
|
||||||
|
@ -33,9 +36,9 @@ Returns FALSE if movement should continue
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
float() CheckAttack = {
|
float() CheckAttack = {
|
||||||
vector spot1, spot2;
|
local vector spot1, spot2;
|
||||||
entity targ;
|
local entity targ;
|
||||||
float chance;
|
local float chance;
|
||||||
|
|
||||||
targ = self.enemy;
|
targ = self.enemy;
|
||||||
|
|
||||||
|
@ -106,6 +109,7 @@ float() CheckAttack = {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
ai_face
|
ai_face
|
||||||
|
@ -131,8 +135,8 @@ void(float d) ai_charge = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() ai_charge_side = {
|
void() ai_charge_side = {
|
||||||
vector dtemp;
|
local vector dtemp;
|
||||||
float heading;
|
local float heading;
|
||||||
|
|
||||||
// aim to the left of the enemy for a flyby
|
// aim to the left of the enemy for a flyby
|
||||||
|
|
||||||
|
@ -146,6 +150,7 @@ void() ai_charge_side = {
|
||||||
walkmove(heading, 20);
|
walkmove(heading, 20);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
ai_melee
|
ai_melee
|
||||||
|
@ -153,8 +158,8 @@ ai_melee
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void() ai_melee = {
|
void() ai_melee = {
|
||||||
vector delta;
|
local vector delta;
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(!self.enemy) {
|
if(!self.enemy) {
|
||||||
return; // removed before stroke
|
return; // removed before stroke
|
||||||
|
@ -170,9 +175,10 @@ void() ai_melee = {
|
||||||
T_Damage(self.enemy, self, self, ldmg);
|
T_Damage(self.enemy, self, self, ldmg);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() ai_melee_side = {
|
void() ai_melee_side = {
|
||||||
vector delta;
|
local vector delta;
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(!self.enemy) {
|
if(!self.enemy) {
|
||||||
return; // removed before stroke
|
return; // removed before stroke
|
||||||
|
@ -192,6 +198,7 @@ void() ai_melee_side = {
|
||||||
T_Damage(self.enemy, self, self, ldmg);
|
T_Damage(self.enemy, self, self, ldmg);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -203,9 +210,9 @@ Returns FALSE if movement should continue
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
float() SoldierCheckAttack = {
|
float() SoldierCheckAttack = {
|
||||||
vector spot1, spot2;
|
local vector spot1, spot2;
|
||||||
entity targ;
|
local entity targ;
|
||||||
float chance;
|
local float chance;
|
||||||
|
|
||||||
targ = self.enemy;
|
targ = self.enemy;
|
||||||
|
|
||||||
|
@ -223,6 +230,7 @@ float() SoldierCheckAttack = {
|
||||||
return FALSE; // don't have a clear shot
|
return FALSE; // don't have a clear shot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// missile attack
|
// missile attack
|
||||||
if(time < self.attack_finished) {
|
if(time < self.attack_finished) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -264,10 +272,10 @@ Returns FALSE if movement should continue
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
float() ShamCheckAttack = {
|
float() ShamCheckAttack = {
|
||||||
vector spot1, spot2;
|
local vector spot1, spot2;
|
||||||
entity targ;
|
local entity targ;
|
||||||
float chance;
|
local float chance;
|
||||||
float enemy_yaw;
|
local float enemy_yaw;
|
||||||
|
|
||||||
if(enemy_range == RANGE_MELEE) {
|
if(enemy_range == RANGE_MELEE) {
|
||||||
if(CanDamage(self.enemy, self)) {
|
if(CanDamage(self.enemy, self)) {
|
||||||
|
@ -325,9 +333,9 @@ Returns FALSE if movement should continue
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
float() OgreCheckAttack = {
|
float() OgreCheckAttack = {
|
||||||
vector spot1, spot2;
|
local vector spot1, spot2;
|
||||||
entity targ;
|
local entity targ;
|
||||||
float chance;
|
local float chance;
|
||||||
|
|
||||||
if(enemy_range == RANGE_MELEE) {
|
if(enemy_range == RANGE_MELEE) {
|
||||||
if(CanDamage(self.enemy, self)) {
|
if(CanDamage(self.enemy, self)) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// fish.qc: Rotfish
|
|
||||||
|
|
||||||
$cd id1 / models / fish
|
$cd id1 / models / fish
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
$base base
|
$base base
|
||||||
|
@ -62,7 +60,7 @@ void() f_run1 = [ $swim1, f_run2 ] {ai_run(12);
|
||||||
if(random() < 0.5) {
|
if(random() < 0.5) {
|
||||||
sound(self, CHAN_VOICE, "fish/idle.wav", 1, ATTN_NORM);
|
sound(self, CHAN_VOICE, "fish/idle.wav", 1, ATTN_NORM);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
void() f_run2 = [ $swim3, f_run3 ] {ai_run(12);};
|
void() f_run2 = [ $swim3, f_run3 ] {ai_run(12);};
|
||||||
void() f_run3 = [ $swim5, f_run4 ] {ai_run(12);};
|
void() f_run3 = [ $swim5, f_run4 ] {ai_run(12);};
|
||||||
void() f_run4 = [ $swim7, f_run5 ] {ai_run(12);};
|
void() f_run4 = [ $swim7, f_run5 ] {ai_run(12);};
|
||||||
|
@ -73,8 +71,8 @@ void() f_run8 = [ $swim15, f_run9 ] {ai_run(12);};
|
||||||
void() f_run9 = [ $swim17, f_run1 ] {ai_run(12);};
|
void() f_run9 = [ $swim17, f_run1 ] {ai_run(12);};
|
||||||
|
|
||||||
void() fish_melee = {
|
void() fish_melee = {
|
||||||
vector delta;
|
local vector delta;
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(!self.enemy) {
|
if(!self.enemy) {
|
||||||
return; // removed before stroke
|
return; // removed before stroke
|
||||||
|
@ -151,6 +149,7 @@ void(entity attacker, float damage) fish_pain = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_fish(1 0 0) (-16 -16 -24) (16 16 24) Ambush
|
/*QUAKED monster_fish(1 0 0) (-16 -16 -24) (16 16 24) Ambush
|
||||||
*/
|
*/
|
||||||
void() monster_fish = {
|
void() monster_fish = {
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
// hknight.qc: Death Knight
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
KNIGHT
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / knight2
|
$cd id1 / models / knight2
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
|
@ -45,15 +51,10 @@ $frame w_attack21 w_attack22
|
||||||
$frame magicc1 magicc2 magicc3 magicc4 magicc5 magicc6 magicc7 magicc8
|
$frame magicc1 magicc2 magicc3 magicc4 magicc5 magicc6 magicc7 magicc8
|
||||||
$frame magicc9 magicc10 magicc11
|
$frame magicc9 magicc10 magicc11
|
||||||
|
|
||||||
void() hknight_idle_sound = {
|
|
||||||
if(random() < 0.2) {
|
|
||||||
sound(self, CHAN_VOICE, "hknight/idle.wav", 1, ATTN_NORM);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void(float offset) hknight_shot = {
|
void(float offset) hknight_shot = {
|
||||||
vector offang;
|
local vector offang;
|
||||||
vector org, vec;
|
local vector org, vec;
|
||||||
|
|
||||||
offang = vectoangles(self.enemy.origin - self.origin);
|
offang = vectoangles(self.enemy.origin - self.origin);
|
||||||
offang_y = offang_y + offset * 6;
|
offang_y = offang_y + offset * 6;
|
||||||
|
@ -123,7 +124,7 @@ void() hknight_stand9 = [ $stand9, hknight_stand1 ] {ai_stand();};
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
void() hknight_walk1 = [ $walk1, hknight_walk2 ] {
|
void() hknight_walk1 = [ $walk1, hknight_walk2 ] {
|
||||||
hknight_idle_sound();
|
hk_idle_sound();
|
||||||
ai_walk(2);
|
ai_walk(2);
|
||||||
};
|
};
|
||||||
void() hknight_walk2 = [ $walk2, hknight_walk3 ] {ai_walk(5);};
|
void() hknight_walk2 = [ $walk2, hknight_walk3 ] {ai_walk(5);};
|
||||||
|
@ -149,7 +150,7 @@ void() hknight_walk20 = [ $walk20, hknight_walk1 ] {ai_walk(2);};
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
void() hknight_run1 = [ $run1, hknight_run2 ] {
|
void() hknight_run1 = [ $run1, hknight_run2 ] {
|
||||||
hknight_idle_sound();
|
hk_idle_sound();
|
||||||
ai_run(20);
|
ai_run(20);
|
||||||
CheckForCharge();
|
CheckForCharge();
|
||||||
};
|
};
|
||||||
|
@ -216,6 +217,7 @@ void() hknight_die = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void() hknight_magica1 = [ $magica1, hknight_magica2 ] {ai_face();};
|
void() hknight_magica1 = [ $magica1, hknight_magica2 ] {ai_face();};
|
||||||
|
@ -346,6 +348,12 @@ void() hknight_watk22 = [ $w_attack22, hknight_run1 ] {ai_charge(3);};
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
void() hk_idle_sound = {
|
||||||
|
if(random() < 0.2) {
|
||||||
|
sound(self, CHAN_VOICE, "hknight/idle.wav", 1, ATTN_NORM);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void(entity attacker, float damage) hknight_pain = {
|
void(entity attacker, float damage) hknight_pain = {
|
||||||
if(self.pain_finished > time) {
|
if(self.pain_finished > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -368,6 +376,8 @@ void(entity attacker, float damage) hknight_pain = {
|
||||||
hknight_pain1();
|
hknight_pain1();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
float hknight_type;
|
||||||
|
|
||||||
void() hknight_melee = {
|
void() hknight_melee = {
|
||||||
hknight_type = hknight_type + 1;
|
hknight_type = hknight_type + 1;
|
||||||
|
|
||||||
|
@ -393,6 +403,7 @@ void() monster_hell_knight = {
|
||||||
precache_model2("progs/k_spike.mdl");
|
precache_model2("progs/k_spike.mdl");
|
||||||
precache_model2("progs/h_hellkn.mdl");
|
precache_model2("progs/h_hellkn.mdl");
|
||||||
|
|
||||||
|
|
||||||
precache_sound2("hknight/attack1.wav");
|
precache_sound2("hknight/attack1.wav");
|
||||||
precache_sound2("hknight/death1.wav");
|
precache_sound2("hknight/death1.wav");
|
||||||
precache_sound2("hknight/pain1.wav");
|
precache_sound2("hknight/pain1.wav");
|
||||||
|
|
167
source/items.qc
167
source/items.qc
|
@ -1,5 +1,3 @@
|
||||||
// items.qc: items the player can pick up
|
|
||||||
|
|
||||||
const string WEPNAME_AXE = "Axe";
|
const string WEPNAME_AXE = "Axe";
|
||||||
const string WEPNAME_SHOTGUN = "Shotgun";
|
const string WEPNAME_SHOTGUN = "Shotgun";
|
||||||
const string WEPNAME_SUPER_SHOTGUN = "Double-barrelled Shotgun";
|
const string WEPNAME_SUPER_SHOTGUN = "Double-barrelled Shotgun";
|
||||||
|
@ -11,27 +9,19 @@ const string WEPNAME_LIGHTNING = "Thunderbolt";
|
||||||
|
|
||||||
string() Key1Name = {
|
string() Key1Name = {
|
||||||
switch(world.worldtype) {
|
switch(world.worldtype) {
|
||||||
case 0:
|
case 0: return "silver key";
|
||||||
return "silver key";
|
case 1: return "silver runekey";
|
||||||
case 1:
|
case 2: return "silver keycard";
|
||||||
return "silver runekey";
|
default: return string_null;
|
||||||
case 2:
|
|
||||||
return "silver keycard";
|
|
||||||
default:
|
|
||||||
return string_null;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
string() Key2Name = {
|
string() Key2Name = {
|
||||||
switch(world.worldtype) {
|
switch(world.worldtype) {
|
||||||
case 0:
|
case 0: return "gold key";
|
||||||
return "gold key";
|
case 1: return "gold runekey";
|
||||||
case 1:
|
case 2: return "gold keycard";
|
||||||
return "gold runekey";
|
default: return string_null;
|
||||||
case 2:
|
|
||||||
return "gold keycard";
|
|
||||||
default:
|
|
||||||
return string_null;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,7 +58,7 @@ plants the object on the floor
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void() PlaceItem = {
|
void() PlaceItem = {
|
||||||
float oldz;
|
local float oldz;
|
||||||
|
|
||||||
self.mdl = self.model; // so it can be restored on respawn
|
self.mdl = self.model; // so it can be restored on respawn
|
||||||
self.flags = FL_ITEM; // make extra wide
|
self.flags = FL_ITEM; // make extra wide
|
||||||
|
@ -141,6 +131,7 @@ enum {
|
||||||
H_ROTTEN = 1,
|
H_ROTTEN = 1,
|
||||||
H_MEGA = 2,
|
H_MEGA = 2,
|
||||||
};
|
};
|
||||||
|
.float healamount, healtype;
|
||||||
|
|
||||||
void() item_health = {
|
void() item_health = {
|
||||||
self.touch = health_touch;
|
self.touch = health_touch;
|
||||||
|
@ -173,8 +164,8 @@ void() item_health = {
|
||||||
|
|
||||||
|
|
||||||
void() health_touch = {
|
void() health_touch = {
|
||||||
float amount;
|
local float amount;
|
||||||
string s;
|
local string s;
|
||||||
|
|
||||||
if(other.classname != "player") {
|
if(other.classname != "player") {
|
||||||
return;
|
return;
|
||||||
|
@ -253,7 +244,7 @@ ARMOR
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() armor_touch = {
|
void() armor_touch = {
|
||||||
float type, value, bit;
|
local float type, value, bit;
|
||||||
|
|
||||||
if(other.health <= 0) {
|
if(other.health <= 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -389,10 +380,12 @@ float(float w) RankForWeapon = {
|
||||||
Deathmatch_Weapon
|
Deathmatch_Weapon
|
||||||
|
|
||||||
Deathmatch weapon change rules for picking up a weapon
|
Deathmatch weapon change rules for picking up a weapon
|
||||||
|
|
||||||
|
.float ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void(float old, float new) Deathmatch_Weapon = {
|
void(float old, float new) Deathmatch_Weapon = {
|
||||||
float or, nr;
|
local float or, nr;
|
||||||
|
|
||||||
// change self.weapon if desired
|
// change self.weapon if desired
|
||||||
or = RankForWeapon(self.weapon);
|
or = RankForWeapon(self.weapon);
|
||||||
|
@ -408,9 +401,9 @@ weapon_touch
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void() weapon_touch = {
|
void() weapon_touch = {
|
||||||
float hadammo, best, new, old;
|
local float hadammo, best, new, old;
|
||||||
entity stemp;
|
local entity stemp;
|
||||||
float leave;
|
local float leave;
|
||||||
|
|
||||||
if(!(other.flags & FL_CLIENT)) {
|
if(!(other.flags & FL_CLIENT)) {
|
||||||
return;
|
return;
|
||||||
|
@ -606,8 +599,8 @@ AMMO
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() ammo_touch = {
|
void() ammo_touch = {
|
||||||
entity stemp;
|
local entity stemp;
|
||||||
float best;
|
local float best;
|
||||||
|
|
||||||
if(other.classname != "player") {
|
if(other.classname != "player") {
|
||||||
return;
|
return;
|
||||||
|
@ -854,8 +847,8 @@ KEYS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() key_touch = {
|
void() key_touch = {
|
||||||
entity stemp;
|
local entity stemp;
|
||||||
float best;
|
local float best;
|
||||||
|
|
||||||
if(other.classname != "player") {
|
if(other.classname != "player") {
|
||||||
return;
|
return;
|
||||||
|
@ -914,18 +907,18 @@ following:
|
||||||
void() item_key1 = {
|
void() item_key1 = {
|
||||||
self.netname = Key1Name();
|
self.netname = Key1Name();
|
||||||
switch(world.worldtype) {
|
switch(world.worldtype) {
|
||||||
case 0:
|
case 0:
|
||||||
precache_model("progs/w_s_key.mdl");
|
precache_model("progs/w_s_key.mdl");
|
||||||
setmodel(self, "progs/w_s_key.mdl");
|
setmodel(self, "progs/w_s_key.mdl");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
precache_model("progs/m_s_key.mdl");
|
precache_model("progs/m_s_key.mdl");
|
||||||
setmodel(self, "progs/m_s_key.mdl");
|
setmodel(self, "progs/m_s_key.mdl");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
precache_model2("progs/b_s_key.mdl");
|
precache_model2("progs/b_s_key.mdl");
|
||||||
setmodel(self, "progs/b_s_key.mdl");
|
setmodel(self, "progs/b_s_key.mdl");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
key_setsounds();
|
key_setsounds();
|
||||||
self.touch = key_touch;
|
self.touch = key_touch;
|
||||||
|
@ -948,18 +941,18 @@ following:
|
||||||
void() item_key2 = {
|
void() item_key2 = {
|
||||||
self.netname = Key2Name();
|
self.netname = Key2Name();
|
||||||
switch(world.worldtype) {
|
switch(world.worldtype) {
|
||||||
case 0:
|
case 0:
|
||||||
precache_model("progs/w_g_key.mdl");
|
precache_model("progs/w_g_key.mdl");
|
||||||
setmodel(self, "progs/w_g_key.mdl");
|
setmodel(self, "progs/w_g_key.mdl");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
precache_model("progs/m_g_key.mdl");
|
precache_model("progs/m_g_key.mdl");
|
||||||
setmodel(self, "progs/m_g_key.mdl");
|
setmodel(self, "progs/m_g_key.mdl");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
precache_model2("progs/b_g_key.mdl");
|
precache_model2("progs/b_g_key.mdl");
|
||||||
setmodel(self, "progs/b_g_key.mdl");
|
setmodel(self, "progs/b_g_key.mdl");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
key_setsounds();
|
key_setsounds();
|
||||||
self.touch = key_touch;
|
self.touch = key_touch;
|
||||||
|
@ -979,8 +972,8 @@ END OF LEVEL RUNES
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() sigil_touch = {
|
void() sigil_touch = {
|
||||||
entity stemp;
|
local entity stemp;
|
||||||
float best;
|
local float best;
|
||||||
|
|
||||||
if(other.classname != "player") {
|
if(other.classname != "player") {
|
||||||
return;
|
return;
|
||||||
|
@ -1046,8 +1039,8 @@ POWERUPS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() powerup_touch = {
|
void() powerup_touch = {
|
||||||
entity stemp;
|
local entity stemp;
|
||||||
float best;
|
local float best;
|
||||||
|
|
||||||
if(other.classname != "player") {
|
if(other.classname != "player") {
|
||||||
return;
|
return;
|
||||||
|
@ -1188,10 +1181,10 @@ PLAYER BACKPACKS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() BackpackTouch = {
|
void() BackpackTouch = {
|
||||||
string s;
|
local string s;
|
||||||
float best, old, new;
|
local float best, old, new;
|
||||||
entity stemp;
|
local entity stemp;
|
||||||
float acount;
|
local float acount;
|
||||||
|
|
||||||
if(other.classname != "player" || other.health <= 0) {
|
if(other.classname != "player" || other.health <= 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -1213,10 +1206,10 @@ void() BackpackTouch = {
|
||||||
self = stemp;
|
self = stemp;
|
||||||
|
|
||||||
// change weapons
|
// change weapons
|
||||||
other.ammo_shells = other.ammo_shells + self.ammo_shells;
|
other.ammo_shells = other.ammo_shells + self.ammo_shells;
|
||||||
other.ammo_nails = other.ammo_nails + self.ammo_nails;
|
other.ammo_nails = other.ammo_nails + self.ammo_nails;
|
||||||
other.ammo_rockets = other.ammo_rockets + self.ammo_rockets;
|
other.ammo_rockets = other.ammo_rockets + self.ammo_rockets;
|
||||||
other.ammo_cells = other.ammo_cells + self.ammo_cells;
|
other.ammo_cells = other.ammo_cells + self.ammo_cells;
|
||||||
|
|
||||||
new = self.items;
|
new = self.items;
|
||||||
if(!new) {
|
if(!new) {
|
||||||
|
@ -1303,7 +1296,7 @@ DropBackpack
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
entity() DropBackpack = {
|
entity() DropBackpack = {
|
||||||
entity item;
|
local entity item;
|
||||||
|
|
||||||
item = spawn();
|
item = spawn();
|
||||||
item.origin = self.origin - '0 0 24';
|
item.origin = self.origin - '0 0 24';
|
||||||
|
@ -1311,39 +1304,21 @@ entity() DropBackpack = {
|
||||||
item.weapon = self.weapon;
|
item.weapon = self.weapon;
|
||||||
|
|
||||||
switch(item.weapon) {
|
switch(item.weapon) {
|
||||||
case IT_AXE:
|
case IT_AXE: item.netname = WEPNAME_AXE; break;
|
||||||
item.netname = WEPNAME_AXE;
|
case IT_SHOTGUN: item.netname = WEPNAME_SHOTGUN; break;
|
||||||
break;
|
case IT_SUPER_SHOTGUN: item.netname = WEPNAME_SUPER_SHOTGUN; break;
|
||||||
case IT_SHOTGUN:
|
case IT_NAILGUN: item.netname = WEPNAME_NAILGUN; break;
|
||||||
item.netname = WEPNAME_SHOTGUN;
|
case IT_SUPER_NAILGUN: item.netname = WEPNAME_SUPER_NAILGUN; break;
|
||||||
break;
|
case IT_GRENADE_LAUNCHER: item.netname = WEPNAME_GRENADE_LAUNCHER; break;
|
||||||
case IT_SUPER_SHOTGUN:
|
case IT_ROCKET_LAUNCHER: item.netname = WEPNAME_ROCKET_LAUNCHER; break;
|
||||||
item.netname = WEPNAME_SUPER_SHOTGUN;
|
case IT_LIGHTNING: item.netname = WEPNAME_LIGHTNING; break;
|
||||||
break;
|
default: item.netname = ""; break;
|
||||||
case IT_NAILGUN:
|
|
||||||
item.netname = WEPNAME_NAILGUN;
|
|
||||||
break;
|
|
||||||
case IT_SUPER_NAILGUN:
|
|
||||||
item.netname = WEPNAME_SUPER_NAILGUN;
|
|
||||||
break;
|
|
||||||
case IT_GRENADE_LAUNCHER:
|
|
||||||
item.netname = WEPNAME_GRENADE_LAUNCHER;
|
|
||||||
break;
|
|
||||||
case IT_ROCKET_LAUNCHER:
|
|
||||||
item.netname = WEPNAME_ROCKET_LAUNCHER;
|
|
||||||
break;
|
|
||||||
case IT_LIGHTNING:
|
|
||||||
item.netname = WEPNAME_LIGHTNING;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
item.netname = "";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
item.ammo_shells = self.ammo_shells;
|
item.ammo_shells = self.ammo_shells;
|
||||||
item.ammo_nails = self.ammo_nails;
|
item.ammo_nails = self.ammo_nails;
|
||||||
item.ammo_rockets = self.ammo_rockets;
|
item.ammo_rockets = self.ammo_rockets;
|
||||||
item.ammo_cells = self.ammo_cells;
|
item.ammo_cells = self.ammo_cells;
|
||||||
|
|
||||||
item.velocity_z = 300;
|
item.velocity_z = 300;
|
||||||
item.velocity_x = -100 + (random() * 200);
|
item.velocity_x = -100 + (random() * 200);
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
// knight.qc: Knight
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
KNIGHT
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / knight
|
$cd id1 / models / knight
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
|
@ -69,6 +75,7 @@ void() knight_walk12 = [ $walk12, knight_walk13 ] {ai_walk(3);};
|
||||||
void() knight_walk13 = [ $walk13, knight_walk14 ] {ai_walk(4);};
|
void() knight_walk13 = [ $walk13, knight_walk14 ] {ai_walk(4);};
|
||||||
void() knight_walk14 = [ $walk14, knight_walk1 ] {ai_walk(3);};
|
void() knight_walk14 = [ $walk14, knight_walk1 ] {ai_walk(3);};
|
||||||
|
|
||||||
|
|
||||||
void() knight_run1 = [ $runb1, knight_run2 ] {
|
void() knight_run1 = [ $runb1, knight_run2 ] {
|
||||||
if(random() < 0.2) {
|
if(random() < 0.2) {
|
||||||
sound(self, CHAN_VOICE, "knight/idle.wav", 1, ATTN_IDLE);
|
sound(self, CHAN_VOICE, "knight/idle.wav", 1, ATTN_IDLE);
|
||||||
|
@ -83,6 +90,7 @@ void() knight_run6 = [ $runb6, knight_run7 ] {ai_run(20);};
|
||||||
void() knight_run7 = [ $runb7, knight_run8 ] {ai_run(14);};
|
void() knight_run7 = [ $runb7, knight_run8 ] {ai_run(14);};
|
||||||
void() knight_run8 = [ $runb8, knight_run1 ] {ai_run(6);};
|
void() knight_run8 = [ $runb8, knight_run1 ] {ai_run(6);};
|
||||||
|
|
||||||
|
|
||||||
void() knight_runatk1 = [ $runattack1, knight_runatk2 ] {
|
void() knight_runatk1 = [ $runattack1, knight_runatk2 ] {
|
||||||
if(random() > 0.5) {
|
if(random() > 0.5) {
|
||||||
sound(self, CHAN_WEAPON, "knight/sword2.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "knight/sword2.wav", 1, ATTN_NORM);
|
||||||
|
@ -113,8 +121,8 @@ void() knight_atk5 = [ $attackb5, knight_atk6 ] {ai_charge(3);};
|
||||||
void() knight_atk6 = [ $attackb6, knight_atk7 ] {ai_charge(4); ai_melee();};
|
void() knight_atk6 = [ $attackb6, knight_atk7 ] {ai_charge(4); ai_melee();};
|
||||||
void() knight_atk7 = [ $attackb7, knight_atk8 ] {ai_charge(1); ai_melee();};
|
void() knight_atk7 = [ $attackb7, knight_atk8 ] {ai_charge(1); ai_melee();};
|
||||||
void() knight_atk8 = [ $attackb8, knight_atk9 ] {ai_charge(3);
|
void() knight_atk8 = [ $attackb8, knight_atk9 ] {ai_charge(3);
|
||||||
ai_melee();
|
ai_melee();
|
||||||
};
|
};
|
||||||
void() knight_atk9 = [ $attackb9, knight_atk10] {ai_charge(1);};
|
void() knight_atk9 = [ $attackb9, knight_atk10] {ai_charge(1);};
|
||||||
void() knight_atk10 = [ $attackb10, knight_run1 ] {ai_charge(5);};
|
void() knight_atk10 = [ $attackb10, knight_run1 ] {ai_charge(5);};
|
||||||
|
|
||||||
|
@ -141,7 +149,7 @@ void() knight_painb10 = [ $painb10, knight_painb11 ] {ai_painforward(0);};
|
||||||
void() knight_painb11 = [ $painb11, knight_run1 ] {};
|
void() knight_painb11 = [ $painb11, knight_run1 ] {};
|
||||||
|
|
||||||
void(entity attacker, float damage) knight_pain = {
|
void(entity attacker, float damage) knight_pain = {
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
if(self.pain_finished > time) {
|
if(self.pain_finished > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -176,6 +184,7 @@ void() knight_bow9 = [ $kneel1, knight_bow10 ] {ai_turn();};
|
||||||
void() knight_bow10 = [ $walk1, knight_walk1 ] {ai_turn();};
|
void() knight_bow10 = [ $walk1, knight_walk1 ] {ai_turn();};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void() knight_die1 = [ $death1, knight_die2 ] {};
|
void() knight_die1 = [ $death1, knight_die2 ] {};
|
||||||
void() knight_die2 = [ $death2, knight_die3 ] {};
|
void() knight_die2 = [ $death2, knight_die3 ] {};
|
||||||
void() knight_die3 = [ $death3, knight_die4 ]
|
void() knight_die3 = [ $death3, knight_die4 ]
|
||||||
|
@ -188,6 +197,7 @@ void() knight_die8 = [ $death8, knight_die9 ] {};
|
||||||
void() knight_die9 = [ $death9, knight_die10] {};
|
void() knight_die9 = [ $death9, knight_die10] {};
|
||||||
void() knight_die10 = [ $death10, knight_die10] {};
|
void() knight_die10 = [ $death10, knight_die10] {};
|
||||||
|
|
||||||
|
|
||||||
void() knight_dieb1 = [ $deathb1, knight_dieb2 ] {};
|
void() knight_dieb1 = [ $deathb1, knight_dieb2 ] {};
|
||||||
void() knight_dieb2 = [ $deathb2, knight_dieb3 ] {};
|
void() knight_dieb2 = [ $deathb2, knight_dieb3 ] {};
|
||||||
void() knight_dieb3 = [ $deathb3, knight_dieb4 ]
|
void() knight_dieb3 = [ $deathb3, knight_dieb4 ]
|
||||||
|
@ -201,6 +211,7 @@ void() knight_dieb9 = [ $deathb9, knight_dieb10] {};
|
||||||
void() knight_dieb10 = [ $deathb10, knight_dieb11] {};
|
void() knight_dieb10 = [ $deathb10, knight_dieb11] {};
|
||||||
void() knight_dieb11 = [ $deathb11, knight_dieb11] {};
|
void() knight_dieb11 = [ $deathb11, knight_dieb11] {};
|
||||||
|
|
||||||
|
|
||||||
void() knight_die = {
|
void() knight_die = {
|
||||||
// check for gib
|
// check for gib
|
||||||
if(self.health < -40) {
|
if(self.health < -40) {
|
||||||
|
@ -221,6 +232,7 @@ void() knight_die = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_knight(1 0 0) (-16 -16 -24) (16 16 40) Ambush
|
/*QUAKED monster_knight(1 0 0) (-16 -16 -24) (16 16 40) Ambush
|
||||||
*/
|
*/
|
||||||
void() monster_knight = {
|
void() monster_knight = {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// misc.qc: various useful brushes
|
|
||||||
|
|
||||||
/*QUAKED info_null(0 0.5 0) (-4 -4 -4) (4 4 4)
|
/*QUAKED info_null(0 0.5 0) (-4 -4 -4) (4 4 4)
|
||||||
Used as a positional target for spotlights, etc.
|
Used as a positional target for spotlights, etc.
|
||||||
|
@ -150,6 +149,7 @@ void() light_flame_small_white = {
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED misc_fireball(0 .5 .8) (-8 -8 -8) (8 8 8)
|
/*QUAKED misc_fireball(0 .5 .8) (-8 -8 -8) (8 8 8)
|
||||||
Lava Balls
|
Lava Balls
|
||||||
*/
|
*/
|
||||||
|
@ -165,7 +165,7 @@ void() misc_fireball = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() fire_fly = {
|
void() fire_fly = {
|
||||||
entity fireball;
|
local entity fireball;
|
||||||
|
|
||||||
fireball = spawn();
|
fireball = spawn();
|
||||||
fireball.solid = SOLID_TRIGGER;
|
fireball.solid = SOLID_TRIGGER;
|
||||||
|
@ -186,6 +186,7 @@ void() fire_fly = {
|
||||||
self.think = fire_fly;
|
self.think = fire_fly;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() fire_touch = {
|
void() fire_touch = {
|
||||||
T_Damage(other, self, self, 20);
|
T_Damage(other, self, self, 20);
|
||||||
remove(self);
|
remove(self);
|
||||||
|
@ -193,6 +194,7 @@ void() fire_touch = {
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
void() barrel_explode = {
|
void() barrel_explode = {
|
||||||
self.takedamage = DAMAGE_NO;
|
self.takedamage = DAMAGE_NO;
|
||||||
self.classname = "explo_box";
|
self.classname = "explo_box";
|
||||||
|
@ -206,12 +208,13 @@ void() barrel_explode = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED misc_explobox(0 .5 .8) (0 0 0) (32 32 64)
|
/*QUAKED misc_explobox(0 .5 .8) (0 0 0) (32 32 64)
|
||||||
TESTING THING
|
TESTING THING
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() misc_explobox = {
|
void() misc_explobox = {
|
||||||
float oldz;
|
local float oldz;
|
||||||
|
|
||||||
self.solid = SOLID_BBOX;
|
self.solid = SOLID_BBOX;
|
||||||
self.movetype = MOVETYPE_NONE;
|
self.movetype = MOVETYPE_NONE;
|
||||||
|
@ -235,12 +238,13 @@ void() misc_explobox = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED misc_explobox2(0 .5 .8) (0 0 0) (32 32 64)
|
/*QUAKED misc_explobox2(0 .5 .8) (0 0 0) (32 32 64)
|
||||||
Smaller exploding box, REGISTERED ONLY
|
Smaller exploding box, REGISTERED ONLY
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() misc_explobox2 = {
|
void() misc_explobox2 = {
|
||||||
float oldz;
|
local float oldz;
|
||||||
|
|
||||||
self.solid = SOLID_BBOX;
|
self.solid = SOLID_BBOX;
|
||||||
self.movetype = MOVETYPE_NONE;
|
self.movetype = MOVETYPE_NONE;
|
||||||
|
@ -289,6 +293,7 @@ void() shooter_think = {
|
||||||
newmis.velocity = self.movedir * 500;
|
newmis.velocity = self.movedir * 500;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED trap_spikeshooter(0 .5 .8) (-8 -8 -8) (8 8 8) superspike laser
|
/*QUAKED trap_spikeshooter(0 .5 .8) (-8 -8 -8) (8 8 8) superspike laser
|
||||||
When triggered, fires a spike in the direction set in QuakeEd.
|
When triggered, fires a spike in the direction set in QuakeEd.
|
||||||
Laser is only for REGISTERED.
|
Laser is only for REGISTERED.
|
||||||
|
@ -306,6 +311,7 @@ void() trap_spikeshooter = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED trap_shooter(0 .5 .8) (-8 -8 -8) (8 8 8) superspike laser
|
/*QUAKED trap_shooter(0 .5 .8) (-8 -8 -8) (8 8 8) superspike laser
|
||||||
Continuously fires spikes.
|
Continuously fires spikes.
|
||||||
"wait" time between spike(1.0 default)
|
"wait" time between spike(1.0 default)
|
||||||
|
@ -322,18 +328,23 @@ void() trap_shooter = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED air_bubbles(0 .5 .8) (-8 -8 -8) (8 8 8)
|
/*QUAKED air_bubbles(0 .5 .8) (-8 -8 -8) (8 8 8)
|
||||||
|
|
||||||
testing air bubbles
|
testing air bubbles
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() air_bubbles = {
|
void() air_bubbles =
|
||||||
|
|
||||||
|
{
|
||||||
if(deathmatch) {
|
if(deathmatch) {
|
||||||
remove(self);
|
remove(self);
|
||||||
return;
|
return;
|
||||||
|
@ -344,7 +355,7 @@ void() air_bubbles = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() make_bubbles = {
|
void() make_bubbles = {
|
||||||
entity bubble;
|
local entity bubble;
|
||||||
|
|
||||||
bubble = spawn();
|
bubble = spawn();
|
||||||
setmodel(bubble, "progs/s_bubble.spr");
|
setmodel(bubble, "progs/s_bubble.spr");
|
||||||
|
@ -364,7 +375,7 @@ void() make_bubbles = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() bubble_split = {
|
void() bubble_split = {
|
||||||
entity bubble;
|
local entity bubble;
|
||||||
bubble = spawn();
|
bubble = spawn();
|
||||||
setmodel(bubble, "progs/s_bubble.spr");
|
setmodel(bubble, "progs/s_bubble.spr");
|
||||||
setorigin(bubble, self.origin);
|
setorigin(bubble, self.origin);
|
||||||
|
@ -394,8 +405,8 @@ void() bubble_remove = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() bubble_bob = {
|
void() bubble_bob = {
|
||||||
float rnd1, rnd2, rnd3;
|
local float rnd1, rnd2, rnd3;
|
||||||
vector vtmp1, modi;
|
local vector vtmp1, modi;
|
||||||
|
|
||||||
self.cnt = self.cnt + 1;
|
self.cnt = self.cnt + 1;
|
||||||
if(self.cnt == 4) {
|
if(self.cnt == 4) {
|
||||||
|
@ -455,6 +466,7 @@ void() viewthing =
|
||||||
setmodel(self, "progs/player.mdl");
|
setmodel(self, "progs/player.mdl");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
@ -479,6 +491,7 @@ void() func_wall = {
|
||||||
setmodel(self, self.model);
|
setmodel(self, self.model);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED func_illusionary(0 .5 .8) ?
|
/*QUAKED func_illusionary(0 .5 .8) ?
|
||||||
A simple entity that looks solid but lets you walk through it.
|
A simple entity that looks solid but lets you walk through it.
|
||||||
*/
|
*/
|
||||||
|
@ -599,7 +612,9 @@ void() noise_think = {
|
||||||
For optimzation testing, starts a lot of sounds.
|
For optimzation testing, starts a lot of sounds.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() misc_noisemaker = {
|
void() misc_noisemaker =
|
||||||
|
|
||||||
|
{
|
||||||
precache_sound2("enforcer/enfire.wav");
|
precache_sound2("enforcer/enfire.wav");
|
||||||
precache_sound2("enforcer/enfstop.wav");
|
precache_sound2("enforcer/enfstop.wav");
|
||||||
precache_sound2("enforcer/sight1.wav");
|
precache_sound2("enforcer/sight1.wav");
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// models.qc: model information
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
@ -16,6 +15,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot1
|
$frame shot1
|
||||||
|
|
||||||
|
|
||||||
$modelname g_nail
|
$modelname g_nail
|
||||||
$cd id1 / models / g_nail
|
$cd id1 / models / g_nail
|
||||||
$flags 8 // client side rotate
|
$flags 8 // client side rotate
|
||||||
|
@ -24,6 +24,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot1
|
$frame shot1
|
||||||
|
|
||||||
|
|
||||||
$modelname g_nail2
|
$modelname g_nail2
|
||||||
$cd id1 / models / g_nail2
|
$cd id1 / models / g_nail2
|
||||||
$flags 8 // client side rotate
|
$flags 8 // client side rotate
|
||||||
|
@ -32,6 +33,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot2
|
$frame shot2
|
||||||
|
|
||||||
|
|
||||||
$modelname g_rock
|
$modelname g_rock
|
||||||
$cd id1 / models / g_rock
|
$cd id1 / models / g_rock
|
||||||
$flags 8 // client side rotate
|
$flags 8 // client side rotate
|
||||||
|
@ -40,6 +42,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot1
|
$frame shot1
|
||||||
|
|
||||||
|
|
||||||
$modelname g_rock2
|
$modelname g_rock2
|
||||||
$cd id1 / models / g_rock2
|
$cd id1 / models / g_rock2
|
||||||
$flags 8 // client side rotate
|
$flags 8 // client side rotate
|
||||||
|
@ -71,6 +74,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame frame1 frame2 frame3 frame4 frame5 frame6 frame7 frame8 frame9
|
$frame frame1 frame2 frame3 frame4 frame5 frame6 frame7 frame8 frame9
|
||||||
|
|
||||||
|
|
||||||
$modelname v_shot
|
$modelname v_shot
|
||||||
$cd id1 / models / v_shot
|
$cd id1 / models / v_shot
|
||||||
$origin 0 0 54
|
$origin 0 0 54
|
||||||
|
@ -78,6 +82,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
|
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
|
||||||
|
|
||||||
|
|
||||||
$modelname v_shot2
|
$modelname v_shot2
|
||||||
$cd id1 / models / v_shot2
|
$cd id1 / models / v_shot2
|
||||||
$origin 0 0 56
|
$origin 0 0 56
|
||||||
|
@ -85,6 +90,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
|
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
|
||||||
|
|
||||||
|
|
||||||
$modelname v_rock2
|
$modelname v_rock2
|
||||||
$cd id1 / models / v_rock2
|
$cd id1 / models / v_rock2
|
||||||
$origin 0 0 54
|
$origin 0 0 54
|
||||||
|
@ -92,6 +98,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot6
|
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot6
|
||||||
|
|
||||||
|
|
||||||
$modelname v_rock
|
$modelname v_rock
|
||||||
$cd id1 / models / v_rock
|
$cd id1 / models / v_rock
|
||||||
$origin 0 0 54
|
$origin 0 0 54
|
||||||
|
@ -99,6 +106,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
|
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
|
||||||
|
|
||||||
|
|
||||||
$modelname v_nail2
|
$modelname v_nail2
|
||||||
$cd id1 / models / v_nail2
|
$cd id1 / models / v_nail2
|
||||||
$origin 0 0 54
|
$origin 0 0 54
|
||||||
|
@ -106,6 +114,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7 shot8 shot9
|
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7 shot8 shot9
|
||||||
|
|
||||||
|
|
||||||
$modelname v_nail
|
$modelname v_nail
|
||||||
$cd id1 / models / v_nail
|
$cd id1 / models / v_nail
|
||||||
$origin 0 0 54
|
$origin 0 0 54
|
||||||
|
@ -120,6 +129,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame shot1 shot2 shot3 shot4 shot5
|
$frame shot1 shot2 shot3 shot4 shot5
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
|
@ -170,6 +180,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame frame1
|
$frame frame1
|
||||||
|
|
||||||
|
|
||||||
$modelname quaddama
|
$modelname quaddama
|
||||||
$cd id1 / models / quaddama
|
$cd id1 / models / quaddama
|
||||||
$flags 8 // client side rotate
|
$flags 8 // client side rotate
|
||||||
|
@ -247,6 +258,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame frame1
|
$frame frame1
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
|
@ -263,6 +275,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame frame1
|
$frame frame1
|
||||||
|
|
||||||
|
|
||||||
// torso
|
// torso
|
||||||
$modelname gib2
|
$modelname gib2
|
||||||
$cd id1 / models / gib2
|
$cd id1 / models / gib2
|
||||||
|
@ -280,6 +293,7 @@ $base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$frame frame1
|
$frame frame1
|
||||||
|
|
||||||
|
|
||||||
// heads
|
// heads
|
||||||
|
|
||||||
$modelname h_player
|
$modelname h_player
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// monsters.qc: basic monster functions
|
|
||||||
|
|
||||||
/* ALL MONSTERS SHOULD BE 1 0 0 IN COLOR */
|
/* ALL MONSTERS SHOULD BE 1 0 0 IN COLOR */
|
||||||
|
|
||||||
// name =[framenum, nexttime, nextthink] {code}
|
// name =[framenum, nexttime, nextthink] {code}
|
||||||
|
@ -12,6 +10,7 @@
|
||||||
// <code>
|
// <code>
|
||||||
// };
|
// };
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
monster_use
|
monster_use
|
||||||
|
@ -52,7 +51,7 @@ enemy as activator.
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() monster_death_use = {
|
void() monster_death_use = {
|
||||||
entity ent, otemp, stemp;
|
local entity ent, otemp, stemp;
|
||||||
|
|
||||||
// fall to ground
|
// fall to ground
|
||||||
if(self.flags & FL_FLY) {
|
if(self.flags & FL_FLY) {
|
||||||
|
@ -70,11 +69,12 @@ void() monster_death_use = {
|
||||||
SUB_UseTargets();
|
SUB_UseTargets();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void() walkmonster_start_go = {
|
void() walkmonster_start_go = {
|
||||||
string stemp;
|
local string stemp;
|
||||||
entity etemp;
|
local entity etemp;
|
||||||
|
|
||||||
self.origin_z = self.origin_z + 1; // raise off floor a bit
|
self.origin_z = self.origin_z + 1; // raise off floor a bit
|
||||||
droptofloor();
|
droptofloor();
|
||||||
|
@ -120,6 +120,7 @@ void() walkmonster_start_go = {
|
||||||
self.nextthink = self.nextthink + random() * 0.5;
|
self.nextthink = self.nextthink + random() * 0.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() walkmonster_start = {
|
void() walkmonster_start = {
|
||||||
// delay drop to floor to make sure all doors have been spawned
|
// delay drop to floor to make sure all doors have been spawned
|
||||||
// spread think times so they don't all happen at same time
|
// spread think times so they don't all happen at same time
|
||||||
|
@ -129,6 +130,7 @@ void() walkmonster_start = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void() flymonster_start_go = {
|
void() flymonster_start_go = {
|
||||||
self.takedamage = DAMAGE_AIM;
|
self.takedamage = DAMAGE_AIM;
|
||||||
|
|
||||||
|
@ -175,6 +177,7 @@ void() flymonster_start = {
|
||||||
total_monsters = total_monsters + 1;
|
total_monsters = total_monsters + 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() swimmonster_start_go = {
|
void() swimmonster_start_go = {
|
||||||
if(deathmatch) {
|
if(deathmatch) {
|
||||||
remove(self);
|
remove(self);
|
||||||
|
@ -220,3 +223,4 @@ void() swimmonster_start = {
|
||||||
total_monsters = total_monsters + 1;
|
total_monsters = total_monsters + 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
// ogre.qc: Ogre
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
OGRE
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / ogre_c
|
$cd id1 / models / ogre_c
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
|
@ -43,6 +49,7 @@ $frame pull1 pull2 pull3 pull4 pull5 pull6 pull7 pull8 pull9 pull10 pull11
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
|
||||||
void() OgreGrenadeExplode = {
|
void() OgreGrenadeExplode = {
|
||||||
T_RadiusDamage(self, self.owner, 40, world);
|
T_RadiusDamage(self, self.owner, 40, world);
|
||||||
sound(self, CHAN_VOICE, "weapons/r_exp3.wav", 1, ATTN_NORM);
|
sound(self, CHAN_VOICE, "weapons/r_exp3.wav", 1, ATTN_NORM);
|
||||||
|
@ -80,7 +87,7 @@ OgreFireGrenade
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() OgreFireGrenade = {
|
void() OgreFireGrenade = {
|
||||||
entity missile, mpuff;
|
local entity missile, mpuff;
|
||||||
|
|
||||||
self.effects = self.effects | EF_MUZZLEFLASH;
|
self.effects = self.effects | EF_MUZZLEFLASH;
|
||||||
|
|
||||||
|
@ -114,6 +121,7 @@ void() OgreFireGrenade = {
|
||||||
setorigin(missile, self.origin);
|
setorigin(missile, self.origin);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -124,8 +132,8 @@ FIXME
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void(float side) chainsaw = {
|
void(float side) chainsaw = {
|
||||||
vector delta;
|
local vector delta;
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(!self.enemy) {
|
if(!self.enemy) {
|
||||||
return;
|
return;
|
||||||
|
@ -155,6 +163,7 @@ void(float side) chainsaw = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() ogre_stand1 = [ $stand1, ogre_stand2 ] {ai_stand();};
|
void() ogre_stand1 = [ $stand1, ogre_stand2 ] {ai_stand();};
|
||||||
void() ogre_stand2 = [ $stand2, ogre_stand3 ] {ai_stand();};
|
void() ogre_stand2 = [ $stand2, ogre_stand3 ] {ai_stand();};
|
||||||
void() ogre_stand3 = [ $stand3, ogre_stand4 ] {ai_stand();};
|
void() ogre_stand3 = [ $stand3, ogre_stand4 ] {ai_stand();};
|
||||||
|
@ -201,7 +210,7 @@ void() ogre_run1 = [ $run1, ogre_run2 ] {ai_run(9);
|
||||||
if(random() < 0.2) {
|
if(random() < 0.2) {
|
||||||
sound(self, CHAN_VOICE, "ogre/ogidle2.wav", 1, ATTN_IDLE);
|
sound(self, CHAN_VOICE, "ogre/ogidle2.wav", 1, ATTN_IDLE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
void() ogre_run2 = [ $run2, ogre_run3 ] {ai_run(12);};
|
void() ogre_run2 = [ $run2, ogre_run3 ] {ai_run(12);};
|
||||||
void() ogre_run3 = [ $run3, ogre_run4 ] {ai_run(8);};
|
void() ogre_run3 = [ $run3, ogre_run4 ] {ai_run(8);};
|
||||||
void() ogre_run4 = [ $run4, ogre_run5 ] {ai_run(22);};
|
void() ogre_run4 = [ $run4, ogre_run5 ] {ai_run(22);};
|
||||||
|
@ -211,8 +220,8 @@ void() ogre_run7 = [ $run7, ogre_run8 ] {ai_run(13);};
|
||||||
void() ogre_run8 = [ $run8, ogre_run1 ] {ai_run(24);};
|
void() ogre_run8 = [ $run8, ogre_run1 ] {ai_run(24);};
|
||||||
|
|
||||||
void() ogre_swing1 = [ $swing1, ogre_swing2 ] {ai_charge(11);
|
void() ogre_swing1 = [ $swing1, ogre_swing2 ] {ai_charge(11);
|
||||||
sound(self, CHAN_WEAPON, "ogre/ogsawatk.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "ogre/ogsawatk.wav", 1, ATTN_NORM);
|
||||||
};
|
};
|
||||||
void() ogre_swing2 = [ $swing2, ogre_swing3 ] {ai_charge(1);};
|
void() ogre_swing2 = [ $swing2, ogre_swing3 ] {ai_charge(1);};
|
||||||
void() ogre_swing3 = [ $swing3, ogre_swing4 ] {ai_charge(4);};
|
void() ogre_swing3 = [ $swing3, ogre_swing4 ] {ai_charge(4);};
|
||||||
void() ogre_swing4 = [ $swing4, ogre_swing5 ] {ai_charge(13);};
|
void() ogre_swing4 = [ $swing4, ogre_swing5 ] {ai_charge(13);};
|
||||||
|
@ -228,8 +237,8 @@ void() ogre_swing13 = [ $swing13, ogre_swing14 ] {ai_charge(8);};
|
||||||
void() ogre_swing14 = [ $swing14, ogre_run1 ] {ai_charge(9);};
|
void() ogre_swing14 = [ $swing14, ogre_run1 ] {ai_charge(9);};
|
||||||
|
|
||||||
void() ogre_smash1 = [ $smash1, ogre_smash2 ] {ai_charge(6);
|
void() ogre_smash1 = [ $smash1, ogre_smash2 ] {ai_charge(6);
|
||||||
sound(self, CHAN_WEAPON, "ogre/ogsawatk.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "ogre/ogsawatk.wav", 1, ATTN_NORM);
|
||||||
};
|
};
|
||||||
void() ogre_smash2 = [ $smash2, ogre_smash3 ] {ai_charge(0);};
|
void() ogre_smash2 = [ $smash2, ogre_smash3 ] {ai_charge(0);};
|
||||||
void() ogre_smash3 = [ $smash3, ogre_smash4 ] {ai_charge(0);};
|
void() ogre_smash3 = [ $smash3, ogre_smash4 ] {ai_charge(0);};
|
||||||
void() ogre_smash4 = [ $smash4, ogre_smash5 ] {ai_charge(1);};
|
void() ogre_smash4 = [ $smash4, ogre_smash5 ] {ai_charge(1);};
|
||||||
|
@ -240,9 +249,9 @@ void() ogre_smash8 = [ $smash8, ogre_smash9 ] {ai_charge(10); chainsaw(0);};
|
||||||
void() ogre_smash9 = [ $smash9, ogre_smash10 ] {ai_charge(13); chainsaw(0);};
|
void() ogre_smash9 = [ $smash9, ogre_smash10 ] {ai_charge(13); chainsaw(0);};
|
||||||
void() ogre_smash10 = [ $smash10, ogre_smash11 ] {chainsaw(1);};
|
void() ogre_smash10 = [ $smash10, ogre_smash11 ] {chainsaw(1);};
|
||||||
void() ogre_smash11 = [ $smash11, ogre_smash12 ] {ai_charge(2);
|
void() ogre_smash11 = [ $smash11, ogre_smash12 ] {ai_charge(2);
|
||||||
chainsaw(0);
|
chainsaw(0);
|
||||||
self.nextthink = self.nextthink + random() * 0.2;
|
self.nextthink = self.nextthink + random() * 0.2;
|
||||||
}; // slight variation
|
}; // slight variation
|
||||||
void() ogre_smash12 = [ $smash12, ogre_smash13 ] {ai_charge(0);};
|
void() ogre_smash12 = [ $smash12, ogre_smash13 ] {ai_charge(0);};
|
||||||
void() ogre_smash13 = [ $smash13, ogre_smash14 ] {ai_charge(4);};
|
void() ogre_smash13 = [ $smash13, ogre_smash14 ] {ai_charge(4);};
|
||||||
void() ogre_smash14 = [ $smash14, ogre_run1 ] {ai_charge(12);};
|
void() ogre_smash14 = [ $smash14, ogre_run1 ] {ai_charge(12);};
|
||||||
|
@ -261,10 +270,12 @@ void() ogre_pain3 = [ $pain3, ogre_pain4 ] {};
|
||||||
void() ogre_pain4 = [ $pain4, ogre_pain5 ] {};
|
void() ogre_pain4 = [ $pain4, ogre_pain5 ] {};
|
||||||
void() ogre_pain5 = [ $pain5, ogre_run1 ] {};
|
void() ogre_pain5 = [ $pain5, ogre_run1 ] {};
|
||||||
|
|
||||||
|
|
||||||
void() ogre_painb1 = [ $painb1, ogre_painb2 ] {};
|
void() ogre_painb1 = [ $painb1, ogre_painb2 ] {};
|
||||||
void() ogre_painb2 = [ $painb2, ogre_painb3 ] {};
|
void() ogre_painb2 = [ $painb2, ogre_painb3 ] {};
|
||||||
void() ogre_painb3 = [ $painb3, ogre_run1 ] {};
|
void() ogre_painb3 = [ $painb3, ogre_run1 ] {};
|
||||||
|
|
||||||
|
|
||||||
void() ogre_painc1 = [ $painc1, ogre_painc2 ] {};
|
void() ogre_painc1 = [ $painc1, ogre_painc2 ] {};
|
||||||
void() ogre_painc2 = [ $painc2, ogre_painc3 ] {};
|
void() ogre_painc2 = [ $painc2, ogre_painc3 ] {};
|
||||||
void() ogre_painc3 = [ $painc3, ogre_painc4 ] {};
|
void() ogre_painc3 = [ $painc3, ogre_painc4 ] {};
|
||||||
|
@ -272,6 +283,7 @@ void() ogre_painc4 = [ $painc4, ogre_painc5 ] {};
|
||||||
void() ogre_painc5 = [ $painc5, ogre_painc6 ] {};
|
void() ogre_painc5 = [ $painc5, ogre_painc6 ] {};
|
||||||
void() ogre_painc6 = [ $painc6, ogre_run1 ] {};
|
void() ogre_painc6 = [ $painc6, ogre_run1 ] {};
|
||||||
|
|
||||||
|
|
||||||
void() ogre_paind1 = [ $paind1, ogre_paind2 ] {};
|
void() ogre_paind1 = [ $paind1, ogre_paind2 ] {};
|
||||||
void() ogre_paind2 = [ $paind2, ogre_paind3 ] {ai_pain(10);};
|
void() ogre_paind2 = [ $paind2, ogre_paind3 ] {ai_pain(10);};
|
||||||
void() ogre_paind3 = [ $paind3, ogre_paind4 ] {ai_pain(9);};
|
void() ogre_paind3 = [ $paind3, ogre_paind4 ] {ai_pain(9);};
|
||||||
|
@ -305,8 +317,9 @@ void() ogre_paine13 = [ $paine13, ogre_paine14 ] {};
|
||||||
void() ogre_paine14 = [ $paine14, ogre_paine15 ] {};
|
void() ogre_paine14 = [ $paine14, ogre_paine15 ] {};
|
||||||
void() ogre_paine15 = [ $paine15, ogre_run1 ] {};
|
void() ogre_paine15 = [ $paine15, ogre_run1 ] {};
|
||||||
|
|
||||||
|
|
||||||
void(entity attacker, float damage) ogre_pain = {
|
void(entity attacker, float damage) ogre_pain = {
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
// don't make multiple pain sounds right after each other
|
// don't make multiple pain sounds right after each other
|
||||||
if(self.pain_finished > time) {
|
if(self.pain_finished > time) {
|
||||||
|
@ -397,6 +410,7 @@ void() ogre_melee = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_ogre(1 0 0) (-32 -32 -24) (32 32 64) Ambush
|
/*QUAKED monster_ogre(1 0 0) (-32 -32 -24) (32 32 64) Ambush
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -440,3 +454,4 @@ void() monster_ogre_marksman = {
|
||||||
monster_ogre();
|
monster_ogre();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
// oldone.qc: Shub-Niggurath
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
OLD ONE
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
$cd id1 / models / old_one
|
$cd id1 / models / old_one
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
$base base
|
$base base
|
||||||
$skin skin
|
$skin skin
|
||||||
$scale 1
|
$scale 1
|
||||||
|
|
||||||
|
entity shub;
|
||||||
|
|
||||||
$frame old1 old2 old3 old4 old5 old6 old7 old8 old9
|
$frame old1 old2 old3 old4 old5 old6 old7 old8 old9
|
||||||
$frame old10 old11 old12 old13 old14 old15 old16 old17 old18 old19
|
$frame old10 old11 old12 old13 old14 old15 old16 old17 old18 old19
|
||||||
$frame old20 old21 old22 old23 old24 old25 old26 old27 old28 old29
|
$frame old20 old21 old22 old23 old24 old25 old26 old27 old28 old29
|
||||||
|
@ -65,6 +72,7 @@ void() old_idle44 = [ $old44, old_idle45 ] {};
|
||||||
void() old_idle45 = [ $old45, old_idle46 ] {};
|
void() old_idle45 = [ $old45, old_idle46 ] {};
|
||||||
void() old_idle46 = [ $old46, old_idle1 ] {};
|
void() old_idle46 = [ $old46, old_idle1 ] {};
|
||||||
|
|
||||||
|
|
||||||
void() old_thrash1 = [ $shake1, old_thrash2 ] {lightstyle(0, "m");};
|
void() old_thrash1 = [ $shake1, old_thrash2 ] {lightstyle(0, "m");};
|
||||||
void() old_thrash2 = [ $shake2, old_thrash3 ] {lightstyle(0, "k");};
|
void() old_thrash2 = [ $shake2, old_thrash3 ] {lightstyle(0, "k");};
|
||||||
void() old_thrash3 = [ $shake3, old_thrash4 ] {lightstyle(0, "k");};
|
void() old_thrash3 = [ $shake3, old_thrash4 ] {lightstyle(0, "k");};
|
||||||
|
@ -80,11 +88,11 @@ void() old_thrash12 = [ $shake12, old_thrash13 ] {lightstyle(0, "i");};
|
||||||
void() old_thrash13 = [ $shake13, old_thrash14 ] {lightstyle(0, "k");};
|
void() old_thrash13 = [ $shake13, old_thrash14 ] {lightstyle(0, "k");};
|
||||||
void() old_thrash14 = [ $shake14, old_thrash15 ] {lightstyle(0, "m");};
|
void() old_thrash14 = [ $shake14, old_thrash15 ] {lightstyle(0, "m");};
|
||||||
void() old_thrash15 = [ $shake15, old_thrash16 ] {lightstyle(0, "m");
|
void() old_thrash15 = [ $shake15, old_thrash16 ] {lightstyle(0, "m");
|
||||||
self.cnt = self.cnt + 1;
|
self.cnt = self.cnt + 1;
|
||||||
if(self.cnt != 3) {
|
if(self.cnt != 3) {
|
||||||
self.think = old_thrash1;
|
self.think = old_thrash1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
void() old_thrash16 = [ $shake16, old_thrash17 ] {lightstyle(0, "g");};
|
void() old_thrash16 = [ $shake16, old_thrash17 ] {lightstyle(0, "g");};
|
||||||
void() old_thrash17 = [ $shake17, old_thrash18 ] {lightstyle(0, "c");};
|
void() old_thrash17 = [ $shake17, old_thrash18 ] {lightstyle(0, "c");};
|
||||||
void() old_thrash18 = [ $shake18, old_thrash19 ] {lightstyle(0, "b");};
|
void() old_thrash18 = [ $shake18, old_thrash19 ] {lightstyle(0, "b");};
|
||||||
|
@ -94,8 +102,8 @@ void() old_thrash20 = [ $shake20, old_thrash20 ] {finale_4();};
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void() finale_1 = {
|
void() finale_1 = {
|
||||||
entity pos, pl;
|
local entity pos, pl;
|
||||||
entity timer;
|
local entity timer;
|
||||||
|
|
||||||
intermission_exittime = time + 10000000; // never allow exit
|
intermission_exittime = time + 10000000; // never allow exit
|
||||||
intermission_running = 1;
|
intermission_running = 1;
|
||||||
|
@ -139,7 +147,7 @@ void() finale_1 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() finale_2 = {
|
void() finale_2 = {
|
||||||
vector o;
|
local vector o;
|
||||||
|
|
||||||
// start a teleport splash inside shub
|
// start a teleport splash inside shub
|
||||||
|
|
||||||
|
@ -165,10 +173,10 @@ void() finale_3 = {
|
||||||
|
|
||||||
void() finale_4 = {
|
void() finale_4 = {
|
||||||
// throw tons of meat chunks
|
// throw tons of meat chunks
|
||||||
vector oldo;
|
local vector oldo;
|
||||||
float x, y, z;
|
local float x, y, z;
|
||||||
float r;
|
local float r;
|
||||||
entity n;
|
local entity n;
|
||||||
|
|
||||||
sound(self, CHAN_VOICE, "boss2/pop2.wav", 1, ATTN_NORM);
|
sound(self, CHAN_VOICE, "boss2/pop2.wav", 1, ATTN_NORM);
|
||||||
|
|
||||||
|
@ -226,6 +234,7 @@ void() nopain = {
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_oldone(1 0 0) (-16 -16 -24) (16 16 32)
|
/*QUAKED monster_oldone(1 0 0) (-16 -16 -24) (16 16 32)
|
||||||
*/
|
*/
|
||||||
void() monster_oldone = {
|
void() monster_oldone = {
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
// plats.qc: moving platforms
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PLAT_LOW_TRIGGER = 1,
|
PLAT_LOW_TRIGGER = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
void() plat_spawn_inside_trigger = {
|
void() plat_spawn_inside_trigger = {
|
||||||
entity trigger;
|
local entity trigger;
|
||||||
vector tmin, tmax;
|
local vector tmin, tmax;
|
||||||
|
|
||||||
//
|
//
|
||||||
// middle trigger
|
// middle trigger
|
||||||
|
@ -100,6 +98,7 @@ void() plat_trigger_use = {
|
||||||
plat_go_down();
|
plat_go_down();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() plat_crush = {
|
void() plat_crush = {
|
||||||
//dprint("plat_crush\n");
|
//dprint("plat_crush\n");
|
||||||
|
|
||||||
|
@ -122,6 +121,7 @@ void() plat_use = {
|
||||||
plat_go_down();
|
plat_go_down();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED func_plat(0 .5 .8) ? PLAT_LOW_TRIGGER
|
/*QUAKED func_plat(0 .5 .8) ? PLAT_LOW_TRIGGER
|
||||||
speed default 150
|
speed default 150
|
||||||
|
|
||||||
|
@ -135,8 +135,11 @@ Set "sounds" to one of the following:
|
||||||
2) chain slow
|
2) chain slow
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() func_plat = {
|
|
||||||
entity t;
|
void() func_plat =
|
||||||
|
|
||||||
|
{
|
||||||
|
local entity t;
|
||||||
|
|
||||||
if(!self.t_length) {
|
if(!self.t_length) {
|
||||||
self.t_length = 80;
|
self.t_length = 80;
|
||||||
|
@ -164,6 +167,7 @@ void() func_plat = {
|
||||||
self.noise1 = "plats/medplat2.wav";
|
self.noise1 = "plats/medplat2.wav";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
self.mangle = self.angles;
|
self.mangle = self.angles;
|
||||||
self.angles = '0 0 0';
|
self.angles = '0 0 0';
|
||||||
|
|
||||||
|
@ -229,7 +233,7 @@ void() train_wait = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() train_next = {
|
void() train_next = {
|
||||||
entity targ;
|
local entity targ;
|
||||||
|
|
||||||
targ = find(world, targetname, self.target);
|
targ = find(world, targetname, self.target);
|
||||||
self.target = targ.target;
|
self.target = targ.target;
|
||||||
|
@ -245,8 +249,10 @@ void() train_next = {
|
||||||
SUB_CalcMove(targ.origin - self.mins, self.speed, train_wait);
|
SUB_CalcMove(targ.origin - self.mins, self.speed, train_wait);
|
||||||
};
|
};
|
||||||
|
|
||||||
void() func_train_find = {
|
void() func_train_find =
|
||||||
entity targ;
|
|
||||||
|
{
|
||||||
|
local entity targ;
|
||||||
|
|
||||||
targ = find(world, targetname, self.target);
|
targ = find(world, targetname, self.target);
|
||||||
self.target = targ.target;
|
self.target = targ.target;
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
// player.qc: the player entity
|
|
||||||
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
PLAYER
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / player_4
|
$cd id1 / models / player_4
|
||||||
$origin 0 - 6 24
|
$origin 0 - 6 24
|
||||||
|
@ -20,6 +27,7 @@ $frame stand1 stand2 stand3 stand4 stand5
|
||||||
$frame axstnd1 axstnd2 axstnd3 axstnd4 axstnd5 axstnd6
|
$frame axstnd1 axstnd2 axstnd3 axstnd4 axstnd5 axstnd6
|
||||||
$frame axstnd7 axstnd8 axstnd9 axstnd10 axstnd11 axstnd12
|
$frame axstnd7 axstnd8 axstnd9 axstnd10 axstnd11 axstnd12
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// pain
|
// pain
|
||||||
//
|
//
|
||||||
|
@ -27,6 +35,7 @@ $frame axpain1 axpain2 axpain3 axpain4 axpain5 axpain6
|
||||||
|
|
||||||
$frame pain1 pain2 pain3 pain4 pain5 pain6
|
$frame pain1 pain2 pain3 pain4 pain5 pain6
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// death
|
// death
|
||||||
//
|
//
|
||||||
|
@ -68,6 +77,7 @@ $frame axattc1 axattc2 axattc3 axattc4 axattc5 axattc6
|
||||||
|
|
||||||
$frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
|
$frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
PLAYER
|
PLAYER
|
||||||
|
@ -118,9 +128,10 @@ void() player_run = [ $rockrun1, player_run ] {
|
||||||
self.walkframe = self.walkframe + 1;
|
self.walkframe = self.walkframe + 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() player_shot1 = [$shotatt1, player_shot2 ] {self.weaponframe = 1;
|
void() player_shot1 = [$shotatt1, player_shot2 ] {self.weaponframe = 1;
|
||||||
self.effects = self.effects | EF_MUZZLEFLASH;
|
self.effects = self.effects | EF_MUZZLEFLASH;
|
||||||
};
|
};
|
||||||
void() player_shot2 = [$shotatt2, player_shot3 ] {self.weaponframe = 2;};
|
void() player_shot2 = [$shotatt2, player_shot3 ] {self.weaponframe = 2;};
|
||||||
void() player_shot3 = [$shotatt3, player_shot4 ] {self.weaponframe = 3;};
|
void() player_shot3 = [$shotatt3, player_shot4 ] {self.weaponframe = 3;};
|
||||||
void() player_shot4 = [$shotatt4, player_shot5 ] {self.weaponframe = 4;};
|
void() player_shot4 = [$shotatt4, player_shot5 ] {self.weaponframe = 4;};
|
||||||
|
@ -147,6 +158,7 @@ void() player_axed2 = [$axattd2, player_axed3 ] {self.weaponframe = 6;};
|
||||||
void() player_axed3 = [$axattd3, player_axed4 ] {self.weaponframe = 7; W_FireAxe();};
|
void() player_axed3 = [$axattd3, player_axed4 ] {self.weaponframe = 7; W_FireAxe();};
|
||||||
void() player_axed4 = [$axattd4, player_run ] {self.weaponframe = 8;};
|
void() player_axed4 = [$axattd4, player_run ] {self.weaponframe = 8;};
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void() player_nail1 = [$nailatt1, player_nail2 ] {
|
void() player_nail1 = [$nailatt1, player_nail2 ] {
|
||||||
|
@ -215,9 +227,10 @@ void() player_light2 = [$light2, player_light1 ] {
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
void() player_rocket1 = [$rockatt1, player_rocket2 ] {self.weaponframe = 1;
|
void() player_rocket1 = [$rockatt1, player_rocket2 ] {self.weaponframe = 1;
|
||||||
self.effects = self.effects | EF_MUZZLEFLASH;
|
self.effects = self.effects | EF_MUZZLEFLASH;
|
||||||
};
|
};
|
||||||
void() player_rocket2 = [$rockatt2, player_rocket3 ] {self.weaponframe = 2;};
|
void() player_rocket2 = [$rockatt2, player_rocket3 ] {self.weaponframe = 2;};
|
||||||
void() player_rocket3 = [$rockatt3, player_rocket4 ] {self.weaponframe = 3;};
|
void() player_rocket3 = [$rockatt3, player_rocket4 ] {self.weaponframe = 3;};
|
||||||
void() player_rocket4 = [$rockatt4, player_rocket5 ] {self.weaponframe = 4;};
|
void() player_rocket4 = [$rockatt4, player_rocket5 ] {self.weaponframe = 4;};
|
||||||
|
@ -225,7 +238,7 @@ void() player_rocket5 = [$rockatt5, player_rocket6 ] {self.weaponframe = 5;};
|
||||||
void() player_rocket6 = [$rockatt6, player_run ] {self.weaponframe = 6;};
|
void() player_rocket6 = [$rockatt6, player_run ] {self.weaponframe = 6;};
|
||||||
|
|
||||||
void() PainSound = {
|
void() PainSound = {
|
||||||
float rs;
|
local float rs;
|
||||||
|
|
||||||
if(self.health < 0) {
|
if(self.health < 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -282,6 +295,7 @@ void() PainSound = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rs = rint((random() * 5) + 1);
|
rs = rint((random() * 5) + 1);
|
||||||
|
|
||||||
self.noise = "";
|
self.noise = "";
|
||||||
|
@ -334,7 +348,7 @@ void() player_pain = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() DeathBubblesSpawn = {
|
void() DeathBubblesSpawn = {
|
||||||
entity bubble;
|
local entity bubble;
|
||||||
if(self.owner.waterlevel != 3) {
|
if(self.owner.waterlevel != 3) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -359,7 +373,7 @@ void() DeathBubblesSpawn = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void(float num_bubbles) DeathBubbles = {
|
void(float num_bubbles) DeathBubbles = {
|
||||||
entity bubble_spawner;
|
local entity bubble_spawner;
|
||||||
|
|
||||||
bubble_spawner = spawn();
|
bubble_spawner = spawn();
|
||||||
setorigin(bubble_spawner, self.origin);
|
setorigin(bubble_spawner, self.origin);
|
||||||
|
@ -373,8 +387,9 @@ void(float num_bubbles) DeathBubbles = {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() DeathSound = {
|
void() DeathSound = {
|
||||||
float rs;
|
local float rs;
|
||||||
|
|
||||||
// water death sounds
|
// water death sounds
|
||||||
if(self.waterlevel == 3) {
|
if(self.waterlevel == 3) {
|
||||||
|
@ -404,6 +419,7 @@ void() DeathSound = {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() PlayerDead = {
|
void() PlayerDead = {
|
||||||
self.nextthink = -1;
|
self.nextthink = -1;
|
||||||
// allow respawn after a certain time
|
// allow respawn after a certain time
|
||||||
|
@ -411,7 +427,7 @@ void() PlayerDead = {
|
||||||
};
|
};
|
||||||
|
|
||||||
vector(float dm) VelocityForDamage = {
|
vector(float dm) VelocityForDamage = {
|
||||||
vector v;
|
local vector v;
|
||||||
|
|
||||||
v_x = 100 * crandom();
|
v_x = 100 * crandom();
|
||||||
v_y = 100 * crandom();
|
v_y = 100 * crandom();
|
||||||
|
@ -431,7 +447,7 @@ vector(float dm) VelocityForDamage = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void(string gibname, float dm) ThrowGib = {
|
void(string gibname, float dm) ThrowGib = {
|
||||||
entity new;
|
local entity new;
|
||||||
|
|
||||||
new = spawn();
|
new = spawn();
|
||||||
new.origin = self.origin;
|
new.origin = self.origin;
|
||||||
|
@ -465,6 +481,7 @@ void(string gibname, float dm) ThrowHead = {
|
||||||
self.avelocity = crandom() * '0 600 0';
|
self.avelocity = crandom() * '0 600 0';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() GibPlayer = {
|
void() GibPlayer = {
|
||||||
ThrowHead("progs/h_player.mdl", self.health);
|
ThrowHead("progs/h_player.mdl", self.health);
|
||||||
ThrowGib("progs/gib1.mdl", self.health);
|
ThrowGib("progs/gib1.mdl", self.health);
|
||||||
|
@ -491,7 +508,7 @@ void() GibPlayer = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() PlayerDie = {
|
void() PlayerDie = {
|
||||||
float i;
|
local float i;
|
||||||
|
|
||||||
self.items = self.items - (self.items & IT_INVISIBILITY);
|
self.items = self.items - (self.items & IT_INVISIBILITY);
|
||||||
self.invisible_finished = 0; // don't die as eyes
|
self.invisible_finished = 0; // don't die as eyes
|
||||||
|
@ -557,6 +574,7 @@ void() set_suicide_frame = {
|
||||||
self.nextthink = -1;
|
self.nextthink = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() player_diea1 = [ $deatha1, player_diea2 ] {};
|
void() player_diea1 = [ $deatha1, player_diea2 ] {};
|
||||||
void() player_diea2 = [ $deatha2, player_diea3 ] {};
|
void() player_diea2 = [ $deatha2, player_diea3 ] {};
|
||||||
void() player_diea3 = [ $deatha3, player_diea4 ] {};
|
void() player_diea3 = [ $deatha3, player_diea4 ] {};
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
// shalrath.qc: Vore
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
SHAL-RATH
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
$cd id1 / models / shalrath
|
$cd id1 / models / shalrath
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
$base base
|
$base base
|
||||||
|
@ -83,6 +88,7 @@ void() shal_death5 = [ $death5, shal_death6 ] {};
|
||||||
void() shal_death6 = [ $death6, shal_death7 ] {};
|
void() shal_death6 = [ $death6, shal_death7 ] {};
|
||||||
void() shal_death7 = [ $death7, shal_death7 ] {};
|
void() shal_death7 = [ $death7, shal_death7 ] {};
|
||||||
|
|
||||||
|
|
||||||
void() shalrath_pain = {
|
void() shalrath_pain = {
|
||||||
if(self.pain_finished > time) {
|
if(self.pain_finished > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -116,9 +122,9 @@ ShalMissile
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() ShalMissile = {
|
void() ShalMissile = {
|
||||||
entity missile;
|
local entity missile;
|
||||||
vector dir;
|
local vector dir;
|
||||||
float dist, flytime;
|
local float dist, flytime;
|
||||||
|
|
||||||
dir = normalize((self.enemy.origin + '0 0 10') - self.origin);
|
dir = normalize((self.enemy.origin + '0 0 10') - self.origin);
|
||||||
dist = vlen(self.enemy.origin - self.origin);
|
dist = vlen(self.enemy.origin - self.origin);
|
||||||
|
@ -149,7 +155,7 @@ void() ShalMissile = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() ShalHome = {
|
void() ShalHome = {
|
||||||
vector dir, vtemp;
|
local vector dir, vtemp;
|
||||||
vtemp = self.enemy.origin + '0 0 10';
|
vtemp = self.enemy.origin + '0 0 10';
|
||||||
if(self.enemy.health < 1) {
|
if(self.enemy.health < 1) {
|
||||||
remove(self);
|
remove(self);
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
// shambler.qc: Shambler
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
SHAMBLER
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / shams
|
$cd id1 / models / shams
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
|
@ -63,7 +69,7 @@ void() sham_walk12 = [ $walk12, sham_walk1 ] {ai_walk(7);
|
||||||
if(random() > 0.8) {
|
if(random() > 0.8) {
|
||||||
sound(self, CHAN_VOICE, "shambler/sidle.wav", 1, ATTN_IDLE);
|
sound(self, CHAN_VOICE, "shambler/sidle.wav", 1, ATTN_IDLE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void() sham_run1 = [ $run1, sham_run2 ] {ai_run(20);};
|
void() sham_run1 = [ $run1, sham_run2 ] {ai_run(20);};
|
||||||
void() sham_run2 = [ $run2, sham_run3 ] {ai_run(24);};
|
void() sham_run2 = [ $run2, sham_run3 ] {ai_run(24);};
|
||||||
|
@ -74,7 +80,7 @@ void() sham_run6 = [ $run6, sham_run1 ] {ai_run(20);
|
||||||
if(random() > 0.8) {
|
if(random() > 0.8) {
|
||||||
sound(self, CHAN_VOICE, "shambler/sidle.wav", 1, ATTN_IDLE);
|
sound(self, CHAN_VOICE, "shambler/sidle.wav", 1, ATTN_IDLE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void() sham_smash1 = [ $smash1, sham_smash2 ] {
|
void() sham_smash1 = [ $smash1, sham_smash2 ] {
|
||||||
sound(self, CHAN_VOICE, "shambler/melee1.wav", 1, ATTN_NORM);
|
sound(self, CHAN_VOICE, "shambler/melee1.wav", 1, ATTN_NORM);
|
||||||
|
@ -89,8 +95,8 @@ void() sham_smash7 = [ $smash7, sham_smash8 ] {ai_charge(0);};
|
||||||
void() sham_smash8 = [ $smash8, sham_smash9 ] {ai_charge(0);};
|
void() sham_smash8 = [ $smash8, sham_smash9 ] {ai_charge(0);};
|
||||||
void() sham_smash9 = [ $smash9, sham_smash10 ] {ai_charge(0);};
|
void() sham_smash9 = [ $smash9, sham_smash10 ] {ai_charge(0);};
|
||||||
void() sham_smash10 = [ $smash10, sham_smash11 ] {
|
void() sham_smash10 = [ $smash10, sham_smash11 ] {
|
||||||
vector delta;
|
local vector delta;
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(!self.enemy) {
|
if(!self.enemy) {
|
||||||
return;
|
return;
|
||||||
|
@ -117,8 +123,8 @@ void() sham_smash11 = [ $smash11, sham_smash12 ] {ai_charge(5);};
|
||||||
void() sham_smash12 = [ $smash12, sham_run1 ] {ai_charge(4);};
|
void() sham_smash12 = [ $smash12, sham_run1 ] {ai_charge(4);};
|
||||||
|
|
||||||
void(float side) ShamClaw = {
|
void(float side) ShamClaw = {
|
||||||
vector delta;
|
local vector delta;
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(!self.enemy) {
|
if(!self.enemy) {
|
||||||
return;
|
return;
|
||||||
|
@ -175,10 +181,10 @@ void() sham_swingr9 = [ $swingr9, sham_run1 ] {ai_charge(1);
|
||||||
if(random() < 0.5) {
|
if(random() < 0.5) {
|
||||||
self.think = sham_swingl1;
|
self.think = sham_swingl1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void() sham_melee = {
|
void() sham_melee = {
|
||||||
float chance;
|
local float chance;
|
||||||
|
|
||||||
chance = random();
|
chance = random();
|
||||||
if(chance > 0.6 || self.health == 600) {
|
if(chance > 0.6 || self.health == 600) {
|
||||||
|
@ -190,10 +196,11 @@ void() sham_melee = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void() CastLightning = {
|
void() CastLightning = {
|
||||||
vector org, dir;
|
local vector org, dir;
|
||||||
|
|
||||||
self.effects = self.effects | EF_MUZZLEFLASH;
|
self.effects = self.effects | EF_MUZZLEFLASH;
|
||||||
|
|
||||||
|
@ -220,23 +227,23 @@ void() CastLightning = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() sham_magic1 = [ $magic1, sham_magic2 ] {ai_face();
|
void() sham_magic1 = [ $magic1, sham_magic2 ] {ai_face();
|
||||||
sound(self, CHAN_WEAPON, "shambler/sattck1.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "shambler/sattck1.wav", 1, ATTN_NORM);
|
||||||
};
|
};
|
||||||
void() sham_magic2 = [ $magic2, sham_magic3 ] {ai_face();};
|
void() sham_magic2 = [ $magic2, sham_magic3 ] {ai_face();};
|
||||||
void() sham_magic3 = [ $magic3, sham_magic4 ] {ai_face();
|
void() sham_magic3 = [ $magic3, sham_magic4 ] {ai_face();
|
||||||
self.nextthink = self.nextthink + 0.2;
|
self.nextthink = self.nextthink + 0.2;
|
||||||
entity o;
|
local entity o;
|
||||||
|
|
||||||
self.effects = self.effects | EF_MUZZLEFLASH;
|
self.effects = self.effects | EF_MUZZLEFLASH;
|
||||||
ai_face();
|
ai_face();
|
||||||
self.owner = spawn();
|
self.owner = spawn();
|
||||||
o = self.owner;
|
o = self.owner;
|
||||||
setmodel(o, "progs/s_light.mdl");
|
setmodel(o, "progs/s_light.mdl");
|
||||||
setorigin(o, self.origin);
|
setorigin(o, self.origin);
|
||||||
o.angles = self.angles;
|
o.angles = self.angles;
|
||||||
o.nextthink = time + 0.7;
|
o.nextthink = time + 0.7;
|
||||||
o.think = SUB_Remove;
|
o.think = SUB_Remove;
|
||||||
};
|
};
|
||||||
void() sham_magic4 = [ $magic4, sham_magic5 ] {
|
void() sham_magic4 = [ $magic4, sham_magic5 ] {
|
||||||
self.effects = self.effects | EF_MUZZLEFLASH;
|
self.effects = self.effects | EF_MUZZLEFLASH;
|
||||||
self.owner.frame = 1;
|
self.owner.frame = 1;
|
||||||
|
@ -262,6 +269,7 @@ void() sham_magic11 = [ $magic11, sham_magic12 ] {
|
||||||
void() sham_magic12 = [ $magic12, sham_run1 ] {};
|
void() sham_magic12 = [ $magic12, sham_run1 ] {};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void() sham_pain1 = [ $pain1, sham_pain2 ] {};
|
void() sham_pain1 = [ $pain1, sham_pain2 ] {};
|
||||||
void() sham_pain2 = [ $pain2, sham_pain3 ] {};
|
void() sham_pain2 = [ $pain2, sham_pain3 ] {};
|
||||||
void() sham_pain3 = [ $pain3, sham_pain4 ] {};
|
void() sham_pain3 = [ $pain3, sham_pain4 ] {};
|
||||||
|
@ -288,6 +296,7 @@ void(entity attacker, float damage) sham_pain = {
|
||||||
sham_pain1();
|
sham_pain1();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void() sham_death1 = [ $death1, sham_death2 ] {};
|
void() sham_death1 = [ $death1, sham_death2 ] {};
|
||||||
|
@ -320,6 +329,7 @@ void() sham_die = {
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_shambler(1 0 0) (-32 -32 -24) (32 32 64) Ambush
|
/*QUAKED monster_shambler(1 0 0) (-32 -32 -24) (32 32 64) Ambush
|
||||||
*/
|
*/
|
||||||
void() monster_shambler = {
|
void() monster_shambler = {
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
// soldier.qc: Grunt
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
SOLDIER / PLAYER
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / soldier3
|
$cd id1 / models / soldier3
|
||||||
$origin 0 - 6 24
|
$origin 0 - 6 24
|
||||||
|
@ -95,14 +101,15 @@ void() army_atk2 = [ $shoot2, army_atk3 ] {ai_face();};
|
||||||
void() army_atk3 = [ $shoot3, army_atk4 ] {ai_face();};
|
void() army_atk3 = [ $shoot3, army_atk4 ] {ai_face();};
|
||||||
void() army_atk4 = [ $shoot4, army_atk5 ] {ai_face();};
|
void() army_atk4 = [ $shoot4, army_atk5 ] {ai_face();};
|
||||||
void() army_atk5 = [ $shoot5, army_atk6 ] {ai_face();
|
void() army_atk5 = [ $shoot5, army_atk6 ] {ai_face();
|
||||||
army_fire();
|
army_fire();
|
||||||
self.effects = self.effects | EF_MUZZLEFLASH;
|
self.effects = self.effects | EF_MUZZLEFLASH;
|
||||||
};
|
};
|
||||||
void() army_atk6 = [ $shoot6, army_atk7 ] {ai_face();};
|
void() army_atk6 = [ $shoot6, army_atk7 ] {ai_face();};
|
||||||
void() army_atk7 = [ $shoot7, army_atk8 ] {ai_face(); SUB_CheckRefire(army_atk1);};
|
void() army_atk7 = [ $shoot7, army_atk8 ] {ai_face(); SUB_CheckRefire(army_atk1);};
|
||||||
void() army_atk8 = [ $shoot8, army_atk9 ] {ai_face();};
|
void() army_atk8 = [ $shoot8, army_atk9 ] {ai_face();};
|
||||||
void() army_atk9 = [ $shoot9, army_run1 ] {ai_face();};
|
void() army_atk9 = [ $shoot9, army_run1 ] {ai_face();};
|
||||||
|
|
||||||
|
|
||||||
void() army_pain1 = [ $pain1, army_pain2 ] {};
|
void() army_pain1 = [ $pain1, army_pain2 ] {};
|
||||||
void() army_pain2 = [ $pain2, army_pain3 ] {};
|
void() army_pain2 = [ $pain2, army_pain3 ] {};
|
||||||
void() army_pain3 = [ $pain3, army_pain4 ] {};
|
void() army_pain3 = [ $pain3, army_pain4 ] {};
|
||||||
|
@ -140,7 +147,7 @@ void() army_painc12 = [ $painc12, army_painc13] {ai_painforward(8);};
|
||||||
void() army_painc13 = [ $painc13, army_run1] {};
|
void() army_painc13 = [ $painc13, army_run1] {};
|
||||||
|
|
||||||
void(entity attacker, float damage) army_pain = {
|
void(entity attacker, float damage) army_pain = {
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
if(self.pain_finished > time) {
|
if(self.pain_finished > time) {
|
||||||
return;
|
return;
|
||||||
|
@ -163,9 +170,10 @@ void(entity attacker, float damage) army_pain = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() army_fire = {
|
void() army_fire = {
|
||||||
vector dir;
|
local vector dir;
|
||||||
entity en;
|
local entity en;
|
||||||
|
|
||||||
ai_face();
|
ai_face();
|
||||||
|
|
||||||
|
@ -181,6 +189,7 @@ void() army_fire = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void() army_die1 = [ $death1, army_die2 ] {};
|
void() army_die1 = [ $death1, army_die2 ] {};
|
||||||
void() army_die2 = [ $death2, army_die3 ] {};
|
void() army_die2 = [ $death2, army_die3 ] {};
|
||||||
void() army_die3 = [ $death3, army_die4 ]
|
void() army_die3 = [ $death3, army_die4 ]
|
||||||
|
@ -206,6 +215,7 @@ void() army_cdie9 = [ $deathc9, army_cdie10 ] {};
|
||||||
void() army_cdie10 = [ $deathc10, army_cdie11 ] {};
|
void() army_cdie10 = [ $deathc10, army_cdie11 ] {};
|
||||||
void() army_cdie11 = [ $deathc11, army_cdie11 ] {};
|
void() army_cdie11 = [ $deathc11, army_cdie11 ] {};
|
||||||
|
|
||||||
|
|
||||||
void() army_die = {
|
void() army_die = {
|
||||||
// check for gib
|
// check for gib
|
||||||
if(self.health < -35) {
|
if(self.health < -35) {
|
||||||
|
@ -226,6 +236,7 @@ void() army_die = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_army(1 0 0) (-16 -16 -24) (16 16 40) Ambush
|
/*QUAKED monster_army(1 0 0) (-16 -16 -24) (16 16 40) Ambush
|
||||||
*/
|
*/
|
||||||
void() monster_army = {
|
void() monster_army = {
|
||||||
|
@ -248,6 +259,7 @@ void() monster_army = {
|
||||||
|
|
||||||
precache_sound("player/udeath.wav"); // gib death
|
precache_sound("player/udeath.wav"); // gib death
|
||||||
|
|
||||||
|
|
||||||
self.solid = SOLID_SLIDEBOX;
|
self.solid = SOLID_SLIDEBOX;
|
||||||
self.movetype = MOVETYPE_STEP;
|
self.movetype = MOVETYPE_STEP;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// sprites.qc: sprite information
|
|
||||||
|
// these are the only sprites still in the game...
|
||||||
|
|
||||||
$spritename s_explod
|
$spritename s_explod
|
||||||
$type vp_parallel
|
$type vp_parallel
|
||||||
|
@ -10,12 +11,14 @@ $frame 24 88 56 56
|
||||||
$frame 120 88 56 56
|
$frame 120 88 56 56
|
||||||
$frame 216 88 56 56
|
$frame 216 88 56 56
|
||||||
|
|
||||||
|
|
||||||
$spritename s_bubble
|
$spritename s_bubble
|
||||||
$type vp_parallel
|
$type vp_parallel
|
||||||
$load id1 / gfx / sprites / bubble.lbm
|
$load id1 / gfx / sprites / bubble.lbm
|
||||||
$frame 16 16 16 16
|
$frame 16 16 16 16
|
||||||
$frame 40 16 16 16
|
$frame 40 16 16 16
|
||||||
|
|
||||||
|
|
||||||
$spritename s_light
|
$spritename s_light
|
||||||
$type vp_parallel
|
$type vp_parallel
|
||||||
$load id1 / gfx / sprites / light.lbm
|
$load id1 / gfx / sprites / light.lbm
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
// subs.qc: subroutines for think frames
|
|
||||||
|
|
||||||
void() SUB_Null = {};
|
void() SUB_Null = {};
|
||||||
|
|
||||||
void() SUB_Remove = {remove(self);};
|
void() SUB_Remove = {remove(self);};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
QuakeEd only writes a single float for angles(bad idea), so up and down are
|
QuakeEd only writes a single float for angles(bad idea), so up and down are
|
||||||
just constant angles.
|
just constant angles.
|
||||||
|
@ -48,7 +49,7 @@ self.origin traveling at speed
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt = {
|
void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt = {
|
||||||
entity stemp;
|
local entity stemp;
|
||||||
stemp = self;
|
stemp = self;
|
||||||
self = ent;
|
self = ent;
|
||||||
|
|
||||||
|
@ -57,8 +58,8 @@ void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void(vector tdest, float tspeed, void() func) SUB_CalcMove = {
|
void(vector tdest, float tspeed, void() func) SUB_CalcMove = {
|
||||||
vector vdestdelta;
|
local vector vdestdelta;
|
||||||
float len, traveltime;
|
local float len, traveltime;
|
||||||
|
|
||||||
if(!tspeed) {
|
if(!tspeed) {
|
||||||
objerror("No speed is defined!");
|
objerror("No speed is defined!");
|
||||||
|
@ -110,6 +111,7 @@ void() SUB_CalcMoveDone = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
SUB_CalcAngleMove
|
SUB_CalcAngleMove
|
||||||
|
@ -121,7 +123,7 @@ The calling function should make sure self.think is valid
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void(entity ent, vector destangle, float tspeed, void() func) SUB_CalcAngleMoveEnt = {
|
void(entity ent, vector destangle, float tspeed, void() func) SUB_CalcAngleMoveEnt = {
|
||||||
entity stemp;
|
local entity stemp;
|
||||||
stemp = self;
|
stemp = self;
|
||||||
self = ent;
|
self = ent;
|
||||||
SUB_CalcAngleMove(destangle, tspeed, func);
|
SUB_CalcAngleMove(destangle, tspeed, func);
|
||||||
|
@ -129,8 +131,8 @@ void(entity ent, vector destangle, float tspeed, void() func) SUB_CalcAngleMoveE
|
||||||
};
|
};
|
||||||
|
|
||||||
void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove = {
|
void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove = {
|
||||||
vector destdelta;
|
local vector destdelta;
|
||||||
float len, traveltime;
|
local float len, traveltime;
|
||||||
|
|
||||||
if(!tspeed) {
|
if(!tspeed) {
|
||||||
objerror("No speed is defined!");
|
objerror("No speed is defined!");
|
||||||
|
@ -170,6 +172,7 @@ void() SUB_CalcAngleMoveDone = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
void() DelayThink = {
|
void() DelayThink = {
|
||||||
|
@ -198,7 +201,7 @@ match(string)self.target and call their .use function
|
||||||
==============================
|
==============================
|
||||||
*/
|
*/
|
||||||
void() SUB_UseTargets = {
|
void() SUB_UseTargets = {
|
||||||
entity t, stemp, otemp, act;
|
local entity t, stemp, otemp, act;
|
||||||
|
|
||||||
//
|
//
|
||||||
// check for a delay
|
// check for a delay
|
||||||
|
@ -216,6 +219,7 @@ void() SUB_UseTargets = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// print the message
|
// print the message
|
||||||
//
|
//
|
||||||
|
@ -266,8 +270,10 @@ void() SUB_UseTargets = {
|
||||||
} while(1);
|
} while(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
in nightmare mode, all attack_finished times become 0
|
in nightmare mode, all attack_finished times become 0
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
// tarbaby.qc: Spawn
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
BLOB
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / tarbaby
|
$cd id1 / models / tarbaby
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
|
@ -76,10 +82,12 @@ void() tbaby_run23 = [ $run23, tbaby_run24 ] {ai_run(2);};
|
||||||
void() tbaby_run24 = [ $run24, tbaby_run25 ] {ai_run(2);};
|
void() tbaby_run24 = [ $run24, tbaby_run25 ] {ai_run(2);};
|
||||||
void() tbaby_run25 = [ $run25, tbaby_run1 ] {ai_run(2);};
|
void() tbaby_run25 = [ $run25, tbaby_run1 ] {ai_run(2);};
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
void() Tar_JumpTouch = {
|
void() Tar_JumpTouch = {
|
||||||
float ldmg;
|
local float ldmg;
|
||||||
|
|
||||||
if(other.takedamage && other.classname != self.classname) {
|
if(other.takedamage && other.classname != self.classname) {
|
||||||
if(vlen(self.velocity) > 400) {
|
if(vlen(self.velocity) > 400) {
|
||||||
|
@ -91,6 +99,7 @@ void() Tar_JumpTouch = {
|
||||||
sound(self, CHAN_WEAPON, "blob/land1.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "blob/land1.wav", 1, ATTN_NORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!checkbottom(self)) {
|
if(!checkbottom(self)) {
|
||||||
if(self.flags & FL_ONGROUND) {
|
if(self.flags & FL_ONGROUND) {
|
||||||
// jump randomly to not get hung up
|
// jump randomly to not get hung up
|
||||||
|
@ -142,6 +151,7 @@ void() tbaby_jump5 = [ $jump5, tbaby_jump6 ] {
|
||||||
void() tbaby_jump6 = [ $jump6, tbaby_fly1 ] {};
|
void() tbaby_jump6 = [ $jump6, tbaby_fly1 ] {};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
void() tbaby_die1 = [ $exp, tbaby_die2 ] {
|
void() tbaby_die1 = [ $exp, tbaby_die2 ] {
|
||||||
|
@ -164,6 +174,7 @@ void() tbaby_die2 = [ $exp, tbaby_run1 ] {
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED monster_tarbaby(1 0 0) (-16 -16 -24) (16 16 24) Ambush
|
/*QUAKED monster_tarbaby(1 0 0) (-16 -16 -24) (16 16 24) Ambush
|
||||||
*/
|
*/
|
||||||
void() monster_tarbaby = {
|
void() monster_tarbaby = {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// triggers.qc: triggerable entities
|
|
||||||
|
|
||||||
void() trigger_reactivate = {
|
void() trigger_reactivate = {
|
||||||
self.solid = SOLID_TRIGGER;
|
self.solid = SOLID_TRIGGER;
|
||||||
|
@ -23,6 +22,7 @@ void() multi_wait = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// the trigger was just touched/killed/used
|
// the trigger was just touched/killed/used
|
||||||
// self.enemy should be set to the activator so it can be held through a delay
|
// self.enemy should be set to the activator so it can be held through a delay
|
||||||
// so wait for the delay time before firing
|
// so wait for the delay time before firing
|
||||||
|
@ -137,6 +137,7 @@ void() trigger_multiple = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED trigger_once(.5 .5 .5) ? notouch
|
/*QUAKED trigger_once(.5 .5 .5) ? notouch
|
||||||
Variable sized trigger. Triggers once, then removes itself. You must set the key "target" to the name of another object in the level that has a matching
|
Variable sized trigger. Triggers once, then removes itself. You must set the key "target" to the name of another object in the level that has a matching
|
||||||
"targetname". If "health" is set, the trigger must be killed to activate.
|
"targetname". If "health" is set, the trigger must be killed to activate.
|
||||||
|
@ -164,6 +165,7 @@ void() trigger_relay = {
|
||||||
self.use = SUB_UseTargets;
|
self.use = SUB_UseTargets;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
/*QUAKED trigger_secret(.5 .5 .5) ?
|
/*QUAKED trigger_secret(.5 .5 .5) ?
|
||||||
|
@ -198,8 +200,9 @@ void() trigger_secret = {
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
|
||||||
void() counter_use = {
|
void() counter_use = {
|
||||||
string junk;
|
local string junk;
|
||||||
|
|
||||||
self.count = self.count - 1;
|
self.count = self.count - 1;
|
||||||
if(self.count < 0) {
|
if(self.count < 0) {
|
||||||
|
@ -246,6 +249,7 @@ void() trigger_counter = {
|
||||||
self.use = counter_use;
|
self.use = counter_use;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
@ -260,8 +264,8 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() play_teleport = {
|
void() play_teleport = {
|
||||||
float v;
|
local float v;
|
||||||
string tmpstr;
|
local string tmpstr;
|
||||||
|
|
||||||
v = random() * 5;
|
v = random() * 5;
|
||||||
if(v < 1) {
|
if(v < 1) {
|
||||||
|
@ -281,7 +285,7 @@ void() play_teleport = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void(vector org) spawn_tfog = {
|
void(vector org) spawn_tfog = {
|
||||||
entity s;
|
local entity s;
|
||||||
|
|
||||||
s = spawn();
|
s = spawn();
|
||||||
s.origin = org;
|
s.origin = org;
|
||||||
|
@ -295,6 +299,7 @@ void(vector org) spawn_tfog = {
|
||||||
WriteCoord(MSG_BROADCAST, org_z);
|
WriteCoord(MSG_BROADCAST, org_z);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() tdeath_touch = {
|
void() tdeath_touch = {
|
||||||
if(other == self.owner) {
|
if(other == self.owner) {
|
||||||
return;
|
return;
|
||||||
|
@ -317,8 +322,9 @@ void() tdeath_touch = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void(vector org, entity death_owner) spawn_tdeath = {
|
void(vector org, entity death_owner) spawn_tdeath = {
|
||||||
entity death;
|
local entity death;
|
||||||
|
|
||||||
death = spawn();
|
death = spawn();
|
||||||
death.classname = "teledeath";
|
death.classname = "teledeath";
|
||||||
|
@ -336,8 +342,8 @@ void(vector org, entity death_owner) spawn_tdeath = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() teleport_touch = {
|
void() teleport_touch = {
|
||||||
entity t;
|
local entity t;
|
||||||
vector org;
|
local vector org;
|
||||||
|
|
||||||
if(self.targetname) {
|
if(self.targetname) {
|
||||||
if(self.nextthink < time) {
|
if(self.nextthink < time) {
|
||||||
|
@ -419,7 +425,7 @@ Any object touching this will be transported to the corresponding info_teleport_
|
||||||
If the trigger_teleport has a targetname, it will only teleport entities when it has been fired.
|
If the trigger_teleport has a targetname, it will only teleport entities when it has been fired.
|
||||||
*/
|
*/
|
||||||
void() trigger_teleport = {
|
void() trigger_teleport = {
|
||||||
vector o;
|
local vector o;
|
||||||
|
|
||||||
InitTrigger();
|
InitTrigger();
|
||||||
self.touch = teleport_touch;
|
self.touch = teleport_touch;
|
||||||
|
@ -461,6 +467,7 @@ void() trigger_setskill = {
|
||||||
self.touch = trigger_skill_touch;
|
self.touch = trigger_skill_touch;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
@ -553,6 +560,7 @@ void() trigger_push_touch = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*QUAKED trigger_push(.5 .5 .5) ? PUSH_ONCE
|
/*QUAKED trigger_push(.5 .5 .5) ? PUSH_ONCE
|
||||||
Pushes the player
|
Pushes the player
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// weapons.qc: weapon functions
|
|
||||||
|
|
||||||
// called by worldspawn
|
// called by worldspawn
|
||||||
void() W_Precache = {
|
void() W_Precache = {
|
||||||
precache_sound("weapons/r_exp3.wav"); // new rocket explosion
|
precache_sound("weapons/r_exp3.wav"); // new rocket explosion
|
||||||
|
@ -26,8 +24,8 @@ W_FireAxe
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() W_FireAxe = {
|
void() W_FireAxe = {
|
||||||
vector source;
|
local vector source;
|
||||||
vector org;
|
local vector org;
|
||||||
|
|
||||||
makevectors(self.v_angle);
|
makevectors(self.v_angle);
|
||||||
source = self.origin + '0 0 16';
|
source = self.origin + '0 0 16';
|
||||||
|
@ -53,10 +51,12 @@ void() W_FireAxe = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
vector() wall_velocity = {
|
vector() wall_velocity = {
|
||||||
vector vel;
|
local vector vel;
|
||||||
|
|
||||||
vel = normalize(self.velocity);
|
vel = normalize(self.velocity);
|
||||||
vel = normalize(vel + v_up * (random() - 0.5) + v_right * (random() - 0.5));
|
vel = normalize(vel + v_up * (random() - 0.5) + v_right * (random() - 0.5));
|
||||||
|
@ -66,14 +66,15 @@ vector() wall_velocity = {
|
||||||
return vel;
|
return vel;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
SpawnMeatSpray
|
SpawnMeatSpray
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void(vector org, vector vel) SpawnMeatSpray = {
|
void(vector org, vector vel) SpawnMeatSpray = {
|
||||||
entity missile, mpuff;
|
local entity missile, mpuff;
|
||||||
vector org;
|
local vector org;
|
||||||
|
|
||||||
missile = spawn();
|
missile = spawn();
|
||||||
missile.owner = self;
|
missile.owner = self;
|
||||||
|
@ -111,12 +112,13 @@ spawn_touchblood
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void(float damage) spawn_touchblood = {
|
void(float damage) spawn_touchblood = {
|
||||||
vector vel;
|
local vector vel;
|
||||||
|
|
||||||
vel = wall_velocity() * 0.2;
|
vel = wall_velocity() * 0.2;
|
||||||
SpawnBlood(self.origin + vel * 0.01, vel, damage);
|
SpawnBlood(self.origin + vel * 0.01, vel, damage);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
SpawnChunk
|
SpawnChunk
|
||||||
|
@ -136,6 +138,9 @@ Collects multiple small damages into a single damage
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
entity multi_ent;
|
||||||
|
float multi_damage;
|
||||||
|
|
||||||
void() ClearMultiDamage = {
|
void() ClearMultiDamage = {
|
||||||
multi_ent = world;
|
multi_ent = world;
|
||||||
multi_damage = 0;
|
multi_damage = 0;
|
||||||
|
@ -176,7 +181,7 @@ TraceAttack
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void(float damage, vector dir) TraceAttack = {
|
void(float damage, vector dir) TraceAttack = {
|
||||||
vector vel, org;
|
local vector vel, org;
|
||||||
|
|
||||||
vel = normalize(dir + v_up * crandom() + v_right * crandom());
|
vel = normalize(dir + v_up * crandom() + v_right * crandom());
|
||||||
vel = vel + 2 * trace_plane_normal;
|
vel = vel + 2 * trace_plane_normal;
|
||||||
|
@ -205,8 +210,8 @@ Go to the trouble of combining multiple pellets into a single damage call.
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void(float shotcount, vector dir, vector spread) FireBullets = {
|
void(float shotcount, vector dir, vector spread) FireBullets = {
|
||||||
vector direction;
|
local vector direction;
|
||||||
vector src;
|
local vector src;
|
||||||
|
|
||||||
makevectors(self.v_angle);
|
makevectors(self.v_angle);
|
||||||
|
|
||||||
|
@ -231,7 +236,7 @@ W_FireShotgun
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() W_FireShotgun = {
|
void() W_FireShotgun = {
|
||||||
vector dir;
|
local vector dir;
|
||||||
|
|
||||||
sound(self, CHAN_WEAPON, "weapons/guncock.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "weapons/guncock.wav", 1, ATTN_NORM);
|
||||||
|
|
||||||
|
@ -242,13 +247,14 @@ void() W_FireShotgun = {
|
||||||
FireBullets(6, dir, '0.04 0.04 0');
|
FireBullets(6, dir, '0.04 0.04 0');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
W_FireSuperShotgun
|
W_FireSuperShotgun
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() W_FireSuperShotgun = {
|
void() W_FireSuperShotgun = {
|
||||||
vector dir;
|
local vector dir;
|
||||||
|
|
||||||
if(self.currentammo == 1) {
|
if(self.currentammo == 1) {
|
||||||
W_FireShotgun();
|
W_FireShotgun();
|
||||||
|
@ -264,6 +270,7 @@ void() W_FireSuperShotgun = {
|
||||||
FireBullets(14, dir, '0.14 0.08 0');
|
FireBullets(14, dir, '0.14 0.08 0');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
@ -289,7 +296,7 @@ void() BecomeExplosion = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() T_MissileTouch = {
|
void() T_MissileTouch = {
|
||||||
float damg;
|
local float damg;
|
||||||
|
|
||||||
if(other == self.owner) {
|
if(other == self.owner) {
|
||||||
return; // don't explode on owner
|
return; // don't explode on owner
|
||||||
|
@ -326,13 +333,14 @@ void() T_MissileTouch = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
W_FireRocket
|
W_FireRocket
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() W_FireRocket = {
|
void() W_FireRocket = {
|
||||||
entity missile, mpuff;
|
local entity missile, mpuff;
|
||||||
|
|
||||||
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
|
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
|
||||||
|
|
||||||
|
@ -378,8 +386,8 @@ LightningDamage
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void(vector p1, vector p2, entity from, float damage) LightningDamage = {
|
void(vector p1, vector p2, entity from, float damage) LightningDamage = {
|
||||||
entity e1, e2;
|
local entity e1, e2;
|
||||||
vector f;
|
local vector f;
|
||||||
|
|
||||||
f = p2 - p1;
|
f = p2 - p1;
|
||||||
normalize(f);
|
normalize(f);
|
||||||
|
@ -416,9 +424,10 @@ void(vector p1, vector p2, entity from, float damage) LightningDamage = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() W_FireLightning = {
|
void() W_FireLightning = {
|
||||||
vector org;
|
local vector org;
|
||||||
float cells;
|
local float cells;
|
||||||
|
|
||||||
if(self.ammo_cells < 1) {
|
if(self.ammo_cells < 1) {
|
||||||
self.weapon = W_BestWeapon();
|
self.weapon = W_BestWeapon();
|
||||||
|
@ -460,8 +469,10 @@ void() W_FireLightning = {
|
||||||
LightningDamage(self.origin, trace_endpos + v_forward * 4, self, 30);
|
LightningDamage(self.origin, trace_endpos + v_forward * 4, self, 30);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
|
||||||
void() GrenadeExplode = {
|
void() GrenadeExplode = {
|
||||||
T_RadiusDamage(self, self.owner, 120, world);
|
T_RadiusDamage(self, self.owner, 120, world);
|
||||||
|
|
||||||
|
@ -494,7 +505,7 @@ W_FireGrenade
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void() W_FireGrenade = {
|
void() W_FireGrenade = {
|
||||||
entity missile, mpuff;
|
local entity missile, mpuff;
|
||||||
|
|
||||||
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
|
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
|
||||||
|
|
||||||
|
@ -535,8 +546,10 @@ void() W_FireGrenade = {
|
||||||
setorigin(missile, self.origin);
|
setorigin(missile, self.origin);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
launch_spike
|
launch_spike
|
||||||
|
@ -564,8 +577,8 @@ void(vector org, vector dir) launch_spike = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() W_FireSuperSpikes = {
|
void() W_FireSuperSpikes = {
|
||||||
vector dir;
|
local vector dir;
|
||||||
entity old;
|
local entity old;
|
||||||
|
|
||||||
sound(self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
|
||||||
self.attack_finished = time + 0.2;
|
self.attack_finished = time + 0.2;
|
||||||
|
@ -579,8 +592,8 @@ void() W_FireSuperSpikes = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void(float ox) W_FireSpikes = {
|
void(float ox) W_FireSpikes = {
|
||||||
vector dir;
|
local vector dir;
|
||||||
entity old;
|
local entity old;
|
||||||
|
|
||||||
makevectors(self.v_angle);
|
makevectors(self.v_angle);
|
||||||
|
|
||||||
|
@ -604,8 +617,11 @@ void(float ox) W_FireSpikes = {
|
||||||
self.punchangle_x = -2;
|
self.punchangle_x = -2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.float hit_z;
|
||||||
void() spike_touch = {
|
void() spike_touch = {
|
||||||
float rand;
|
local float rand;
|
||||||
if(other == self.owner) {
|
if(other == self.owner) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -642,7 +658,7 @@ void() spike_touch = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void() superspike_touch = {
|
void() superspike_touch = {
|
||||||
float rand;
|
local float rand;
|
||||||
if(other == self.owner) {
|
if(other == self.owner) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -672,6 +688,7 @@ void() superspike_touch = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
|
@ -732,7 +749,7 @@ void() W_SetCurrentAmmo = {
|
||||||
};
|
};
|
||||||
|
|
||||||
float() W_BestWeapon = {
|
float() W_BestWeapon = {
|
||||||
float it;
|
local float it;
|
||||||
|
|
||||||
it = self.items;
|
it = self.items;
|
||||||
|
|
||||||
|
@ -779,7 +796,7 @@ An attack impulse can be triggered now
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void() W_Attack = {
|
void() W_Attack = {
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
if(!W_CheckNoAmmo()) {
|
if(!W_CheckNoAmmo()) {
|
||||||
return;
|
return;
|
||||||
|
@ -835,7 +852,7 @@ W_ChangeWeapon
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void() W_ChangeWeapon = {
|
void() W_ChangeWeapon = {
|
||||||
float it, am, fl;
|
local float it, am, fl;
|
||||||
|
|
||||||
it = self.items;
|
it = self.items;
|
||||||
am = 0;
|
am = 0;
|
||||||
|
@ -939,7 +956,7 @@ Go to the next weapon with ammo
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void() CycleWeaponCommand = {
|
void() CycleWeaponCommand = {
|
||||||
float it, am;
|
local float it, am;
|
||||||
|
|
||||||
it = self.items;
|
it = self.items;
|
||||||
self.impulse = 0;
|
self.impulse = 0;
|
||||||
|
@ -1000,7 +1017,7 @@ Go to the prev weapon with ammo
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void() CycleWeaponReverseCommand = {
|
void() CycleWeaponReverseCommand = {
|
||||||
float it, am;
|
local float it, am;
|
||||||
|
|
||||||
it = self.items;
|
it = self.items;
|
||||||
self.impulse = 0;
|
self.impulse = 0;
|
||||||
|
@ -1143,3 +1160,4 @@ void() SuperDamageSound = {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
// wizard.qc: Scrag
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
WIZARD
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
$cd id1 / models / a_wizard
|
$cd id1 / models / a_wizard
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
|
@ -39,8 +45,8 @@ if self.enemy maintains it's current velocity
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void(entity missile, float mspeed, float accuracy) LaunchMissile = {
|
void(entity missile, float mspeed, float accuracy) LaunchMissile = {
|
||||||
vector vec, move;
|
local vector vec, move;
|
||||||
float fly;
|
local float fly;
|
||||||
|
|
||||||
makevectors(self.angles);
|
makevectors(self.angles);
|
||||||
|
|
||||||
|
@ -70,15 +76,16 @@ void(entity missile, float mspeed, float accuracy) LaunchMissile = {
|
||||||
missile.think = SUB_Remove;
|
missile.think = SUB_Remove;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================
|
=================
|
||||||
WizardCheckAttack
|
WizardCheckAttack
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
float() WizardCheckAttack = {
|
float() WizardCheckAttack = {
|
||||||
vector spot1, spot2;
|
local vector spot1, spot2;
|
||||||
entity targ;
|
local entity targ;
|
||||||
float chance;
|
local float chance;
|
||||||
|
|
||||||
if(time < self.attack_finished) {
|
if(time < self.attack_finished) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -166,8 +173,8 @@ FAST ATTACKS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void() Wiz_FastFire = {
|
void() Wiz_FastFire = {
|
||||||
vector vec;
|
local vector vec;
|
||||||
vector dst;
|
local vector dst;
|
||||||
|
|
||||||
if(self.owner.health > 0) {
|
if(self.owner.health > 0) {
|
||||||
self.owner.effects = self.owner.effects | EF_MUZZLEFLASH;
|
self.owner.effects = self.owner.effects | EF_MUZZLEFLASH;
|
||||||
|
@ -186,8 +193,9 @@ void() Wiz_FastFire = {
|
||||||
remove(self);
|
remove(self);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() Wiz_StartFast = {
|
void() Wiz_StartFast = {
|
||||||
entity missile;
|
local entity missile;
|
||||||
|
|
||||||
sound(self, CHAN_WEAPON, "wizard/wattack.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "wizard/wattack.wav", 1, ATTN_NORM);
|
||||||
self.v_angle = self.angles;
|
self.v_angle = self.angles;
|
||||||
|
@ -215,8 +223,9 @@ void() Wiz_StartFast = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void() Wiz_idlesound = {
|
void() Wiz_idlesound = {
|
||||||
float wr;
|
local float wr;
|
||||||
wr = random() * 5;
|
wr = random() * 5;
|
||||||
|
|
||||||
if(self.waitmin < time) {
|
if(self.waitmin < time) {
|
||||||
|
@ -241,8 +250,8 @@ void() wiz_stand7 = [ $hover7, wiz_stand8 ] {ai_stand();};
|
||||||
void() wiz_stand8 = [ $hover8, wiz_stand1 ] {ai_stand();};
|
void() wiz_stand8 = [ $hover8, wiz_stand1 ] {ai_stand();};
|
||||||
|
|
||||||
void() wiz_walk1 = [ $hover1, wiz_walk2 ] {ai_walk(8);
|
void() wiz_walk1 = [ $hover1, wiz_walk2 ] {ai_walk(8);
|
||||||
Wiz_idlesound();
|
Wiz_idlesound();
|
||||||
};
|
};
|
||||||
void() wiz_walk2 = [ $hover2, wiz_walk3 ] {ai_walk(8);};
|
void() wiz_walk2 = [ $hover2, wiz_walk3 ] {ai_walk(8);};
|
||||||
void() wiz_walk3 = [ $hover3, wiz_walk4 ] {ai_walk(8);};
|
void() wiz_walk3 = [ $hover3, wiz_walk4 ] {ai_walk(8);};
|
||||||
void() wiz_walk4 = [ $hover4, wiz_walk5 ] {ai_walk(8);};
|
void() wiz_walk4 = [ $hover4, wiz_walk5 ] {ai_walk(8);};
|
||||||
|
@ -252,8 +261,8 @@ void() wiz_walk7 = [ $hover7, wiz_walk8 ] {ai_walk(8);};
|
||||||
void() wiz_walk8 = [ $hover8, wiz_walk1 ] {ai_walk(8);};
|
void() wiz_walk8 = [ $hover8, wiz_walk1 ] {ai_walk(8);};
|
||||||
|
|
||||||
void() wiz_side1 = [ $hover1, wiz_side2 ] {ai_run(8);
|
void() wiz_side1 = [ $hover1, wiz_side2 ] {ai_run(8);
|
||||||
Wiz_idlesound();
|
Wiz_idlesound();
|
||||||
};
|
};
|
||||||
void() wiz_side2 = [ $hover2, wiz_side3 ] {ai_run(8);};
|
void() wiz_side2 = [ $hover2, wiz_side3 ] {ai_run(8);};
|
||||||
void() wiz_side3 = [ $hover3, wiz_side4 ] {ai_run(8);};
|
void() wiz_side3 = [ $hover3, wiz_side4 ] {ai_run(8);};
|
||||||
void() wiz_side4 = [ $hover4, wiz_side5 ] {ai_run(8);};
|
void() wiz_side4 = [ $hover4, wiz_side5 ] {ai_run(8);};
|
||||||
|
@ -263,8 +272,8 @@ void() wiz_side7 = [ $hover7, wiz_side8 ] {ai_run(8);};
|
||||||
void() wiz_side8 = [ $hover8, wiz_side1 ] {ai_run(8);};
|
void() wiz_side8 = [ $hover8, wiz_side1 ] {ai_run(8);};
|
||||||
|
|
||||||
void() wiz_run1 = [ $fly1, wiz_run2 ] {ai_run(16);
|
void() wiz_run1 = [ $fly1, wiz_run2 ] {ai_run(16);
|
||||||
Wiz_idlesound();
|
Wiz_idlesound();
|
||||||
};
|
};
|
||||||
void() wiz_run2 = [ $fly2, wiz_run3 ] {ai_run(16);};
|
void() wiz_run2 = [ $fly2, wiz_run3 ] {ai_run(16);};
|
||||||
void() wiz_run3 = [ $fly3, wiz_run4 ] {ai_run(16);};
|
void() wiz_run3 = [ $fly3, wiz_run4 ] {ai_run(16);};
|
||||||
void() wiz_run4 = [ $fly4, wiz_run5 ] {ai_run(16);};
|
void() wiz_run4 = [ $fly4, wiz_run5 ] {ai_run(16);};
|
||||||
|
@ -325,6 +334,7 @@ void() wiz_die = {
|
||||||
wiz_death1();
|
wiz_death1();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void(entity attacker, float damage) Wiz_Pain = {
|
void(entity attacker, float damage) Wiz_Pain = {
|
||||||
sound(self, CHAN_VOICE, "wizard/wpain.wav", 1, ATTN_NORM);
|
sound(self, CHAN_VOICE, "wizard/wpain.wav", 1, ATTN_NORM);
|
||||||
if(random() * 70 > damage) {
|
if(random() * 70 > damage) {
|
||||||
|
@ -334,6 +344,7 @@ void(entity attacker, float damage) Wiz_Pain = {
|
||||||
wiz_pain1();
|
wiz_pain1();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() Wiz_Missile = {
|
void() Wiz_Missile = {
|
||||||
wiz_fast1();
|
wiz_fast1();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// world.qc: basic entry point functions
|
|
||||||
|
|
||||||
void() main = {
|
void() main = {
|
||||||
dprint("main function\n");
|
dprint("main function\n");
|
||||||
|
|
||||||
|
@ -151,6 +149,9 @@ void() main = {
|
||||||
precache_file2("maps/dm6.bsp");
|
precache_file2("maps/dm6.bsp");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
entity lastspawn;
|
||||||
|
|
||||||
//=======================
|
//=======================
|
||||||
/*QUAKED worldspawn(0 0 0) ?
|
/*QUAKED worldspawn(0 0 0) ?
|
||||||
Only used for the world entity.
|
Only used for the world entity.
|
||||||
|
@ -282,6 +283,7 @@ void() worldspawn = {
|
||||||
|
|
||||||
precache_model("progs/v_light.mdl");
|
precache_model("progs/v_light.mdl");
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setup light animation tables. 'a' is total darkness, 'z' is maxbright.
|
// Setup light animation tables. 'a' is total darkness, 'z' is maxbright.
|
||||||
//
|
//
|
||||||
|
@ -342,13 +344,15 @@ BODY QUE
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
entity bodyque_head;
|
||||||
|
|
||||||
void() bodyque = {
|
void() bodyque = {
|
||||||
// just here so spawn functions don't complain after the world
|
// just here so spawn functions don't complain after the world
|
||||||
// creates bodyques
|
// creates bodyques
|
||||||
};
|
};
|
||||||
|
|
||||||
void() InitBodyQue = {
|
void() InitBodyQue = {
|
||||||
entity e;
|
local entity e;
|
||||||
|
|
||||||
bodyque_head = spawn();
|
bodyque_head = spawn();
|
||||||
bodyque_head.classname = "bodyque";
|
bodyque_head.classname = "bodyque";
|
||||||
|
@ -361,6 +365,7 @@ void() InitBodyQue = {
|
||||||
bodyque_head.owner.owner.owner.owner = bodyque_head;
|
bodyque_head.owner.owner.owner.owner = bodyque_head;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// make a body que entry for the given ent so the ent can be
|
// make a body que entry for the given ent so the ent can be
|
||||||
// respawned elsewhere
|
// respawned elsewhere
|
||||||
void(entity ent) CopyToBodyQue = {
|
void(entity ent) CopyToBodyQue = {
|
||||||
|
@ -377,3 +382,4 @@ void(entity ent) CopyToBodyQue = {
|
||||||
bodyque_head = bodyque_head.owner;
|
bodyque_head = bodyque_head.owner;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
// zombie.qc: Zombie
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
ZOMBIE
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
$cd id1 / models / zombie
|
$cd id1 / models / zombie
|
||||||
|
|
||||||
$origin 0 0 24
|
$origin 0 0 24
|
||||||
|
@ -51,6 +56,8 @@ enum {
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
.float inpain;
|
||||||
|
|
||||||
void() zombie_stand1 = [ $stand1, zombie_stand2 ] {ai_stand();};
|
void() zombie_stand1 = [ $stand1, zombie_stand2 ] {ai_stand();};
|
||||||
void() zombie_stand2 = [ $stand2, zombie_stand3 ] {ai_stand();};
|
void() zombie_stand2 = [ $stand2, zombie_stand3 ] {ai_stand();};
|
||||||
void() zombie_stand3 = [ $stand3, zombie_stand4 ] {ai_stand();};
|
void() zombie_stand3 = [ $stand3, zombie_stand4 ] {ai_stand();};
|
||||||
|
@ -160,8 +167,8 @@ ZombieFireGrenade
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void(vector st) ZombieFireGrenade = {
|
void(vector st) ZombieFireGrenade = {
|
||||||
entity missile, mpuff;
|
local entity missile, mpuff;
|
||||||
vector org;
|
local vector org;
|
||||||
|
|
||||||
sound(self, CHAN_WEAPON, "zombie/z_shot1.wav", 1, ATTN_NORM);
|
sound(self, CHAN_WEAPON, "zombie/z_shot1.wav", 1, ATTN_NORM);
|
||||||
|
|
||||||
|
@ -194,6 +201,7 @@ void(vector st) ZombieFireGrenade = {
|
||||||
setorigin(missile, org);
|
setorigin(missile, org);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void() zombie_atta1 = [ $atta1, zombie_atta2 ] {ai_face();};
|
void() zombie_atta1 = [ $atta1, zombie_atta2 ] {ai_face();};
|
||||||
void() zombie_atta2 = [ $atta2, zombie_atta3 ] {ai_face();};
|
void() zombie_atta2 = [ $atta2, zombie_atta3 ] {ai_face();};
|
||||||
void() zombie_atta3 = [ $atta3, zombie_atta4 ] {ai_face();};
|
void() zombie_atta3 = [ $atta3, zombie_atta4 ] {ai_face();};
|
||||||
|
@ -237,7 +245,7 @@ void() zombie_attc11 = [ $attc11, zombie_attc12 ] {ai_face();};
|
||||||
void() zombie_attc12 = [ $attc12, zombie_run1 ] {ai_face(); ZombieFireGrenade('-12 -19 29');};
|
void() zombie_attc12 = [ $attc12, zombie_run1 ] {ai_face(); ZombieFireGrenade('-12 -19 29');};
|
||||||
|
|
||||||
void() zombie_missile = {
|
void() zombie_missile = {
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
r = random();
|
r = random();
|
||||||
|
|
||||||
|
@ -250,6 +258,7 @@ void() zombie_missile = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============================================================================
|
=============================================================================
|
||||||
|
|
||||||
|
@ -408,7 +417,7 @@ FIXME: don't use pain_finished because of nightmare hack
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void(entity attacker, float take) zombie_pain = {
|
void(entity attacker, float take) zombie_pain = {
|
||||||
float r;
|
local float r;
|
||||||
|
|
||||||
self.health = 60; // allways reset health
|
self.health = 60; // allways reset health
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user