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:
silversurfer
2013-09-24 15:13:56 +00:00
parent deb0a65f46
commit 08f5b05c82
3 changed files with 22 additions and 2 deletions
+13
View File
@@ -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;