mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-10 07:11:51 +00:00
db4e96e70a
1) added checkmove forward so it's easier to build against walls 2) Can't build sentries on top of forcefields anymore (they get bounced off) 3) fieldgens are now one unit taller than their fields, so you CAN build on the gen 4) forcefields bounce everything (including buildings) away now. 5) added #ifdef DISALLOW_BLOCKED_TELE around tele block checks. didn't get the point Debug tweaks: 1) added #ifdef DEBUG, which enables RPrint(), dremove(), and printtrace(), as well as the warlock cheat and origin reporting. 2) replaced EVERY dprint with RPrint. 3) changed makefile so that all = no DEBUG and no .sym
81 lines
2.2 KiB
C++
81 lines
2.2 KiB
C++
/*
|
|
TeamFortress V2.1 22/12/96
|
|
|
|
TeamFortress Software
|
|
*/
|
|
|
|
#include "defs.qh"
|
|
|
|
float() CheckExistence;
|
|
entity(float gno) Findgoal;
|
|
|
|
//- OfN -
|
|
void (string msg) Real_RPrint;
|
|
void(entity who) MakeMeDebug;
|
|
|
|
//==============================================================
|
|
// A remove function which makes sure the entity hasn't already
|
|
// been removed, and that it isn't the NIL object.
|
|
void(entity te) dremove =
|
|
{
|
|
if (!te)
|
|
{
|
|
RPrint("***BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG***\n");
|
|
RPrint("WORLD has nearly been removed. Don't worry!\n");
|
|
RPrint("***BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG***\n");
|
|
return;
|
|
}
|
|
|
|
if (te.classname == "player") //- OfN -
|
|
{
|
|
RPrint("***BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG***\n");
|
|
RPrint("Player entity was going to be removed. Don't worry!\n");
|
|
RPrint("***BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG***\n");
|
|
return;
|
|
}
|
|
#if 0
|
|
if (te.is_removed == TRUE)
|
|
{
|
|
RPrint("***BUG BUG BUG BUG BUG BUG BUG***\n");
|
|
RPrint(" Entity has been removed twice. \n");
|
|
RPrint("***BUG BUG BUG BUG BUG BUG BUG***\n");
|
|
return;
|
|
}
|
|
#endif
|
|
|
|
te.is_removed = TRUE;
|
|
remove(te);
|
|
};
|
|
|
|
//==============================================================
|
|
// A command which just dumps your current location to the screen
|
|
|
|
//- OfN
|
|
// any client can remotely debug the server after using impulse 195 if "allow_debug" is set to 1
|
|
// and its and admin
|
|
// then RPrints will be sprinted to him also
|
|
// i coded this cause i dont have access to console in prozac server and wanted to see the dprints
|
|
// all the dprints in the code were replaced with RPrints
|
|
void (string msg) Real_RPrint =
|
|
{
|
|
dprint(msg);
|
|
|
|
if (!debug_target)
|
|
return;
|
|
|
|
sprint(debug_target,PRINT_HIGH,msg);
|
|
};
|
|
|
|
void (float oneline) printtrace =
|
|
{
|
|
local string sep = oneline ? " " : "\n";
|
|
RPrint ("allsolid: " + ftos (trace_allsolid) + sep);
|
|
RPrint ("startsolid: " + ftos (trace_startsolid) + sep);
|
|
RPrint ("fraction: " + ftos (trace_fraction) + sep);
|
|
RPrint ("endpos: " + vtos (trace_endpos) + sep);
|
|
RPrint ("plane_normal: " + vtos (trace_plane_normal) + sep);
|
|
RPrint ("plane_dist: " + ftos (trace_plane_dist) + sep);
|
|
RPrint ("ent: " + (trace_ent ? "yes" : "no") + sep);
|
|
RPrint ("inopen: " + ftos (trace_inopen) + sep);
|
|
RPrint ("inwater: " + ftos (trace_inwater) + "\n");
|
|
};
|