1
0
Fork 0
forked from fte/fteqw

try to be more verbose with null functions called from the engine.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4652 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2014-05-10 16:37:53 +00:00
parent 589b09ae1d
commit 6cc33d7d08
4 changed files with 13 additions and 3 deletions

View file

@ -5025,7 +5025,10 @@ void CSQC_Event_Think(world_t *w, wedict_t *s)
*csqcg.other = EDICT_TO_PROG(w->progs, (edict_t*)w->edicts);
*csqcg.simtime = w->physicstime;
PR_ExecuteProgram (w->progs, s->v->think);
if (!s->v->think)
Con_Printf("CSQC entity \"%s\" has nextthink with no think function\n", PR_GetString(w->progs, s->v->classname));
else
PR_ExecuteProgram (w->progs, s->v->think);
}
void CSQC_Event_Sound (float *origin, wedict_t *wentity, int channel, char *sample, int volume, float attenuation, int pitchadj)

View file

@ -1365,7 +1365,11 @@ void PDECL PR_ExecuteProgram (pubprogfuncs_t *ppf, func_t fnum)
{
// if (pr_global_struct->self)
// ED_Print (PROG_TO_EDICT(pr_global_struct->self));
#ifdef __GNUC__
printf("PR_ExecuteProgram: NULL function from exe (address %p)\n", __builtin_return_address(0));
#else
printf("PR_ExecuteProgram: NULL function from exe\n");
#endif
// Host_Error ("PR_ExecuteProgram: NULL function from exe");
// PR_MoveParms(0, pr_typecurrent);

View file

@ -533,7 +533,10 @@ void SVPR_Event_Think(world_t *w, wedict_t *s)
{
pr_global_struct->self = EDICT_TO_PROG(w->progs, s);
pr_global_struct->other = EDICT_TO_PROG(w->progs, w->edicts);
PR_ExecuteProgram (w->progs, s->v->think);
if (!s->v->think)
Con_Printf("SSQC entity \"%s\" has nextthink with no think function\n", PR_GetString(w->progs, s->v->classname));
else
PR_ExecuteProgram (w->progs, s->v->think);
}
qboolean SVPR_Event_ContentsTransition(world_t *w, wedict_t *ent, int oldwatertype, int newwatertype)

View file

@ -1716,7 +1716,7 @@ void SV_Begin_Core(client_t *split)
{
eval_t *eval, *eval2;
eval = PR_FindGlobal(svprogfuncs, "ClientReEnter", 0, NULL);
if (eval && split->spawninfo)
if (eval && eval->function && split->spawninfo)
{
globalvars_t *pr_globals = PR_globals(svprogfuncs, PR_CURRENT);
int j;