mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Possibly fix crashes when targeting more than 8 enemies
This commit is contained in:
parent
fab3191974
commit
fd6ec29065
2 changed files with 6 additions and 2 deletions
|
@ -12,7 +12,8 @@ Version 1.2
|
|||
* Fix TR1 bear various original AI issues.
|
||||
* Fix TR2 knife thrower AI.
|
||||
* Fix TR2 doberman crashing the game when killed by explosive weapons.
|
||||
* Fix exploding enemies sometimes crashing the game.
|
||||
* Fix random crashes when killing exploding enemies.
|
||||
* Fix random crashes in battle with more than 8 enemies.
|
||||
* Fix volume change in settings not affecting voice track.
|
||||
* Fix several lighting bugs.
|
||||
* Fix double drawing additive faces.
|
||||
|
|
|
@ -927,8 +927,11 @@ void FindNewTarget(ItemInfo& laraItem, const WeaponInfo& weaponInfo)
|
|||
orient.x <= weaponInfo.LockOrientConstraint.second.x &&
|
||||
orient.y <= weaponInfo.LockOrientConstraint.second.y)
|
||||
{
|
||||
if (targetCount >= player.TARGET_COUNT_MAX - 1)
|
||||
break;
|
||||
|
||||
player.TargetList[targetCount] = &item;
|
||||
++targetCount;
|
||||
targetCount++;
|
||||
|
||||
if (distance < closestDistance &&
|
||||
abs(orient.y) < (closestHeadingAngle + ANGLE(15.0f)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue