mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix incorrect variables
ubImprintID uses SOLDIERTYPE->ubProfile, not SOLDIERTYPE->ubID in every other instance of the code. This one's clearly a mistake.
This commit is contained in:
@@ -1988,7 +1988,7 @@ INT8 SearchForItems( SOLDIERTYPE * pSoldier, INT8 bReason, UINT16 usItem )
|
|||||||
if ( pItem->usItemClass == IC_GUN && (*pObj)[0]->data.objectStatus >= MINIMUM_REQUIRED_STATUS )
|
if ( pItem->usItemClass == IC_GUN && (*pObj)[0]->data.objectStatus >= MINIMUM_REQUIRED_STATUS )
|
||||||
{
|
{
|
||||||
// maybe this gun has ammo (adjust for whether it is better than ours!)
|
// maybe this gun has ammo (adjust for whether it is better than ours!)
|
||||||
if ( (*pObj)[0]->data.gun.bGunAmmoStatus < 0 || (*pObj)[0]->data.gun.ubGunShotsLeft == 0 || (ItemHasFingerPrintID(pObj->usItem) && (*pObj)[0]->data.ubImprintID != NOBODY && (*pObj)[0]->data.ubImprintID != pSoldier->ubID) )
|
if ( (*pObj)[0]->data.gun.bGunAmmoStatus < 0 || (*pObj)[0]->data.gun.ubGunShotsLeft == 0 || (ItemHasFingerPrintID(pObj->usItem) && (*pObj)[0]->data.ubImprintID != NO_PROFILE && (*pObj)[0]->data.ubImprintID != pSoldier->ubProfile) )
|
||||||
{
|
{
|
||||||
iTempValue = 0;
|
iTempValue = 0;
|
||||||
}
|
}
|
||||||
@@ -2029,7 +2029,7 @@ INT8 SearchForItems( SOLDIERTYPE * pSoldier, INT8 bReason, UINT16 usItem )
|
|||||||
if (pItem->usItemClass & IC_WEAPON && (*pObj)[0]->data.objectStatus >= MINIMUM_REQUIRED_STATUS )
|
if (pItem->usItemClass & IC_WEAPON && (*pObj)[0]->data.objectStatus >= MINIMUM_REQUIRED_STATUS )
|
||||||
{
|
{
|
||||||
DebugAI(AI_MSG_INFO, pSoldier, String("weapon has good status"));
|
DebugAI(AI_MSG_INFO, pSoldier, String("weapon has good status"));
|
||||||
if ( (pItem->usItemClass & IC_GUN) && ((*pObj)[0]->data.gun.bGunAmmoStatus < 0 || (*pObj)[0]->data.gun.ubGunShotsLeft == 0 || (ItemHasFingerPrintID(pObj->usItem) && (*pObj)[0]->data.ubImprintID != NOBODY && (*pObj)[0]->data.ubImprintID != pSoldier->ubID) ) )
|
if ( (pItem->usItemClass & IC_GUN) && ((*pObj)[0]->data.gun.bGunAmmoStatus < 0 || (*pObj)[0]->data.gun.ubGunShotsLeft == 0 || (ItemHasFingerPrintID(pObj->usItem) && (*pObj)[0]->data.ubImprintID != NO_PROFILE && (*pObj)[0]->data.ubImprintID != pSoldier->ubProfile) ) )
|
||||||
{
|
{
|
||||||
// jammed or out of ammo, skip it!
|
// jammed or out of ammo, skip it!
|
||||||
DebugAI(AI_MSG_INFO, pSoldier, String("jammed or out of ammo, skip it!"));
|
DebugAI(AI_MSG_INFO, pSoldier, String("jammed or out of ammo, skip it!"));
|
||||||
@@ -2080,7 +2080,7 @@ INT8 SearchForItems( SOLDIERTYPE * pSoldier, INT8 bReason, UINT16 usItem )
|
|||||||
if ( pItem->usItemClass & IC_WEAPON && (*pObj)[0]->data.objectStatus >= MINIMUM_REQUIRED_STATUS )
|
if ( pItem->usItemClass & IC_WEAPON && (*pObj)[0]->data.objectStatus >= MINIMUM_REQUIRED_STATUS )
|
||||||
{
|
{
|
||||||
DebugAI(AI_MSG_INFO, pSoldier, String("gun has good status"));
|
DebugAI(AI_MSG_INFO, pSoldier, String("gun has good status"));
|
||||||
if ( (pItem->usItemClass & IC_GUN) && ((*pObj)[0]->data.gun.bGunAmmoStatus < 0 || (*pObj)[0]->data.gun.ubGunShotsLeft == 0 || (ItemHasFingerPrintID(pObj->usItem) && (*pObj)[0]->data.ubImprintID != NOBODY && (*pObj)[0]->data.ubImprintID != pSoldier->ubID) ) )
|
if ( (pItem->usItemClass & IC_GUN) && ((*pObj)[0]->data.gun.bGunAmmoStatus < 0 || (*pObj)[0]->data.gun.ubGunShotsLeft == 0 || (ItemHasFingerPrintID(pObj->usItem) && (*pObj)[0]->data.ubImprintID != NO_PROFILE && (*pObj)[0]->data.ubImprintID != pSoldier->ubProfile) ) )
|
||||||
{
|
{
|
||||||
// jammed or out of ammo, skip it!
|
// jammed or out of ammo, skip it!
|
||||||
DebugAI(AI_MSG_INFO, pSoldier, String("jammed or out of ammo, skip it!"));
|
DebugAI(AI_MSG_INFO, pSoldier, String("jammed or out of ammo, skip it!"));
|
||||||
|
|||||||
Reference in New Issue
Block a user