mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
When checking if a gun barrel extender should be damaged and fall off the game will not use item ID GUN_BARREL_EXTENDER anymore because that was tied to item 310.
Instead the game will now use the attachment class AC_EXTENDER. With this we can have more extenders that can be damaged and fall off and also other extenders that are not damaged by shooting. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6438 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1914,6 +1914,19 @@ OBJECTTYPE* FindAttachmentByClass( OBJECTTYPE * pObj, UINT32 uiItemClass, UINT8
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
OBJECTTYPE* FindAttachmentByAttachmentClass( OBJECTTYPE * pObj, UINT32 uiAttachmentClass, UINT8 subObject )
|
||||
{
|
||||
if (pObj->exists() == true) {
|
||||
for (attachmentList::iterator iter = (*pObj)[subObject]->attachments.begin(); iter != (*pObj)[subObject]->attachments.end(); ++iter) {
|
||||
if (Item[iter->usItem].attachmentclass == uiAttachmentClass && iter->exists())
|
||||
{
|
||||
return &(*iter);
|
||||
}
|
||||
}
|
||||
}
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
INT8 FindLaunchable( SOLDIERTYPE * pSoldier, UINT16 usWeapon )
|
||||
{
|
||||
INT8 bLoop;
|
||||
|
||||
Reference in New Issue
Block a user