mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2025-02-22 03:51:26 +00:00
- finally make hacked fieldgens work right
- some of my "stuck in field" experiments, because they're in the same file and I didn't feel like reverting them. - add an item to TODO
This commit is contained in:
parent
b3a03080e0
commit
bf8e4e1b33
4 changed files with 664 additions and 618 deletions
1
TODO
1
TODO
|
@ -12,3 +12,4 @@ o various drop items
|
|||
X move from *preqcc to cpp
|
||||
o add more variety to tinkering
|
||||
o add a way to edit the respawn ammo entities
|
||||
o add localinfo string for bottom half of the MOTD
|
||||
|
|
18
field.qc
18
field.qc
|
@ -160,13 +160,18 @@ void() Field_think =
|
|||
if (te.velocity == '0 0 0')
|
||||
// if (!IsBuilding(te)) // no screwing with the buildings :)
|
||||
if (te.classname != "force_field")
|
||||
if (EntsTouching2(te,self))
|
||||
// if (EntsTouching2(te,self))
|
||||
{
|
||||
local entity foo;
|
||||
foo = testentitypos (te);
|
||||
if (foo == self)
|
||||
{
|
||||
other = te;
|
||||
deathmsg = DMSG_STUCK_FORCEFIELD;
|
||||
self.dmg = FIELDGEN_DMGINSIDE; // this gonna hurt
|
||||
Field_touch_SUB();
|
||||
}
|
||||
}
|
||||
|
||||
te = te.chain;
|
||||
}
|
||||
|
@ -280,7 +285,7 @@ void() Field_touch_SUB =
|
|||
deathmsg = DMSG_FF_HACKED;
|
||||
else /* if (deathmsg == DMSG_FORCEFIELD_STUCK) */
|
||||
deathmsg = DMSG_FF_STUCK_HACKED;
|
||||
TF_T_Damage (other, self, self.martyr_enemy, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
|
||||
TF_T_Damage (other, self, self, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -305,7 +310,7 @@ void() Field_touch_SUB =
|
|||
deathmsg = DMSG_FF_HACKED;
|
||||
else /* if (deathmsg == DMSG_FORCEFIELD_STUCK) */
|
||||
deathmsg = DMSG_FF_STUCK_HACKED;
|
||||
TF_T_Damage (other, self, self.martyr_enemy, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
|
||||
TF_T_Damage (other, self, self, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -630,6 +635,13 @@ void(entity gen1, entity gen2) Create_Field =
|
|||
gen2.has_teleporter = TRUE;
|
||||
gen2.skin = 2;
|
||||
|
||||
if (gen1.martyr_enemy)
|
||||
tfield.martyr_enemy = gen1.martyr_enemy;
|
||||
else if (gen1.martyr_enemy)
|
||||
tfield.martyr_enemy = gen2.martyr_enemy;
|
||||
else
|
||||
tfield.martyr_enemy = world;
|
||||
|
||||
/* // make sure the field goes off instantly if there's somebody in it
|
||||
local entity oldself;
|
||||
oldself = self;
|
||||
|
|
2
haxxx.qc
2
haxxx.qc
|
@ -418,6 +418,8 @@ void() SBFireInterface =
|
|||
{
|
||||
sprint(self, PRINT_HIGH, "The field generator is now rigged to hurt teammates...\n");
|
||||
targ.martyr_enemy = self;
|
||||
if (targ.fieldgen_hasfield)
|
||||
targ.fieldgen_field.martyr_enemy = self;
|
||||
}
|
||||
}
|
||||
else if (hackThis == SCREWUP_TWO)
|
||||
|
|
51
obituary.qc
51
obituary.qc
|
@ -11,9 +11,6 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
{
|
||||
local float rnum;
|
||||
local string deathstring, deathstring2;
|
||||
local float attackerteam, targteam;
|
||||
local entity te;
|
||||
local entity oself;
|
||||
|
||||
// FIXME:
|
||||
|
||||
|
@ -707,13 +704,15 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
// deathstring = " is persecuted to death\n";
|
||||
|
||||
/*
|
||||
//if (!(targ.job & JOB_MARTYR_ENEMY)) {
|
||||
//if (!(targ.job & JOB_MARTYR_ENEMY))
|
||||
{
|
||||
if (rnum <= 0.5)
|
||||
deathstring = " dies for the heck of it\n";
|
||||
else
|
||||
deathstring = " dies with style\n";
|
||||
|
||||
else {
|
||||
}
|
||||
else
|
||||
{
|
||||
//Give last person who attacked him a frag
|
||||
if (targ.martyr_enemy.classname == "player" && targ.martyr_enemy.has_disconnected == FALSE) {
|
||||
Give_Frags_Out(targ.martyr_enemy, targ, 1, 1, 1, 1, 0);
|
||||
|
@ -1416,6 +1415,35 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
}
|
||||
return;
|
||||
}
|
||||
else if (attacker.classname == "force_field")
|
||||
{
|
||||
if (targ == attacker.real_owner)
|
||||
{
|
||||
bprint (PRINT_MEDIUM, attacker.martyr_enemy.netname);
|
||||
bprint (PRINT_MEDIUM, " laughs as ");
|
||||
bprint (PRINT_MEDIUM, targ.netname);
|
||||
bprint (PRINT_MEDIUM, " fries in his own hacked force field\n");
|
||||
Give_Frags_Out(attacker.real_owner, attacker, -1, 0, 1, 1, 0);
|
||||
}
|
||||
else if (targ == attacker.martyr_enemy)
|
||||
{
|
||||
bprint (PRINT_MEDIUM, targ.netname);
|
||||
bprint (PRINT_MEDIUM, " remembers that corrupting the output on ");
|
||||
bprint (PRINT_MEDIUM, attacker.real_owner.netname);
|
||||
bprint (PRINT_MEDIUM, "'s fieldgen doesn't protect him any\n");
|
||||
Give_Frags_Out(attacker.martyr_enemy, attacker, -1, 0, 1, 1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
bprint (PRINT_MEDIUM, attacker.martyr_enemy.netname);
|
||||
bprint (PRINT_MEDIUM, " laughs as ");
|
||||
bprint (PRINT_MEDIUM, targ.netname);
|
||||
bprint (PRINT_MEDIUM, " is fried in ");
|
||||
bprint (PRINT_MEDIUM, attacker.real_owner.netname);
|
||||
bprint (PRINT_MEDIUM, "'s hacked force field\n");
|
||||
Give_Frags_Out(attacker.martyr_enemy, targ, 1, 0, 1, 1, 0);
|
||||
}
|
||||
}
|
||||
else if (attacker.classname == "building_sentrygun" || attacker.classname == "building_tesla")
|
||||
{
|
||||
if (targ == attacker.real_owner)
|
||||
|
@ -1585,13 +1613,16 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
{
|
||||
rnum = random();
|
||||
|
||||
if (rnum < 0.25)
|
||||
if (rnum < 0.20)
|
||||
deathstring = " died happily\n";
|
||||
else if (rnum < 0.5)
|
||||
else if (rnum < 0.40)
|
||||
deathstring = " knows how to die with style\n";
|
||||
else if (rnum < 0.75)
|
||||
else if (rnum < 0.60)
|
||||
deathstring = " simply dies\n";
|
||||
else deathstring = " had an original death\n";
|
||||
else if (rnum < 0.80)
|
||||
deathstring = " had an original death\n";
|
||||
else
|
||||
deathstring = " wishes we had better death messages\n";
|
||||
}
|
||||
|
||||
bprint(PRINT_MEDIUM, deathstring);
|
||||
|
|
Loading…
Reference in a new issue