mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Bugfix that removes a rare CTD that can occur if a non-LBE item accidentally gets associated with a merc.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2077 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3624,7 +3624,11 @@ BOOLEAN ChangeDropPackStatus(SOLDIERTYPE *pSoldier, BOOLEAN newStatus)
|
|||||||
{
|
{
|
||||||
for(unsigned int wi = 0; wi < guiNumWorldItems; wi++)
|
for(unsigned int wi = 0; wi < guiNumWorldItems; wi++)
|
||||||
{
|
{
|
||||||
if(gWorldItems[wi].soldierID == pSoldier->ubID && gWorldItems[wi].object.exists() == true && LoadBearingEquipment[Item[gWorldItems[wi].object.usItem].ubClassIndex].lbeClass == BACKPACK)
|
//CHRISL: There's the remote chance that a non-LBE item might get associated with a merc. If that happens, we can
|
||||||
|
// have a CTD, so lets resolve that here.
|
||||||
|
if(Item[gWorldItems[wi].object.usItem].usItemClass != IC_LBEGEAR)
|
||||||
|
gWorldItems[wi].soldierID = -1;
|
||||||
|
if(gWorldItems[wi].soldierID == pSoldier->ubID && gWorldItems[wi].object.exists() == true && Item[gWorldItems[wi].object.usItem].usItemClass == IC_LBEGEAR && LoadBearingEquipment[Item[gWorldItems[wi].object.usItem].ubClassIndex].lbeClass == BACKPACK)
|
||||||
{
|
{
|
||||||
for (int x = 0; x < gWorldItems[wi].object.ubNumberOfObjects; ++x) {
|
for (int x = 0; x < gWorldItems[wi].object.ubNumberOfObjects; ++x) {
|
||||||
// Is the item we dropped in this sector and does it have an active LBENODE flag?
|
// Is the item we dropped in this sector and does it have an active LBENODE flag?
|
||||||
|
|||||||
Reference in New Issue
Block a user