mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Gear templates: An entry with '0' and a valid ammo item will try to fit that ammo to any gun used in the slot
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8447 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -9667,7 +9667,8 @@ void ReadEquipmentTable( SOLDIERTYPE* pSoldier, std::string name )
|
||||
ammoitem = (*pObj)[i]->data.gun.usGunAmmoItem;
|
||||
for ( std::vector<GEAR_NODE>::iterator it = vec.begin( ); it != vec.end( ); ++it )
|
||||
{
|
||||
if ( (*it).slot == slot && (*it).item == pObj->usItem )
|
||||
// use the ammotype of the node, provided it exists and fits the gun or a wildcard
|
||||
if ( (*it).slot == slot && (*it).ammoitem != NOTHING && ( (*it).item == pObj->usItem || (*it).item == NOTHING ) )
|
||||
{
|
||||
ammoitem = (*it).ammoitem;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user