Getting rid of the trap_RQ3AdjustAreaPortalState debug function

This commit is contained in:
Richard Allen 2011-07-14 18:43:32 +00:00
parent 4c859d1acd
commit 3505b12514
3 changed files with 9 additions and 33 deletions

View file

@ -1304,9 +1304,6 @@ void QDECL G_Error(const char *fmt, ...);
//Elder: added //Elder: added
void RQ3_StartUniqueItems(void); void RQ3_StartUniqueItems(void);
// JBravo: added
void trap_RQ3AdjustAreaPortalState(gentity_t *ent, qboolean open, int line, char *file);
// aasimon: init stuff // aasimon: init stuff
void RQ3_ReadInitFile(void); void RQ3_ReadInitFile(void);
void RQ3_ParseBuffer(char *buf, int len); void RQ3_ParseBuffer(char *buf, int len);

View file

@ -829,27 +829,6 @@ void QDECL G_Error(const char *fmt, ...)
trap_Error(text); trap_Error(text);
} }
void trap_RQ3AdjustAreaPortalState(gentity_t *ent, qboolean open, int line, char *file)
{
if (ent == NULL) {
trap_SendServerCommand(-1, va("print \"^1trap_AdjustAreaPortalState got called with a NULL ent from line %d of file %s. PLEASE report this to the RQ3 team\n\"", line, file));
G_Printf("^1trap_RQ3AdjustAreaPortalState got called with a NULL ent from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file);
G_LogPrintf("trap_RQ3AdjustAreaPortalState got called with a NULL ent from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file);
}
if (ent-g_entities < 0 || ent-g_entities > level.num_entities) {
trap_SendServerCommand(-1, va("print \"^1trap_AdjustAreaPortalState got called with a unaligned ent from line %d of file %s. PLEASE report this to the RQ3 team\n\"", line, file));
G_Printf("^1trap_RQ3AdjustAreaPortalState got called with a unaligned ent from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file);
G_LogPrintf("trap_RQ3AdjustAreaPortalState got called with a unaligned ent from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file);
}
if (ent->s.number <0 || ent->s.number > level.num_entities) {
trap_SendServerCommand(-1, va("print \"^1trap_AdjustAreaPortalState got called with s.number outof range from line %d of file %s. PLEASE report this to the RQ3 team\n\"", line, file));
G_Printf("^1trap_RQ3AdjustAreaPortalState got called with s.number outof range from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file);
G_LogPrintf("trap_RQ3AdjustAreaPortalState got called with s.number outof range from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file);
}
trap_AdjustAreaPortalState(ent, open);
}
/* /*
================ ================
G_FindTeams G_FindTeams

View file

@ -888,7 +888,7 @@ void Reached_BinaryMover(gentity_t * ent)
} }
// close areaportals // close areaportals
if (ent->teammaster == ent || !ent->teammaster) { if (ent->teammaster == ent || !ent->teammaster) {
trap_RQ3AdjustAreaPortalState(ent, qfalse, __LINE__, __FILE__); trap_AdjustAreaPortalState(ent, qfalse);
} }
} else if (ent->moverState == ROTATOR_1TO2) { // Reaction } else if (ent->moverState == ROTATOR_1TO2) { // Reaction
@ -927,7 +927,7 @@ void Reached_BinaryMover(gentity_t * ent)
} }
// close areaportals // close areaportals
if (ent->teammaster == ent || !ent->teammaster) { if (ent->teammaster == ent || !ent->teammaster) {
trap_RQ3AdjustAreaPortalState(ent, qfalse, __LINE__, __FILE__); trap_AdjustAreaPortalState(ent, qfalse);
} }
} else { } else {
G_Error("Reached_BinaryMover: bad moverState"); G_Error("Reached_BinaryMover: bad moverState");
@ -1058,7 +1058,7 @@ void Use_BinaryMover(gentity_t * ent, gentity_t * other, gentity_t * activator)
// open areaportal // open areaportal
if (ent->teammaster == ent || !ent->teammaster) { if (ent->teammaster == ent || !ent->teammaster) {
trap_RQ3AdjustAreaPortalState(ent, qtrue, __LINE__, __FILE__); trap_AdjustAreaPortalState(ent, qtrue);
} }
return; return;
} }
@ -1134,7 +1134,7 @@ void Use_BinaryMover(gentity_t * ent, gentity_t * other, gentity_t * activator)
// open areaportal // open areaportal
if (ent->teammaster == ent || !ent->teammaster) { if (ent->teammaster == ent || !ent->teammaster) {
trap_RQ3AdjustAreaPortalState(ent, qtrue, __LINE__, __FILE__); trap_AdjustAreaPortalState(ent, qtrue);
} }
return; return;
} }
@ -1566,7 +1566,7 @@ void reset_door(gentity_t *ent)
SetMoverState(ent, ROTATOR_POS1, level.time); SetMoverState(ent, ROTATOR_POS1, level.time);
//Elder: open areaportals for start_open doors //Elder: open areaportals for start_open doors
if ((ent->spawnflags & 1) == 1 && (ent->teammaster == ent || !ent->teammaster)) { if ((ent->spawnflags & 1) == 1 && (ent->teammaster == ent || !ent->teammaster)) {
trap_RQ3AdjustAreaPortalState(ent, qtrue, __LINE__, __FILE__); trap_AdjustAreaPortalState(ent, qtrue);
} }
} }
@ -1728,7 +1728,7 @@ void SP_func_door(gentity_t * ent)
} }
//Elder: open areaportals for start_open doors //Elder: open areaportals for start_open doors
if ((ent->spawnflags & 1) == 1 && (ent->teammaster == ent || !ent->teammaster)) { if ((ent->spawnflags & 1) == 1 && (ent->teammaster == ent || !ent->teammaster)) {
trap_RQ3AdjustAreaPortalState(ent, qtrue, __LINE__, __FILE__); trap_AdjustAreaPortalState(ent, qtrue);
} }
//Makro - added //Makro - added
@ -1893,7 +1893,7 @@ void SP_func_door_rotating(gentity_t * ent)
//Makro - copied from func_door //Makro - copied from func_door
//Elder: open areaportals for start_open doors //Elder: open areaportals for start_open doors
if ((ent->spawnflags & 1) == 1 && (ent->teammaster == ent || !ent->teammaster)) { if ((ent->spawnflags & 1) == 1 && (ent->teammaster == ent || !ent->teammaster)) {
trap_RQ3AdjustAreaPortalState(ent, qtrue, __LINE__, __FILE__); trap_AdjustAreaPortalState(ent, qtrue);
} }
//Makro - added //Makro - added
@ -2619,12 +2619,12 @@ void SetFuncStaticState(gentity_t *ent, qboolean state)
ent->s.eFlags &= ~EF_NODRAW; ent->s.eFlags &= ~EF_NODRAW;
ent->r.contents = CONTENTS_SOLID; ent->r.contents = CONTENTS_SOLID;
ent->r.svFlags &= ~SVF_NOCLIENT; ent->r.svFlags &= ~SVF_NOCLIENT;
//trap_RQ3AdjustAreaPortalState(ent, qtrue, __LINE__, __FILE__); //trap_AdjustAreaPortalState(ent, qtrue);
} else { } else {
ent->s.eFlags |= EF_NODRAW; ent->s.eFlags |= EF_NODRAW;
ent->r.contents = CONTENTS_TRIGGER; ent->r.contents = CONTENTS_TRIGGER;
ent->r.svFlags |= SVF_NOCLIENT; ent->r.svFlags |= SVF_NOCLIENT;
//trap_RQ3AdjustAreaPortalState(ent, qfalse, __LINE__, __FILE__); //trap_AdjustAreaPortalState(ent, qfalse);
} }
} }