mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Fix: crash when checking for muzzleflash
- Fix: under certain conditions, AI-selffeeding could lead to invalid inventory sizes - information from prisoner interrogation is about new sectors - no autoriot in a prison sector if militia is present git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5912 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+5
-2
@@ -11586,8 +11586,11 @@ BOOLEAN IsFlashSuppressor( OBJECTTYPE * pObj, SOLDIERTYPE * pSoldier )
|
||||
if ( Item[(*pObj)[0]->data.gun.usGunAmmoItem].hidemuzzleflash )
|
||||
return TRUE;
|
||||
|
||||
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter) {
|
||||
if (Item[iter->usItem].hidemuzzleflash && iter->exists() )
|
||||
attachmentList::iterator iter = (*pObj)[0]->attachments.begin();
|
||||
attachmentList::iterator iterend = (*pObj)[0]->attachments.end();
|
||||
for (; iter != iterend; ++iter)
|
||||
{
|
||||
if (iter->exists() && Item[iter->usItem].hidemuzzleflash )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user