mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +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 );
|
||||
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