mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Fixes issue with picnum 0 sprites used as map geometry
git-svn-id: https://svn.eduke32.com/eduke32@5933 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
55532bb571
commit
0bdbc463c0
1 changed files with 5 additions and 1 deletions
|
@ -8184,11 +8184,15 @@ void A_PlayAlertSound(int spriteNum)
|
||||||
int A_CheckSwitchTile(int spriteNum)
|
int A_CheckSwitchTile(int spriteNum)
|
||||||
{
|
{
|
||||||
// picnum 0 would oob in the switch below,
|
// picnum 0 would oob in the switch below,
|
||||||
|
|
||||||
|
if (PN(spriteNum) <= 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
// MULTISWITCH has 4 states so deal with it separately,
|
// MULTISWITCH has 4 states so deal with it separately,
|
||||||
// ACCESSSWITCH and ACCESSSWITCH2 are only active in one state so deal with
|
// ACCESSSWITCH and ACCESSSWITCH2 are only active in one state so deal with
|
||||||
// them separately.
|
// them separately.
|
||||||
|
|
||||||
if ((PN(spriteNum) <= 0) || (PN(spriteNum) >= MULTISWITCH && PN(spriteNum) <= MULTISWITCH + 3) || (PN(spriteNum) == ACCESSSWITCH || PN(spriteNum) == ACCESSSWITCH2))
|
if ((PN(spriteNum) >= MULTISWITCH && PN(spriteNum) <= MULTISWITCH + 3) || (PN(spriteNum) == ACCESSSWITCH || PN(spriteNum) == ACCESSSWITCH2))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Loop to catch both states of switches.
|
// Loop to catch both states of switches.
|
||||||
|
|
Loading…
Reference in a new issue