*** empty log message ***

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1753 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Magnus 2006-01-01 22:35:59 +00:00
parent a80a951e94
commit 6efc0d6bde
9 changed files with 2166 additions and 0 deletions

181
quakec/fallout2/fish.qc Normal file
View File

@ -0,0 +1,181 @@
$cd id1/models/fish
$origin 0 0 24
$base base
$skin skin
$frame attack1 attack2 attack3 attack4 attack5 attack6
$frame attack7 attack8 attack9 attack10 attack11 attack12 attack13
$frame attack14 attack15 attack16 attack17 attack18
$frame death1 death2 death3 death4 death5 death6 death7
$frame death8 death9 death10 death11 death12 death13 death14 death15
$frame death16 death17 death18 death19 death20 death21
$frame swim1 swim2 swim3 swim4 swim5 swim6 swim7 swim8
$frame swim9 swim10 swim11 swim12 swim13 swim14 swim15 swim16 swim17
$frame swim18
$frame pain1 pain2 pain3 pain4 pain5 pain6 pain7 pain8
$frame pain9
void() swimmonster_start;
void() f_stand1 =[ $swim1, f_stand2 ] {ai_stand();};
void() f_stand2 =[ $swim2, f_stand3 ] {ai_stand();};
void() f_stand3 =[ $swim3, f_stand4 ] {ai_stand();};
void() f_stand4 =[ $swim4, f_stand5 ] {ai_stand();};
void() f_stand5 =[ $swim5, f_stand6 ] {ai_stand();};
void() f_stand6 =[ $swim6, f_stand7 ] {ai_stand();};
void() f_stand7 =[ $swim7, f_stand8 ] {ai_stand();};
void() f_stand8 =[ $swim8, f_stand9 ] {ai_stand();};
void() f_stand9 =[ $swim9, f_stand10 ] {ai_stand();};
void() f_stand10 =[ $swim10, f_stand11 ] {ai_stand();};
void() f_stand11 =[ $swim11, f_stand12 ] {ai_stand();};
void() f_stand12 =[ $swim12, f_stand13 ] {ai_stand();};
void() f_stand13 =[ $swim13, f_stand14 ] {ai_stand();};
void() f_stand14 =[ $swim14, f_stand15 ] {ai_stand();};
void() f_stand15 =[ $swim15, f_stand16 ] {ai_stand();};
void() f_stand16 =[ $swim16, f_stand17 ] {ai_stand();};
void() f_stand17 =[ $swim17, f_stand18 ] {ai_stand();};
void() f_stand18 =[ $swim18, f_stand1 ] {ai_stand();};
void() f_walk1 =[ $swim1, f_walk2 ] {ai_walk(8);};
void() f_walk2 =[ $swim2, f_walk3 ] {ai_walk(8);};
void() f_walk3 =[ $swim3, f_walk4 ] {ai_walk(8);};
void() f_walk4 =[ $swim4, f_walk5 ] {ai_walk(8);};
void() f_walk5 =[ $swim5, f_walk6 ] {ai_walk(8);};
void() f_walk6 =[ $swim6, f_walk7 ] {ai_walk(8);};
void() f_walk7 =[ $swim7, f_walk8 ] {ai_walk(8);};
void() f_walk8 =[ $swim8, f_walk9 ] {ai_walk(8);};
void() f_walk9 =[ $swim9, f_walk10 ] {ai_walk(8);};
void() f_walk10 =[ $swim10, f_walk11 ] {ai_walk(8);};
void() f_walk11 =[ $swim11, f_walk12 ] {ai_walk(8);};
void() f_walk12 =[ $swim12, f_walk13 ] {ai_walk(8);};
void() f_walk13 =[ $swim13, f_walk14 ] {ai_walk(8);};
void() f_walk14 =[ $swim14, f_walk15 ] {ai_walk(8);};
void() f_walk15 =[ $swim15, f_walk16 ] {ai_walk(8);};
void() f_walk16 =[ $swim16, f_walk17 ] {ai_walk(8);};
void() f_walk17 =[ $swim17, f_walk18 ] {ai_walk(8);};
void() f_walk18 =[ $swim18, f_walk1 ] {ai_walk(8);};
void() f_run1 =[ $swim1, f_run2 ] {ai_run(12);
if (random() < 0.5)
sound (self, CHAN_VOICE, "fish/idle.wav", 1, ATTN_NORM);
};
void() f_run2 =[ $swim3, f_run3 ] {ai_run(12);};
void() f_run3 =[ $swim5, f_run4 ] {ai_run(12);};
void() f_run4 =[ $swim7, f_run5 ] {ai_run(12);};
void() f_run5 =[ $swim9, f_run6 ] {ai_run(12);};
void() f_run6 =[ $swim11, f_run7 ] {ai_run(12);};
void() f_run7 =[ $swim13, f_run8 ] {ai_run(12);};
void() f_run8 =[ $swim15, f_run9 ] {ai_run(12);};
void() f_run9 =[ $swim17, f_run1 ] {ai_run(12);};
void() fish_melee =
{
local vector delta;
local float ldmg;
if (!self.enemy)
return; // removed before stroke
delta = self.enemy.origin - self.origin;
if (vlen(delta) > 60)
return;
sound (self, CHAN_VOICE, "fish/bite.wav", 1, ATTN_NORM);
ldmg = (random() + random()) * 3;
T_Damage (self.enemy, self, self, ldmg);
};
void() f_attack1 =[ $attack1, f_attack2 ] {ai_charge(10);};
void() f_attack2 =[ $attack2, f_attack3 ] {ai_charge(10);};
void() f_attack3 =[ $attack3, f_attack4 ] {fish_melee();};
void() f_attack4 =[ $attack4, f_attack5 ] {ai_charge(10);};
void() f_attack5 =[ $attack5, f_attack6 ] {ai_charge(10);};
void() f_attack6 =[ $attack6, f_attack7 ] {ai_charge(10);};
void() f_attack7 =[ $attack7, f_attack8 ] {ai_charge(10);};
void() f_attack8 =[ $attack8, f_attack9 ] {ai_charge(10);};
void() f_attack9 =[ $attack9, f_attack10] {fish_melee();};
void() f_attack10 =[ $attack10, f_attack11] {ai_charge(10);};
void() f_attack11 =[ $attack11, f_attack12] {ai_charge(10);};
void() f_attack12 =[ $attack12, f_attack13] {ai_charge(10);};
void() f_attack13 =[ $attack13, f_attack14] {ai_charge(10);};
void() f_attack14 =[ $attack14, f_attack15] {ai_charge(10);};
void() f_attack15 =[ $attack15, f_attack16] {fish_melee();};
void() f_attack16 =[ $attack16, f_attack17] {ai_charge(10);};
void() f_attack17 =[ $attack17, f_attack18] {ai_charge(10);};
void() f_attack18 =[ $attack18, f_run1 ] {ai_charge(10);};
void() f_death1 =[ $death1, f_death2 ] {
sound (self, CHAN_VOICE, "fish/death.wav", 1, ATTN_NORM);
};
void() f_death2 =[ $death2, f_death3 ] {};
void() f_death3 =[ $death3, f_death4 ] {};
void() f_death4 =[ $death4, f_death5 ] {};
void() f_death5 =[ $death5, f_death6 ] {};
void() f_death6 =[ $death6, f_death7 ] {};
void() f_death7 =[ $death7, f_death8 ] {};
void() f_death8 =[ $death8, f_death9 ] {};
void() f_death9 =[ $death9, f_death10 ] {};
void() f_death10 =[ $death10, f_death11 ] {};
void() f_death11 =[ $death11, f_death12 ] {};
void() f_death12 =[ $death12, f_death13 ] {};
void() f_death13 =[ $death13, f_death14 ] {};
void() f_death14 =[ $death14, f_death15 ] {};
void() f_death15 =[ $death15, f_death16 ] {};
void() f_death16 =[ $death16, f_death17 ] {};
void() f_death17 =[ $death17, f_death18 ] {};
void() f_death18 =[ $death18, f_death19 ] {};
void() f_death19 =[ $death19, f_death20 ] {};
void() f_death20 =[ $death20, f_death21 ] {};
void() f_death21 =[ $death21, f_death21 ] {self.solid = SOLID_NOT;};
void() f_pain1 =[ $pain1, f_pain2 ] {};
void() f_pain2 =[ $pain2, f_pain3 ] {ai_pain(6);};
void() f_pain3 =[ $pain3, f_pain4 ] {ai_pain(6);};
void() f_pain4 =[ $pain4, f_pain5 ] {ai_pain(6);};
void() f_pain5 =[ $pain5, f_pain6 ] {ai_pain(6);};
void() f_pain6 =[ $pain6, f_pain7 ] {ai_pain(6);};
void() f_pain7 =[ $pain7, f_pain8 ] {ai_pain(6);};
void() f_pain8 =[ $pain8, f_pain9 ] {ai_pain(6);};
void() f_pain9 =[ $pain9, f_run1 ] {ai_pain(6);};
void(entity attacker, float damage) fish_pain =
{
// fish allways do pain frames
f_pain1 ();
};
void() monster_fish =
{
precache_model2 ("progs/fish.mdl");
precache_sound2 ("fish/death.wav");
precache_sound2 ("fish/bite.wav");
precache_sound2 ("fish/idle.wav");
self.solid = SOLID_SLIDEBOX;
self.movetype = MOVETYPE_STEP;
setmodel (self, "progs/fish.mdl");
setsize (self, '-16 -16 -24', '16 16 24');
self.health = 50;
self.helmet = 1;
self.corporation = 3;
self.classname = "monster";
self.netname = "pirannah";
self.th_stand = f_stand1;
self.th_walk = f_walk1;
self.th_run = f_run1;
self.th_die = f_death1;
self.th_pain = fish_pain;
self.th_melee = f_attack1;
swimmonster_start ();
};

440
quakec/fallout2/hknight.qc Normal file
View File

@ -0,0 +1,440 @@
/*
==============================================================================
KNIGHT
==============================================================================
*/
$cd id1/models/knight2
$origin 0 0 24
$base base
$skin skin
$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8 walk9
$frame walk10 walk11 walk12 walk13 walk14 walk15 walk16 walk17
$frame walk18 walk19 walk20
$frame run1 run2 run3 run4 run5 run6 run7 run8
$frame pain1 pain2 pain3 pain4 pain5
$frame death1 death2 death3 death4 death5 death6 death7 death8
$frame death9 death10 death11 death12
$frame deathb1 deathb2 deathb3 deathb4 deathb5 deathb6 deathb7 deathb8
$frame deathb9
$frame char_a1 char_a2 char_a3 char_a4 char_a5 char_a6 char_a7 char_a8
$frame char_a9 char_a10 char_a11 char_a12 char_a13 char_a14 char_a15 char_a16
$frame magica1 magica2 magica3 magica4 magica5 magica6 magica7 magica8
$frame magica9 magica10 magica11 magica12 magica13 magica14
$frame magicb1 magicb2 magicb3 magicb4 magicb5 magicb6 magicb7 magicb8
$frame magicb9 magicb10 magicb11 magicb12 magicb13
$frame char_b1 char_b2 char_b3 char_b4 char_b5 char_b6
$frame slice1 slice2 slice3 slice4 slice5 slice6 slice7 slice8 slice9 slice10
$frame smash1 smash2 smash3 smash4 smash5 smash6 smash7 smash8 smash9 smash10
$frame smash11
$frame w_attack1 w_attack2 w_attack3 w_attack4 w_attack5 w_attack6 w_attack7
$frame w_attack8 w_attack9 w_attack10 w_attack11 w_attack12 w_attack13 w_attack14
$frame w_attack15 w_attack16 w_attack17 w_attack18 w_attack19 w_attack20
$frame w_attack21 w_attack22
$frame magicc1 magicc2 magicc3 magicc4 magicc5 magicc6 magicc7 magicc8
$frame magicc9 magicc10 magicc11
void() hknight_char_a1;
void() hknight_run1;
void() hk_idle_sound;
void(float offset) hknight_shot =
{
local vector offang;
local vector org, vec;
offang = vectoangles (self.enemy.origin - self.origin);
offang_y = offang_y + offset * 6;
makevectors (offang);
org = self.origin + self.mins + self.size*0.5 + v_forward * 20;
// set missile speed
vec = normalize (v_forward);
vec_z = 0 - vec_z + (random() - 0.5)*0.1;
launch_spike (org, vec);
newmis.classname = "knightspike";
setmodel (newmis, "progs/k_spike.mdl");
setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
newmis.velocity = vec*300;
sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);
};
void() CheckForCharge =
{
// check for mad charge
if (!enemy_vis)
return;
if (time < self.attack_finished)
return;
if ( fabs(self.origin_z - self.enemy.origin_z) > 20)
return; // too much height change
if ( vlen (self.origin - self.enemy.origin) < 80)
return; // use regular attack
// charge
SUB_AttackFinished (2);
hknight_char_a1 ();
};
void() CheckContinueCharge =
{
if (time > self.attack_finished)
{
SUB_AttackFinished (3);
hknight_run1 ();
return; // done charging
}
if (random() > 0.5)
sound (self, CHAN_WEAPON, "knight/sword2.wav", 1, ATTN_NORM);
else
sound (self, CHAN_WEAPON, "knight/sword1.wav", 1, ATTN_NORM);
};
//===========================================================================
void() hknight_stand1 =[ $stand1, hknight_stand2 ] {ai_stand();};
void() hknight_stand2 =[ $stand2, hknight_stand3 ] {ai_stand();};
void() hknight_stand3 =[ $stand3, hknight_stand4 ] {ai_stand();};
void() hknight_stand4 =[ $stand4, hknight_stand5 ] {ai_stand();};
void() hknight_stand5 =[ $stand5, hknight_stand6 ] {ai_stand();};
void() hknight_stand6 =[ $stand6, hknight_stand7 ] {ai_stand();};
void() hknight_stand7 =[ $stand7, hknight_stand8 ] {ai_stand();};
void() hknight_stand8 =[ $stand8, hknight_stand9 ] {ai_stand();};
void() hknight_stand9 =[ $stand9, hknight_stand1 ] {ai_stand();};
//===========================================================================
void() hknight_walk1 =[ $walk1, hknight_walk2 ] {
hk_idle_sound();
ai_walk(2);};
void() hknight_walk2 =[ $walk2, hknight_walk3 ] {ai_walk(5);};
void() hknight_walk3 =[ $walk3, hknight_walk4 ] {ai_walk(5);};
void() hknight_walk4 =[ $walk4, hknight_walk5 ] {ai_walk(4);};
void() hknight_walk5 =[ $walk5, hknight_walk6 ] {ai_walk(4);};
void() hknight_walk6 =[ $walk6, hknight_walk7 ] {ai_walk(2);};
void() hknight_walk7 =[ $walk7, hknight_walk8 ] {ai_walk(2);};
void() hknight_walk8 =[ $walk8, hknight_walk9 ] {ai_walk(3);};
void() hknight_walk9 =[ $walk9, hknight_walk10 ] {ai_walk(3);};
void() hknight_walk10 =[ $walk10, hknight_walk11 ] {ai_walk(4);};
void() hknight_walk11 =[ $walk11, hknight_walk12 ] {ai_walk(3);};
void() hknight_walk12 =[ $walk12, hknight_walk13 ] {ai_walk(4);};
void() hknight_walk13 =[ $walk13, hknight_walk14 ] {ai_walk(6);};
void() hknight_walk14 =[ $walk14, hknight_walk15 ] {ai_walk(2);};
void() hknight_walk15 =[ $walk15, hknight_walk16 ] {ai_walk(2);};
void() hknight_walk16 =[ $walk16, hknight_walk17 ] {ai_walk(4);};
void() hknight_walk17 =[ $walk17, hknight_walk18 ] {ai_walk(3);};
void() hknight_walk18 =[ $walk18, hknight_walk19 ] {ai_walk(3);};
void() hknight_walk19 =[ $walk19, hknight_walk20 ] {ai_walk(3);};
void() hknight_walk20 =[ $walk20, hknight_walk1 ] {ai_walk(2);};
//===========================================================================
void() hknight_run1 =[ $run1, hknight_run2 ] {
hk_idle_sound();
ai_run (20); CheckForCharge (); };
void() hknight_run2 =[ $run2, hknight_run3 ] {ai_run(25);};
void() hknight_run3 =[ $run3, hknight_run4 ] {ai_run(18);};
void() hknight_run4 =[ $run4, hknight_run5 ] {ai_run(16);};
void() hknight_run5 =[ $run5, hknight_run6 ] {ai_run(14);};
void() hknight_run6 =[ $run6, hknight_run7 ] {ai_run(25);};
void() hknight_run7 =[ $run7, hknight_run8 ] {ai_run(21);};
void() hknight_run8 =[ $run8, hknight_run1 ] {ai_run(13);};
//============================================================================
void() hknight_pain1 =[ $pain1, hknight_pain2 ] {sound (self, CHAN_VOICE, "hknight/pain1.wav", 1, ATTN_NORM);};
void() hknight_pain2 =[ $pain2, hknight_pain3 ] {};
void() hknight_pain3 =[ $pain3, hknight_pain4 ] {};
void() hknight_pain4 =[ $pain4, hknight_pain5 ] {};
void() hknight_pain5 =[ $pain5, hknight_run1 ] {};
//============================================================================
void() hknight_die1 =[ $death1, hknight_die2 ] {ai_forward(10);};
void() hknight_die2 =[ $death2, hknight_die3 ] {ai_forward(8);};
void() hknight_die3 =[ $death3, hknight_die4 ]
{self.solid = SOLID_NOT; ai_forward(7);};
void() hknight_die4 =[ $death4, hknight_die5 ] {};
void() hknight_die5 =[ $death5, hknight_die6 ] {};
void() hknight_die6 =[ $death6, hknight_die7 ] {};
void() hknight_die7 =[ $death7, hknight_die8 ] {};
void() hknight_die8 =[ $death8, hknight_die9 ] {ai_forward(10);};
void() hknight_die9 =[ $death9, hknight_die10 ] {ai_forward(11);};
void() hknight_die10 =[ $death10, hknight_die11 ] {};
void() hknight_die11 =[ $death11, hknight_die12 ] {};
void() hknight_die12 =[ $death12, hknight_die12 ] {};
void() hknight_dieb1 =[ $deathb1, hknight_dieb2 ] {};
void() hknight_dieb2 =[ $deathb2, hknight_dieb3 ] {};
void() hknight_dieb3 =[ $deathb3, hknight_dieb4 ]
{self.solid = SOLID_NOT;};
void() hknight_dieb4 =[ $deathb4, hknight_dieb5 ] {};
void() hknight_dieb5 =[ $deathb5, hknight_dieb6 ] {};
void() hknight_dieb6 =[ $deathb6, hknight_dieb7 ] {};
void() hknight_dieb7 =[ $deathb7, hknight_dieb8 ] {};
void() hknight_dieb8 =[ $deathb8, hknight_dieb9 ] {};
void() hknight_dieb9 =[ $deathb9, hknight_dieb9 ] {};
void() hknight_die =
{
// check for gib
if (self.health < -40)
{
sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NORM);
ThrowHead ("progs/h_hellkn.mdl", self.health);
ThrowGib ("progs/gib1.mdl", self.health);
ThrowGib ("progs/gib2.mdl", self.health);
ThrowGib ("progs/gib3.mdl", self.health);
return;
}
// regular death
sound (self, CHAN_VOICE, "hknight/death1.wav", 1, ATTN_NORM);
if (random() > 0.5)
hknight_die1 ();
else
hknight_dieb1 ();
};
//============================================================================
void() hknight_magica1 =[ $magica1, hknight_magica2 ] {ai_face();};
void() hknight_magica2 =[ $magica2, hknight_magica3 ] {ai_face();};
void() hknight_magica3 =[ $magica3, hknight_magica4 ] {ai_face();};
void() hknight_magica4 =[ $magica4, hknight_magica5 ] {ai_face();};
void() hknight_magica5 =[ $magica5, hknight_magica6 ] {ai_face();};
void() hknight_magica6 =[ $magica6, hknight_magica7 ] {ai_face();};
void() hknight_magica7 =[ $magica7, hknight_magica8 ] {hknight_shot(-2);};
void() hknight_magica8 =[ $magica8, hknight_magica9 ] {hknight_shot(-1);};
void() hknight_magica9 =[ $magica9, hknight_magica10] {hknight_shot(0);};
void() hknight_magica10 =[ $magica10, hknight_magica11] {hknight_shot(1);};
void() hknight_magica11 =[ $magica11, hknight_magica12] {hknight_shot(2);};
void() hknight_magica12 =[ $magica12, hknight_magica13] {hknight_shot(3);};
void() hknight_magica13 =[ $magica13, hknight_magica14] {ai_face();};
void() hknight_magica14 =[ $magica14, hknight_run1 ] {ai_face();};
//============================================================================
void() hknight_magicb1 =[ $magicb1, hknight_magicb2 ] {ai_face();};
void() hknight_magicb2 =[ $magicb2, hknight_magicb3 ] {ai_face();};
void() hknight_magicb3 =[ $magicb3, hknight_magicb4 ] {ai_face();};
void() hknight_magicb4 =[ $magicb4, hknight_magicb5 ] {ai_face();};
void() hknight_magicb5 =[ $magicb5, hknight_magicb6 ] {ai_face();};
void() hknight_magicb6 =[ $magicb6, hknight_magicb7 ] {ai_face();};
void() hknight_magicb7 =[ $magicb7, hknight_magicb8 ] {hknight_shot(-2);};
void() hknight_magicb8 =[ $magicb8, hknight_magicb9 ] {hknight_shot(-1);};
void() hknight_magicb9 =[ $magicb9, hknight_magicb10] {hknight_shot(0);};
void() hknight_magicb10 =[ $magicb10, hknight_magicb11] {hknight_shot(1);};
void() hknight_magicb11 =[ $magicb11, hknight_magicb12] {hknight_shot(2);};
void() hknight_magicb12 =[ $magicb12, hknight_magicb13] {hknight_shot(3);};
void() hknight_magicb13 =[ $magicb13, hknight_run1] {ai_face();};
//============================================================================
void() hknight_magicc1 =[ $magicc1, hknight_magicc2 ] {ai_face();};
void() hknight_magicc2 =[ $magicc2, hknight_magicc3 ] {ai_face();};
void() hknight_magicc3 =[ $magicc3, hknight_magicc4 ] {ai_face();};
void() hknight_magicc4 =[ $magicc4, hknight_magicc5 ] {ai_face();};
void() hknight_magicc5 =[ $magicc5, hknight_magicc6 ] {ai_face();};
void() hknight_magicc6 =[ $magicc6, hknight_magicc7 ] {hknight_shot(-2);};
void() hknight_magicc7 =[ $magicc7, hknight_magicc8 ] {hknight_shot(-1);};
void() hknight_magicc8 =[ $magicc8, hknight_magicc9 ] {hknight_shot(0);};
void() hknight_magicc9 =[ $magicc9, hknight_magicc10] {hknight_shot(1);};
void() hknight_magicc10 =[ $magicc10, hknight_magicc11] {hknight_shot(2);};
void() hknight_magicc11 =[ $magicc11, hknight_run1] {hknight_shot(3);};
//===========================================================================
void() hknight_char_a1 =[ $char_a1, hknight_char_a2 ] {ai_charge(20);};
void() hknight_char_a2 =[ $char_a2, hknight_char_a3 ] {ai_charge(25);};
void() hknight_char_a3 =[ $char_a3, hknight_char_a4 ] {ai_charge(18);};
void() hknight_char_a4 =[ $char_a4, hknight_char_a5 ] {ai_charge(16);};
void() hknight_char_a5 =[ $char_a5, hknight_char_a6 ] {ai_charge(14);};
void() hknight_char_a6 =[ $char_a6, hknight_char_a7 ] {ai_charge(20); ai_melee();};
void() hknight_char_a7 =[ $char_a7, hknight_char_a8 ] {ai_charge(21); ai_melee();};
void() hknight_char_a8 =[ $char_a8, hknight_char_a9 ] {ai_charge(13); ai_melee();};
void() hknight_char_a9 =[ $char_a9, hknight_char_a10 ] {ai_charge(20); ai_melee();};
void() hknight_char_a10=[ $char_a10, hknight_char_a11 ] {ai_charge(20); ai_melee();};
void() hknight_char_a11=[ $char_a11, hknight_char_a12 ] {ai_charge(18); ai_melee();};
void() hknight_char_a12=[ $char_a12, hknight_char_a13 ] {ai_charge(16);};
void() hknight_char_a13=[ $char_a13, hknight_char_a14 ] {ai_charge(14);};
void() hknight_char_a14=[ $char_a14, hknight_char_a15 ] {ai_charge(25);};
void() hknight_char_a15=[ $char_a15, hknight_char_a16 ] {ai_charge(21);};
void() hknight_char_a16=[ $char_a16, hknight_run1 ] {ai_charge(13);};
//===========================================================================
void() hknight_char_b1 =[ $char_b1, hknight_char_b2 ]
{CheckContinueCharge (); ai_charge(23); ai_melee();};
void() hknight_char_b2 =[ $char_b2, hknight_char_b3 ] {ai_charge(17); ai_melee();};
void() hknight_char_b3 =[ $char_b3, hknight_char_b4 ] {ai_charge(12); ai_melee();};
void() hknight_char_b4 =[ $char_b4, hknight_char_b5 ] {ai_charge(22); ai_melee();};
void() hknight_char_b5 =[ $char_b5, hknight_char_b6 ] {ai_charge(18); ai_melee();};
void() hknight_char_b6 =[ $char_b6, hknight_char_b1 ] {ai_charge(8); ai_melee();};
//===========================================================================
void() hknight_slice1 =[ $slice1, hknight_slice2 ] {ai_charge(9);};
void() hknight_slice2 =[ $slice2, hknight_slice3 ] {ai_charge(6);};
void() hknight_slice3 =[ $slice3, hknight_slice4 ] {ai_charge(13);};
void() hknight_slice4 =[ $slice4, hknight_slice5 ] {ai_charge(4);};
void() hknight_slice5 =[ $slice5, hknight_slice6 ] {ai_charge(7); ai_melee();};
void() hknight_slice6 =[ $slice6, hknight_slice7 ] {ai_charge(15); ai_melee();};
void() hknight_slice7 =[ $slice7, hknight_slice8 ] {ai_charge(8); ai_melee();};
void() hknight_slice8 =[ $slice8, hknight_slice9 ] {ai_charge(2); ai_melee();};
void() hknight_slice9 =[ $slice9, hknight_slice10 ] {ai_melee();};
void() hknight_slice10 =[ $slice10, hknight_run1 ] {ai_charge(3);};
//===========================================================================
void() hknight_smash1 =[ $smash1, hknight_smash2 ] {ai_charge(1);};
void() hknight_smash2 =[ $smash2, hknight_smash3 ] {ai_charge(13);};
void() hknight_smash3 =[ $smash3, hknight_smash4 ] {ai_charge(9);};
void() hknight_smash4 =[ $smash4, hknight_smash5 ] {ai_charge(11);};
void() hknight_smash5 =[ $smash5, hknight_smash6 ] {ai_charge(10); ai_melee();};
void() hknight_smash6 =[ $smash6, hknight_smash7 ] {ai_charge(7); ai_melee();};
void() hknight_smash7 =[ $smash7, hknight_smash8 ] {ai_charge(12); ai_melee();};
void() hknight_smash8 =[ $smash8, hknight_smash9 ] {ai_charge(2); ai_melee();};
void() hknight_smash9 =[ $smash9, hknight_smash10 ] {ai_charge(3); ai_melee();};
void() hknight_smash10 =[ $smash10, hknight_smash11 ] {ai_charge(0);};
void() hknight_smash11 =[ $smash11, hknight_run1 ] {ai_charge(0);};
//============================================================================
void() hknight_watk1 =[ $w_attack1, hknight_watk2 ] {ai_charge(2);};
void() hknight_watk2 =[ $w_attack2, hknight_watk3 ] {ai_charge(0);};
void() hknight_watk3 =[ $w_attack3, hknight_watk4 ] {ai_charge(0);};
void() hknight_watk4 =[ $w_attack4, hknight_watk5 ] {ai_melee();};
void() hknight_watk5 =[ $w_attack5, hknight_watk6 ] {ai_melee();};
void() hknight_watk6 =[ $w_attack6, hknight_watk7 ] {ai_melee();};
void() hknight_watk7 =[ $w_attack7, hknight_watk8 ] {ai_charge(1);};
void() hknight_watk8 =[ $w_attack8, hknight_watk9 ] {ai_charge(4);};
void() hknight_watk9 =[ $w_attack9, hknight_watk10 ] {ai_charge(5);};
void() hknight_watk10 =[ $w_attack10, hknight_watk11 ] {ai_charge(3); ai_melee();};
void() hknight_watk11 =[ $w_attack11, hknight_watk12 ] {ai_charge(2); ai_melee();};
void() hknight_watk12 =[ $w_attack12, hknight_watk13 ] {ai_charge(2); ai_melee();};
void() hknight_watk13 =[ $w_attack13, hknight_watk14 ] {ai_charge(0);};
void() hknight_watk14 =[ $w_attack14, hknight_watk15 ] {ai_charge(0);};
void() hknight_watk15 =[ $w_attack15, hknight_watk16 ] {ai_charge(0);};
void() hknight_watk16 =[ $w_attack16, hknight_watk17 ] {ai_charge(1);};
void() hknight_watk17 =[ $w_attack17, hknight_watk18 ] {ai_charge(1); ai_melee();};
void() hknight_watk18 =[ $w_attack18, hknight_watk19 ] {ai_charge(3); ai_melee();};
void() hknight_watk19 =[ $w_attack19, hknight_watk20 ] {ai_charge(4); ai_melee();};
void() hknight_watk20 =[ $w_attack20, hknight_watk21 ] {ai_charge(6);};
void() hknight_watk21 =[ $w_attack21, hknight_watk22 ] {ai_charge(7);};
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 =
{
if (self.pain_finished > time)
return;
sound (self, CHAN_VOICE, "hknight/pain1.wav", 1, ATTN_NORM);
if (time - self.pain_finished > 5)
{ // allways go into pain frame if it has been a while
hknight_pain1 ();
self.pain_finished = time + 1;
return;
}
if ((random()*30 > damage) )
return; // didn't flinch
self.pain_finished = time + 1;
hknight_pain1 ();
};
float hknight_type;
void() hknight_melee =
{
hknight_type = hknight_type + 1;
sound (self, CHAN_WEAPON, "hknight/slash1.wav", 1, ATTN_NORM);
if (hknight_type == 1)
hknight_slice1 ();
else if (hknight_type == 2)
hknight_smash1 ();
else if (hknight_type == 3)
{
hknight_watk1 ();
hknight_type = 0;
}
};
void() monster_hell_knight =
{
precache_model2 ("progs/hknight.mdl");
precache_model2 ("progs/k_spike.mdl");
precache_model2 ("progs/h_hellkn.mdl");
precache_sound2 ("hknight/attack1.wav");
precache_sound2 ("hknight/death1.wav");
precache_sound2 ("hknight/pain1.wav");
precache_sound2 ("hknight/sight1.wav");
precache_sound ("hknight/hit.wav"); // used by C code, so don't sound2
precache_sound2 ("hknight/slash1.wav");
precache_sound2 ("hknight/idle.wav");
precache_sound2 ("hknight/grunt.wav");
precache_sound ("knight/sword1.wav");
precache_sound ("knight/sword2.wav");
self.solid = SOLID_SLIDEBOX;
self.movetype = MOVETYPE_STEP;
setmodel (self, "progs/hknight.mdl");
setsize (self, '-16 -16 -24', '16 16 40');
self.health = 250;
self.armor = 12;
self.armortype = 0.1;
self.helmet = 2;
self.corporation = 3;
self.classname = "monster";
self.netname = "reaver";
self.th_stand = hknight_stand1;
self.th_walk = hknight_walk1;
self.th_run = hknight_run1;
self.th_melee = hknight_melee;
self.th_missile = hknight_magicc1;
self.th_pain = hknight_pain;
self.th_die = hknight_die;
self.armornoise = "weapons/ric1.wav";
walkmonster_start ();
};

View File

@ -0,0 +1,187 @@
/*
return ("
weaponry\n\n
<EFBFBD>1 melee \n
<EFBFBD>2 thrown \n
<EFBFBD>3 pistols&smgs \n
<EFBFBD>4 shotguns \n
<EFBFBD>5 rifles \n
<EFBFBD>6 heavy guns \n
<EFBFBD>e leave
*/
/*
<EFBFBD>1 1911a1 .45 01 5$\n
<EFBFBD>2 d. eagle .44 02 7$\n
<EFBFBD>3 mk23 socom .45 02 9$\n
<EFBFBD>4 h&k mp7 4mm 03 14$\n
<EFBFBD>5 h&k mp5 9mm 03 17$\n
<EFBFBD>6 alien blaster 02 21$\n
<EFBFBD>1 pipe rifle .44 02 4$\n
<EFBFBD>2 winchester 12g 03 8$\n
<EFBFBD>3 mossberg 12g 04 14$\n
<EFBFBD>4 citykiller 12g 05 35$\n
<EFBFBD>1 rangemaster 7mm 03 11$\n
<EFBFBD>2 ak-112 5mm 04 21$\n
<EFBFBD>3 remington .308 05 24$\n
<EFBFBD>4 ak-74 5mm 04 27$\n
<EFBFBD>5 moonlight .223 05 36$\n
<EFBFBD>6 sa-80 5mm 05 23$\n
<EFBFBD>7 plasma rifle 07 41$\n
<EFBFBD>8 gauss rifle 2mm 08 51$\n
*/
string () ShopString =
{
return ("--- S H O P -------\n\n<>1 traits \n<>2 perks \n<>3 body armour \n<>4 protection \n<>5 weapons \n<>6 equipment \n<>7 chems \n<>e leave \n");
};
string () WeaponString =
{
return ("weaponry\n\n<>1 melee \n<>2 thrown \n<>3 pistols&smgs \n<>4 shotguns \n<>5 rifles \n<>e leave \n");
};
string () TraitString =
{
return ("traits\n\n<>1 one handed \n<>2 small frame \n<>3 bruiser \n<>4 heavy handed \n<>5 bloody mess \n<>6 bad luck \n<>e leave \n");
};
string () MiscString =
{
return ("grenades\n GRENADE | COST \n\n<>1 plasma grenade 11\n<>2 frag grenade 5\n<>3 emp grenade 3\n<>4 smoke grenade 2\n<>5 flash bang mark ii 2\n<>e exit \n");
};
string () BuildString =
{
return ("BUILD A STRUCTURE\n NAME | UPGRADE | COST \n\n<>1 supply depot ammo/hp 4\n<>2 arms lab weapons +10% 6\n<>3 armory armour +10% 10\n<>4 proto-lab gadgets/hrdwr 15\n<>e exit \n");
};
string () HelmetString =
{
return ("helmets\nprotect you from headshots so\nmake sure you use a decent one\n\n ABS% WT DEFLECT PRC\n<>1 combat helm -10% 01 5% 05\n<>2 combat helm 2 +0% 02 5% 20\n<>3 heavy-duty +20% 03 5% 20\n<>4 ceramic helm -20% ...");
};
string () ArmorString1 =
{
return ("body armour\n wt abs prc\n\n<>1 vault suit 03 1/20% 03$\n<>2 leather armor 07 2/30% 05$\n<>3 kevlar armor 10 3/35% 08$\n<>4 combat armor 13 4/40% 11$\n<>5 brotherhood armor 17 5/45% 15$");
};
string () ArmorString2 =
{
return ("body armour\n WT ABS SPEC PRC\n\n<>1 battle gear 08 57% NONE 50\n<>2 battle gear ii 09 62% !EXP 60\n<>3 high-tech suit 09 42% +ALL 60\n<>4 carbon-fiber mesh 09 56% !ENR 70\n<>5 pseudo-chitin suit 07...");
};
string () ArmorString3 =
{
return ("special body armour\n WT ABS SPEC PRC\n<>1 vsn force mail 07 %40 DFLC 95c\n<>2 super chitin 08 %35 DFLC 95c\n<>3 suit of mota 14 %70 HEAL 95c\n<>0 previous \n<>e exit ...");
};
string () PlusString =
{
return ("perks\n ABILITY | FRAGS NEEDED \n\n<>1 bonus movement 8\n<>2 weapons handling 12\n<>3 quick pockets 14\n<>4 awareness 15\n<>5 silent running 17\n<>6 better criticals 23\n<>7 bonus ranged damage 26\n<>8 strong back ...");
};
string () PlusString2 =
{
return ("perks\n ABILITY | FRAGS NEEDED \n\n<>1 bonus movement 8\n<>2 weapons handling 12\n<>3 quick pockets 14\n<>4 awareness 15\n<>5 silent running 17\n<>6 better criticals 23\n<>7 bonus ranged damage 26\n<>8 strong back ...");
};
/*
<EFBFBD>5 energy shield |front :25% <20>25
<EFBFBD>6 protect ring |damage:15% <20>65
<EFBFBD>7 dark force |deflct:15% <20>75
<EFBFBD>8 efreeti module |blasts 40% <20>85
<EFBFBD>9 sentient cube |regenerate <20>95
<EFBFBD>0 vampire |space warp <20>95
*/
string () HardwareString =
{
return ("+ protective devices +\n\n HARDWARE | SHIELDS VS | PRICE \n<>1 pro cloak |damage:07% <20>15\n<>2 emp shielding |emp: 100% <20>25\n<>3 force shield |front: 25% <20>20\n<>4 force field |damage:10% <20>25\n<>5 energy shield |energy:23% <20>25<35>5 energy shield |front :25% <20>25<35>6 protect ring |damage:15% <20>65<35>7 dark force |deflct:15% <20>75<35>8 efreeti module |blasts 40% <20>85<35>9 sentient cube |regenerate <20>95<35>0 vampire |space warp <20>95");
};
string () MeleeString =
{
return ("melee weapons\n WEAPON | TYPE | WEIGHT | PRICE \n\n<>1 knife melee 01 01$\n<>2 combat knife melee 03 03$\n<>3 ripper melee 03 07$\n<>4 power fist melee 04 11$\n<>e exit \n");
};
/*
<EFBFBD>6 h&k mp5 9mmP 03 17$\n
<EFBFBD>7 h&k mp7 4.60mm 03 14$\n
<EFBFBD>8 fn p90 5.57mm 03 22$\n
<EFBFBD>9 h&k mp10 10mm 03 24$\n
<EFBFBD>0 thompson .45 03 20$\n
<EFBFBD>6 h&k mp5 9mmP 03 17$\n<>7 h&k mp7 4.60mm 03 14$\n<>8 fn p90 5.57mm 03 22$\n<>9 h&k mp10 10mm 03 24$\n<>0 thompson .45 03 20$\n
*/
string () SmallArmString1 =
{
return ("Pistols and Submachineguns\n WEAPON | CAL | WEIGHT | PRICE \n\n<>1 1911a1 .45 01 5$\n<>2 d. eagle .44 02 7$\n<>3 mk23 socom .45 02 9$\n<>4 h&k mp7 4mm 03 14$\n<>5 h&k mp5 9mm 03 17$\n<>6 alien blaster 02 21$\n");
};
string () SmallArmString2 =
{
return ("shotguns\n WEAPON | TYPE | WEIGHT | PRICE \n\n<>1 pipe rifle .44 02 4$\n<>2 winchester 12g 03 8$\n<>3 mossberg 12g 04 14$\n<>4 citykiller 12g 05 35$\n");
};
/*
<EFBFBD>6 dks-1 .338 bolt 08 32$\n
<EFBFBD>7 moonlight .223 auto 06 54$\n
<EFBFBD>8 xl70e3 5mm auto 08 27$\n
<EFBFBD>9 fn-fal .308 auto 04 51$\n
<EFBFBD>0 sa-80 .223 auto 07 45$\n
*/
string () SmallArmString3 =
{
return ("rifles\n RIFLE | TYPE | WEIGHT | PRICE \n\n<>1 rangemaster 7mm 03 11$\n<>2 ak-112 5mm 04 21$\n<>3 remington .308 05 24$\n<>4 ak-74 5mm 04 27$\n<>5 moonlight .223 05 36$\n<>6 sa-80 5mm 05 23$\n<>7 plasma rifle 07 41$\n<>8 gauss rifle 2mm 08 51$\n");
};
string () DrugString1 =
{
return ("drugs\n DRUG | EFFECTS | PRICE\n\n<>1 stimpack heals 40 3$\n<>2 medkit+ heals 20+50 5$\n<>3 superstim* heals 40+60 12$\n<>e exit \n\n\n+ requires medic \n* requires medic with 7+ kills");
};
string () DrugString2 =
{
return ("drugs\n DRUG | EFFECTS | PRICE\n\n<>1 stimpack heals 40 3$\n<>2 adrenaline +60 speed/jump 7$\n<>3 psycho+ +60 hp/no pain 15$\n<>4 medkit* heals 20+50 12$\n<>5 berserk* adren+psycho 21$\n<>e exit \n");
};
string () EnergyWeaponsString =
{
return ("high-tech weaponry\n WEAPON | TYPE | WEIGHT | PRICE \n\n<>1 [*] flash gun semi 03 21$\n<>2 [&] plasma rifle semi 08 34$\n<>3 [*] laser rifle semi 11 40$\n<>4 [*] laser carbine auto 06 57$\n<>5 [?] alien blaster semi 02 72$\n");
};
//<2F>6 bozar 14 81$\n<>7 firestorm 12 97$
string () HeavyGunsString =
{
return ("heavy guns\n WEAPON | TYPE | WEIGHT | PRICE \n\n<>1 light support weapon 15 55$\n<>2 rocket launcher 11 75$\n<>3 50oc flamethrower 16 35$\n<>4 steyr amr .50 flechette 17 72$\n<>5 m72 gauss rifle 2mm 12 81$\n<>6 bozar 14 81$\n<>7 firestorm 12 97$");
};
string () de_dust =
{
return (" DE_DUST \n (BOMB/DEFUSE MAP) \n\nrangers have obtained two ufos\nthat have crash landed in the \ndesert. raiders must blow them\nup with c4 before its too late\n\n(activate electronic tools and\nc4 by pressing 4) ...");
};
/*
<EFBFBD>4 motion sensor <20>20c\n
<EFBFBD>5 extra magazines <20>20c\n
<EFBFBD>6 electronic tools mark ii <20>30c\n
<EFBFBD>7 climbing gear <20>30c\n
<EFBFBD>8 remote camera <20>40c\n
<EFBFBD>9 cooling module <20>50c\n
<EFBFBD>0 laser defense field <20>50c\n
*/
string () GadgetString =
{
return ("+ special equipment +\npress your c key to activate!\n\n<>1 stealth boy <20>20c\n<>2 displacer cloak <20>20c\n<>3 security alarm <20>20c\n<>4 motion sensor <20>20c\n<>5 extra magazines <20>20c\n<>6 electronic tools mark ii <20>30c\n<>7 climbing gear <20>30c\n<>8 remote camera <20>40c\n<>9 cooling module <20>50c\n<>0 laser defense field <20>50c\n");
};

View File

@ -0,0 +1,232 @@
/*
########################################################################
This QC file houses all of the ugly code that no one wants to deal with.
########################################################################
*/
/*drain_energy - Makes energy weapons overheat*/
/*GetWeaponName - Tells the player what weapons he is carrying*/
/*GetWeaponWeight - Calculates the total weight for weapons*/
void (vector org, entity guy, float input, float cost) spawn_station =
{
local entity dog;
local entity te;
if ((self.ammo_shells < cost))
{
sprint (self, 2, "not enough money.\n");
return;
}
self = guy;
te = find (world, classname, "station");
while (te)
{
if (((te.track == self) && (te.skin == input)))
{
sprint (self, 2, "already have one.\n");
return;
}
te = find (te, classname, "station");
}
makevectors (self.v_angle);
org = ((org + (v_forward * IT_LIGHTNING)) + (v_up * EF_FLAG2));
if ((pointcontents ((org + '0 20 0')) != CONTENT_EMPTY))
{
sprint (self, 2, "can't build there.\n");
return;
}
if ((pointcontents ((org + '0 -20 0')) != CONTENT_EMPTY))
{
sprint (self, 2, "can't build there.\n");
return;
}
if ((pointcontents ((org + '20 0 0')) != CONTENT_EMPTY))
{
sprint (self, 2, "can't build there.\n");
return;
}
if ((pointcontents ((org + '-20 0 0')) != CONTENT_EMPTY))
{
sprint (self, 2, "can't build there.\n");
return;
}
if ((pointcontents ((org + '0 0 50')) != CONTENT_EMPTY))
{
sprint (self, 2, "can't build there.\n");
return;
}
if ((pointcontents ((org + '0 0 -10')) != CONTENT_EMPTY))
{
sprint (self, 2, "can't build there.\n");
return;
}
self.impulse = 0;
te = findradius (org, 40);
while (te)
{
if (te.classname == "spawn1")
{
sprint (self, 2, "can't build at spawn.\n");
return;
}
if (te.classname == "spawn2")
{
sprint (self, 2, "can't build at spawn.\n");
return;
}
if (te.classname == "ghoul")
{
sprint (self, 2, "somethings in the way.\n");
return;
}
if (((te.classname == "player") && (te.health > 0)))
{
sprint (self, 2, "can't build on players.\n");
return;
}
if (((te.classname == "station") && (te.health > 0)))
{
sprint (self, 2, "can't build on other stations.\n");
return;
}
te = te.chain;
}
self.ammo_shells = (self.ammo_shells - cost);
dog = spawn ();
dog.team = self.team;
dog.track = self;
self = dog;
//spawn_dot (dog);
self.origin = org;
self.takedamage = DAMAGE_YES;
self.solid = SOLID_SLIDEBOX;
self.movetype = MOVETYPE_STEP;
setsize (self, '-16 -16 0', '16 16 40');
self.health = SVC_INTERMISSION;
self.max_health = (300 + (input * 50));
self.th_die = station_die;
setmodel (self, "progs/station.mdl");
self.classname = "station";
self.think = station_think;
self.helmet = 2;
self.skin = input;
if ((self.skin == 0))
{
self.netname = "depot";
}
if ((self.skin == 1))
{
self.netname = "armslab";
}
if ((self.skin == 2))
{
self.netname = "armory";
}
if ((self.skin == 3))
{
self.netname = "protolab";
}
self.frame = WEAPON_SPIKES;
};
void (float dat) drain_energy =
{
self.ammo_cells = (self.ammo_cells - dat);
if ((self.ammo_cells <= 0))
{
self.recharge = 1;
}
if ((dat != WEAPON_SPIKES))
{
if ((self.recharge == 1))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E>!COOLING!<21> \n");
}
else
{
if ((self.ammo_cells >= 200))
{
return;
}
else
{
if ((self.ammo_cells >= (200 * 0.9)))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E><E282AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƒ<EFBFBD> \n");
}
else
{
if ((self.ammo_cells >= (200 * 0.8)))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E><E282AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƒ<EFBFBD><C692> \n");
}
else
{
if ((self.ammo_cells >= (200 * 0.7)))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E><E282AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƒ<EFBFBD><C692><EFBFBD> \n");
}
else
{
if ((self.ammo_cells >= (200 * 0.6)))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E><E282AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƒ<EFBFBD><C692><EFBFBD><EFBFBD> \n");
}
else
{
if ((self.ammo_cells >= (200 * 0.5)))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E><E282AC><EFBFBD><EFBFBD><EFBFBD>ƒ<EFBFBD><C692><EFBFBD><EFBFBD><EFBFBD> \n");
}
else
{
if ((self.ammo_cells >= (200 * 0.4)))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E><E282AC><EFBFBD><EFBFBD>ƒ<EFBFBD><C692><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \n");
}
else
{
if ((self.ammo_cells >= (200 * 0.3)))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E><E282AC><EFBFBD>ƒ<EFBFBD><C692><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \n");
}
else
{
if ((self.ammo_cells >= (200 * 0.2)))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E><E282AC>ƒ<EFBFBD><C692><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \n");
}
else
{
if ((self.ammo_cells <= (200 * 0.1)))
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€<6E>ƒ<EFBFBD><C692><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \n");
}
else
{
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\nH TEMP C \n€ƒ<E282AC><C692><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \n");
}
}
}
}
}
}
}
}
}
}
}
}
};
void (entity guy, float slot) GetWeaponWeight =
{
return;
};

585
quakec/fallout2/models.qc Normal file
View File

@ -0,0 +1,585 @@
/*
===============================================================================
WORLD WEAPONS
===============================================================================
*/
$modelname g_shot
$cd /raid/quake/id1/models/g_shot
$origin 0 0 -24
$flags 8 // client side rotate
$base base
$skin skin
$frame shot1
$modelname g_nail
$cd /raid/quake/id1/models/g_nail
$flags 8 // client side rotate
$origin 0 0 -24
$base base
$skin skin
$frame shot1
$modelname g_nail2
$cd /raid/quake/id1/models/g_nail2
$flags 8 // client side rotate
$origin 0 0 -24
$base base
$skin skin
$frame shot2
$modelname g_rock
$cd /raid/quake/id1/models/g_rock
$flags 8 // client side rotate
$origin 0 0 -24
$base base
$skin skin
$frame shot1
$modelname g_rock2
$cd /raid/quake/id1/models/g_rock2
$flags 8 // client side rotate
$origin 0 0 -24
$base base
$skin skin
$frame shot1
$modelname g_light
$cd /raid/quake/id1/models/g_light
$flags 8 // client side rotate
$origin 0 0 -24
$base base
$skin skin
$frame shot1
/*
===============================================================================
VIEW WEAPONS
===============================================================================
*/
$modelname v_axe
$cd /raid/quake/id1/models/v_axe
$origin 0 5 54
$base base
$skin skin
$frame frame1 frame2 frame3 frame4 frame5 frame6 frame7 frame8 frame9
$modelname v_shot
$cd /raid/quake/id1/models/v_shot
$origin 0 0 54
$base base
$skin skin
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
$modelname v_shot2
$cd /raid/quake/id1/models/v_shot2
$origin 0 0 56
$base base
$skin skin
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
$modelname v_rock2
$cd /raid/quake/id1/models/v_rock2
$origin 0 0 54
$base base
$skin skin
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot6
$modelname v_rock
$cd /raid/quake/id1/models/v_rock
$origin 0 0 54
$base base
$skin skin
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
$modelname v_nail2
$cd /raid/quake/id1/models/v_nail2
$origin 0 0 54
$base base
$skin skin
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7 shot8 shot9
$modelname v_nail
$cd /raid/quake/id1/models/v_nail
$origin 0 0 54
$base base
$skin skin
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7 shot8 shot9
$modelname v_light
$cd /raid/quake/id1/models/v_light
$origin 0 0 54
$base base
$skin skin
$frame shot1 shot2 shot3 shot4 shot5
/*
===============================================================================
ITEMS
===============================================================================
*/
$modelname w_g_key
$cd /raid/quake/id1/models/w_g_key
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname w_s_key
$cd /raid/quake/id1/models/w_s_key
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname m_g_key
$cd /raid/quake/id1/models/m_g_key
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname m_s_key
$cd /raid/quake/id1/models/m_s_key
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname b_g_key
$cd /raid/quake/id1/models/b_g_key
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname b_s_key
$cd /raid/quake/id1/models/b_s_key
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname quaddama
$cd /raid/quake/id1/models/quaddama
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname invisibl
$cd /raid/quake/id1/models/invisibl
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname invulner
$flags 8 // client side rotate
$cd /raid/quake/id1/models/invulner
$base base
$skin skin
$frame frame1
//modelname jetpack
//cd /raid/quake/id1/models/jetpack
//flags 8 // client side rotate
//base base
//skin skin
//frame frame1
$modelname cube
$cd /raid/quake/id1/models/cube
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname suit
$cd /raid/quake/id1/models/suit
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname boots
$cd /raid/quake/id1/models/boots
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname end1
$cd /raid/quake/id1/models/end1
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname end2
$cd /raid/quake/id1/models/end2
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname end3
$cd /raid/quake/id1/models/end3
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
$modelname end4
$cd /raid/quake/id1/models/end4
$flags 8 // client side rotate
$base base
$skin skin
$frame frame1
/*
===============================================================================
GIBS
===============================================================================
*/
$modelname gib1
$cd /raid/quake/id1/models/gib1
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
// torso
$modelname gib2
$cd /raid/quake/id1/models/gib2
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname gib3
$cd /raid/quake/id1/models/gib3
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
// heads
$modelname h_player
$cd /raid/quake/id1/models/h_player
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_dog
$cd /raid/quake/id1/models/h_dog
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_mega
$cd /raid/quake/id1/models/h_mega
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_guard
$cd /raid/quake/id1/models/h_guard
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_wizard
$cd /raid/quake/id1/models/h_wizard
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_knight
$cd /raid/quake/id1/models/h_knight
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_hellkn
$cd /raid/quake/id1/models/h_hellkn
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_zombie
$cd /raid/quake/id1/models/h_zombie
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_shams
$cd /raid/quake/id1/models/h_shams
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_shal
$cd /raid/quake/id1/models/h_shal
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_ogre
$cd /raid/quake/id1/models/h_ogre
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname h_demon
$cd /raid/quake/id1/models/h_demon
$flags 4 // EF_GIB
$origin 0 0 0
$base base
$skin skin
$frame frame1
/*
===============================================================================
MISC
===============================================================================
*/
$modelname armor
$cd /raid/quake/id1/models/armor
$flags 8 // client side rotate
$origin 0 0 -8
$base base
$skin skin
$skin skin2
$skin skin3
$frame armor
$modelname s_light // shambler lightning ready
$cd /raid/quake/id1/models/s_light
$origin 0 0 24
$base base
$skin skin
$frame frame1 frame2 frame3
$modelname bolt3 // lightning towar bolts
$cd /raid/quake/id1/models/bolt2
$origin 0 0 0
$base base
$scale 4
$skin skin
$frame light
$modelname bolt2
$cd /raid/quake/id1/models/bolt2
$origin 0 0 0
$base base
$skin skin
$frame light
$modelname bolt
$cd /raid/quake/id1/models/bolt
$origin 0 0 0
$base light
$skin light
$frame light
$modelname laser
$cd /raid/quake/id1/models/laser
$base base
$skin skin
$scale 2
$frame frame1
$modelname flame // with torch
$cd /raid/quake/id1/models/flame
$origin 0 0 12
$base base
$skin skin
$framegroupstart
$frame flame1 0.1
$frame flame2 0.1
$frame flame3 0.1
$frame flame4 0.1
$frame flame5 0.1
$frame flame6 0.1
$framegroupend
$modelname flame2 // standing flame, no torch
$cd /raid/quake/id1/models/flame2
$origin 0 0 12
$base base
$skin skin
$framegroupstart
$frame flame1 0.1
$frame flame2 0.1
$frame flame3 0.1
$frame flame4 0.1
$frame flame5 0.1
$frame flame6 0.1
$framegroupend
$framegroupstart
$frame flameb1
$frame flameb2
$frame flameb3
$frame flameb4
$frame flameb5
$frame flameb6
$frame flameb7
$frame flameb8
$frame flameb9
$frame flameb10
$frame flameb11
$framegroupend
$modelname zom_gib
$cd /raid/quake/id1/models/zom_gib
$flags 32 // EF_ZOMGIB
$base base
$skin skin
$frame frame1
$modelname eyes
$cd /raid/quake/id1/models/eyes
$origin 0 0 -24
$base base
$skin skin
$frame frame1
$modelname spike
$cd /raid/quake/id1/models/spike
$origin 0 0 0
$base spike
$skin skin
$frame spike
$modelname s_spike
$cd /raid/quake/id1/models/s_spike
$origin 0 0 0
$base spike
$skin skin
$frame spike
$modelname v_spike
$cd /raid/quake/id1/models/v_spike
$flags 128 // EF_TRACER3
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname w_spike
$cd /raid/quake/id1/models/w_spike
$flags 16 // EF_TRACER
$origin 0 0 0
$base base
$skin skin
$framegroupstart
$frame frame1 0.1
$frame frame2 0.1
$frame frame3 0.1
$frame frame4 0.1
$framegroupend
$modelname k_spike
$cd /raid/quake/id1/models/k_spike
$flags 64 // EF_TRACER2
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname backpack
$cd /raid/quake/id1/models/backpack
$flags 8 // EF_ROTATE
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname grenade
$cd /raid/quake/id1/models/grenade2
$flags 2 // EF_GRENADE
$origin 0 0 0
$base base
$skin skin
$frame grenade
$modelname missile
$cd /raid/quake/id1/models/missile
$flags 1 // EF_ROCKET
$origin 0 0 0
$base base
$skin skin
$frame missile
$modelname lavaball
$cd /raid/quake/id1/models/lavaball
$flags 1 // EF_ROCKET
$origin 0 0 0
$base base
$skin skin
$frame frame1
$modelname teleport
$cd /raid/quake/id1/models/teleport
$origin 0 0 24
$base base
$skin skin
$frame frame1

198
quakec/fallout2/name.qc Normal file
View File

@ -0,0 +1,198 @@
string (entity guy, float slot) GetWeaponName =
{
local string name;
if (slot == 0)
name = "bare hands";
if (slot == 1)
name = "knife";
else if (slot == 2)
name = "axe";
else if (slot == 3)
name = "ripper";
else if (slot == 4)
name = "power axe";
else if (slot == 5)
name = "1911";
else if (slot == 6)
name = "desert eagle";
else if (slot == 7)
name = "needler";
else if (slot == 8)
name = "alien blaster";
else if (slot == 9)
name = "pipe rifle";
else if (slot == 10)
name = "winchester";
else if (slot == 11)
name = "mossberg";
else if (slot == 12)
name = "citykiller";
else if (slot == 13)
name = "mp9";
else if (slot == 14)
name = "grease gun";
else if (slot == 15)
name = "rangemaster";
else if (slot == 16)
name = "ak-112";
else if (slot == 17)
name = "ak-74";
else if (slot == 18)
name = "dks-1";
else if (slot == 19)
name = "moonlight";
else if (slot == 20)
name = "sa-80";
else if (slot == 21)
name = "gauss rifle";
else if (slot == 22)
name = "laser carbine";
return name;
};
string () GetArmorName =
{
local string name;
local float slot;
slot = self.armor;
if (slot == 0)
name = "none";
else if (slot == 1)
name = "bulletproof shirt";
else if (slot == 2)
name = "leather armor";
else if (slot == 3)
name = "kevlar armor";
else if (slot == 4)
name = "metal armor";
else if (slot == 5)
name = "combat armor";
else if (slot == 6)
name = "brotherhood armor";
else if (slot == 7)
name = "force armor";
else if (slot == 8)
name = "light power armor";
return name;
};
string () GetEquipmentName =
{
local string name;
local float slot;
slot = self.equipment;
if (slot == 0)
name = "none";
else if (slot == 1)
name = "medic's bag";
else if (slot == 2)
name = "security alarm";
else if (slot == 3)
name = "remote camera";
else if (slot == 4)
name = "belt pouch";
else if (slot == 5)
name = "backpack";
else if (slot == 6)
name = "toolkit mark ii";
else if (slot == 7)
name = "climbing gear";
else if (slot == 8)
name = "enhanced battery";
else if (slot == 9)
name = "stealth-boy";
return name;
};
string () GetProtectName =
{
local string name;
local float slot;
slot = self.protect;
if (slot == 0)
name = "none";
if (slot == 1)
name = "";
else if (slot == 2)
name = "sacred talisman";
else if (slot == 3)
name = "forcefield ring";
else if (slot == 4)
name = "";
else if (slot == 5)
name = "";
return name;
};
string () GetPerkName =
{
local string name;
local float slot;
slot = self.perk;
if (slot == 0)
name = "none";
if (slot == 1)
name = "medic's bag";
else if (slot == 2)
name = "security alarm";
else if (slot == 3)
name = "remote camera";
else if (slot == 4)
name = "belt pouch";
else if (slot == 5)
name = "backpack";
else if (slot == 6)
name = "toolkit mark ii";
else if (slot == 7)
name = "climbing gear";
else if (slot == 8)
name = "enhanced battery";
else if (slot == 9)
name = "stealth-boy";
return name;
};
string () GetTraitName =
{
local string name;
local float slot;
slot = self.trait;
if (slot == 0)
name = "none";
else if (slot == 1)
name = "medic's bag";
else if (slot == 2)
name = "security alarm";
else if (slot == 3)
name = "remote camera";
else if (slot == 4)
name = "belt pouch";
else if (slot == 5)
name = "backpack";
else if (slot == 6)
name = "toolkit mark ii";
else if (slot == 7)
name = "climbing gear";
else if (slot == 8)
name = "enhanced battery";
else if (slot == 9)
name = "stealth-boy";
return name;
};

233
quakec/fallout2/shalrath.qc Normal file
View File

@ -0,0 +1,233 @@
/*
==============================================================================
SHAL-RATH
==============================================================================
*/
$cd id1/models/shalrath
$origin 0 0 24
$base base
$skin skin
$scale 0.7
$frame attack1 attack2 attack3 attack4 attack5 attack6 attack7 attack8
$frame attack9 attack10 attack11
$frame pain1 pain2 pain3 pain4 pain5
$frame death1 death2 death3 death4 death5 death6 death7
$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8 walk9 walk10
$frame walk11 walk12
void() shalrath_pain;
void() ShalMissile;
void() shal_stand =[ $walk1, shal_stand ] {ai_stand();};
void() shal_walk1 =[ $walk2, shal_walk2 ] {
if (random() < 0.2)
sound (self, CHAN_VOICE, "shalrath/idle.wav", 1, ATTN_IDLE);
ai_walk(6);};
void() shal_walk2 =[ $walk3, shal_walk3 ] {ai_walk(4);};
void() shal_walk3 =[ $walk4, shal_walk4 ] {ai_walk(0);};
void() shal_walk4 =[ $walk5, shal_walk5 ] {ai_walk(0);};
void() shal_walk5 =[ $walk6, shal_walk6 ] {ai_walk(0);};
void() shal_walk6 =[ $walk7, shal_walk7 ] {ai_walk(0);};
void() shal_walk7 =[ $walk8, shal_walk8 ] {ai_walk(5);};
void() shal_walk8 =[ $walk9, shal_walk9 ] {ai_walk(6);};
void() shal_walk9 =[ $walk10, shal_walk10 ] {ai_walk(5);};
void() shal_walk10 =[ $walk11, shal_walk11 ] {ai_walk(0);};
void() shal_walk11 =[ $walk12, shal_walk12 ] {ai_walk(4);};
void() shal_walk12 =[ $walk1, shal_walk1 ] {ai_walk(5);};
void() shal_run1 =[ $walk2, shal_run2 ] {
if (random() < 0.2)
sound (self, CHAN_VOICE, "shalrath/idle.wav", 1, ATTN_IDLE);
ai_run(6);};
void() shal_run2 =[ $walk3, shal_run3 ] {ai_run(4);};
void() shal_run3 =[ $walk4, shal_run4 ] {ai_run(0);};
void() shal_run4 =[ $walk5, shal_run5 ] {ai_run(0);};
void() shal_run5 =[ $walk6, shal_run6 ] {ai_run(0);};
void() shal_run6 =[ $walk7, shal_run7 ] {ai_run(0);};
void() shal_run7 =[ $walk8, shal_run8 ] {ai_run(5);};
void() shal_run8 =[ $walk9, shal_run9 ] {ai_run(6);};
void() shal_run9 =[ $walk10, shal_run10 ] {ai_run(5);};
void() shal_run10 =[ $walk11, shal_run11 ] {ai_run(0);};
void() shal_run11 =[ $walk12, shal_run12 ] {ai_run(4);};
void() shal_run12 =[ $walk1, shal_run1 ] {ai_run(5);};
void() shal_attack1 =[ $attack1, shal_attack2 ] {
sound (self, CHAN_VOICE, "shalrath/attack.wav", 1, ATTN_NORM);
ai_face();
};
void() shal_attack2 =[ $attack2, shal_attack3 ] {ai_face();};
void() shal_attack3 =[ $attack3, shal_attack4 ] {ai_face();};
void() shal_attack4 =[ $attack4, shal_attack5 ] {ai_face();};
void() shal_attack5 =[ $attack5, shal_attack6 ] {ai_face();};
void() shal_attack6 =[ $attack6, shal_attack7 ] {ai_face();};
void() shal_attack7 =[ $attack7, shal_attack8 ] {ai_face();};
void() shal_attack8 =[ $attack8, shal_attack9 ] {ai_face();};
void() shal_attack9 =[ $attack9, shal_attack10 ] {ShalMissile();};
void() shal_attack10 =[ $attack10, shal_attack11 ] {ai_face();};
void() shal_attack11 =[ $attack11, shal_run1 ] {};
void() shal_pain1 =[ $pain1, shal_pain2 ] {};
void() shal_pain2 =[ $pain2, shal_pain3 ] {};
void() shal_pain3 =[ $pain3, shal_pain4 ] {};
void() shal_pain4 =[ $pain4, shal_pain5 ] {};
void() shal_pain5 =[ $pain5, shal_run1 ] {};
void() shal_death1 =[ $death1, shal_death2 ] {};
void() shal_death2 =[ $death2, shal_death3 ] {};
void() shal_death3 =[ $death3, shal_death4 ] {};
void() shal_death4 =[ $death4, shal_death5 ] {};
void() shal_death5 =[ $death5, shal_death6 ] {};
void() shal_death6 =[ $death6, shal_death7 ] {};
void() shal_death7 =[ $death7, shal_death7 ] {};
void() shalrath_pain =
{
if (self.pain_finished > time)
return;
sound (self, CHAN_VOICE, "shalrath/pain.wav", 1, ATTN_NORM);
shal_pain1();
self.pain_finished = time + 3;
};
void() shalrath_die =
{
// check for gib
if (self.health < -90)
{
sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NORM);
ThrowHead ("progs/h_shal.mdl", self.health);
ThrowGib ("progs/gib1.mdl", self.health);
ThrowGib ("progs/gib2.mdl", self.health);
ThrowGib ("progs/gib3.mdl", self.health);
return;
}
sound (self, CHAN_VOICE, "shalrath/death.wav", 1, ATTN_NORM);
shal_death1();
self.solid = SOLID_NOT;
// insert death sounds here
};
/*
================
ShalMissile
================
*/
void() ShalMissileTouch;
void() ShalHome;
void() ShalMissile =
{
local entity missile;
local vector dir;
local float dist, flytime;
dir = normalize((self.enemy.origin + '0 0 10') - self.origin);
dist = vlen (self.enemy.origin - self.origin);
flytime = dist * 0.002;
if (flytime < 0.1)
flytime = 0.1;
sound (self, CHAN_WEAPON, "shalrath/attack2.wav", 1, ATTN_NORM);
missile = spawn ();
missile.owner = self;
missile.solid = SOLID_BBOX;
missile.movetype = MOVETYPE_FLYMISSILE;
setmodel (missile, "progs/v_spike.mdl");
setsize (missile, '0 0 0', '0 0 0');
missile.origin = self.origin + '0 0 10';
missile.velocity = dir * 400;
missile.avelocity = '300 300 300';
missile.nextthink = flytime + time;
missile.think = ShalHome;
missile.enemy = self.enemy;
missile.touch = ShalMissileTouch;
};
void() ShalHome =
{
local vector dir, vtemp;
vtemp = self.enemy.origin + '0 0 10';
if (self.enemy.health < 1)
{
remove(self);
return;
}
dir = normalize(vtemp - self.origin);
self.velocity = dir * 350;
self.nextthink = time + 0.2;
self.think = ShalHome;
};
void() ShalMissileTouch =
{
if (other == self.owner)
return; // don't explode on owner
if (other.classname == "monster_zombie")
T_Damage (other, self, self, 110);
T_RadiusDamage (self, self.owner, 40, world);
sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_EXPLOSION);
WriteCoord (MSG_BROADCAST, self.origin_x);
WriteCoord (MSG_BROADCAST, self.origin_y);
WriteCoord (MSG_BROADCAST, self.origin_z);
self.velocity = '0 0 0';
self.touch = SUB_Null;
setmodel (self, "progs/s_explod.spr");
self.solid = SOLID_NOT;
Explosion(2);
};
//=================================================================
void() monster_shalrath =
{
precache_model2 ("progs/shalrath.mdl");
precache_model2 ("progs/h_shal.mdl");
precache_model2 ("progs/v_spike.mdl");
precache_sound2 ("shalrath/attack.wav");
precache_sound2 ("shalrath/attack2.wav");
precache_sound2 ("shalrath/death.wav");
precache_sound2 ("shalrath/idle.wav");
precache_sound2 ("shalrath/pain.wav");
precache_sound2 ("shalrath/sight.wav");
self.solid = SOLID_SLIDEBOX;
self.movetype = MOVETYPE_STEP;
setmodel (self, "progs/shalrath.mdl");
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
self.health = 800;
self.corporation = 3;
self.armor = 9;
self.armortype = 0.2;
self.helmet = 1;
self.classname = "monster";
self.netname = "experiment";
self.th_stand = shal_stand;
self.th_walk = shal_walk1;
self.th_run = shal_run1;
self.th_die = shalrath_die;
self.th_pain = shalrath_pain;
self.th_missile = shal_attack1;
self.think = walkmonster_start;
self.nextthink = time + 0.1 + random ()*0.1;
};

View File

@ -0,0 +1,84 @@
// Spectator functions
// Added Aug11'97 by Zoid <zoid@idsoftware.com>
//
// These functions are called from the server if they exist.
// Note that Spectators only have one think since they movement code doesn't
// track them much. Impulse commands work as usual, but don't call
// the regular ImpulseCommand handler in weapons.qc since Spectators don't
// have any weapons and things can explode.
//
// --- Zoid.
/*
===========
SpectatorConnect
called when a spectator connects to a server
============
*/
void() SpectatorConnect =
{
bprint (PRINT_MEDIUM, "Spectator ");
bprint (PRINT_MEDIUM, self.netname);
bprint (PRINT_MEDIUM, " entered the game\n");
self.goalentity = world; // used for impulse 1 below
};
/*
===========
SpectatorDisconnect
called when a spectator disconnects from a server
============
*/
void() SpectatorDisconnect =
{
bprint (PRINT_MEDIUM, "Spectator ");
bprint (PRINT_MEDIUM, self.netname);
bprint (PRINT_MEDIUM, " left the game\n");
};
/*
================
SpectatorImpulseCommand
Called by SpectatorThink if the spectator entered an impulse
================
*/
void() SpectatorImpulseCommand =
{
if (self.impulse == 1) {
// teleport the spectator to the next spawn point
// note that if the spectator is tracking, this doesn't do
// much
self.goalentity = find(self.goalentity, classname, "info_player_deathmatch");
if (self.goalentity == world)
self.goalentity = find(self.goalentity, classname, "info_player_deathmatch");
if (self.goalentity != world) {
setorigin(self, self.goalentity.origin);
self.angles = self.goalentity.angles;
self.fixangle = TRUE; // turn this way immediately
}
}
self.impulse = 0;
};
/*
================
SpectatorThink
Called every frame after physics are run
================
*/
void() SpectatorThink =
{
// self.origin, etc contains spectator position, so you could
// do some neat stuff here
if (self.impulse)
SpectatorImpulseCommand();
};

View File

@ -0,0 +1,26 @@
// these are the only sprites still in the game...
$spritename s_explod
$type vp_parallel
$load /raid/quake/id1/gfx/sprites/explod03.lbm
$frame 24 24 56 56
$frame 120 24 56 56
$frame 216 24 56 56
$frame 24 88 56 56
$frame 120 88 56 56
$frame 216 88 56 56
$spritename s_bubble
$type vp_parallel
$load /raid/quake/id1/gfx/sprites/bubble.lbm
$frame 16 16 16 16
$frame 40 16 16 16
$spritename s_light
$type vp_parallel
$load /raid/quake/id1/gfx/sprites/light.lbm
$frame 104 32 32 32