mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Feature improvement:
- If MILITIA_USE_SECTOR_EQUIPMENT is TRUE and you assign a merc to the 'MOVE ITEM' assignment, you can select wether gear that the militia can use should be ignored. - To prevent confusion, 'MOVE ITEM' has been renamed 'GETITEM'. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7517 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+21
-1
@@ -15409,4 +15409,24 @@ void AttachDefaultAttachments(OBJECTTYPE *pObj, BOOLEAN fAllDefaultAttachments)/
|
||||
pObj->AttachObject(NULL, &defaultAttachment, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: is this object useable by militia?
|
||||
BOOLEAN ObjectIsMilitiaRelevant( OBJECTTYPE *pObj )
|
||||
{
|
||||
if ( !pObj )
|
||||
return FALSE;
|
||||
|
||||
if ( gGameExternalOptions.fMilitiaUseSectorInventory )
|
||||
{
|
||||
if ( Item[pObj->usItem].usItemClass & IC_ARMOUR && gGameExternalOptions.fMilitiaUseSectorInventory_Armour ) return TRUE;
|
||||
if ( Item[pObj->usItem].usItemClass & IC_FACE && gGameExternalOptions.fMilitiaUseSectorInventory_Face ) return TRUE;
|
||||
if ( Item[pObj->usItem].usItemClass & (IC_BLADE | IC_PUNCH) && gGameExternalOptions.fMilitiaUseSectorInventory_Melee ) return TRUE;
|
||||
if ( Item[pObj->usItem].usItemClass & IC_GRENADE && gGameExternalOptions.fMilitiaUseSectorInventory_Grenade ) return TRUE;
|
||||
if ( Item[pObj->usItem].usItemClass & (IC_GUN | IC_AMMO) && gGameExternalOptions.fMilitiaUseSectorInventory_Gun ) return TRUE;
|
||||
if ( Item[pObj->usItem].usItemClass & IC_LAUNCHER && gGameExternalOptions.fMilitiaUseSectorInventory_Launcher ) return TRUE;
|
||||
if ( Item[pObj->usItem].usItemClass & IC_AMMO && gGameExternalOptions.fMilitiaUseSectorInventory_Ammo ) return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user