mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2025-02-18 18:11:08 +00:00
some cleanups
This commit is contained in:
parent
b3ba69216f
commit
4e75f3c83e
4 changed files with 573 additions and 901 deletions
38
jobs.qc
38
jobs.qc
|
@ -528,7 +528,7 @@ void() JudokaRearm =
|
||||||
oself = self;
|
oself = self;
|
||||||
self = self.enemy;
|
self = self.enemy;
|
||||||
stuffcmd(self, "v_idlescale 0\n");
|
stuffcmd(self, "v_idlescale 0\n");
|
||||||
self.tfstate = self.tfstate - (self.tfstate & TFSTATE_ASSAULTCANNON);
|
self.tfstate &= ~TFSTATE_ASSAULTCANNON;
|
||||||
TeamFortress_SetSpeed(self);
|
TeamFortress_SetSpeed(self);
|
||||||
self.weaponframe = 0;
|
self.weaponframe = 0;
|
||||||
self.count = 1;
|
self.count = 1;
|
||||||
|
@ -661,7 +661,7 @@ void() JobJudoka =
|
||||||
oself = self;
|
oself = self;
|
||||||
self = trace_ent;
|
self = trace_ent;
|
||||||
stuffcmd(self, "-attack;v_idlescale 0\n");
|
stuffcmd(self, "-attack;v_idlescale 0\n");
|
||||||
self.tfstate = self.tfstate - (self.tfstate & TFSTATE_ASSAULTCANNON);
|
self.tfstate &= ~TFSTATE_ASSAULTCANNON;
|
||||||
TeamFortress_SetSpeed(self);
|
TeamFortress_SetSpeed(self);
|
||||||
self.weaponframe = 0;
|
self.weaponframe = 0;
|
||||||
self.count = 1;
|
self.count = 1;
|
||||||
|
@ -864,8 +864,7 @@ void() GuerillaTossTouch =
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID) //CH if in wall or sky
|
if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID) { //CH if in wall or sky
|
||||||
{
|
|
||||||
self.health = 0; //CH needed for tesla
|
self.health = 0; //CH needed for tesla
|
||||||
// OfN CAUSES ANY PROBLEM? Is this needed?
|
// OfN CAUSES ANY PROBLEM? Is this needed?
|
||||||
|
|
||||||
|
@ -888,7 +887,7 @@ void() GuerillaTossTouch =
|
||||||
void() JobGuerilla =
|
void() JobGuerilla =
|
||||||
{
|
{
|
||||||
if (self.ammo_rockets < MINE_COST) {
|
if (self.ammo_rockets < MINE_COST) {
|
||||||
sprint(self,PRINT_HIGH,"every mine needs 4 rockets to work!\n");
|
sprint(self, PRINT_HIGH, "every mine needs 4 rockets to work!\n");
|
||||||
self.job_finished = time + 1;
|
self.job_finished = time + 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -896,9 +895,9 @@ void() JobGuerilla =
|
||||||
if (self.num_mines >= max_mines) {
|
if (self.num_mines >= max_mines) {
|
||||||
local string st;
|
local string st;
|
||||||
st = ftos(max_mines);
|
st = ftos(max_mines);
|
||||||
sprint(self,PRINT_HIGH,"you can set upto ");
|
sprint(self, PRINT_HIGH, "you can set upto ");
|
||||||
sprint(self,PRINT_HIGH,st);
|
sprint(self, PRINT_HIGH, st);
|
||||||
sprint(self,PRINT_HIGH," mines!\n");
|
sprint(self, PRINT_HIGH, " mines!\n");
|
||||||
self.job_finished = time + 1;
|
self.job_finished = time + 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -923,16 +922,16 @@ void() JobGuerilla =
|
||||||
newmis.classname = "grenade";
|
newmis.classname = "grenade";
|
||||||
newmis.netname = "land_mine";
|
newmis.netname = "land_mine";
|
||||||
setsize (newmis, '0 0 0', '0 0 0');
|
setsize (newmis, '0 0 0', '0 0 0');
|
||||||
//setsize (newmis, '-0.5 -0.5 -0.5', '1 1 1');
|
// setsize (newmis, '-0.5 -0.5 -0.5', '1 1 1');
|
||||||
setorigin (newmis, self.origin);
|
setorigin (newmis, self.origin);
|
||||||
newmis.owner = self;
|
newmis.owner = self;
|
||||||
makevectors (self.v_angle);
|
makevectors (self.v_angle);
|
||||||
newmis.avelocity = '300 300 300';
|
newmis.avelocity = '300 300 300';
|
||||||
newmis.velocity = v_forward*600 + v_up * 200 + v_right*10 + v_up*10;
|
newmis.velocity = v_forward*600 + v_up * 200 + v_right*10 + v_up*10;
|
||||||
newmis.angles = vectoangles(newmis.velocity);
|
newmis.angles = vectoangles(newmis.velocity);
|
||||||
//newmis.skin = self.team_no - 1;
|
// newmis.skin = self.team_no - 1;
|
||||||
newmis.skin = 1;
|
newmis.skin = 1;
|
||||||
//setmodel (newmis, "progs/lndmine.mdl");
|
// setmodel (newmis, "progs/lndmine.mdl");
|
||||||
setmodel (newmis, "progs/biggren.mdl");
|
setmodel (newmis, "progs/biggren.mdl");
|
||||||
|
|
||||||
newmis.heat = time; //Controls when mine can first go off
|
newmis.heat = time; //Controls when mine can first go off
|
||||||
|
@ -942,7 +941,6 @@ void() JobGuerilla =
|
||||||
newmis.touch = GuerillaTossTouch;
|
newmis.touch = GuerillaTossTouch;
|
||||||
newmis.think = GuerillaThink;
|
newmis.think = GuerillaThink;
|
||||||
newmis.nextthink = time + ACTIVATE_TIME;
|
newmis.nextthink = time + ACTIVATE_TIME;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void() JobCrusader;
|
void() JobCrusader;
|
||||||
|
@ -960,16 +958,13 @@ void() UseJobSkill =
|
||||||
JobThief();
|
JobThief();
|
||||||
else if (myjob & JOB_RUNNER)
|
else if (myjob & JOB_RUNNER)
|
||||||
JobRunner();
|
JobRunner();
|
||||||
else if (myjob & JOB_WARLOCK)
|
else if (myjob & JOB_WARLOCK) {
|
||||||
{
|
if (HasFlag(self.team_no) == FALSE) {
|
||||||
if (HasFlag(self.team_no) == FALSE)
|
|
||||||
{
|
|
||||||
CenterPrint(self, "No demons until your team has the flag!\n");
|
CenterPrint(self, "No demons until your team has the flag!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
JobWarlock();
|
JobWarlock();
|
||||||
}
|
} else if (myjob & JOB_CHAPLAN)
|
||||||
else if (myjob & JOB_CHAPLAN)
|
|
||||||
JobChaplan();
|
JobChaplan();
|
||||||
else if (myjob & JOB_BERSERKER)
|
else if (myjob & JOB_BERSERKER)
|
||||||
JobBerserker();
|
JobBerserker();
|
||||||
|
@ -995,7 +990,8 @@ void() UseJobSkill =
|
||||||
#define EXPOSURE_NOHIDE_TIME 20
|
#define EXPOSURE_NOHIDE_TIME 20
|
||||||
#define EXPOSURE_NORELOAD_TIME 7
|
#define EXPOSURE_NORELOAD_TIME 7
|
||||||
#define FULLH_NORELOAD_TIME 1.5
|
#define FULLH_NORELOAD_TIME 1.5
|
||||||
void (entity targ, float pain) RevealThief = {
|
void (entity targ, float pain) RevealThief =
|
||||||
|
{
|
||||||
if (targ.classname != "player")
|
if (targ.classname != "player")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1010,8 +1006,7 @@ void (entity targ, float pain) RevealThief = {
|
||||||
sprint(targ,PRINT_HIGH,"You have been uncovered!\n");
|
sprint(targ,PRINT_HIGH,"You have been uncovered!\n");
|
||||||
targ.attack_finished = time + EXPOSURE_NORELOAD_TIME;
|
targ.attack_finished = time + EXPOSURE_NORELOAD_TIME;
|
||||||
targ.job_finished = time + EXPOSURE_NOHIDE_TIME;
|
targ.job_finished = time + EXPOSURE_NOHIDE_TIME;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (targ.invisible_time)
|
if (targ.invisible_time)
|
||||||
sprint (targ, PRINT_HIGH, "Leaving shadows... just as soon as this ring wears off...\n");
|
sprint (targ, PRINT_HIGH, "Leaving shadows... just as soon as this ring wears off...\n");
|
||||||
else
|
else
|
||||||
|
@ -1024,4 +1019,3 @@ void (entity targ, float pain) RevealThief = {
|
||||||
targ.job = targ.job - (targ.job & JOB_ACTIVE);
|
targ.job = targ.job - (targ.job & JOB_ACTIVE);
|
||||||
TeamFortress_SetSpeed(targ);
|
TeamFortress_SetSpeed(targ);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
194
player.qc
194
player.qc
|
@ -571,11 +571,10 @@ void() player_assaultcannonup1 =[$nailatt1, player_assaultcannonup2 ]
|
||||||
if ((!self.button0) || (self.ammo_shells < 1) || intermission_running)
|
if ((!self.button0) || (self.ammo_shells < 1) || intermission_running)
|
||||||
{
|
{
|
||||||
// Let him/her walk again
|
// Let him/her walk again
|
||||||
//if (!self.is_haxxxoring) //- OfN already checked on TeamFortress_SetSpeed()
|
// if (!self.is_haxxxoring) //- OfN already checked on TeamFortress_SetSpeed() {
|
||||||
//{
|
self.tfstate &= ~TFSTATE_ASSAULTCANNON;
|
||||||
self.tfstate = self.tfstate - (self.tfstate & TFSTATE_ASSAULTCANNON);
|
|
||||||
TeamFortress_SetSpeed(self);
|
TeamFortress_SetSpeed(self);
|
||||||
//}
|
// }
|
||||||
|
|
||||||
self.count = 1;
|
self.count = 1;
|
||||||
self.heat = 0;
|
self.heat = 0;
|
||||||
|
@ -613,11 +612,10 @@ void() player_assaultcannonup2 =[$nailatt1, player_assaultcannonup1 ]
|
||||||
if ((!self.button0) || (self.ammo_shells < 1) || intermission_running)
|
if ((!self.button0) || (self.ammo_shells < 1) || intermission_running)
|
||||||
{
|
{
|
||||||
// Let him/her walk again
|
// Let him/her walk again
|
||||||
//if (!self.is_haxxxoring) //- OfN already checked on TeamFortress_SetSpeed()
|
// if (!self.is_haxxxoring) //- OfN already checked on TeamFortress_SetSpeed() {
|
||||||
//{
|
self.tfstate &= ~TFSTATE_ASSAULTCANNON;
|
||||||
self.tfstate = self.tfstate - (self.tfstate & TFSTATE_ASSAULTCANNON);
|
|
||||||
TeamFortress_SetSpeed(self);
|
TeamFortress_SetSpeed(self);
|
||||||
//}
|
// }
|
||||||
|
|
||||||
self.count = 1;
|
self.count = 1;
|
||||||
self.heat = 0;
|
self.heat = 0;
|
||||||
|
@ -659,7 +657,7 @@ void() player_assaultcannon1 =[$nailatt1, player_assaultcannon2 ]
|
||||||
{
|
{
|
||||||
stuffcmd(self, "v_idlescale 0\n");
|
stuffcmd(self, "v_idlescale 0\n");
|
||||||
// Let him/her walk again
|
// Let him/her walk again
|
||||||
self.tfstate = self.tfstate - (self.tfstate & TFSTATE_ASSAULTCANNON);
|
self.tfstate &= ~TFSTATE_ASSAULTCANNON;
|
||||||
TeamFortress_SetSpeed(self);
|
TeamFortress_SetSpeed(self);
|
||||||
|
|
||||||
self.weaponframe = 0;
|
self.weaponframe = 0;
|
||||||
|
@ -689,11 +687,10 @@ void() player_assaultcannon1 =[$nailatt1, player_assaultcannon2 ]
|
||||||
// Cannon Firing 2
|
// Cannon Firing 2
|
||||||
void() player_assaultcannon2 =[$nailatt2, player_assaultcannon1 ]
|
void() player_assaultcannon2 =[$nailatt2, player_assaultcannon1 ]
|
||||||
{
|
{
|
||||||
if ((!self.button0) || (self.ammo_shells < 1) || intermission_running)
|
if ((!self.button0) || (self.ammo_shells < 1) || intermission_running) {
|
||||||
{
|
|
||||||
stuffcmd(self, "v_idlescale 0\n");
|
stuffcmd(self, "v_idlescale 0\n");
|
||||||
// Let him/her walk again
|
// Let him/her walk again
|
||||||
self.tfstate = self.tfstate - (self.tfstate & TFSTATE_ASSAULTCANNON);
|
self.tfstate &= ~TFSTATE_ASSAULTCANNON;
|
||||||
TeamFortress_SetSpeed(self);
|
TeamFortress_SetSpeed(self);
|
||||||
|
|
||||||
self.weaponframe = 0;
|
self.weaponframe = 0;
|
||||||
|
@ -724,17 +721,15 @@ void() player_assaultcannondown1 =[$nailatt1, player_assaultcannondown1 ]
|
||||||
if (self.count == 1)
|
if (self.count == 1)
|
||||||
sound (self, CHAN_WEAPON, "weapons/asscan3.wav", 1, ATTN_NORM);
|
sound (self, CHAN_WEAPON, "weapons/asscan3.wav", 1, ATTN_NORM);
|
||||||
|
|
||||||
if (self.count >= 15)
|
if (self.count >= 15) {
|
||||||
{
|
|
||||||
self.heat = 0;
|
self.heat = 0;
|
||||||
self.fire_held_down = FALSE;
|
self.fire_held_down = FALSE;
|
||||||
|
|
||||||
// Let him/her walk again
|
// Let him/her walk again
|
||||||
self.tfstate = self.tfstate - (self.tfstate & TFSTATE_ASSAULTCANNON);
|
self.tfstate &= ~TFSTATE_ASSAULTCANNON;
|
||||||
TeamFortress_SetSpeed(self);
|
TeamFortress_SetSpeed(self);
|
||||||
|
|
||||||
if (self.ammo_shells < 1 || self.ammo_cells < 6)
|
if (self.ammo_shells < 1 || self.ammo_cells < 6) {
|
||||||
{
|
|
||||||
self.current_weapon = W_BestWeapon();
|
self.current_weapon = W_BestWeapon();
|
||||||
W_SetCurrentAmmo();
|
W_SetCurrentAmmo();
|
||||||
W_PrintWeaponMessage();
|
W_PrintWeaponMessage();
|
||||||
|
@ -745,8 +740,7 @@ void() player_assaultcannondown1 =[$nailatt1, player_assaultcannondown1 ]
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.count != 8 && self.count != 10 && self.count != 12 && self.count != 14)
|
if (self.count != 8 && self.count != 10 && self.count != 12 && self.count != 14) {
|
||||||
{
|
|
||||||
if (self.weaponframe == 3)
|
if (self.weaponframe == 3)
|
||||||
self.weaponframe = 0;
|
self.weaponframe = 0;
|
||||||
else
|
else
|
||||||
|
@ -763,8 +757,10 @@ void() player_light1 =[$light1, player_light2 ]
|
||||||
{
|
{
|
||||||
muzzleflash();
|
muzzleflash();
|
||||||
|
|
||||||
if (!self.button0 || intermission_running)
|
if (!self.button0 || intermission_running) {
|
||||||
{player_run ();return;}
|
player_run ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.weaponframe = self.weaponframe + 1;
|
self.weaponframe = self.weaponframe + 1;
|
||||||
if (self.weaponframe == 5)
|
if (self.weaponframe == 5)
|
||||||
self.weaponframe = 1;
|
self.weaponframe = 1;
|
||||||
|
@ -772,10 +768,13 @@ void() player_light1 =[$light1, player_light2 ]
|
||||||
W_FireLightning();
|
W_FireLightning();
|
||||||
Attack_Finished(0.2);
|
Attack_Finished(0.2);
|
||||||
};
|
};
|
||||||
|
|
||||||
void() player_light2 =[$light2, player_light1 ]
|
void() player_light2 =[$light2, player_light1 ]
|
||||||
{
|
{
|
||||||
if (!self.button0 || intermission_running)
|
if (!self.button0 || intermission_running) {
|
||||||
{player_run ();return;}
|
player_run ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.weaponframe = self.weaponframe + 1;
|
self.weaponframe = self.weaponframe + 1;
|
||||||
if (self.weaponframe == 5)
|
if (self.weaponframe == 5)
|
||||||
self.weaponframe = 1;
|
self.weaponframe = 1;
|
||||||
|
@ -790,10 +789,12 @@ void() player_light2 =[$light2, player_light1 ]
|
||||||
|
|
||||||
void() player_light_assault1 =[$light1, player_light_assault2 ]
|
void() player_light_assault1 =[$light1, player_light_assault2 ]
|
||||||
{
|
{
|
||||||
//muzzleflash();
|
// muzzleflash();
|
||||||
|
|
||||||
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING)
|
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING) {
|
||||||
{player_run ();return;}
|
player_run ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
muzzleflash(); //- oFn moved
|
muzzleflash(); //- oFn moved
|
||||||
|
|
||||||
|
@ -804,10 +805,13 @@ void() player_light_assault1 =[$light1, player_light_assault2 ]
|
||||||
W_FireLightAssault();
|
W_FireLightAssault();
|
||||||
Attack_Finished(0.2);
|
Attack_Finished(0.2);
|
||||||
};
|
};
|
||||||
|
|
||||||
void() player_light_assault2 =[$light2, player_light_assault1 ]
|
void() player_light_assault2 =[$light2, player_light_assault1 ]
|
||||||
{
|
{
|
||||||
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING)
|
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING) {
|
||||||
{player_run ();return;}
|
player_run ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.weaponframe = self.weaponframe + 1;
|
self.weaponframe = self.weaponframe + 1;
|
||||||
if (self.weaponframe == 5)
|
if (self.weaponframe == 5)
|
||||||
self.weaponframe = 1;
|
self.weaponframe = 1;
|
||||||
|
@ -817,10 +821,8 @@ void() player_light_assault2 =[$light2, player_light_assault1 ]
|
||||||
};
|
};
|
||||||
//End WK
|
//End WK
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
void() player_rocket1 =[$rockatt1, player_rocket2 ] {self.weaponframe=1; muzzleflash();};
|
void() player_rocket1 =[$rockatt1, player_rocket2 ] {self.weaponframe=1; 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;};
|
||||||
|
@ -1086,8 +1088,7 @@ void(string gibname, float dm) ThrowGib =
|
||||||
newmis.frame = 0;
|
newmis.frame = 0;
|
||||||
newmis.flags = 0;
|
newmis.flags = 0;
|
||||||
|
|
||||||
if (gibname=="progs/tesgib4.mdl" || gibname=="progs/t2gib4.mdl")
|
if (gibname=="progs/tesgib4.mdl" || gibname=="progs/t2gib4.mdl") {
|
||||||
{
|
|
||||||
newmis.skin=dm;
|
newmis.skin=dm;
|
||||||
newmis.velocity = VelocityForDamage (-70);
|
newmis.velocity = VelocityForDamage (-70);
|
||||||
}
|
}
|
||||||
|
@ -1109,24 +1110,18 @@ void(string gibname, float dm) ThrowHead =
|
||||||
self.flags = self.flags - (self.flags & FL_ONGROUND);
|
self.flags = self.flags - (self.flags & FL_ONGROUND);
|
||||||
self.avelocity = crandom() * '0 600 0';
|
self.avelocity = crandom() * '0 600 0';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (self.classname == "player")
|
if (self.classname == "player") {
|
||||||
{
|
|
||||||
self.classname = "player_head";
|
self.classname = "player_head";
|
||||||
self.think = SUB_Remove;
|
self.think = SUB_Remove;
|
||||||
self.nextthink = time + 20 + 20 * random();
|
self.nextthink = time + 20 + 20 * random();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
self.classname = "monster_head";
|
self.classname = "monster_head";
|
||||||
self.think = SUB_Remove;
|
self.think = SUB_Remove;
|
||||||
self.nextthink = time + 20 + 20 * random();
|
self.nextthink = time + 20 + 20 * random();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
//-OfN
|
//-OfN
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void(string gibname) HeadShotThrowHead =
|
void(string gibname) HeadShotThrowHead =
|
||||||
|
@ -1154,28 +1149,26 @@ void() KillPlayer =
|
||||||
void() GibPlayer =
|
void() GibPlayer =
|
||||||
{
|
{
|
||||||
//- OfN now this can be turned on/off with the headless localinfo -//
|
//- OfN now this can be turned on/off with the headless localinfo -//
|
||||||
// Decapitation ------------------------------------------------------//
|
// Decapitation ------------------------------------------------------
|
||||||
if (headless == 1)
|
if (headless == 1) {
|
||||||
{
|
if (deathmsg == DMSG_SNIPERHEADSHOT) {
|
||||||
if (deathmsg == DMSG_SNIPERHEADSHOT) //- Ofn - I don't like this: || deathmsg == DMSG_BACKSTAB)
|
//- Ofn - I don't like this: || deathmsg == DMSG_BACKSTAB) {
|
||||||
{
|
// if (deathmsg == DMSG_SNIPERHEADSHOT)
|
||||||
//if (deathmsg == DMSG_SNIPERHEADSHOT)
|
|
||||||
HeadShotThrowHead("progs/h_player.mdl");
|
HeadShotThrowHead("progs/h_player.mdl");
|
||||||
//else
|
// else
|
||||||
// ThrowHead("progs/h_player.mdl", -60);
|
// ThrowHead("progs/h_player.mdl", -60);
|
||||||
|
|
||||||
newmis = spawn();
|
newmis = spawn();
|
||||||
newmis.solid = SOLID_NOT;
|
newmis.solid = SOLID_NOT;
|
||||||
newmis.movetype = MOVETYPE_STEP;
|
newmis.movetype = MOVETYPE_STEP;
|
||||||
|
|
||||||
newmis.angles = self.angles;
|
newmis.angles = self.angles;
|
||||||
|
|
||||||
setsize(newmis, '0 0 0', '0 0 0');
|
setsize(newmis, '0 0 0', '0 0 0');
|
||||||
setorigin(newmis, self.origin);
|
setorigin(newmis, self.origin);
|
||||||
|
|
||||||
newmis.colormap = self.colormap;
|
newmis.colormap = self.colormap;
|
||||||
// newmis.color=self.color
|
// newmis.color = self.color
|
||||||
//newmis.skin = self.skin;
|
// newmis.skin = self.skin;
|
||||||
|
|
||||||
setmodel(newmis, "progs/headless.mdl");
|
setmodel(newmis, "progs/headless.mdl");
|
||||||
|
|
||||||
|
@ -1187,45 +1180,36 @@ void() GibPlayer =
|
||||||
newmis.frame = 8;
|
newmis.frame = 8;
|
||||||
|
|
||||||
ThrowGib ("progs/zom_gib.mdl", self.health); //- lol, looks cool
|
ThrowGib ("progs/zom_gib.mdl", self.health); //- lol, looks cool
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
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);
|
||||||
ThrowGib ("progs/gib2.mdl", self.health);
|
ThrowGib ("progs/gib2.mdl", self.health);
|
||||||
ThrowGib ("progs/gib3.mdl", self.health);
|
ThrowGib ("progs/gib3.mdl", self.health);
|
||||||
ThrowGib ("progs/gib3.mdl", self.health); //-added
|
ThrowGib ("progs/gib3.mdl", self.health); //-added
|
||||||
//ThrowGib ("progs/zom_gib.mdl", self.health); //-added
|
// ThrowGib ("progs/zom_gib.mdl", self.health); //-added
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
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);
|
||||||
ThrowGib ("progs/gib2.mdl", self.health);
|
ThrowGib ("progs/gib2.mdl", self.health);
|
||||||
ThrowGib ("progs/gib3.mdl", self.health);
|
ThrowGib ("progs/gib3.mdl", self.health);
|
||||||
//ThrowGib ("progs/gib3.mdl", self.health); //-added
|
// ThrowGib ("progs/gib3.mdl", self.health); //-added
|
||||||
}
|
}
|
||||||
|
|
||||||
// Why do we need this? What are we doing that's clobbering _something_
|
// Why do we need this? What are we doing that's clobbering _something_
|
||||||
// within a second after a trigger_hurt kills the player?
|
// within a second after a trigger_hurt kills the player?
|
||||||
if (deathmsg == DMSG_TRIGGER)
|
if (deathmsg == DMSG_TRIGGER) {
|
||||||
{
|
|
||||||
newmis = spawn();
|
newmis = spawn();
|
||||||
newmis.owner = self;
|
newmis.owner = self;
|
||||||
newmis.think = KillPlayer;
|
newmis.think = KillPlayer;
|
||||||
newmis.nextthink = time + 1;
|
newmis.nextthink = time + 1;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
self.deadflag = DEAD_DEAD;
|
self.deadflag = DEAD_DEAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
TeamFortress_SetupRespawn(FALSE);
|
TeamFortress_SetupRespawn(FALSE);
|
||||||
|
|
||||||
if (damage_attacker.classname == "teledeath")
|
if (damage_attacker.classname == "teledeath") {
|
||||||
{
|
|
||||||
sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
|
sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
|
||||||
|
|
||||||
// if telefragged, extend respawn delay to prevent chaining telefrags
|
// if telefragged, extend respawn delay to prevent chaining telefrags
|
||||||
|
@ -1234,8 +1218,7 @@ void() GibPlayer =
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (damage_attacker.classname == "teledeath2")
|
if (damage_attacker.classname == "teledeath2") {
|
||||||
{
|
|
||||||
sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
|
sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
|
||||||
|
|
||||||
// if telefragged, extend respawn delay to prevent chaining telefrags
|
// if telefragged, extend respawn delay to prevent chaining telefrags
|
||||||
|
@ -1257,16 +1240,16 @@ void() PlayerDie =
|
||||||
//WK Stop orff
|
//WK Stop orff
|
||||||
sound (self, CHAN_MUSIC, "items/r_item1.wav", 0.1, ATTN_NORM);
|
sound (self, CHAN_MUSIC, "items/r_item1.wav", 0.1, ATTN_NORM);
|
||||||
//WK Stop glows!
|
//WK Stop glows!
|
||||||
self.flags = self.flags - (self.flags & (EF_BRIGHTLIGHT | EF_DIMLIGHT));
|
self.flags &= ~(EF_BRIGHTLIGHT | EF_DIMLIGHT);
|
||||||
self.effects = 0;
|
self.effects = 0;
|
||||||
// make dead guy release hook (wedge)
|
// make dead guy release hook (wedge)
|
||||||
if (self.hook_out)
|
if (self.hook_out) {
|
||||||
{
|
|
||||||
Reset_Grapple (self.hook);
|
Reset_Grapple (self.hook);
|
||||||
Attack_Finished(0.75);
|
Attack_Finished(0.75);
|
||||||
// self.hook_out = TRUE; // PutClientInServer will reset this
|
// self.hook_out = TRUE; // PutClientInServer will reset this
|
||||||
}
|
}
|
||||||
self.items = self.items & ~(IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD);
|
|
||||||
|
self.items &= ~(IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD);
|
||||||
self.invisible_finished = 0; // don't die as eyes
|
self.invisible_finished = 0; // don't die as eyes
|
||||||
self.invincible_finished = 0;
|
self.invincible_finished = 0;
|
||||||
self.super_damage_finished = 0;
|
self.super_damage_finished = 0;
|
||||||
|
@ -1274,13 +1257,10 @@ void() PlayerDie =
|
||||||
self.modelindex = modelindex_player; // don't use eyes
|
self.modelindex = modelindex_player; // don't use eyes
|
||||||
// If infected, give the medic a frag
|
// If infected, give the medic a frag
|
||||||
finished = TRUE;
|
finished = TRUE;
|
||||||
if (self.tfstate & TFSTATE_INFECTED && self == self.enemy)
|
if (self.tfstate & TFSTATE_INFECTED && self == self.enemy) {
|
||||||
{
|
|
||||||
te = find(NIL, classname, "timer");
|
te = find(NIL, classname, "timer");
|
||||||
while (te)
|
while (te) {
|
||||||
{
|
if (te.owner == self && te.think == BioInfection_Decay) {
|
||||||
if (te.owner == self && te.think == BioInfection_Decay)
|
|
||||||
{
|
|
||||||
logfrag(te.enemy, self);
|
logfrag(te.enemy, self);
|
||||||
te.enemy.real_frags = te.enemy.real_frags + 1;
|
te.enemy.real_frags = te.enemy.real_frags + 1;
|
||||||
if (!(toggleflags & TFLAG_TEAMFRAGS))
|
if (!(toggleflags & TFLAG_TEAMFRAGS))
|
||||||
|
@ -1298,18 +1278,16 @@ void() PlayerDie =
|
||||||
|
|
||||||
// Restore player's speed
|
// Restore player's speed
|
||||||
#ifdef RESTORE_DEAD_SPEEDS
|
#ifdef RESTORE_DEAD_SPEEDS
|
||||||
|
|
||||||
stuffcmd(self,"cl_backspeed 1000\n");
|
stuffcmd(self,"cl_backspeed 1000\n");
|
||||||
stuffcmd(self,"cl_forwardspeed 1000\n");
|
stuffcmd(self,"cl_forwardspeed 1000\n");
|
||||||
stuffcmd(self,"cl_sidespeed 1000\n");
|
stuffcmd(self,"cl_sidespeed 1000\n");
|
||||||
stuffcmd(self,"cl_movespeedkey 2\n");
|
stuffcmd(self,"cl_movespeedkey 2\n");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (deathmatch || coop)
|
if (deathmatch || coop)
|
||||||
DropBackpack();
|
DropBackpack();
|
||||||
|
|
||||||
self.weaponmodel="";
|
self.weaponmodel = "";
|
||||||
self.view_ofs = '0 0 -8';
|
self.view_ofs = '0 0 -8';
|
||||||
self.deadflag = DEAD_DYING;
|
self.deadflag = DEAD_DYING;
|
||||||
self.solid = SOLID_NOT;
|
self.solid = SOLID_NOT;
|
||||||
|
@ -1318,8 +1296,7 @@ void() PlayerDie =
|
||||||
|
|
||||||
if (self.velocity_z < 10)
|
if (self.velocity_z < 10)
|
||||||
self.velocity_z = self.velocity_z + random()*300;
|
self.velocity_z = self.velocity_z + random()*300;
|
||||||
if (self.health < -40)
|
if (self.health < -40) {
|
||||||
{
|
|
||||||
GibPlayer ();
|
GibPlayer ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1329,14 +1306,13 @@ void() PlayerDie =
|
||||||
self.angles_x = 0;
|
self.angles_x = 0;
|
||||||
self.angles_z = 0;
|
self.angles_z = 0;
|
||||||
|
|
||||||
if (self.current_weapon <= WEAP_AXE)
|
if (self.current_weapon <= WEAP_AXE) {
|
||||||
{
|
|
||||||
player_die_ax1 ();
|
player_die_ax1 ();
|
||||||
TeamFortress_SetupRespawn(FALSE);
|
TeamFortress_SetupRespawn(FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
i = 1 + floor(random()*6);
|
i = 1 + floor(random() * 6);
|
||||||
|
|
||||||
if (i == 1)
|
if (i == 1)
|
||||||
player_diea1();
|
player_diea1();
|
||||||
|
@ -1442,8 +1418,7 @@ void() Headless_Think =
|
||||||
{
|
{
|
||||||
self.frame = self.frame + 1;
|
self.frame = self.frame + 1;
|
||||||
|
|
||||||
if (self.frame == 7 || self.frame == 18)
|
if (self.frame == 7 || self.frame == 18) {
|
||||||
{
|
|
||||||
self.nextthink = time + 30 + random()*10;
|
self.nextthink = time + 30 + random()*10;
|
||||||
self.think = SUB_Remove;
|
self.think = SUB_Remove;
|
||||||
return;
|
return;
|
||||||
|
@ -1452,8 +1427,7 @@ void() Headless_Think =
|
||||||
self.nextthink = time + 0.1;
|
self.nextthink = time + 0.1;
|
||||||
};
|
};
|
||||||
|
|
||||||
//===========================================================
|
// Airgun player stuff ========================================================
|
||||||
// Airgun player stuff
|
|
||||||
|
|
||||||
void() player_airgun1 =[$rockatt1, player_airgun2 ] {self.weaponframe=1;};
|
void() player_airgun1 =[$rockatt1, player_airgun2 ] {self.weaponframe=1;};
|
||||||
void() player_airgun2 =[$rockatt2, player_airgun3 ] {self.weaponframe=2;};
|
void() player_airgun2 =[$rockatt2, player_airgun3 ] {self.weaponframe=2;};
|
||||||
|
@ -1467,40 +1441,46 @@ void() player_failedairgun1 =[$nailatt1, player_failedairgun2 ] {self.weaponf
|
||||||
void() player_failedairgun2 =[$nailatt2, player_failedairgun3 ] {self.weaponframe=7;};
|
void() player_failedairgun2 =[$nailatt2, player_failedairgun3 ] {self.weaponframe=7;};
|
||||||
void() player_failedairgun3 =[$nailatt2, player_run ] {self.weaponframe=0;};
|
void() player_failedairgun3 =[$nailatt2, player_run ] {self.weaponframe=0;};
|
||||||
|
|
||||||
//================================================================0
|
// Laser cannon player stuff ==================================================
|
||||||
// Laser cannon player stuff
|
|
||||||
|
|
||||||
void() player_laser1 =[$nailatt1, player_laser2 ]
|
void() player_laser1 =[$nailatt1, player_laser2 ]
|
||||||
{
|
{
|
||||||
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING)
|
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING) {
|
||||||
{player_run ();return;}
|
player_run ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.attack_finished = time + 0.2;
|
self.attack_finished = time + 0.2;
|
||||||
self.weaponframe=1;
|
self.weaponframe=1;
|
||||||
HIP_FireLaser(0);
|
HIP_FireLaser(0);
|
||||||
};
|
};
|
||||||
|
|
||||||
void() player_laser2 =[$nailatt2, player_laser3 ]
|
void() player_laser2 =[$nailatt2, player_laser3 ]
|
||||||
{
|
{
|
||||||
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING)
|
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING) {
|
||||||
{player_run ();return;}
|
player_run ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.weaponframe=2;
|
self.weaponframe=2;
|
||||||
};
|
};
|
||||||
|
|
||||||
void() player_laser3 =[$nailatt2, player_laser4 ]
|
void() player_laser3 =[$nailatt2, player_laser4 ]
|
||||||
{
|
{
|
||||||
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING)
|
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING) {
|
||||||
{player_run ();return;}
|
player_run ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.attack_finished = time + 0.2;
|
self.attack_finished = time + 0.2;
|
||||||
self.weaponframe=4;
|
self.weaponframe=4;
|
||||||
HIP_FireLaser(1);
|
HIP_FireLaser(1);
|
||||||
};
|
};
|
||||||
|
|
||||||
void() player_laser4 =[$nailatt1, player_laser1 ]
|
void() player_laser4 =[$nailatt1, player_laser1 ]
|
||||||
{
|
{
|
||||||
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING)
|
if (!self.button0 || intermission_running || self.tfstate & TFSTATE_RELOADING) {
|
||||||
{player_run ();return;}
|
player_run ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.weaponframe=5;
|
self.weaponframe=5;
|
||||||
};
|
};
|
||||||
|
|
||||||
//____________________________________________________//
|
|
||||||
|
|
|
@ -4629,7 +4629,7 @@ void() W_WeaponFrame =
|
||||||
self.fire_held_down = FALSE;
|
self.fire_held_down = FALSE;
|
||||||
|
|
||||||
// Let him/her walk again
|
// Let him/her walk again
|
||||||
self.tfstate = self.tfstate - (self.tfstate & TFSTATE_ASSAULTCANNON);
|
self.tfstate &= ~TFSTATE_ASSAULTCANNON;
|
||||||
TeamFortress_SetSpeed(self);
|
TeamFortress_SetSpeed(self);
|
||||||
|
|
||||||
player_run ();
|
player_run ();
|
||||||
|
|
Loading…
Reference in a new issue