Fix for CheckSpawn, so that self is now always valid. (wasn't before)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@397 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2a9d845acd
commit
586900f0c9
1 changed files with 5 additions and 3 deletions
|
@ -1875,6 +1875,8 @@ int LoadEnts(progfuncs_t *progfuncs, char *file, float killonspawnflags)
|
|||
}
|
||||
else
|
||||
{
|
||||
eval_t *selfvar;
|
||||
|
||||
//added by request of Mercury.
|
||||
if (fulldata) //this is a vital part of HL map support!!!
|
||||
{ //essentually, it passes the ent's spawn info to the ent.
|
||||
|
@ -1889,12 +1891,12 @@ int LoadEnts(progfuncs_t *progfuncs, char *file, float killonspawnflags)
|
|||
fulldata->string = spawndata - progfuncs->stringtable;
|
||||
}
|
||||
|
||||
selfvar = (eval_t *)((int *)pr_globals + ED_FindGlobalOfs(progfuncs, "self"));
|
||||
selfvar->edict = EDICT_TO_PROG(ed);
|
||||
|
||||
f = PR_FindFunc(progfuncs, var->string+progfuncs->stringtable, -2);
|
||||
if (f)
|
||||
{
|
||||
eval_t *selfvar;
|
||||
selfvar = (eval_t *)((int *)pr_globals + ED_FindGlobalOfs(progfuncs, "self"));
|
||||
selfvar->edict = EDICT_TO_PROG(ed);
|
||||
if (CheckSpawn)
|
||||
{
|
||||
G_INT(OFS_PARM0) = f;
|
||||
|
|
Loading…
Reference in a new issue