mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +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
|
||||
{
|
||||
if ((a & 0xFFFF) >= 0)
|
||||
{
|
||||
short nTarget = a & 0xFFFF;
|
||||
|
||||
if (sprite[nTarget].statnum < 199) {
|
||||
if (nTarget > -1)
|
||||
{
|
||||
if (nTarget > -1 && sprite[nTarget].statnum < 199) {
|
||||
LionList[nLion].nTarget = nTarget;
|
||||
}
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ case_3:
|
|||
SpiderList[nSpider].nHealth -= nDamage;
|
||||
if (SpiderList[nSpider].nHealth > 0)
|
||||
{
|
||||
if (sprite[nTarget].statnum == 100)
|
||||
if (nTarget > -1 && sprite[nTarget].statnum == 100)
|
||||
{
|
||||
SpiderList[nSpider].nTarget = nTarget;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue