mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
LOBOT: enemies wear backpacks properly
If an enemy soldier gets a backpack when randomly generated, put it into the backpack inventory slot instead of a generic inventory slot.
This commit is contained in:
@@ -2264,7 +2264,15 @@ void ChooseLBEsForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bLBEClass
|
|||||||
{
|
{
|
||||||
CreateItem( usItem, (INT8)(80 + Random( 21 )), &gTempObject );
|
CreateItem( usItem, (INT8)(80 + Random( 21 )), &gTempObject );
|
||||||
gTempObject.fFlags |= OBJECT_UNDROPPABLE;
|
gTempObject.fFlags |= OBJECT_UNDROPPABLE;
|
||||||
PlaceObjectInSoldierCreateStruct( pp, &gTempObject );
|
// put backpacks into the backpack slot for LOBOT
|
||||||
|
if ((UsingNewInventorySystem()) && (Item[usItem].usItemClass & IC_LBEGEAR) && (LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass == BACKPACK))
|
||||||
|
{
|
||||||
|
pp->Inv[BPACKPOCKPOS] = gTempObject;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PlaceObjectInSoldierCreateStruct( pp, &gTempObject );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user