mirror of
https://git.code.sf.net/p/quake/game-source
synced 2024-11-21 19:41:25 +00:00
Osmod's (John Schuessler, osmod@hotmail.com) "bringback" mod merged in.
controled by the respawn_enabled flag (always off at the moment). Most of the merge work done by Hikaru/Misty (Tim C. McGrath), especially the bug fixes.
This commit is contained in:
parent
56ea8abf9f
commit
f4c1b758d0
13 changed files with 134 additions and 25 deletions
78
quake/bringback.qc
Normal file
78
quake/bringback.qc
Normal file
|
@ -0,0 +1,78 @@
|
|||
// bring back qc file, contains all the functions added to create the
|
||||
// 'respawn effect
|
||||
// void bringback (); declared in ogre.qc ( first file its referanced in);
|
||||
// void savecritter (); ""
|
||||
|
||||
integer respawn_enabled;
|
||||
|
||||
void () savecritter =
|
||||
{
|
||||
// .max_health was only used by player untill now
|
||||
self.max_health = self.health;
|
||||
// .oldorigin only used by secret doors, untill now.
|
||||
self.oldorigin = self.origin;
|
||||
// .weaponmodel is only used to show the players currentweapon (on the hud)
|
||||
self.weaponmodel = self.model;
|
||||
};
|
||||
|
||||
void () bringback =
|
||||
{
|
||||
if (!respawn_enabled)
|
||||
return;
|
||||
|
||||
self.frags++;
|
||||
|
||||
if (self.frags == 50) {
|
||||
//ThrowGib ("progs/gib1.mdl", self.health);
|
||||
//ThrowGib ("progs/gib2.mdl", self.health);
|
||||
//ThrowGib ("progs/gib3.mdl", self.health);
|
||||
spawn_tfog (self.origin);
|
||||
setmodel (self, "");
|
||||
}
|
||||
if (self.frags > 100) {
|
||||
self.solid = SOLID_SLIDEBOX;
|
||||
self.movetype = MOVETYPE_STEP;
|
||||
self.takedamage = DAMAGE_AIM;
|
||||
|
||||
self.frags = 1;
|
||||
|
||||
if (mapname != "end")
|
||||
self.origin = self.oldorigin;
|
||||
|
||||
setmodel(self, self.weaponmodel);
|
||||
self.health = self.max_health;
|
||||
|
||||
// about 3/4 of quakes critters use this size
|
||||
setsize (self, '-16 -16 -24', '16 16 40');
|
||||
|
||||
if (self.classname == "monster_demon1")
|
||||
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
||||
if (self.classname == "monster_ogre")
|
||||
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
||||
if (self.classname == "monster_shalrath")
|
||||
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
||||
if (self.classname == "monster_shambler")
|
||||
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
||||
if (self.classname == "monster_dog")
|
||||
setsize (self, '-32 -32 -24', '32 32 40');
|
||||
if (self.classname == "monster_fish") {
|
||||
setsize (self, '-16 -16 -24', '16 16 24');
|
||||
self.flags = self.flags + FL_SWIM;
|
||||
}
|
||||
if (self.classname == "monster_wizard")
|
||||
self.flags = self.flags + FL_FLY;
|
||||
|
||||
spawn_tfog (self.origin);
|
||||
spawn_tdeath (self.origin, self);
|
||||
if (FindTarget) {
|
||||
self.think = self.th_run;
|
||||
} else {
|
||||
self.think = self.th_walk;
|
||||
}
|
||||
|
||||
if (!(self.flags & FL_FLY) && !(self.flags & FL_SWIM)) {
|
||||
self.origin_z = self.origin_z + 1;
|
||||
droptofloor ();
|
||||
}
|
||||
}
|
||||
};
|
|
@ -148,7 +148,7 @@ void() demon1_die6 =[ $death6, demon1_die7 ]
|
|||
{self.solid = SOLID_NOT;};
|
||||
void() demon1_die7 =[ $death7, demon1_die8 ] {};
|
||||
void() demon1_die8 =[ $death8, demon1_die9 ] {};
|
||||
void() demon1_die9 =[ $death9, demon1_die9 ] {};
|
||||
void() demon1_die9 =[ $death9, demon1_die9 ] { bringback (); };
|
||||
|
||||
void() demon_die =
|
||||
{
|
||||
|
@ -209,8 +209,9 @@ void() monster_demon1 =
|
|||
self.th_melee = Demon_MeleeAttack; // one of two attacks
|
||||
self.th_missile = demon1_jump1; // jump attack
|
||||
self.th_pain = demon1_pain;
|
||||
|
||||
walkmonster_start();
|
||||
|
||||
savecritter ();
|
||||
walkmonster_start ();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ void() dog_die5 =[ $death5, dog_die6 ] {};
|
|||
void() dog_die6 =[ $death6, dog_die7 ] {};
|
||||
void() dog_die7 =[ $death7, dog_die8 ] {};
|
||||
void() dog_die8 =[ $death8, dog_die9 ] {};
|
||||
void() dog_die9 =[ $death9, dog_die9 ] {};
|
||||
void() dog_die9 =[ $death9, dog_die9 ] { bringback (); };
|
||||
|
||||
void() dog_dieb1 =[ $deathb1, dog_dieb2 ] {};
|
||||
void() dog_dieb2 =[ $deathb2, dog_dieb3 ] {};
|
||||
|
@ -223,7 +223,7 @@ void() dog_dieb5 =[ $deathb5, dog_dieb6 ] {};
|
|||
void() dog_dieb6 =[ $deathb6, dog_dieb7 ] {};
|
||||
void() dog_dieb7 =[ $deathb7, dog_dieb8 ] {};
|
||||
void() dog_dieb8 =[ $deathb8, dog_dieb9 ] {};
|
||||
void() dog_dieb9 =[ $deathb9, dog_dieb9 ] {};
|
||||
void() dog_dieb9 =[ $deathb9, dog_dieb9 ] { bringback (); };
|
||||
|
||||
|
||||
void() dog_die =
|
||||
|
@ -357,5 +357,6 @@ void() monster_dog =
|
|||
self.th_melee = dog_atta1;
|
||||
self.th_missile = dog_leap1;
|
||||
|
||||
walkmonster_start();
|
||||
savecritter ();
|
||||
walkmonster_start ();
|
||||
};
|
||||
|
|
|
@ -249,7 +249,7 @@ void() enf_die9 =[ $death9, enf_die10 ] {ai_forward(3);};
|
|||
void() enf_die10 =[ $death10, enf_die11 ] {ai_forward(5);};
|
||||
void() enf_die11 =[ $death11, enf_die12 ] {ai_forward(5);};
|
||||
void() enf_die12 =[ $death12, enf_die13 ] {ai_forward(5);};
|
||||
void() enf_die13 =[ $death13, enf_die14 ] {};
|
||||
void() enf_die13 =[ $death13, enf_die14 ] { bringback (); };
|
||||
void() enf_die14 =[ $death14, enf_die14 ] {};
|
||||
|
||||
void() enf_fdie1 =[ $fdeath1, enf_fdie2 ] {};
|
||||
|
@ -266,7 +266,7 @@ void() enf_fdie7 =[ $fdeath7, enf_fdie8 ] {};
|
|||
void() enf_fdie8 =[ $fdeath8, enf_fdie9 ] {};
|
||||
void() enf_fdie9 =[ $fdeath9, enf_fdie10 ] {};
|
||||
void() enf_fdie10 =[ $fdeath10, enf_fdie11 ] {};
|
||||
void() enf_fdie11 =[ $fdeath11, enf_fdie11 ] {};
|
||||
void() enf_fdie11 =[ $fdeath11, enf_fdie11 ] { bringback (); };
|
||||
|
||||
|
||||
void() enf_die =
|
||||
|
@ -329,5 +329,6 @@ void() monster_enforcer =
|
|||
self.th_die = enf_die;
|
||||
self.th_missile = enf_atk1;
|
||||
|
||||
savecritter ();
|
||||
walkmonster_start();
|
||||
};
|
||||
|
|
|
@ -108,9 +108,7 @@ 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_death1 =[ $death1, f_death2 ] {};
|
||||
void() f_death2 =[ $death2, f_death3 ] {};
|
||||
void() f_death3 =[ $death3, f_death4 ] {};
|
||||
void() f_death4 =[ $death4, f_death5 ] {};
|
||||
|
@ -130,7 +128,24 @@ 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_death21 =[ $death21, f_death21 ] {
|
||||
self.solid = SOLID_NOT;
|
||||
bringback ();
|
||||
};
|
||||
|
||||
void () f_death =
|
||||
{
|
||||
if (self.health < -35) {
|
||||
sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NORM);
|
||||
ThrowGib ("progs/gib3.mdl", self.health);
|
||||
ThrowGib ("progs/gib3.mdl", self.health);
|
||||
ThrowGib ("progs/gib3.mdl", self.health);
|
||||
remove (self);
|
||||
return;
|
||||
}
|
||||
|
||||
f_death1 ();
|
||||
};
|
||||
|
||||
void() f_pain1 =[ $pain1, f_pain2 ] {};
|
||||
void() f_pain2 =[ $pain2, f_pain3 ] {ai_pain(6);};
|
||||
|
@ -177,10 +192,11 @@ void() monster_fish =
|
|||
self.th_stand = f_stand1;
|
||||
self.th_walk = f_walk1;
|
||||
self.th_run = f_run1;
|
||||
self.th_die = f_death1;
|
||||
self.th_die = f_death;
|
||||
self.th_pain = fish_pain;
|
||||
self.th_melee = f_attack1;
|
||||
|
||||
savecritter ();
|
||||
swimmonster_start ();
|
||||
};
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ 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_die12 =[ $death12, hknight_die12 ] { bringback (); };
|
||||
|
||||
void() hknight_dieb1 =[ $deathb1, hknight_dieb2 ] {};
|
||||
void() hknight_dieb2 =[ $deathb2, hknight_dieb3 ] {};
|
||||
|
@ -195,7 +195,7 @@ 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_dieb9 =[ $deathb9, hknight_dieb9 ] { bringback (); };
|
||||
|
||||
void() hknight_die =
|
||||
{
|
||||
|
@ -436,5 +436,6 @@ void() monster_hell_knight =
|
|||
self.th_pain = hknight_pain;
|
||||
self.th_die = hknight_die;
|
||||
|
||||
savecritter ();
|
||||
walkmonster_start ();
|
||||
};
|
||||
|
|
|
@ -193,7 +193,7 @@ void() knight_die6 =[ $death6, knight_die7 ] {};
|
|||
void() knight_die7 =[ $death7, knight_die8 ] {};
|
||||
void() knight_die8 =[ $death8, knight_die9 ] {};
|
||||
void() knight_die9 =[ $death9, knight_die10] {};
|
||||
void() knight_die10=[ $death10, knight_die10] {};
|
||||
void() knight_die10=[ $death10, knight_die10] { bringback (); };
|
||||
|
||||
|
||||
void() knight_dieb1 =[ $deathb1, knight_dieb2 ] {};
|
||||
|
@ -207,7 +207,7 @@ void() knight_dieb7 =[ $deathb7, knight_dieb8 ] {};
|
|||
void() knight_dieb8 =[ $deathb8, knight_dieb9 ] {};
|
||||
void() knight_dieb9 =[ $deathb9, knight_dieb10] {};
|
||||
void() knight_dieb10 = [ $deathb10, knight_dieb11] {};
|
||||
void() knight_dieb11 = [ $deathb11, knight_dieb11] {};
|
||||
void() knight_dieb11 = [ $deathb11, knight_dieb11] { bringback (); };
|
||||
|
||||
|
||||
void() knight_die =
|
||||
|
@ -266,5 +266,6 @@ void() monster_knight =
|
|||
self.th_pain = knight_pain;
|
||||
self.th_die = knight_die;
|
||||
|
||||
savecritter ();
|
||||
walkmonster_start ();
|
||||
};
|
||||
|
|
|
@ -6,6 +6,9 @@ OGRE
|
|||
==============================================================================
|
||||
*/
|
||||
|
||||
void bringback ();
|
||||
void savecritter ();
|
||||
|
||||
$cd id1/models/ogre_c
|
||||
$origin 0 0 24
|
||||
$base base
|
||||
|
@ -369,7 +372,7 @@ void() ogre_die10 =[ $death10, ogre_die11 ] {};
|
|||
void() ogre_die11 =[ $death11, ogre_die12 ] {};
|
||||
void() ogre_die12 =[ $death12, ogre_die13 ] {};
|
||||
void() ogre_die13 =[ $death13, ogre_die14 ] {};
|
||||
void() ogre_die14 =[ $death14, ogre_die14 ] {};
|
||||
void() ogre_die14 =[ $death14, ogre_die14 ] { bringback (); };
|
||||
|
||||
void() ogre_bdie1 =[ $bdeath1, ogre_bdie2 ] {};
|
||||
void() ogre_bdie2 =[ $bdeath2, ogre_bdie3 ] {ai_forward(5);};
|
||||
|
@ -384,7 +387,7 @@ void() ogre_bdie6 =[ $bdeath6, ogre_bdie7 ] {ai_forward(7);};
|
|||
void() ogre_bdie7 =[ $bdeath7, ogre_bdie8 ] {ai_forward(25);};
|
||||
void() ogre_bdie8 =[ $bdeath8, ogre_bdie9 ] {};
|
||||
void() ogre_bdie9 =[ $bdeath9, ogre_bdie10 ] {};
|
||||
void() ogre_bdie10 =[ $bdeath10, ogre_bdie10 ] {};
|
||||
void() ogre_bdie10 =[ $bdeath10, ogre_bdie10 ] { bringback (); };
|
||||
|
||||
void() ogre_die =
|
||||
{
|
||||
|
@ -452,6 +455,7 @@ void() monster_ogre =
|
|||
self.th_missile = ogre_nail1;
|
||||
self.th_pain = ogre_pain;
|
||||
|
||||
savecritter ();
|
||||
walkmonster_start ();
|
||||
};
|
||||
|
||||
|
|
|
@ -33,3 +33,5 @@ fish.qc // registered
|
|||
shalrath.qc // registered
|
||||
enforcer.qc // registered
|
||||
oldone.qc // registered
|
||||
|
||||
bringback.qc // new
|
||||
|
|
|
@ -86,7 +86,7 @@ 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() shal_death7 =[ $death7, shal_death7 ] { bringback (); };
|
||||
|
||||
|
||||
void(entity attacker, float damage) shalrath_pain =
|
||||
|
@ -224,6 +224,7 @@ void() monster_shalrath =
|
|||
self.th_pain = shalrath_pain;
|
||||
self.th_missile = shal_attack1;
|
||||
|
||||
savecritter ();
|
||||
self.think = walkmonster_start;
|
||||
self.nextthink = time + 0.1 + random () * 0.1;
|
||||
};
|
||||
|
|
|
@ -302,7 +302,7 @@ void() sham_death7 =[ $death7, sham_death8 ] {};
|
|||
void() sham_death8 =[ $death8, sham_death9 ] {};
|
||||
void() sham_death9 =[ $death9, sham_death10 ] {};
|
||||
void() sham_death10 =[ $death10, sham_death11 ] {};
|
||||
void() sham_death11 =[ $death11, sham_death11 ] {};
|
||||
void() sham_death11 =[ $death11, sham_death11 ] { bringback (); };
|
||||
|
||||
void() sham_die =
|
||||
{
|
||||
|
@ -361,5 +361,6 @@ void() monster_shambler =
|
|||
self.th_missile = sham_magic1;
|
||||
self.th_pain = sham_pain;
|
||||
|
||||
savecritter ();
|
||||
walkmonster_start ();
|
||||
};
|
||||
|
|
|
@ -202,7 +202,7 @@ void() army_die6 =[ $death6, army_die7 ] {};
|
|||
void() army_die7 =[ $death7, army_die8 ] {};
|
||||
void() army_die8 =[ $death8, army_die9 ] {};
|
||||
void() army_die9 =[ $death9, army_die10 ] {};
|
||||
void() army_die10 =[ $death10, army_die10 ] {};
|
||||
void() army_die10 =[ $death10, army_die10 ] { bringback (); };
|
||||
|
||||
void() army_cdie1 =[ $deathc1, army_cdie2 ] {};
|
||||
void() army_cdie2 =[ $deathc2, army_cdie3 ] {ai_back(5);};
|
||||
|
@ -215,7 +215,7 @@ void() army_cdie7 =[ $deathc7, army_cdie8 ] {};
|
|||
void() army_cdie8 =[ $deathc8, army_cdie9 ] {};
|
||||
void() army_cdie9 =[ $deathc9, army_cdie10 ] {};
|
||||
void() army_cdie10 =[ $deathc10, army_cdie11 ] {};
|
||||
void() army_cdie11 =[ $deathc11, army_cdie11 ] {};
|
||||
void() army_cdie11 =[ $deathc11, army_cdie11 ] { bringback (); };
|
||||
|
||||
|
||||
void() army_die =
|
||||
|
@ -280,5 +280,6 @@ void() monster_army =
|
|||
self.th_pain = army_pain;
|
||||
self.th_die = army_die;
|
||||
|
||||
savecritter ();
|
||||
walkmonster_start ();
|
||||
};
|
||||
|
|
|
@ -336,7 +336,7 @@ void() wiz_death4 =[ $death4, wiz_death5 ] {};
|
|||
void() wiz_death5 =[ $death5, wiz_death6 ] {};
|
||||
void() wiz_death6 =[ $death6, wiz_death7 ] {};
|
||||
void() wiz_death7 =[ $death7, wiz_death8 ] {};
|
||||
void() wiz_death8 =[ $death8, wiz_death8 ] {};
|
||||
void() wiz_death8 =[ $death8, wiz_death8 ] { bringback (); };
|
||||
|
||||
void() wiz_die =
|
||||
{
|
||||
|
@ -405,6 +405,7 @@ void() monster_wizard =
|
|||
self.th_missile = Wiz_Missile;
|
||||
self.th_pain = Wiz_Pain;
|
||||
self.th_die = wiz_die;
|
||||
|
||||
|
||||
savecritter ();
|
||||
flymonster_start ();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue