2001-07-23 20:52:47 +00:00
|
|
|
|
#include "defs.qh"
|
2001-07-17 05:58:10 +00:00
|
|
|
|
/*=======================================================//
|
|
|
|
|
// OfteN.QC - CustomTF 3.2.OfN - 30/1/2001 - //
|
|
|
|
|
// by Sergio Fuma<6D>a Grunwaldt - OfteN aka superCOCK2000 //
|
|
|
|
|
=========================================================//
|
|
|
|
|
Additional stuff
|
|
|
|
|
=========================================================*/
|
|
|
|
|
|
|
|
|
|
//= HOLOGRAPH SETTINGS ==========//
|
|
|
|
|
#define HOLO_POWER_COST 10 //
|
|
|
|
|
#define HOLO_CYCLE_COST 2 //
|
|
|
|
|
#define HOLO_CYCLE_TIME 1.5 //
|
|
|
|
|
//===============================//
|
|
|
|
|
|
|
|
|
|
//= FLARE GREN SETTINGS =========//
|
|
|
|
|
#define FLARE_DURATION 60 //
|
|
|
|
|
//===============================//
|
|
|
|
|
|
|
|
|
|
void() HoloThink;
|
|
|
|
|
void(entity player) RemoveHolo;
|
|
|
|
|
|
|
|
|
|
//====================================================================//
|
|
|
|
|
// Initialize stuff, localinfos etc... //
|
|
|
|
|
// This is called on worldspawn and with the IMPULSE_UPDATEINFO (194) //
|
|
|
|
|
//====================================================================//
|
|
|
|
|
|
|
|
|
|
void () UpdateInfos =
|
|
|
|
|
{
|
|
|
|
|
local string st;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "allow_debug"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on")
|
|
|
|
|
allow_debug = 1;
|
|
|
|
|
else
|
|
|
|
|
{
|
2001-11-02 17:00:52 +00:00
|
|
|
|
debug_target=NIL;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
allow_debug = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
/*st = infokey(NIL, "cool_gibs"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on")
|
|
|
|
|
cool_gibs = 1;
|
|
|
|
|
else
|
|
|
|
|
cool_gibs = 0;*/
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "pay_msgs"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on")
|
|
|
|
|
pay_msgs = 1;
|
|
|
|
|
else
|
|
|
|
|
pay_msgs = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "team_prefix"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on")
|
|
|
|
|
team_prefix = 1;
|
|
|
|
|
else
|
|
|
|
|
team_prefix = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
/*st = infokey(NIL, "allow_mauser"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on")
|
|
|
|
|
allow_mauser = 1;
|
|
|
|
|
else
|
|
|
|
|
allow_mauser = 0;*/
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "headless"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
headless = 1;
|
|
|
|
|
else
|
|
|
|
|
headless = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "no_grapple"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
no_grapple = 1;
|
|
|
|
|
else
|
|
|
|
|
no_grapple = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "no_army"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
no_army = 1;
|
|
|
|
|
else
|
|
|
|
|
no_army = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "nicecolors"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
nicecolors = 1;
|
|
|
|
|
else
|
|
|
|
|
nicecolors = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "relax_cheatcheck"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
relax_cheatcheck = 1;
|
|
|
|
|
else
|
|
|
|
|
relax_cheatcheck = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
/*st = infokey(NIL, "allow_antigrav"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
allow_antigrav = 1;
|
|
|
|
|
else
|
|
|
|
|
allow_antigrav = 0;*/
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "no_clusters"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
no_clusters = 1;
|
|
|
|
|
else
|
|
|
|
|
no_clusters = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "no_c4"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
no_c4 = 1;
|
|
|
|
|
else
|
|
|
|
|
no_c4 = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "no_otr"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
no_otr = 1;
|
|
|
|
|
else
|
|
|
|
|
no_otr = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "no_laser"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
no_laser = 1;
|
|
|
|
|
else
|
|
|
|
|
no_laser = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "no_detpush"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "0" || st =="off" )
|
|
|
|
|
no_detpush = 0;
|
|
|
|
|
else
|
|
|
|
|
no_detpush = 1;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "no_monstercolors"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
no_monstercolors = 1;
|
|
|
|
|
else
|
|
|
|
|
no_monstercolors = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "no_chaplan"); //
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (st == "1" || st =="on" )
|
|
|
|
|
no_chaplan = 1;
|
|
|
|
|
else
|
|
|
|
|
no_chaplan = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "max_mines"); //
|
2001-09-30 22:38:44 +00:00
|
|
|
|
if (!st) st="4"; //sets default, 4 max mines
|
2001-07-17 05:58:10 +00:00
|
|
|
|
max_mines = stof(st);
|
|
|
|
|
if (max_mines < 2 ) max_mines = 2; // the allowed minimum are 2 mines
|
|
|
|
|
else if (max_mines > 8) max_mines = 8; //the allowed maximum is 8 mines
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "custom_mode"); //
|
2001-09-30 22:38:44 +00:00
|
|
|
|
if (!st) st="0"; //sets default
|
2001-07-17 05:58:10 +00:00
|
|
|
|
custom_mode = stof(st);
|
|
|
|
|
if (custom_mode < 0 ) custom_mode = 0; // the allowed minimum
|
|
|
|
|
else if (custom_mode > 2) custom_mode = 2; //the allowed maximum
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "stock_mode"); //
|
2001-09-30 22:38:44 +00:00
|
|
|
|
if (!st) st="0"; //sets default
|
2001-07-17 05:58:10 +00:00
|
|
|
|
stock_mode = stof(st);
|
|
|
|
|
if (stock_mode < 0 ) stock_mode = 0; // the allowed minimum
|
|
|
|
|
else if (stock_mode > 2) stock_mode = 2; //the allowed maximum
|
|
|
|
|
|
|
|
|
|
if (stock_mode == 2 && custom_mode == 2) custom_mode = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
st = infokey(NIL, "army_delay"); //
|
2001-09-30 22:38:44 +00:00
|
|
|
|
if (!st) st="5"; //sets default
|
2001-07-17 05:58:10 +00:00
|
|
|
|
army_delay = stof(st);
|
|
|
|
|
if (army_delay < 2 ) army_delay = 2; // the allowed minimum
|
|
|
|
|
else if (army_delay > 60) army_delay = 60; //the allowed maximum
|
|
|
|
|
|
2002-09-08 02:12:15 +00:00
|
|
|
|
st = infokey(NIL, "allow_watermonsters"); //
|
|
|
|
|
if (st == "0" || st =="off" )
|
|
|
|
|
allow_watermonsters = 0;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
else
|
2002-09-08 02:12:15 +00:00
|
|
|
|
allow_watermonsters = 1;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//====================================================================//
|
|
|
|
|
// Sprints to all the members on one team except one the Team> Prefix //
|
|
|
|
|
// It should be used prior any teamsprint (look at tforttm.qc) //
|
|
|
|
|
//====================================================================//
|
|
|
|
|
|
|
|
|
|
void(float tno, entity ignore) teamprefixsprint =
|
|
|
|
|
{
|
|
|
|
|
if ( team_prefix != 1 )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
local entity te;
|
|
|
|
|
|
|
|
|
|
// Don't do teamprints in DM
|
|
|
|
|
if (tno == 0)
|
|
|
|
|
return;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
te = find(NIL, classname, "player");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
while (te)
|
|
|
|
|
{
|
|
|
|
|
if (Teammate(te.team_no,tno) && te != ignore)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(te, PRINT_HIGH, "Team<EFBFBD> ");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
te = find(te, classname, "player");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//==========================================================
|
|
|
|
|
// same shit but ignores 2 players
|
|
|
|
|
|
|
|
|
|
void(float tno, entity ignore, entity ignore2) teamprefixsprintbi =
|
|
|
|
|
{
|
|
|
|
|
if ( team_prefix != 1 )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
local entity te;
|
|
|
|
|
|
|
|
|
|
// Don't do teamprints in DM
|
|
|
|
|
if (tno == 0)
|
|
|
|
|
return;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
te = find(NIL, classname, "player");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
while (te)
|
|
|
|
|
{
|
|
|
|
|
if (Teammate(te.team_no,tno) && te != ignore && te != ignore2)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(te, PRINT_HIGH, "Team<EFBFBD> ");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
te = find(te, classname, "player");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//- For better performance i added this: --//
|
|
|
|
|
void(entity ignore, string st, string st2, string st3, string st4, string st5, string st6) teamsprint6 =
|
|
|
|
|
{
|
|
|
|
|
local entity te;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
te = find(NIL, classname, "player");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
while (te)
|
|
|
|
|
{
|
|
|
|
|
if (Teammate(te.team_no,ignore.team_no) && te != ignore)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(te, PRINT_HIGH, st);
|
|
|
|
|
sprint(te, PRINT_HIGH, st2);
|
|
|
|
|
sprint(te, PRINT_HIGH, st3);
|
|
|
|
|
sprint(te, PRINT_HIGH, st4);
|
|
|
|
|
sprint(te, PRINT_HIGH, st5);
|
|
|
|
|
sprint(te, PRINT_HIGH, st6);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
te = find(te, classname, "player");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//==========================================================
|
|
|
|
|
// same shit but ignores 2 players
|
|
|
|
|
|
|
|
|
|
void(entity ignore, entity ignore2, string st, string st2, string st3, string st4, string st5, string st6) teamsprintbi =
|
|
|
|
|
{
|
|
|
|
|
local entity te;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
te = find(NIL, classname, "player");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
while (te)
|
|
|
|
|
{
|
|
|
|
|
if (Teammate(te.team_no,ignore.team_no) && te != ignore && te != ignore2)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(te, PRINT_HIGH, st);
|
|
|
|
|
sprint(te, PRINT_HIGH, st2);
|
|
|
|
|
sprint(te, PRINT_HIGH, st3);
|
|
|
|
|
sprint(te, PRINT_HIGH, st4);
|
|
|
|
|
sprint(te, PRINT_HIGH, st5);
|
|
|
|
|
sprint(te, PRINT_HIGH, st6);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
te = find(te, classname, "player");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//================================================//
|
|
|
|
|
// Kicks any player with no TF skin on tforttm.qc //
|
|
|
|
|
//================================================//
|
|
|
|
|
|
|
|
|
|
float (string skin_str) Is_TF_Skin =
|
|
|
|
|
{
|
|
|
|
|
// if relax_cheatcheck is "on" return its a valid skin
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (relax_cheatcheck==1) return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if ( skin_str != "tf_scout"
|
|
|
|
|
&& skin_str != "tf_snipe"
|
|
|
|
|
&& skin_str != "tf_sold"
|
|
|
|
|
&& skin_str != "tf_demo"
|
|
|
|
|
&& skin_str != "tf_medic"
|
|
|
|
|
&& skin_str != "tf_hwguy"
|
|
|
|
|
&& skin_str != "tf_pyro"
|
|
|
|
|
&& skin_str != "tf_spy"
|
|
|
|
|
&& skin_str != "tf_eng")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
else
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//============================================================================//
|
|
|
|
|
// Return the new "NICE" color for the team corresponding to the no passed in //
|
|
|
|
|
//============================================================================//
|
|
|
|
|
|
2001-07-24 20:54:19 +00:00
|
|
|
|
/*string (float tno) TeamGetNiceColor =
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
if (tno == 1)
|
|
|
|
|
return "2 13";
|
|
|
|
|
if (tno == 2)
|
|
|
|
|
return "9 4";
|
|
|
|
|
if (tno == 3)
|
|
|
|
|
return "5 12";
|
|
|
|
|
if (tno == 4)
|
|
|
|
|
return "3 11";
|
|
|
|
|
|
2001-07-23 05:46:14 +00:00
|
|
|
|
return "";
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
2001-07-24 20:54:19 +00:00
|
|
|
|
*/
|
|
|
|
|
float (float tno) TeamGetNiceColor =
|
|
|
|
|
{
|
|
|
|
|
if (nicecolors == 1)
|
|
|
|
|
{
|
|
|
|
|
if (tno == 1)
|
|
|
|
|
return 2;
|
|
|
|
|
if (tno == 2)
|
|
|
|
|
return 9;
|
|
|
|
|
if (tno == 3)
|
|
|
|
|
return 5;
|
|
|
|
|
if (tno == 4)
|
|
|
|
|
return 3;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (tno == 1)
|
|
|
|
|
return 13;
|
|
|
|
|
if (tno == 2)
|
|
|
|
|
return 4;
|
|
|
|
|
if (tno == 3)
|
|
|
|
|
return 12;
|
|
|
|
|
if (tno == 4)
|
|
|
|
|
return 11;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
};
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
float (float tno, float theColor ) IsValidTopColor =
|
|
|
|
|
{
|
|
|
|
|
theColor = floor(theColor);
|
|
|
|
|
|
|
|
|
|
// if relax_cheatcheck is "on" return its a valid color value
|
|
|
|
|
if (relax_cheatcheck==1)
|
|
|
|
|
{
|
|
|
|
|
if (theColor > 13 || theColor < 0)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (tno == 1)
|
|
|
|
|
{
|
|
|
|
|
if (theColor == 4)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (number_of_teams > 2 && theColor == 12)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (number_of_teams > 3 && theColor == 11)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (tno == 2)
|
|
|
|
|
{
|
|
|
|
|
if (theColor == 13)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (number_of_teams > 2 && theColor == 12)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (number_of_teams > 3 && theColor == 11)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (tno == 3)
|
|
|
|
|
{
|
|
|
|
|
if (theColor==4||theColor==13)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (number_of_teams > 3 && theColor == 11)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (tno == 4 && (theColor==4||theColor==13||theColor==12))
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (tno == 1 && (theColor==2||theColor==13))
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (tno == 2 && (theColor==9||theColor==4))
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (tno == 3 && (theColor==12||theColor==5))
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (tno == 4 && (theColor==11||theColor==3))
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//==========================//
|
|
|
|
|
// The new holograph device //
|
|
|
|
|
//==========================//
|
|
|
|
|
void(entity player) UpdateCells =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (player.current_weapon == WEAP_SPANNER
|
|
|
|
|
|| player.current_weapon == WEAP_LIGHTNING
|
|
|
|
|
|| player.current_weapon == WEAP_FLAMETHROWER
|
|
|
|
|
|| player.current_weapon == WEAP_DAEDALUS
|
|
|
|
|
|| player.current_weapon == WEAP_LASERCANNON)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
player.currentammo = player.ammo_cells;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
player.items = player.items | IT_CELLS;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void(entity player) ActivateHolo =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (!(player.cutf_items & CUTF_HOLO))
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
//sprint(player, PRINT_MEDIUM, "You do not have the holograph!\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (player.has_holo == 2) return; // avoids overflow, turns to 1 after first think
|
|
|
|
|
|
|
|
|
|
if (player.ammo_cells < 10 && player.has_holo == 0)
|
|
|
|
|
{
|
|
|
|
|
local string st;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(player, PRINT_HIGH, "Your holograph needs ");
|
|
|
|
|
st=ftos(HOLO_POWER_COST);
|
|
|
|
|
sprint(player, PRINT_HIGH, st);
|
|
|
|
|
sprint(player, PRINT_HIGH," cells at least!\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (player.has_holo == 1)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(player, PRINT_HIGH, "You turn off the holograph device\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
RemoveHolo(player);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
newmis = spawn();
|
2001-07-23 20:52:47 +00:00
|
|
|
|
newmis.solid = SOLID_NOT;
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
newmis.movetype = MOVETYPE_NONE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
newmis.origin = player.origin;
|
|
|
|
|
newmis.angles = player.angles;
|
|
|
|
|
newmis.colormap = player.colormap;
|
|
|
|
|
newmis.skin = player.skin;
|
|
|
|
|
setmodel (newmis, "progs/player.mdl");
|
|
|
|
|
newmis.classname = "holo";
|
|
|
|
|
newmis.owner=player;
|
|
|
|
|
newmis.frame=player.frame;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
newmis.nextthink = time + HOLO_CYCLE_TIME;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
newmis.think = HoloThink;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
newmis.effects = EF_DIMLIGHT;
|
|
|
|
|
player.ammo_cells = player.ammo_cells - HOLO_POWER_COST;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
UpdateCells(player);
|
|
|
|
|
|
|
|
|
|
stuffcmd (player, "bf\nbf\n");
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(player,PRINT_HIGH,"you turn on your holograph...\n");
|
|
|
|
|
sound (newmis, CHAN_MISC, "effects/bodyhit2.wav", 0.5, ATTN_NORM);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
player.has_holo = 2; // 2 makes it wait until first think for turning off the holo
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void() HoloThink =
|
|
|
|
|
{
|
|
|
|
|
//local entity oldself;
|
|
|
|
|
|
|
|
|
|
if (self.owner.ammo_cells < 1)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self.owner, PRINT_MEDIUM, "your hologram runs out of energy\n");
|
|
|
|
|
sound (self, CHAN_MISC, "effects/bodyhit1.wav", 0.6, ATTN_NORM);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
spawnFOG(self.origin);
|
|
|
|
|
self.owner.has_holo = 0;
|
|
|
|
|
dremove(self);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.owner.ammo_cells = self.owner.ammo_cells - HOLO_CYCLE_COST;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
/*oldself = self;
|
|
|
|
|
self = self.owner;
|
|
|
|
|
W_SetCurrentAmmo();
|
|
|
|
|
self = oldself;*/
|
|
|
|
|
|
|
|
|
|
UpdateCells(self.owner);
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.nextthink = time + HOLO_CYCLE_TIME;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
self.owner.has_holo = 1; // ready to be turned off
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void (entity player) RemoveHolo =
|
|
|
|
|
{
|
|
|
|
|
local entity te;
|
2001-11-02 17:00:52 +00:00
|
|
|
|
te = find(NIL, classname, "holo");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
while (te)
|
|
|
|
|
{
|
|
|
|
|
if (te.owner == player) {
|
|
|
|
|
te.owner.has_holo = 0;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sound (te, CHAN_MISC, "effects/bodyhit1.wav", 0.6, ATTN_NORM);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
spawnFOG(te.origin);
|
|
|
|
|
dremove(te);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
te = find(te, classname, "holo");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2001-10-20 20:33:01 +00:00
|
|
|
|
vector (vector pos, vector dir) NudgeOnePosition =
|
|
|
|
|
{
|
|
|
|
|
local float a, b;
|
|
|
|
|
a = pointcontents (pos + dir);
|
|
|
|
|
b = pointcontents (pos - dir);
|
|
|
|
|
if (a != CONTENTS_SOLID && b == CONTENTS_SOLID)
|
|
|
|
|
return dir;
|
|
|
|
|
else if (a == CONTENTS_SOLID && b != CONTENTS_SOLID)
|
|
|
|
|
return -dir;
|
|
|
|
|
else
|
|
|
|
|
return '0 0 0';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
vector (vector pos) NudgePosition =
|
|
|
|
|
{
|
|
|
|
|
pos += NudgeOnePosition (pos, '1 0 0');
|
|
|
|
|
pos += NudgeOnePosition (pos, '0 1 0');
|
|
|
|
|
pos += NudgeOnePosition (pos, '0 0 1');
|
|
|
|
|
return pos;
|
|
|
|
|
};
|
|
|
|
|
|
2001-07-17 05:58:10 +00:00
|
|
|
|
//===========================//
|
|
|
|
|
// THE FLARES ARE BACK! hehe //
|
|
|
|
|
//===========================//
|
|
|
|
|
|
|
|
|
|
void() FlareBounce;
|
|
|
|
|
|
|
|
|
|
//---------------------------//
|
|
|
|
|
// Flare touch function. //
|
|
|
|
|
|
|
|
|
|
void() FlareGrenadeTouch =
|
|
|
|
|
{
|
|
|
|
|
if (other == self.owner)
|
|
|
|
|
return; // don't bounce on owner
|
|
|
|
|
|
2001-07-31 17:08:59 +00:00
|
|
|
|
if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID) // if in wall or sky
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
dremove(self);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (self.has_holo==0)
|
|
|
|
|
{
|
|
|
|
|
self.skin=1;
|
|
|
|
|
//setmodel (self, "progs/flare.mdl");
|
|
|
|
|
}
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
if (!other && self.movetype != MOVETYPE_BOUNCE)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
self.velocity = '0 0 0';
|
|
|
|
|
|
|
|
|
|
if (random()<0.6)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sound (self, CHAN_MISC, "effects/bodyhit2.wav", 0.7, ATTN_NORM); // bounce sound
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sound (self, CHAN_MISC, "effects/bodyhit1.wav", 0.6, ATTN_NORM); // bounce sound
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
2001-10-20 20:33:01 +00:00
|
|
|
|
|
|
|
|
|
// the networking imprecision causes them to be through the
|
|
|
|
|
// wall on clients, and in QF this stops the light from
|
|
|
|
|
// working properly. So I try to nudge them away from the
|
|
|
|
|
// wall
|
|
|
|
|
setorigin (self, NudgePosition (self.origin));
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.movetype = MOVETYPE_BOUNCE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
self.avelocity = '1000 200 850';
|
|
|
|
|
self.touch = FlareBounce;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (self.velocity == '0 0 0')
|
|
|
|
|
self.avelocity = '0 0 0';
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void() FlareBounce =
|
|
|
|
|
{
|
|
|
|
|
if (other == self.owner)
|
|
|
|
|
return; // don't bounce on owner
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (self.velocity == '0 0 0')
|
|
|
|
|
self.avelocity = '0 0 0';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//---------------------------//
|
|
|
|
|
// Flare grenade explosion. //
|
|
|
|
|
|
|
|
|
|
void() FlareGrenadeExplode =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sound (self, CHAN_MISC, "items/flare1.wav", 1, ATTN_NORM);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
//setmodel (self, "progs/flare.mdl");
|
|
|
|
|
self.skin=0;
|
|
|
|
|
self.has_holo=1;
|
|
|
|
|
|
|
|
|
|
local vector org;
|
|
|
|
|
org=self.origin;
|
|
|
|
|
|
2001-10-13 23:02:22 +00:00
|
|
|
|
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
|
|
|
|
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
|
2001-07-25 21:10:26 +00:00
|
|
|
|
WriteByte (MSG_MULTICAST, 3);
|
2001-10-13 23:02:22 +00:00
|
|
|
|
WriteCoord (MSG_MULTICAST, org_x);
|
|
|
|
|
WriteCoord (MSG_MULTICAST, org_y);
|
|
|
|
|
WriteCoord (MSG_MULTICAST, org_z);
|
2001-07-25 21:10:26 +00:00
|
|
|
|
multicast (org, MULTICAST_PVS);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.effects = self.effects | EF_DIMLIGHT;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
self.think = SUB_Remove;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
self.nextthink = time + FLARE_DURATION;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//========================================================//
|
|
|
|
|
// My stupid contributions to optimize something! //
|
|
|
|
|
//========================================================//
|
|
|
|
|
|
|
|
|
|
float(entity thing) IsMonster =
|
|
|
|
|
{
|
|
|
|
|
if (thing.classname=="monster_shambler")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (thing.classname=="monster_demon1")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (thing.classname=="monster_wizard")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (thing.classname=="monster_army")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (thing.classname=="monster_knight")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (thing.classname=="monster_hknight")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
float(entity thing) IsMonsterNonArmy =
|
|
|
|
|
{
|
|
|
|
|
if (thing.classname=="monster_shambler")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (thing.classname=="monster_demon1")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (thing.classname=="monster_wizard")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (thing.classname=="monster_knight")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (thing.classname=="monster_hknight")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
float(entity player) HasMonster =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if ((player.job & JOB_WARLOCK && player.job & JOB_DEMON_OUT)
|
|
|
|
|
||(player.job & JOB_ARMY && player.job & JOB_DEMON_OUT))
|
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
string(entity themonster) GetMonsterName =
|
|
|
|
|
{
|
|
|
|
|
if (themonster.classname == "monster_wizard")
|
|
|
|
|
return "scrag";
|
|
|
|
|
if (themonster.classname == "monster_shambler")
|
<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 (themonster.has_tesla > 6)
|
|
|
|
|
return "shambler king";
|
|
|
|
|
if (themonster.has_tesla == 6)
|
|
|
|
|
return "battle shambler";
|
|
|
|
|
else
|
|
|
|
|
return "shambler";
|
|
|
|
|
}
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (themonster.classname == "monster_demon1")
|
|
|
|
|
return "fiend";
|
|
|
|
|
if (themonster.classname == "monster_army")
|
|
|
|
|
return "army soldier";
|
|
|
|
|
if (themonster.classname == "monster_knight")
|
|
|
|
|
return "knight";
|
|
|
|
|
if (themonster.classname == "monster_hknight")
|
|
|
|
|
return "hell knight";
|
|
|
|
|
|
|
|
|
|
return "unknown monster";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void(entity themonster) KillTheMonster =
|
|
|
|
|
{
|
|
|
|
|
local entity oself;
|
|
|
|
|
oself=self;
|
|
|
|
|
|
|
|
|
|
self=themonster;
|
|
|
|
|
|
|
|
|
|
if (themonster.classname == "monster_wizard")
|
|
|
|
|
wiz_die();
|
|
|
|
|
else if (themonster.classname == "monster_shambler")
|
|
|
|
|
custom_shambler_die();
|
|
|
|
|
else if (themonster.classname == "monster_demon1")
|
|
|
|
|
custom_demon_die();
|
|
|
|
|
else if (themonster.classname == "monster_army")
|
|
|
|
|
custom_grunt_die();
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
#if 0 // no knights right now
|
|
|
|
|
else if (themonster.classname == "monster_knight")
|
2001-07-17 05:58:10 +00:00
|
|
|
|
knight_die();
|
|
|
|
|
else if (themonster.classname == "monster_hknight")
|
|
|
|
|
hknight_die();
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
#endif
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self=oself;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
string(entity thebuilding) GetBuildingName =
|
|
|
|
|
{
|
2001-10-01 11:37:02 +00:00
|
|
|
|
if (thebuilding.classname == "building_dispenser")
|
|
|
|
|
return "dispenser";
|
|
|
|
|
else if (thebuilding.classname == "building_sentrygun")
|
|
|
|
|
return "sentry gun";
|
|
|
|
|
else if (thebuilding.classname == "building_tesla")
|
|
|
|
|
return "tesla sentry";
|
|
|
|
|
else if (thebuilding.classname == "building_sensor")
|
|
|
|
|
return "motion sensor";
|
|
|
|
|
else if (thebuilding.classname == "building_camera")
|
|
|
|
|
return "security camera";
|
|
|
|
|
else if (thebuilding.classname == "building_teleporter")
|
|
|
|
|
return "teleporter pad";
|
|
|
|
|
else if (thebuilding.classname == "building_fieldgen")
|
|
|
|
|
return "field generator";
|
|
|
|
|
else
|
|
|
|
|
return "unknown building (BUG)";
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// soldiers don't target unoffensive buildings, or cloaked teslas!
|
|
|
|
|
float(entity thebuilding) IsOffenseBuilding =
|
|
|
|
|
{
|
|
|
|
|
if (!IsBuilding(thebuilding))
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (thebuilding.classname == "building_sentrygun")
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (thebuilding.classname == "building_tesla")
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (thebuilding.tf_items & NIT_TESLA_CLOAKING)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
if (thebuilding.job == 2)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE; // tesla is uncloaked, so soldier can see it
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
string(entity thething) GetEnemyName =
|
|
|
|
|
{
|
|
|
|
|
if (thething.classname == "player")
|
|
|
|
|
return thething.netname;
|
|
|
|
|
|
|
|
|
|
if (IsMonster(thething))
|
|
|
|
|
return GetMonsterName(thething);
|
|
|
|
|
|
|
|
|
|
if (IsBuilding(thething))
|
|
|
|
|
return GetBuildingName(thething);
|
|
|
|
|
|
|
|
|
|
if (thething.classname == "grenade" && thething.netname == "land_mine")
|
|
|
|
|
return "land mine";
|
|
|
|
|
|
|
|
|
|
if (thething.classname != "")
|
|
|
|
|
return thething.classname;
|
|
|
|
|
|
|
|
|
|
return "unknown stuff";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//======================================================//
|
|
|
|
|
void() ExpBodyThink;
|
|
|
|
|
|
|
|
|
|
void(entity body) ExpBody =
|
|
|
|
|
{
|
|
|
|
|
newmis=spawn();
|
|
|
|
|
newmis.owner=body;
|
|
|
|
|
newmis.think=ExpBodyThink;
|
|
|
|
|
newmis.nextthink=time;
|
|
|
|
|
newmis.origin=body.origin;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void() ExpBodyThink =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
//deathmsg = DMSG_EXPBODY;
|
|
|
|
|
TF_T_Damage(self.owner, self.owner, self.owner.martyr_enemy, self.owner.health + 60, TF_TD_IGNOREARMOUR, TF_TD_OTHER);// TF_TD_OTHER);
|
|
|
|
|
|
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
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
deathmsg = DMSG_EXPBODY;
|
|
|
|
|
T_RadiusDamage (self.owner, self.owner, EXPBODY_DMG, self.owner);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
// self.owner.is_abouttodie = TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
dremove(self);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//===========================================//
|
|
|
|
|
|
|
|
|
|
void(vector where) spawnFOG =
|
|
|
|
|
{
|
2001-10-13 23:02:22 +00:00
|
|
|
|
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
|
|
|
|
WriteByte (MSG_MULTICAST, TE_TELEPORT);
|
|
|
|
|
WriteCoord (MSG_MULTICAST, where_x);
|
|
|
|
|
WriteCoord (MSG_MULTICAST, where_y);
|
|
|
|
|
WriteCoord (MSG_MULTICAST, where_z);
|
2001-07-23 20:52:47 +00:00
|
|
|
|
multicast (where, MULTICAST_PHS);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//=========================================================//
|
|
|
|
|
// called on any try to dismantle something from menu.qc
|
|
|
|
|
// returns true if the thing should be dismantled
|
|
|
|
|
float() CheckEnemyDismantle =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (Teammate(self.building.real_owner.team_no,self.team_no)) return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
local string st;
|
|
|
|
|
st=GetBuildingName(self.building);
|
|
|
|
|
|
|
|
|
|
if (GetICELevel(self.building) == 1 && random() > 0.5)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self, PRINT_HIGH, "This ");
|
|
|
|
|
sprint(self, PRINT_HIGH, st);
|
|
|
|
|
sprint(self, PRINT_HIGH, " isn't easy to dismantle, it has a level 1 ICE!\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self.building.real_owner, PRINT_HIGH, "Somebody is trying to dismantle your ");
|
|
|
|
|
sprint(self.building.real_owner, PRINT_HIGH,st);
|
|
|
|
|
sprint(self.building.real_owner, PRINT_HIGH, "!\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
else if (GetICELevel(self.building) == 2)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self, PRINT_HIGH, "You can't dismantle this ");
|
|
|
|
|
sprint(self, PRINT_HIGH, st);
|
|
|
|
|
sprint(self, PRINT_HIGH, ", it's protected with a level 2 ICE!\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self.building.real_owner, PRINT_HIGH, "Somebody tried to dismantle your ");
|
|
|
|
|
sprint(self.building.real_owner, PRINT_HIGH,st);
|
|
|
|
|
sprint(self.building.real_owner, PRINT_HIGH, "!\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
else if (GetICELevel(self.building) == 3)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self, PRINT_HIGH, "This ");
|
|
|
|
|
sprint(self, PRINT_HIGH, st);
|
|
|
|
|
sprint(self, PRINT_HIGH, " is protected with a level 3 ICE!\n");
|
|
|
|
|
deathmsg=DMSG_ANTIDISM;
|
|
|
|
|
TF_T_Damage(self, self, self.building, self.health + 50, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
|
|
|
|
|
sound (self, CHAN_MISC, "effects/crunch.wav", 1, ATTN_NONE);
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_MEDIUM, self.building.real_owner.netname);
|
|
|
|
|
bprint(PRINT_MEDIUM, "'s ");
|
|
|
|
|
bprint(PRINT_MEDIUM, st);
|
|
|
|
|
bprint(PRINT_MEDIUM, " has been dismantled by ");
|
|
|
|
|
bprint(PRINT_MEDIUM, self.netname);
|
|
|
|
|
bprint(PRINT_MEDIUM, "\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(self.building.real_owner, PRINT_HIGH, "The enemy has dismantled your ");
|
|
|
|
|
sprint(self.building.real_owner, PRINT_HIGH, st);
|
|
|
|
|
sprint(self.building.real_owner, PRINT_HIGH, "!\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
logfrag(self, self.building.real_owner);
|
|
|
|
|
|
|
|
|
|
self.real_frags = self.real_frags + 1;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (!(toggleflags & TFLAG_TEAMFRAGS))
|
2001-07-17 05:58:10 +00:00
|
|
|
|
self.frags = self.real_frags;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//- OfN - Checks spots are visible between them
|
|
|
|
|
float (vector spot1, vector spot2) vis2orig =
|
|
|
|
|
{
|
2001-11-02 17:00:52 +00:00
|
|
|
|
traceline (spot1, spot2, TRUE, NIL); // see through other monsters
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (trace_inopen && trace_inwater)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return FALSE; // sight line crossed contents
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
if (trace_fraction == 1 && trace_endpos == spot2) //CH just extra check
|
2001-07-23 20:52:47 +00:00
|
|
|
|
return TRUE;
|
|
|
|
|
return FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
|
// Return the number of players in game
|
|
|
|
|
float() GetNoPlayers =
|
|
|
|
|
{
|
2001-10-07 22:15:22 +00:00
|
|
|
|
local float num_players = 0;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
local entity search;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
search = find (NIL, classname, "player");
|
|
|
|
|
while (search)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
num_players = num_players + 1;
|
|
|
|
|
search = find (search, classname, "player");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return num_players;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//==================================================================
|
|
|
|
|
// prints the overall resutls, best player etc.. on intermission
|
|
|
|
|
|
|
|
|
|
entity() GetBestPlayer =
|
|
|
|
|
{
|
2001-09-23 04:25:02 +00:00
|
|
|
|
local float bestscore;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
local entity theplayer, search;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
theplayer = NIL;
|
|
|
|
|
search = NIL;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
bestscore = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
search = find (NIL, classname, "player");
|
|
|
|
|
while (search)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
if (search.frags > bestscore)
|
|
|
|
|
{
|
|
|
|
|
bestscore = search.frags;
|
|
|
|
|
theplayer = search;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
search = find (search, classname, "player");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return theplayer;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
entity() GetBestKiller =
|
|
|
|
|
{
|
2001-09-23 04:25:02 +00:00
|
|
|
|
local float bestscore;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
local entity theplayer, search;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
theplayer = NIL;
|
|
|
|
|
search = NIL;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
bestscore = 0;
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
search = find (NIL, classname, "player");
|
|
|
|
|
while (search)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
if (search.frags - TeamFortress_TeamGetScore(search.team_no) > bestscore && search.team_no > 0)
|
|
|
|
|
{
|
|
|
|
|
bestscore = search.frags - TeamFortress_TeamGetScore(search.team_no);
|
|
|
|
|
theplayer = search;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
search = find (search, classname, "player");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return theplayer;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void() bprintline =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,"\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void() PrintResults =
|
|
|
|
|
{
|
|
|
|
|
local string winteam;
|
|
|
|
|
local entity theplayer;
|
|
|
|
|
|
|
|
|
|
bprintline();
|
|
|
|
|
|
|
|
|
|
if (time >= timelimit)
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,"Time limit reached!\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,"Map ");
|
|
|
|
|
bprint(PRINT_HIGH,mapname);
|
|
|
|
|
bprint(PRINT_HIGH," was played for ");
|
|
|
|
|
bprint(PRINT_HIGH,ftos(floor(time/60)));
|
|
|
|
|
bprint(PRINT_HIGH," minutes.\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,"\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
winteam = GetTrueTeamName(TeamFortress_TeamGetWinner());
|
|
|
|
|
|
|
|
|
|
if (winteam != "ERROR")
|
|
|
|
|
{
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,winteam);
|
|
|
|
|
bprint(PRINT_HIGH," team <20><><EFBFBD><EFBFBD> the game!!\n\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
theplayer = GetBestPlayer();
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
if (theplayer)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,theplayer.netname);
|
|
|
|
|
bprint(PRINT_HIGH," (");
|
|
|
|
|
bprint(PRINT_HIGH,GetTrueTeamName(theplayer.team_no));
|
|
|
|
|
bprint(PRINT_HIGH,") with ");
|
|
|
|
|
bprint(PRINT_HIGH,ftos(floor(theplayer.frags)));
|
|
|
|
|
bprint(PRINT_HIGH," frags.");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,"None.");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,"\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
theplayer = GetBestKiller();
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
if (theplayer)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,theplayer.netname);
|
|
|
|
|
bprint(PRINT_HIGH," (");
|
|
|
|
|
bprint(PRINT_HIGH,GetTrueTeamName(theplayer.team_no));
|
|
|
|
|
bprint(PRINT_HIGH,") with ");
|
|
|
|
|
bprint(PRINT_HIGH,ftos(floor(theplayer.frags - TeamFortress_TeamGetScore(theplayer.team_no))));
|
|
|
|
|
bprint(PRINT_HIGH," kills.");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,"None.");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
bprint(PRINT_HIGH,"\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
bprintline();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//======================================================================================
|
|
|
|
|
// called on clientobituary to check if warlock knife kills should be increased
|
|
|
|
|
|
|
|
|
|
void(entity attacker) MonsterKill =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (attacker.job & JOB_WARLOCK)
|
|
|
|
|
if (deathmsg == DMSG_AXE || deathmsg == DMSG_BACKSTAB)
|
|
|
|
|
if (attacker.demon_blood < MAX_KNIFE_BLOOD)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
attacker.demon_blood = attacker.demon_blood + 1;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//===============================================================================
|
|
|
|
|
// this function returns the max amount of grens a player can carry
|
|
|
|
|
|
|
|
|
|
float(entity theplayer, float grenslot) GetMaxGrens =
|
|
|
|
|
{
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tf_items & NIT_AMMO_BANDOLIER) // player can carry more grens cause he got bandolier
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
if (grenslot == 2) //2nd slot
|
|
|
|
|
{
|
|
|
|
|
if (theplayer.tp_grenades_2 == 0)
|
|
|
|
|
return 0;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_NAIL)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 3;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_FRAG)
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
return 3;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_CALTROP)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 4;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_MIRV)
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
return 2;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_FLARE)
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
return 8;
|
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_EMP)
|
|
|
|
|
return 4;// was 5
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
return 5;
|
|
|
|
|
}
|
|
|
|
|
else // first slot, or bug :)
|
|
|
|
|
{
|
|
|
|
|
if (theplayer.tp_grenades_1 == 0)
|
|
|
|
|
return 0;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_NAIL)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 3;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_FRAG)
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
return 3;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_CALTROP)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 4;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_MIRV)
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
return 2;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_FLARE)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 8;
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_EMP)
|
|
|
|
|
return 4;// was 5
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
return 5;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (grenslot == 2) //2nd slot
|
|
|
|
|
{
|
|
|
|
|
if (theplayer.tp_grenades_2 == 0)
|
|
|
|
|
return 0;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_NAIL)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 2;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_FRAG)
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
return 2;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_CALTROP)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 3;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_MIRV)
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
return 1;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_FLARE)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 6;
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_EMP)
|
|
|
|
|
return 3;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
return 4;
|
|
|
|
|
}
|
|
|
|
|
else // first slot, or bug :)
|
|
|
|
|
{
|
|
|
|
|
if (theplayer.tp_grenades_1 == 0)
|
|
|
|
|
return 0;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_NAIL)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 2;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_FRAG)
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
return 2;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_2 == GR_TYPE_CALTROP)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 3;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_MIRV)
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
return 1;// was 1
|
2001-07-23 20:52:47 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_FLARE)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return 6;
|
1) Attempted to give players positive frags whenever possible. You now
should get frags for blowing people up with others' dispensers/mines/expbody,
airfisting rockets, etc.
2) Redid Give_Frags_Out
3) Changed many uses of pointcontents and ugly hacks to use hullpointcontents
and checkmove, now a lot cleaner and less buggy
4) You can grapple builds again. This caused really odd bugs.
5) You can now damage your own buildings again (gasp). Any time a tesla or sentry
is damaged it turns on its attacker, friendly or otherwise. This is both a counter-TK
and counter-spy mechanism.
6) Teslas are now entirely inside their bounding box
7) Now check every frame for players startsolid and for outside of the map cube.
8) #define WALL_HURT to make it hurt when you hit a wall
9) Used some cool ideas (aka laws of physics) to make the airfist a little less annoying
10) You now only get 1 mirv per slot without bandolier. Demoman and hwguy gain bandolier.
demoman loses his extra mirv but gains an extra grenade and pair of detpacks. Hwguy
gets extra grenade.
11) New and improved EMP grenade now does damage based on range. no longer blows up shells.
Doesn't directly damage sentries anymore, but does significant damage to dispensers.
EMP someone who's setting a det and it blows up in their face.
12) Players now do radius damage from getting EMPed (again)
13) EMPs now go through walls (again)
14) EMP number lowered by one (3 without, 4 with bandolier) and cost raised by $100
15) You can only have 2 frag grens, 3 with bandolier now.
16) Hover boots will now eat cells if they get low on charge. In addition, the silly bug
where their charge wasn't restored when you die is fixed now.
17) EMPing a detpack now sets its timer to anywhere between 1 and 121 seconds from current time,
with a logarithmic probability of it being lower. (random() * random() * 120 + 1). Also, probably
more time the closer it is to the EMP.
18) Judo can now be blocked by people with close combat, knife or judo. Blocked judo means that the
attacker loses 3 seconds of attack.
19) Judo missing now makes them unable to fire.
20) Shortened judo range (back to normal if w/ close combat)
21) Attempted to rework the railgun. Seems to be okay now.
Probably still a lot of bugs in here, but since this is the devel version I thought I would commit
all my changes so people could start testing it. I'll commit fixes as soon as I find the bugs.
2003-11-26 08:53:44 +00:00
|
|
|
|
if (theplayer.tp_grenades_1 == GR_TYPE_EMP)
|
|
|
|
|
return 3;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
return 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0; // shouldnt happen ever.
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//=====================================================//
|
|
|
|
|
|
|
|
|
|
/*void(entity attacker) Check_PainInflictor =
|
|
|
|
|
{
|
|
|
|
|
if (self.health <= 0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
local entity real_attacker;
|
|
|
|
|
real_attacker = attacker;
|
|
|
|
|
|
|
|
|
|
if (!IsMonster(attacker) && attacker.classname!="player")
|
|
|
|
|
{
|
|
|
|
|
if (!IsMonster(atta
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
if (self.enemy!=self && self.enemy && self.enemy!=attacker && self.enemy!=attacker.owner)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
{
|
|
|
|
|
if (!visible(self.enemy))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};*/
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
void(entity player) SwitchToCamera =
|
|
|
|
|
{
|
|
|
|
|
if (player.classname!="player")
|
|
|
|
|
{
|
|
|
|
|
RPrint("OFTEN BUG REPORT: Object '");
|
|
|
|
|
RPrint(player.classname);
|
|
|
|
|
RPrint("' in SwitchToCamera()\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local entity camera;
|
|
|
|
|
local float done;
|
|
|
|
|
|
|
|
|
|
if (!player.has_camera)
|
|
|
|
|
return;
|
|
|
|
|
if (player.is_cameraviewing)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
// FIXME: no inair, no water, no moving, no haxxxoring, no building, no detpacking, no throwing a det,
|
|
|
|
|
// no feinginG? (special)
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
camera = find(NIL, classname, "building_camera");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
if (camera.real_owner == player)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
done = TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
while (!done)
|
|
|
|
|
{
|
|
|
|
|
camera = find(camera, classname, "building_camera");
|
|
|
|
|
if (camera.real_owner == player)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
done = TRUE;
|
2001-11-02 17:00:52 +00:00
|
|
|
|
if (!camera)
|
2001-07-23 20:52:47 +00:00
|
|
|
|
done = TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
2001-11-02 17:00:52 +00:00
|
|
|
|
if (!camera)
|
2001-07-17 05:58:10 +00:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
msg_entity = player;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
WriteByte(MSG_ONE, SVC_SETVIEWPORT);
|
|
|
|
|
WriteEntity(MSG_ONE, camera);
|
|
|
|
|
WriteByte(MSG_ONE, SVC_SETANGLES);
|
|
|
|
|
WriteAngle(MSG_ONE, camera.angles_x);
|
|
|
|
|
WriteAngle(MSG_ONE, camera.angles_y);
|
|
|
|
|
WriteAngle(MSG_ONE, camera.angles_z);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
//- OfN create the "fake" player image
|
|
|
|
|
newmis=spawn();
|
2001-07-23 20:52:47 +00:00
|
|
|
|
newmis.solid = SOLID_BBOX; //SOLID_BSP
|
|
|
|
|
newmis.movetype = MOVETYPE_NONE;
|
|
|
|
|
newmis.takedamage = DAMAGE_AIM;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
newmis.origin = player.origin;
|
|
|
|
|
newmis.angles = player.angles;
|
|
|
|
|
newmis.colormap = player.colormap;
|
|
|
|
|
newmis.skin = player.skin;
|
|
|
|
|
setmodel (newmis, "progs/player.mdl");
|
|
|
|
|
//setsize (newmis,????); // NEEDED?
|
|
|
|
|
//setorigin (newmis, newmis.origin); // NEEDED?
|
|
|
|
|
newmis.classname = "fake_player";
|
|
|
|
|
newmis.owner=player;
|
|
|
|
|
newmis.frame=player.frame;
|
|
|
|
|
|
|
|
|
|
newmis.th_pain = FakePain;
|
|
|
|
|
newmis.th_die = FakeDie;
|
|
|
|
|
|
|
|
|
|
newmis.max_health = 9999;
|
|
|
|
|
newmis.health = 9999;
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
//newmis.nextthink = time + HOLO_CYCLE_TIME;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
//newmis.think = HoloThink;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
//newmis.effects = EF_DIMLIGHT;
|
|
|
|
|
//player.ammo_cells = player.ammo_cells - HOLO_POWER_COST;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
player.fixangle = TRUE;
|
|
|
|
|
player.is_cameraviewing = TRUE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
player.t_s_h = player.weaponmodel; // FIXME: reloading<6E>?
|
|
|
|
|
player.weaponmodel= ""; // FIXME: reloading<6E>?
|
|
|
|
|
player.view_ofs = '0 0 0';
|
|
|
|
|
|
|
|
|
|
setorigin (player, camera.origin);
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
sprint(player, PRINT_HIGH, "Camera view activated.\n");
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void(entity player) SwitchFromCamera =
|
|
|
|
|
{
|
|
|
|
|
if (player.classname!="player")
|
|
|
|
|
{
|
|
|
|
|
RPrint("OFTEN BUG REPORT: Object '");
|
|
|
|
|
RPrint(player.classname);
|
|
|
|
|
RPrint("' in SwitchFromCamera()\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!player.has_camera)
|
|
|
|
|
return;
|
|
|
|
|
if (!player.is_cameraviewing)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
msg_entity = player;
|
2001-07-23 20:52:47 +00:00
|
|
|
|
WriteByte(MSG_ONE, SVC_SETVIEWPORT);
|
|
|
|
|
WriteEntity(MSG_ONE, player);
|
|
|
|
|
WriteByte(MSG_ONE, SVC_SETANGLES);
|
|
|
|
|
WriteAngle(MSG_ONE, player.angles_x);
|
|
|
|
|
WriteAngle(MSG_ONE, player.angles_y);
|
|
|
|
|
WriteAngle(MSG_ONE, player.angles_z);
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
player.fixangle = FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
|
|
|
|
|
player.weaponmodel = player.t_s_h; // FIXME: reloading<6E>?
|
|
|
|
|
player.view_ofs = '0 0 22';
|
|
|
|
|
|
2001-07-23 20:52:47 +00:00
|
|
|
|
player.is_cameraviewing = FALSE;
|
2001-07-17 05:58:10 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
2001-07-23 05:46:14 +00:00
|
|
|
|
// hola
|