2001-07-23 20:52:47 +00:00
|
|
|
|
#include "defs.qh"
|
2001-07-17 05:58:10 +00:00
|
|
|
|
/*======================================================
|
|
|
|
|
SECURITY.QC Custom TeamFortress v3.1
|
|
|
|
|
|
|
|
|
|
(c) Craig Hauser 26/3/00
|
|
|
|
|
========================================================
|
|
|
|
|
Functions for the security camera
|
|
|
|
|
======================================================*/
|
|
|
|
|
void() Security_Camera_Idle;
|
|
|
|
|
float() Security_Camera_FindTarget;
|
2001-10-17 07:48:11 +00:00
|
|
|
|
void(entity attacker, float damage) Security_Camera_Pain;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
void() Security_Camera_Die;
|
|
|
|
|
void() Security_Camera_PrintTarget;
|
|
|
|
|
void() Security_Camera_Spawn;
|
|
|
|
|
float() Security_Camera_FindFakeTarget;
|
|
|
|
|
void() SecurityCameraTossTouch;
|
|
|
|
|
|
|
|
|
|
//used for print
|
|
|
|
|
string(float tno) GetTrueTeamName;
|
|
|
|
|
string(float pc) TeamFortress_GetClassName;
|
|
|
|
|
string(float pc) TeamFortress_GetJobName;
|
|
|
|
|
|
|
|
|
|
//===================================================================
|
|
|
|
|
void() Security_Camera_Idle =
|
|
|
|
|
{
|
|
|
|
|
if (Security_Camera_FindTarget())
|
|
|
|
|
self.nextthink = time + 2; //CH if found wait 2 sec before do another check
|
|
|
|
|
else
|
|
|
|
|
self.nextthink = time + 0.5; //CH else 2 checks per sec
|
|
|
|
|
self.think = Security_Camera_Idle;
|
|
|
|
|
};
|
|
|
|
|
//========
|
|
|
|
|
float() Security_Camera_FindTarget =
|
|
|
|
|
{
|
2001-11-02 17:00:52 +00:00
|
|
|
|
local entity client = NIL;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
local float r, gotone, loopc;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (self.is_malfunctioning & SCREWUP_TWO) // SB how tragic, camera can't see
|
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (self.is_malfunctioning & SCREWUP_THREE) // oh no, we're reading incorrect signals
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
if (Security_Camera_FindFakeTarget())
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
else
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Try a few checks to make it react faster
|
|
|
|
|
r = 0;
|
|
|
|
|
loopc = 0;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
gotone = FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
local float trange; //- OfN - Hack
|
|
|
|
|
trange=1000;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (self.num_mines & IMPROVED_ONE)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
trange=1250;
|
|
|
|
|
|
|
|
|
|
//CH Theortetically this will check every client on the server now
|
2001-07-23 20:52:47 +00:00
|
|
|
|
while (loopc < 32 && gotone == FALSE)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
client = checkclient();
|
2001-07-23 20:52:47 +00:00
|
|
|
|
gotone = TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (!client)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
gotone = FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (!Pharse_Client(client, self, 1, trange, 0, 1))
|
2001-07-23 20:52:47 +00:00
|
|
|
|
gotone = FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
loopc = loopc + 1;
|
|
|
|
|
if (gotone) loopc = 1000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!gotone)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Found a Target
|
|
|
|
|
self.enemy = client;
|
|
|
|
|
if (self.enemy.classname != "player")
|
|
|
|
|
{
|
|
|
|
|
self.enemy = self.enemy.enemy;
|
|
|
|
|
if (self.enemy.classname != "player")
|
|
|
|
|
{
|
2001-11-02 17:00:52 +00:00
|
|
|
|
self.enemy = NIL;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Spotted sound
|
|
|
|
|
if (self.heat == 3) { //CH so it does not beep all the time.
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sound (self, CHAN_WEAPON, "weapons/camera_beep.wav", 1, ATTN_NORM);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
self.heat = 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
self.heat = self.heat + 1;
|
|
|
|
|
|
|
|
|
|
Security_Camera_PrintTarget ();
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
float() Security_Camera_FindFakeTarget =
|
|
|
|
|
{
|
2001-11-02 17:00:52 +00:00
|
|
|
|
local entity client = NIL;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
local float r, gotone, loopc;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (self.is_malfunctioning & SCREWUP_THREE) // SB how tragic, camera can't see
|
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Try a few checks to make it react faster
|
|
|
|
|
r = 0;
|
|
|
|
|
loopc = 0;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
gotone = FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
// Pick a random client
|
2001-07-23 20:52:47 +00:00
|
|
|
|
while (loopc < 32 && gotone == FALSE)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
client = checkclient();
|
2001-07-23 20:52:47 +00:00
|
|
|
|
gotone = TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (!client)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
gotone = FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (random() < 0.05)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
gotone = FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (client.playerclass == PC_UNDEFINED) {
|
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (client.done_custom & CUSTOM_BUILDING) {
|
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
if (client.health <= 0) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
if (client.has_disconnected) {
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
loopc = loopc + 1;
|
|
|
|
|
if (gotone) loopc = 1000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!gotone)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// Found a Target
|
|
|
|
|
self.enemy = client;
|
|
|
|
|
if (self.enemy.classname != "player")
|
|
|
|
|
{
|
|
|
|
|
self.enemy = self.enemy.enemy;
|
|
|
|
|
if (self.enemy.classname != "player")
|
|
|
|
|
{
|
2001-11-02 17:00:52 +00:00
|
|
|
|
self.enemy = NIL;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Spotted sound
|
|
|
|
|
if (self.heat == 3) { //CH so it does not beep all the time.
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sound (self, CHAN_WEAPON, "weapons/camera_beep.wav", 1, ATTN_NORM);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
self.heat = 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
self.heat = self.heat + 1;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (!(self.is_malfunctioning & SCREWUP_ONE))
|
2001-07-17 05:58:10 +00:00
|
|
|
|
Security_Camera_PrintTarget ();
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
//========
|
2001-10-17 07:48:11 +00:00
|
|
|
|
void(entity attacker, float damage) Security_Camera_Pain =
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sound (self, CHAN_WEAPON, "weapons/camera_beep.wav", 1, ATTN_NORM);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
//======
|
|
|
|
|
void() Security_Camera_Die =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self.real_owner, PRINT_HIGH, "Your security camera was destroyed.\n");
|
|
|
|
|
self.real_owner.has_camera = FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
// ThrowGib("progs/tgib1.mdl", -70);
|
|
|
|
|
// ThrowGib("progs/tgib2.mdl", -70);
|
|
|
|
|
// ThrowGib("progs/tgib3.mdl", -70);
|
|
|
|
|
|
2001-10-13 23:02:22 +00:00
|
|
|
|
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
|
|
|
|
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
|
|
|
|
|
WriteCoord (MSG_MULTICAST, self.origin_x);
|
|
|
|
|
WriteCoord (MSG_MULTICAST, self.origin_y);
|
|
|
|
|
WriteCoord (MSG_MULTICAST, self.origin_z);
|
2001-07-23 20:52:47 +00:00
|
|
|
|
multicast (self.origin, MULTICAST_PHS);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
dremove(self);
|
|
|
|
|
//SwitchFromCamera();
|
|
|
|
|
};
|
|
|
|
|
//==========
|
|
|
|
|
//Prints the person to owner/team
|
|
|
|
|
//Outputs: "<>SECURITY CAMERA<> Team_color class/job (netname)\n"
|
|
|
|
|
void() Security_Camera_PrintTarget =
|
|
|
|
|
{
|
|
|
|
|
local string st;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self.real_owner, PRINT_HIGH, "<1F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "); //<>Security camera<>
|
2001-07-17 05:58:10 +00:00
|
|
|
|
st = GetTrueTeamName(self.enemy.team_no);
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self.real_owner, PRINT_HIGH, st);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self.real_owner, PRINT_HIGH, " ");
|
|
|
|
|
if (self.enemy.playerclass != PC_CUSTOM)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
st = TeamFortress_GetClassName(self.enemy.playerclass);
|
|
|
|
|
else
|
|
|
|
|
st = TeamFortress_GetJobName(self.enemy.job);
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self.real_owner, PRINT_HIGH, st);
|
|
|
|
|
sprint(self.real_owner, PRINT_HIGH, " (");
|
|
|
|
|
sprint(self.real_owner, PRINT_HIGH, self.enemy.netname);
|
|
|
|
|
sprint(self.real_owner, PRINT_HIGH, ")\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
//==========
|
|
|
|
|
void() Security_Camera_Spawn =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (self.ammo_cells < BUILD_COST_CAMERA)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self,PRINT_HIGH,"Not enough cells to build a Security Camera\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.ammo_cells = self.ammo_cells - BUILD_COST_CAMERA;
|
|
|
|
|
self.has_camera = TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
newmis = spawn();
|
2001-07-23 20:52:47 +00:00
|
|
|
|
newmis.movetype = MOVETYPE_BOUNCE;
|
<Grievre> lemme see... fixes: stuck shamblers, cheat teslas, camming and
sensing
<Grievre> give mirvs the right death message, make them a little weaker and
more spread out
<Grievre> increased damage done by exp body... fixes not being able to use
airfist if you have daedalus or lg with no cells
<Grievre> made it so missing judo = you can't fire for 1.5 seconds, also
judo doesn't always work, less chance of it working a) if they're facing
you b) if they have knife, judo, or close combat
<Grievre> you lose speed the more armor you have (so upgraded people can
buy cougar and cheetah now)
<Grievre> attempted to fix the respawn guard not telefragging bug (if it
was still there)
<Grievre> made it so you can tell a shambler to come, stop, or patrol even
if it is fighting someone, doesn't really work most of the time but can
"wake up" your shambler if it's being screwy
<Grievre> (works for all demons)
<Grievre> made it so a monster goes back to what it was doing before
(following you, patrolling etc) once it's done with its enemy
<Grievre> made the sniper rifle less cheap (or tried to), charging now =
more accuracy, rather than more damage. OTR now does slightly less damage
than regular, but isn't blocked by armor as much.
<Grievre> autorifle now has half the rate of fire but does same damage as
sniper rifle, but less accurate
<Grievre> headshots always ignore armor if target has green armor, legshots
always ignore armor except for red
<Grievre> added bshams and shambler kings (can be disabled with infokeys)
<Grievre> increased max knife blood to 32
<Grievre> made it so airfist bounces gymnasts twice as much, and bounces
everyone a little more (I think), may cause stuck bugs but I think it
won't. airfist does half damage to gymnasts and slightly more to hwguys
<Grievre> made shamblers a little smarter and more powerful in general
<Grievre> they now attack buildings (only bshams/kings) if they are
attacked by them first
<Grievre> bsham/king fireball now sets things on fire
<Grievre> shamblers will generally attack the person who last hit them
<Grievre> shortened judoka range (they have the old range if they get close
combat
<Grievre> shamblers will cycle the left-right slash or fireball longer than
they did (but they won't keep doing it if their enemy is not visible)
<Grievre> fixed shambler fireball so it doesn't miss and hurt itself so
much
<Grievre> #define OLD_AUTORIFLE
<Grievre> will go to the old behavior of the auto rifle
<Grievre> I think that's it
<Grievre> oh, I changed the intro message and version string a little, you
might want to change that
2003-11-12 04:58:19 +00:00
|
|
|
|
setsize (newmis, '-16 -16 -6', '16 16 10');
|
2001-07-17 05:58:10 +00:00
|
|
|
|
// setsize (newmis, '-8 -8 -8', '8 8 8');
|
2001-07-23 20:52:47 +00:00
|
|
|
|
newmis.solid = SOLID_BBOX;
|
|
|
|
|
newmis.takedamage = DAMAGE_AIM;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
newmis.classname = "building_camera";
|
|
|
|
|
newmis.netname = "security_camera";
|
<Grievre> lemme see... fixes: stuck shamblers, cheat teslas, camming and
sensing
<Grievre> give mirvs the right death message, make them a little weaker and
more spread out
<Grievre> increased damage done by exp body... fixes not being able to use
airfist if you have daedalus or lg with no cells
<Grievre> made it so missing judo = you can't fire for 1.5 seconds, also
judo doesn't always work, less chance of it working a) if they're facing
you b) if they have knife, judo, or close combat
<Grievre> you lose speed the more armor you have (so upgraded people can
buy cougar and cheetah now)
<Grievre> attempted to fix the respawn guard not telefragging bug (if it
was still there)
<Grievre> made it so you can tell a shambler to come, stop, or patrol even
if it is fighting someone, doesn't really work most of the time but can
"wake up" your shambler if it's being screwy
<Grievre> (works for all demons)
<Grievre> made it so a monster goes back to what it was doing before
(following you, patrolling etc) once it's done with its enemy
<Grievre> made the sniper rifle less cheap (or tried to), charging now =
more accuracy, rather than more damage. OTR now does slightly less damage
than regular, but isn't blocked by armor as much.
<Grievre> autorifle now has half the rate of fire but does same damage as
sniper rifle, but less accurate
<Grievre> headshots always ignore armor if target has green armor, legshots
always ignore armor except for red
<Grievre> added bshams and shambler kings (can be disabled with infokeys)
<Grievre> increased max knife blood to 32
<Grievre> made it so airfist bounces gymnasts twice as much, and bounces
everyone a little more (I think), may cause stuck bugs but I think it
won't. airfist does half damage to gymnasts and slightly more to hwguys
<Grievre> made shamblers a little smarter and more powerful in general
<Grievre> they now attack buildings (only bshams/kings) if they are
attacked by them first
<Grievre> bsham/king fireball now sets things on fire
<Grievre> shamblers will generally attack the person who last hit them
<Grievre> shortened judoka range (they have the old range if they get close
combat
<Grievre> shamblers will cycle the left-right slash or fireball longer than
they did (but they won't keep doing it if their enemy is not visible)
<Grievre> fixed shambler fireball so it doesn't miss and hurt itself so
much
<Grievre> #define OLD_AUTORIFLE
<Grievre> will go to the old behavior of the auto rifle
<Grievre> I think that's it
<Grievre> oh, I changed the intro message and version string a little, you
might want to change that
2003-11-12 04:58:19 +00:00
|
|
|
|
newmis.origin = self.origin;
|
2001-11-02 17:00:52 +00:00
|
|
|
|
newmis.owner = NIL;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
newmis.real_owner = self;
|
|
|
|
|
makevectors (self.v_angle);
|
|
|
|
|
newmis.avelocity = '0 0 0';
|
|
|
|
|
newmis.velocity = v_forward*800 + v_up * 200 + v_right*10 + v_up*10;
|
<Grievre> lemme see... fixes: stuck shamblers, cheat teslas, camming and
sensing
<Grievre> give mirvs the right death message, make them a little weaker and
more spread out
<Grievre> increased damage done by exp body... fixes not being able to use
airfist if you have daedalus or lg with no cells
<Grievre> made it so missing judo = you can't fire for 1.5 seconds, also
judo doesn't always work, less chance of it working a) if they're facing
you b) if they have knife, judo, or close combat
<Grievre> you lose speed the more armor you have (so upgraded people can
buy cougar and cheetah now)
<Grievre> attempted to fix the respawn guard not telefragging bug (if it
was still there)
<Grievre> made it so you can tell a shambler to come, stop, or patrol even
if it is fighting someone, doesn't really work most of the time but can
"wake up" your shambler if it's being screwy
<Grievre> (works for all demons)
<Grievre> made it so a monster goes back to what it was doing before
(following you, patrolling etc) once it's done with its enemy
<Grievre> made the sniper rifle less cheap (or tried to), charging now =
more accuracy, rather than more damage. OTR now does slightly less damage
than regular, but isn't blocked by armor as much.
<Grievre> autorifle now has half the rate of fire but does same damage as
sniper rifle, but less accurate
<Grievre> headshots always ignore armor if target has green armor, legshots
always ignore armor except for red
<Grievre> added bshams and shambler kings (can be disabled with infokeys)
<Grievre> increased max knife blood to 32
<Grievre> made it so airfist bounces gymnasts twice as much, and bounces
everyone a little more (I think), may cause stuck bugs but I think it
won't. airfist does half damage to gymnasts and slightly more to hwguys
<Grievre> made shamblers a little smarter and more powerful in general
<Grievre> they now attack buildings (only bshams/kings) if they are
attacked by them first
<Grievre> bsham/king fireball now sets things on fire
<Grievre> shamblers will generally attack the person who last hit them
<Grievre> shortened judoka range (they have the old range if they get close
combat
<Grievre> shamblers will cycle the left-right slash or fireball longer than
they did (but they won't keep doing it if their enemy is not visible)
<Grievre> fixed shambler fireball so it doesn't miss and hurt itself so
much
<Grievre> #define OLD_AUTORIFLE
<Grievre> will go to the old behavior of the auto rifle
<Grievre> I think that's it
<Grievre> oh, I changed the intro message and version string a little, you
might want to change that
2003-11-12 04:58:19 +00:00
|
|
|
|
newmis.origin += (normalize(newmis.velocity) * 20);
|
|
|
|
|
setorigin(newmis, newmis.origin);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
newmis.angles = '0 0 0';
|
|
|
|
|
newmis.angles_y = anglemod(self.angles_y + 180);
|
|
|
|
|
// newmis.skin = 1;
|
|
|
|
|
newmis.th_die = Security_Camera_Die; // Death function
|
|
|
|
|
newmis.th_pain = Security_Camera_Pain;
|
|
|
|
|
newmis.mdl = "progs/camera.mdl"; //CH temp model
|
|
|
|
|
setmodel (newmis, newmis.mdl);
|
|
|
|
|
newmis.team_no = self.team_no;
|
|
|
|
|
newmis.colormap = self.colormap;
|
|
|
|
|
newmis.heat = 0; //Beeps
|
|
|
|
|
|
<Grievre> lemme see... fixes: stuck shamblers, cheat teslas, camming and
sensing
<Grievre> give mirvs the right death message, make them a little weaker and
more spread out
<Grievre> increased damage done by exp body... fixes not being able to use
airfist if you have daedalus or lg with no cells
<Grievre> made it so missing judo = you can't fire for 1.5 seconds, also
judo doesn't always work, less chance of it working a) if they're facing
you b) if they have knife, judo, or close combat
<Grievre> you lose speed the more armor you have (so upgraded people can
buy cougar and cheetah now)
<Grievre> attempted to fix the respawn guard not telefragging bug (if it
was still there)
<Grievre> made it so you can tell a shambler to come, stop, or patrol even
if it is fighting someone, doesn't really work most of the time but can
"wake up" your shambler if it's being screwy
<Grievre> (works for all demons)
<Grievre> made it so a monster goes back to what it was doing before
(following you, patrolling etc) once it's done with its enemy
<Grievre> made the sniper rifle less cheap (or tried to), charging now =
more accuracy, rather than more damage. OTR now does slightly less damage
than regular, but isn't blocked by armor as much.
<Grievre> autorifle now has half the rate of fire but does same damage as
sniper rifle, but less accurate
<Grievre> headshots always ignore armor if target has green armor, legshots
always ignore armor except for red
<Grievre> added bshams and shambler kings (can be disabled with infokeys)
<Grievre> increased max knife blood to 32
<Grievre> made it so airfist bounces gymnasts twice as much, and bounces
everyone a little more (I think), may cause stuck bugs but I think it
won't. airfist does half damage to gymnasts and slightly more to hwguys
<Grievre> made shamblers a little smarter and more powerful in general
<Grievre> they now attack buildings (only bshams/kings) if they are
attacked by them first
<Grievre> bsham/king fireball now sets things on fire
<Grievre> shamblers will generally attack the person who last hit them
<Grievre> shortened judoka range (they have the old range if they get close
combat
<Grievre> shamblers will cycle the left-right slash or fireball longer than
they did (but they won't keep doing it if their enemy is not visible)
<Grievre> fixed shambler fireball so it doesn't miss and hurt itself so
much
<Grievre> #define OLD_AUTORIFLE
<Grievre> will go to the old behavior of the auto rifle
<Grievre> I think that's it
<Grievre> oh, I changed the intro message and version string a little, you
might want to change that
2003-11-12 04:58:19 +00:00
|
|
|
|
newmis.think = Security_Camera_Die;
|
|
|
|
|
newmis.nextthink = time + 5;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
newmis.health = newmis.max_health = BUILD_HEALTH_CAMERA;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
newmis.touch = SecurityCameraTossTouch;
|
|
|
|
|
|
|
|
|
|
newmis.num_mines=0; // OfN - reset HACKER improvements
|
|
|
|
|
|
|
|
|
|
W_SetCurrentAmmo();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
//========
|
|
|
|
|
void() SecurityCameraTossTouch =
|
|
|
|
|
{
|
2001-11-02 17:00:52 +00:00
|
|
|
|
if (other || other == self.real_owner)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return;
|
<Grievre> lemme see... fixes: stuck shamblers, cheat teslas, camming and
sensing
<Grievre> give mirvs the right death message, make them a little weaker and
more spread out
<Grievre> increased damage done by exp body... fixes not being able to use
airfist if you have daedalus or lg with no cells
<Grievre> made it so missing judo = you can't fire for 1.5 seconds, also
judo doesn't always work, less chance of it working a) if they're facing
you b) if they have knife, judo, or close combat
<Grievre> you lose speed the more armor you have (so upgraded people can
buy cougar and cheetah now)
<Grievre> attempted to fix the respawn guard not telefragging bug (if it
was still there)
<Grievre> made it so you can tell a shambler to come, stop, or patrol even
if it is fighting someone, doesn't really work most of the time but can
"wake up" your shambler if it's being screwy
<Grievre> (works for all demons)
<Grievre> made it so a monster goes back to what it was doing before
(following you, patrolling etc) once it's done with its enemy
<Grievre> made the sniper rifle less cheap (or tried to), charging now =
more accuracy, rather than more damage. OTR now does slightly less damage
than regular, but isn't blocked by armor as much.
<Grievre> autorifle now has half the rate of fire but does same damage as
sniper rifle, but less accurate
<Grievre> headshots always ignore armor if target has green armor, legshots
always ignore armor except for red
<Grievre> added bshams and shambler kings (can be disabled with infokeys)
<Grievre> increased max knife blood to 32
<Grievre> made it so airfist bounces gymnasts twice as much, and bounces
everyone a little more (I think), may cause stuck bugs but I think it
won't. airfist does half damage to gymnasts and slightly more to hwguys
<Grievre> made shamblers a little smarter and more powerful in general
<Grievre> they now attack buildings (only bshams/kings) if they are
attacked by them first
<Grievre> bsham/king fireball now sets things on fire
<Grievre> shamblers will generally attack the person who last hit them
<Grievre> shortened judoka range (they have the old range if they get close
combat
<Grievre> shamblers will cycle the left-right slash or fireball longer than
they did (but they won't keep doing it if their enemy is not visible)
<Grievre> fixed shambler fireball so it doesn't miss and hurt itself so
much
<Grievre> #define OLD_AUTORIFLE
<Grievre> will go to the old behavior of the auto rifle
<Grievre> I think that's it
<Grievre> oh, I changed the intro message and version string a little, you
might want to change that
2003-11-12 04:58:19 +00:00
|
|
|
|
if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin + '0 0 12') == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
Security_Camera_Die();
|
|
|
|
|
return;
|
|
|
|
|
}
|
<Grievre> lemme see... fixes: stuck shamblers, cheat teslas, camming and
sensing
<Grievre> give mirvs the right death message, make them a little weaker and
more spread out
<Grievre> increased damage done by exp body... fixes not being able to use
airfist if you have daedalus or lg with no cells
<Grievre> made it so missing judo = you can't fire for 1.5 seconds, also
judo doesn't always work, less chance of it working a) if they're facing
you b) if they have knife, judo, or close combat
<Grievre> you lose speed the more armor you have (so upgraded people can
buy cougar and cheetah now)
<Grievre> attempted to fix the respawn guard not telefragging bug (if it
was still there)
<Grievre> made it so you can tell a shambler to come, stop, or patrol even
if it is fighting someone, doesn't really work most of the time but can
"wake up" your shambler if it's being screwy
<Grievre> (works for all demons)
<Grievre> made it so a monster goes back to what it was doing before
(following you, patrolling etc) once it's done with its enemy
<Grievre> made the sniper rifle less cheap (or tried to), charging now =
more accuracy, rather than more damage. OTR now does slightly less damage
than regular, but isn't blocked by armor as much.
<Grievre> autorifle now has half the rate of fire but does same damage as
sniper rifle, but less accurate
<Grievre> headshots always ignore armor if target has green armor, legshots
always ignore armor except for red
<Grievre> added bshams and shambler kings (can be disabled with infokeys)
<Grievre> increased max knife blood to 32
<Grievre> made it so airfist bounces gymnasts twice as much, and bounces
everyone a little more (I think), may cause stuck bugs but I think it
won't. airfist does half damage to gymnasts and slightly more to hwguys
<Grievre> made shamblers a little smarter and more powerful in general
<Grievre> they now attack buildings (only bshams/kings) if they are
attacked by them first
<Grievre> bsham/king fireball now sets things on fire
<Grievre> shamblers will generally attack the person who last hit them
<Grievre> shortened judoka range (they have the old range if they get close
combat
<Grievre> shamblers will cycle the left-right slash or fireball longer than
they did (but they won't keep doing it if their enemy is not visible)
<Grievre> fixed shambler fireball so it doesn't miss and hurt itself so
much
<Grievre> #define OLD_AUTORIFLE
<Grievre> will go to the old behavior of the auto rifle
<Grievre> I think that's it
<Grievre> oh, I changed the intro message and version string a little, you
might want to change that
2003-11-12 04:58:19 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint (self.real_owner, PRINT_HIGH, "You finish building the Security Camera.\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
teamprefixsprint(self.real_owner.team_no,self.real_owner); //- OfN
|
|
|
|
|
teamsprint(self.real_owner.team_no, self.real_owner, self.real_owner.netname);
|
|
|
|
|
teamsprint(self.real_owner.team_no, self.real_owner, " has built a Security Camera.\n");
|
|
|
|
|
|
|
|
|
|
self.real_owner.option = time + 2; // so ppl cant destroy it for 2 seconds
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.movetype = MOVETYPE_NONE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
setsize (self, '-16 -16 -6', '16 16 10');
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.solid = SOLID_BBOX;
|
|
|
|
|
self.takedamage = DAMAGE_AIM;
|
|
|
|
|
sound (self, CHAN_WEAPON, "weapons/guerilla_set.wav", 1, ATTN_NORM);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
self.think = Security_Camera_Idle;
|
|
|
|
|
self.nextthink = time + 1;
|
|
|
|
|
};
|