mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
actors.cpp: improve SE_11_SWINGING_DOOR detection and handling of players that block a door's path
git-svn-id: https://svn.eduke32.com/eduke32@6893 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7c7b8f62a9
commit
712646f713
1 changed files with 14 additions and 7 deletions
|
@ -6649,23 +6649,30 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
&& clipinsidebox((vec2_t *)&sprite[k], j, 256) == 1)
|
&& clipinsidebox((vec2_t *)&sprite[k], j, 256) == 1)
|
||||||
goto next_sprite;
|
goto next_sprite;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
l = (SP(spriteNum) >> 3) * pData[3];
|
||||||
|
pData[2] += l;
|
||||||
|
pData[4] += l;
|
||||||
|
A_MoveSector(spriteNum);
|
||||||
|
setsprite(spriteNum, (vec3_t *)pSprite);
|
||||||
|
|
||||||
|
for (j=pSector->wallptr; j<endWall; j++)
|
||||||
|
{
|
||||||
for (SPRITES_OF(STAT_PLAYER, k))
|
for (SPRITES_OF(STAT_PLAYER, k))
|
||||||
{
|
{
|
||||||
if (sprite[k].owner >= 0 && clipinsidebox((vec2_t *)&sprite[k], j, pPlayer->clipdist + 40) == 1)
|
if (sprite[k].owner >= 0 && clipinsidebox((vec2_t *)&sprite[k], j, pPlayer->clipdist))
|
||||||
{
|
{
|
||||||
pData[5] = 8; // Delay
|
pData[5] = 8; // Delay
|
||||||
|
pData[2] -= l;
|
||||||
|
pData[4] -= l;
|
||||||
|
A_MoveSector(spriteNum);
|
||||||
|
setsprite(spriteNum, (vec3_t *)pSprite);
|
||||||
goto next_sprite;
|
goto next_sprite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
k = (SP(spriteNum) >> 3) * pData[3];
|
|
||||||
pData[2] += k;
|
|
||||||
pData[4] += k;
|
|
||||||
A_MoveSector(spriteNum);
|
|
||||||
setsprite(spriteNum, (vec3_t *)pSprite);
|
|
||||||
|
|
||||||
if (pData[4] <= -511 || pData[4] >= 512)
|
if (pData[4] <= -511 || pData[4] >= 512)
|
||||||
{
|
{
|
||||||
pData[4] = 0;
|
pData[4] = 0;
|
||||||
|
|
Loading…
Reference in a new issue