mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
game.c: factor out 2 inst. of dup. code into G_DoEventAnimSprites().
git-svn-id: https://svn.eduke32.com/eduke32@2892 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
27ebcc41b4
commit
0aec79ef8f
1 changed files with 13 additions and 14 deletions
|
@ -6061,6 +6061,16 @@ static int32_t adult_tile_p(int32_t pic)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
spriteext[tsprite[j].owner].tspr = &tsprite[j];
|
||||||
|
VM_OnEvent(EVENT_ANIMATESPRITES, tsprite[j].owner, myconnectindex, -1, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if 0 // def _MSC_VER
|
#if 0 // def _MSC_VER
|
||||||
// Visual C thought this was a bit too hard to optimise so we'd better
|
// Visual C thought this was a bit too hard to optimise so we'd better
|
||||||
// tell it not to try... such a pussy it is.
|
// tell it not to try... such a pussy it is.
|
||||||
|
@ -6887,25 +6897,14 @@ skip:
|
||||||
if (apScriptGameEvent[EVENT_ANIMATESPRITES])
|
if (apScriptGameEvent[EVENT_ANIMATESPRITES])
|
||||||
{
|
{
|
||||||
j = spritesortcnt-1;
|
j = spritesortcnt-1;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
G_DoEventAnimSprites(j);
|
||||||
if (display_mirror) tsprite[j].statnum = TSPR_MIRROR;
|
|
||||||
if (tsprite[j].owner < MAXSPRITES && tsprite[j].owner >= 0 && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS)
|
|
||||||
{
|
|
||||||
spriteext[tsprite[j].owner].tspr = (spritetype *)&tsprite[j];
|
|
||||||
VM_OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (j--);
|
while (j--);
|
||||||
|
|
||||||
if (j < 0) return;
|
if (j < 0) return;
|
||||||
|
|
||||||
if (display_mirror) tsprite[j].statnum = TSPR_MIRROR;
|
G_DoEventAnimSprites(j);
|
||||||
if (tsprite[j].owner >= 0 && tsprite[j].owner < MAXSPRITES && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS)
|
|
||||||
{
|
|
||||||
spriteext[tsprite[j].owner].tspr = (spritetype *)&tsprite[j];
|
|
||||||
VM_OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0 // def _MSC_VER
|
#if 0 // def _MSC_VER
|
||||||
|
|
Loading…
Reference in a new issue