mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Added: Ctrl+Shift+E now fill LBE items in sector with other items and places them in vehicles first.
Added: Right-Click on remove attachments button on sector inventory screen will not empty LBE items in sector Changed: SLAY_STAYS_FOREVER disables Slay's hourly chance to leave when unattended Added: SLAY_HOURLY_CHANCE_TO_LEAVE setting to Ja2_Options.ini Fixed: a bunch of array index out of bounds bugs Fixed: a bunch of typos in if contitions Fixed: BuildListFile() function loading items from index 1 instead 0 Added translation: Polish text for some map inventory screen items Added translation: English texts for new functionality for other language files Cleaned up some old TODOs git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8404 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+15
-11
@@ -156,10 +156,10 @@ void CreateLBE (OBJECTTYPE* pObj, UINT8 ubID, int numSubPockets)
|
||||
(*pObj)[0]->data.lbe.uniqueID = uniqueID;
|
||||
}
|
||||
|
||||
bool DestroyLBEIfEmpty(OBJECTTYPE* pObj)
|
||||
bool DestroyLBEIfEmpty(OBJECTTYPE* pObj, int stackIndex)
|
||||
{
|
||||
if (pObj->IsActiveLBE(0) == true) {
|
||||
LBENODE* pLBE = pObj->GetLBEPointer(0);
|
||||
if (pObj->IsActiveLBE(stackIndex) == true) {
|
||||
LBENODE* pLBE = pObj->GetLBEPointer(stackIndex);
|
||||
if (pLBE)
|
||||
{
|
||||
UINT16 plbesize = pLBE->inv.size();
|
||||
@@ -174,19 +174,19 @@ bool DestroyLBEIfEmpty(OBJECTTYPE* pObj)
|
||||
break;
|
||||
}
|
||||
}
|
||||
(*pObj)[0]->data.lbe.uniqueID = 0;
|
||||
(*pObj)[0]->data.lbe.bLBE = 0;
|
||||
(*pObj)[stackIndex]->data.lbe.uniqueID = 0;
|
||||
(*pObj)[stackIndex]->data.lbe.bLBE = 0;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void DestroyLBE(OBJECTTYPE* pObj)
|
||||
void DestroyLBE(OBJECTTYPE* pObj, int stackIndex)
|
||||
{
|
||||
if(pObj->IsActiveLBE(0) == true)
|
||||
if(pObj->IsActiveLBE(stackIndex) == true)
|
||||
{
|
||||
LBENODE* pLBE = pObj->GetLBEPointer(0);
|
||||
LBENODE* pLBE = pObj->GetLBEPointer(stackIndex);
|
||||
if(pLBE)
|
||||
{
|
||||
UINT16 plbesize = pLBE->inv.size();
|
||||
@@ -206,8 +206,8 @@ void DestroyLBE(OBJECTTYPE* pObj)
|
||||
}
|
||||
}
|
||||
|
||||
(*pObj)[0]->data.lbe.uniqueID = 0;
|
||||
(*pObj)[0]->data.lbe.bLBE = 0;
|
||||
(*pObj)[stackIndex]->data.lbe.uniqueID = 0;
|
||||
(*pObj)[stackIndex]->data.lbe.bLBE = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1009,7 +1009,11 @@ OBJECTTYPE* StackedObjectData::GetAttachmentAtIndex(UINT8 index)
|
||||
}
|
||||
|
||||
if (iter != attachments.end()) {
|
||||
return &(*iter);
|
||||
OBJECTTYPE * attachment = &(*iter);
|
||||
if (attachment->usItem > 0 && (attachment->ubNumberOfObjects != 1 || attachment->usItem > MAXITEMS || attachment->ubMission != 0) ) {
|
||||
__debugbreak();
|
||||
}
|
||||
return attachment;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user