mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Don't set spriteext[].tspr when creating tsprites from the engine.
Its only use is to have a actor -> tsprite mapping for the EVENT_ANIMATESPRITE event and .tspr will be set before it is run. git-svn-id: https://svn.eduke32.com/eduke32@3448 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
294f97a004
commit
14e97b2a57
2 changed files with 9 additions and 7 deletions
|
@ -814,7 +814,6 @@ static void yax_copytsprites()
|
|||
break;
|
||||
|
||||
Bmemcpy(&tsprite[spritesortcnt], spr, sizeof(spritetype));
|
||||
spriteext[spritenum].tspr = &tsprite[spritesortcnt];
|
||||
tsprite[spritesortcnt].owner = spritenum;
|
||||
|
||||
tsprite[spritesortcnt].sectnum = sectnum; // potentially tweak sectnum!
|
||||
|
@ -2435,8 +2434,7 @@ int32_t engine_addtsprite(int16_t z, int16_t sectnum)
|
|||
if (spritesortcnt >= MAXSPRITESONSCREEN)
|
||||
return 1;
|
||||
|
||||
copybufbyte(spr,&tsprite[spritesortcnt],sizeof(spritetype));
|
||||
spriteext[z].tspr = (spritetype *)&tsprite[spritesortcnt];
|
||||
Bmemcpy(&tsprite[spritesortcnt], spr, sizeof(spritetype));
|
||||
tsprite[spritesortcnt++].owner = z;
|
||||
|
||||
#ifdef YAX_ENABLE
|
||||
|
|
|
@ -6223,11 +6223,15 @@ static int32_t G_CheckAdultTile(int32_t pic)
|
|||
|
||||
static void G_DoEventAnimSprites(int32_t j)
|
||||
{
|
||||
if (display_mirror) tsprite[j].statnum = TSPR_MIRROR;
|
||||
if ((unsigned)tsprite[j].owner < MAXSPRITES && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS)
|
||||
const int32_t ow = tsprite[j].owner;
|
||||
|
||||
if (display_mirror)
|
||||
tsprite[j].statnum = TSPR_MIRROR;
|
||||
|
||||
if ((unsigned)ow < MAXSPRITES && spriteext[ow].flags & SPREXT_TSPRACCESS)
|
||||
{
|
||||
spriteext[tsprite[j].owner].tspr = &tsprite[j];
|
||||
VM_OnEvent(EVENT_ANIMATESPRITES, tsprite[j].owner, myconnectindex, -1, 0);
|
||||
spriteext[ow].tspr = &tsprite[j];
|
||||
VM_OnEvent(EVENT_ANIMATESPRITES, ow, myconnectindex, -1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue