mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
Add another invalid target sprite index check for Spider (and made the lion check more consistent to other code)
This commit is contained in:
parent
66e3a53991
commit
a7e09febe4
2 changed files with 5 additions and 5 deletions
|
@ -186,12 +186,12 @@ void FuncLion(int a, int nDamage, int nRun)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if ((a & 0xFFFF) >= 0)
|
|
||||||
{
|
{
|
||||||
short nTarget = a & 0xFFFF;
|
short nTarget = a & 0xFFFF;
|
||||||
|
|
||||||
if (sprite[nTarget].statnum < 199) {
|
if (nTarget > -1)
|
||||||
|
{
|
||||||
|
if (nTarget > -1 && sprite[nTarget].statnum < 199) {
|
||||||
LionList[nLion].nTarget = nTarget;
|
LionList[nLion].nTarget = nTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -400,7 +400,7 @@ case_3:
|
||||||
SpiderList[nSpider].nHealth -= nDamage;
|
SpiderList[nSpider].nHealth -= nDamage;
|
||||||
if (SpiderList[nSpider].nHealth > 0)
|
if (SpiderList[nSpider].nHealth > 0)
|
||||||
{
|
{
|
||||||
if (sprite[nTarget].statnum == 100)
|
if (nTarget > -1 && sprite[nTarget].statnum == 100)
|
||||||
{
|
{
|
||||||
SpiderList[nSpider].nTarget = nTarget;
|
SpiderList[nSpider].nTarget = nTarget;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue