- set martyr_enemy to the hacker when he does bad hacks to a field gen

- use martyr_enemy as the badguy when a fieldgen frys teammates
- make sure martyr_enemy is set to world when the guy disconnects
- move ClientObituary into it's own obituary.qc file
- tweak field lighting times and stuff
- add code to turn off a field the instant it's turned on, instead of later when it thinks, but that's disabled for now
- probably other stuff I've forgotten

I havn't actually set the deathmsg for friendly forcefield kills yet.  I'm commiting now to reduce conflicting changes.
This commit is contained in:
Adam Olsen 2001-07-27 20:48:54 +00:00
parent 9b1f1adede
commit 5410fbad7e
7 changed files with 2938 additions and 2902 deletions

1
BUGS
View file

@ -1,6 +1,5 @@
- info string length exceeded :/ - info string length exceeded :/
- duplicate connects - duplicate connects
- the curse color is rejected by the color changing code
- the map cycler (including if you set nmap) just sit there if it doesn't change map. instead, it should have failsafe behavior - the map cycler (including if you set nmap) just sit there if it doesn't change map. instead, it should have failsafe behavior
- "has_sentry" should be a counter, not a flag (allows a second build if you hack and it gets roasted) - "has_sentry" should be a counter, not a flag (allows a second build if you hack and it gets roasted)
- there appears to be a window between when a teamkill curse respawn is disabled and when they're killed. it should be removed. - there appears to be a window between when a teamkill curse respawn is disabled and when they're killed. it should be removed.

2905
client.qc

File diff suppressed because it is too large Load diff

View file

@ -1276,6 +1276,8 @@
#define DMSG_STUCK_FORCEFIELD 65 #define DMSG_STUCK_FORCEFIELD 65
#define DMSG_SPANNERFIELD 66 #define DMSG_SPANNERFIELD 66
#define DMSG_FGTRAP 67 #define DMSG_FGTRAP 67
#define DMSG_FF_HACKED 68
#define DMSG_FF_STUCK_HACKED 69
//Defs for objects a spikeshooter can spawn Misc.qc //Defs for objects a spikeshooter can spawn Misc.qc
#define SPAWNFLAG_SUPERSPIKE 1 #define SPAWNFLAG_SUPERSPIKE 1

View file

@ -19,9 +19,9 @@
// field generator settings // field generator settings
#define FIELDGEN_SHOCKTIME 2 // seconds the generators remains glowing and doing lightning after a shock #define FIELDGEN_SHOCKTIME 3 // seconds the generators remains glowing and doing lightning after a shock
#define FIELDGEN_LINKTIME 3.5 // seconds between tries to link with other generator #define FIELDGEN_LINKTIME 3.5 // seconds between tries to link with other generator
#define FIELDGEN_TIMEDISABLED 1 // was 3 // then 2 #define FIELDGEN_TIMEDISABLED 1.5 // was 3 // then 2
#define FIELDGEN_CELLSCOST 2 // cells cost for each "FIELDGEN_ISWORKING" pass #define FIELDGEN_CELLSCOST 2 // cells cost for each "FIELDGEN_ISWORKING" pass
#define FIELDGEN_DMG 80 // normal damag when touching #define FIELDGEN_DMG 80 // normal damag when touching
#define FIELDGEN_DMGINSIDE 120 // damage when trapped inside field #define FIELDGEN_DMGINSIDE 120 // damage when trapped inside field
@ -275,8 +275,14 @@ void() Field_touch_SUB =
if (shoulddamage == 1) if (shoulddamage == 1)
TF_T_Damage (other, self, self.real_owner, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY); TF_T_Damage (other, self, self.real_owner, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
else if (shoulddamage == 2) // hacked to hurt teammates else if (shoulddamage == 2) // hacked to hurt teammates
TF_T_Damage (other, self, world, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY); {
} if (deathmsg == DMSG_FORCEFIELD)
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);
}
}
} }
else // non player entities else // non player entities
@ -294,7 +300,13 @@ void() Field_touch_SUB =
if (shoulddamage == 1) if (shoulddamage == 1)
TF_T_Damage (other, self, self.real_owner, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY); TF_T_Damage (other, self, self.real_owner, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
else if (shoulddamage == 2) // hacked to hurt teammates else if (shoulddamage == 2) // hacked to hurt teammates
TF_T_Damage (other, self, world, self.dmg, TF_TD_NOTTEAM, TF_TD_ELECTRICITY); {
if (deathmsg == DMSG_FORCEFIELD)
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);
}
} }
} }
@ -617,6 +629,13 @@ void(entity gen1, entity gen2) Create_Field =
gen2.effects = EF_DIMLIGHT; gen2.effects = EF_DIMLIGHT;
gen2.has_teleporter = TRUE; gen2.has_teleporter = TRUE;
gen2.skin = 2; gen2.skin = 2;
/* // make sure the field goes off instantly if there's somebody in it
local entity oldself;
oldself = self;
self = tfield;
self.think ();
self = oldself; */
}; };
//=================================================================0 //=================================================================0
@ -949,6 +968,7 @@ void(entity field) Field_Built =
field.fieldgen_hasfield = FALSE; field.fieldgen_hasfield = FALSE;
field.no_grenades_1 = time + 3; field.no_grenades_1 = time + 3;
field.fieldgen_field = world; field.fieldgen_field = world;
field.martyr_enemy = world;
}; };
//============================================================== //==============================================================

View file

@ -415,7 +415,10 @@ void() SBFireInterface =
else if (targ.classname == "building_teleporter") else if (targ.classname == "building_teleporter")
sprint(self, PRINT_HIGH, "The teleporter will now strip the items off all who enter...\n"); sprint(self, PRINT_HIGH, "The teleporter will now strip the items off all who enter...\n");
else if (targ.classname == "building_fieldgen") else if (targ.classname == "building_fieldgen")
{
sprint(self, PRINT_HIGH, "The field generator is now rigged to hurt teammates...\n"); sprint(self, PRINT_HIGH, "The field generator is now rigged to hurt teammates...\n");
targ.martyr_enemy = self;
}
} }
else if (hackThis == SCREWUP_TWO) else if (hackThis == SCREWUP_TWO)
{ {

2898
obituary.qc Normal file

File diff suppressed because it is too large Load diff

View file

@ -19,6 +19,7 @@ weapons.qc
world.qc world.qc
status.qc status.qc
client.qc client.qc
obituary.qc
player.qc player.qc
doors.qc doors.qc
buttons.qc buttons.qc