mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Fix issue where swingdoors would refuse to open or close if an enemy was in front of the door in an overlapping but unrelated/disjoint sector
git-svn-id: https://svn.eduke32.com/eduke32@7473 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f7f62c4466
commit
0bfde1c4d3
3 changed files with 8 additions and 5 deletions
|
@ -88,6 +88,8 @@ extern int16_t clipsectorlist[MAXCLIPSECTORS], origclipsectorlist[MAXCLIPSECTORS
|
||||||
int clipinsidebox(vec2_t *vect, int wallnum, int walldist);
|
int clipinsidebox(vec2_t *vect, int wallnum, int walldist);
|
||||||
int clipinsideboxline(int x, int y, int x1, int y1, int x2, int y2, int walldist);
|
int clipinsideboxline(int x, int y, int x1, int y1, int x2, int y2, int walldist);
|
||||||
|
|
||||||
|
int sectoradjacent(int sect1, int sect2);
|
||||||
|
|
||||||
extern int32_t clipmoveboxtracenum;
|
extern int32_t clipmoveboxtracenum;
|
||||||
|
|
||||||
int32_t clipmove(vec3_t *pos, int16_t *sectnum, int32_t xvect, int32_t yvect, int32_t walldist, int32_t ceildist,
|
int32_t clipmove(vec3_t *pos, int16_t *sectnum, int32_t xvect, int32_t yvect, int32_t walldist, int32_t ceildist,
|
||||||
|
|
|
@ -909,8 +909,7 @@ static int32_t get_floorspr_clipyou(int32_t x1, int32_t x2, int32_t x3, int32_t
|
||||||
return clipyou;
|
return clipyou;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
int sectoradjacent(int sect1, int sect2)
|
||||||
static int sectoradjacent(int sect1, int sect2)
|
|
||||||
{
|
{
|
||||||
if (sector[sect1].wallnum > sector[sect2].wallnum)
|
if (sector[sect1].wallnum > sector[sect2].wallnum)
|
||||||
swaplong(§1, §2);
|
swaplong(§1, §2);
|
||||||
|
@ -921,7 +920,6 @@ static int sectoradjacent(int sect1, int sect2)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// clipmove
|
// clipmove
|
||||||
|
|
|
@ -6676,8 +6676,11 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
{
|
{
|
||||||
for (SPRITES_OF(STAT_ACTOR, k))
|
for (SPRITES_OF(STAT_ACTOR, k))
|
||||||
{
|
{
|
||||||
if (sprite[k].extra > 0 && A_CheckEnemySprite(&sprite[k])
|
if (sprite[k].extra > 0 &&
|
||||||
&& clipinsidebox((vec2_t *)&sprite[k], j, 256) == 1)
|
(pSprite->sectnum == sprite[k].sectnum ||
|
||||||
|
sectoradjacent(pSprite->sectnum, sprite[k].sectnum)) &&
|
||||||
|
A_CheckEnemySprite(&sprite[k]) &&
|
||||||
|
clipinsidebox((vec2_t *)&sprite[k], j, 256) == 1)
|
||||||
goto next_sprite;
|
goto next_sprite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue