Fix ghost hitlist causing zone errors (closes #118)
Beware the wrath of PU_LEVEL
This commit is contained in:
parent
0362a0dff4
commit
fd65151d50
1 changed files with 2 additions and 1 deletions
|
|
@ -1466,7 +1466,7 @@ void G_GhostAddHit(INT32 playernum, mobj_t *victim)
|
|||
return;
|
||||
ghostext[playernum].flags |= EZT_HIT;
|
||||
ghostext[playernum].hits++;
|
||||
ghostext[playernum].hitlist = Z_Realloc(ghostext[playernum].hitlist, ghostext[playernum].hits * sizeof(mobj_t *), PU_LEVEL, &ghostext[playernum].hitlist);
|
||||
Z_Realloc(ghostext[playernum].hitlist, ghostext[playernum].hits * sizeof(mobj_t *), PU_STATIC, &ghostext[playernum].hitlist);
|
||||
P_SetTarget(ghostext[playernum].hitlist + (ghostext[playernum].hits-1), victim);
|
||||
}
|
||||
|
||||
|
|
@ -1648,6 +1648,7 @@ void G_WriteGhostTic(mobj_t *ghost, INT32 playernum)
|
|||
WRITEANGLE(demobuf.p,mo->angle);
|
||||
P_SetTarget(ghostext[playernum].hitlist+i, NULL);
|
||||
}
|
||||
Z_Free(ghostext[playernum].hitlist);
|
||||
ghostext[playernum].hits = 0;
|
||||
}
|
||||
if (ghostext[playernum].flags & EZT_SPRITE)
|
||||
|
|
|
|||
Loading…
Reference in a new issue