mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
-fixed battle scope / sniper scope conflict in Inventory Choosing.cpp
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@164 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
//RELEASE BUILD VERSION
|
//RELEASE BUILD VERSION
|
||||||
INT16 zVersionLabel[256] = { L"Release v1.13.162" };
|
INT16 zVersionLabel[256] = { L"Release v1.13.164" };
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -670,7 +670,40 @@ void ChooseWeaponForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bWeaponC
|
|||||||
{
|
{
|
||||||
usAttachIndex = PickARandomAttachment(ATTACHMENTS,usGunIndex,bAttachClass,FALSE);
|
usAttachIndex = PickARandomAttachment(ATTACHMENTS,usGunIndex,bAttachClass,FALSE);
|
||||||
|
|
||||||
if ( usScopeIndex > 0 )
|
if ( Item[usGunIndex].defaultattachment > 0 )
|
||||||
|
{
|
||||||
|
//check for incompatibilities
|
||||||
|
for(i = 0;i<sizeof(IncompatibleAttachments);i++)
|
||||||
|
{
|
||||||
|
if ( IncompatibleAttachments[i][0] == NONE )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if ( IncompatibleAttachments[i][0] == usAttachIndex && IncompatibleAttachments[i][1] == Item[usGunIndex].defaultattachment )
|
||||||
|
{
|
||||||
|
// default attachment wins
|
||||||
|
usAttachIndex = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( usScopeIndex > 0 )
|
||||||
|
{
|
||||||
|
//check for incompatibilities w/scope
|
||||||
|
for(i = 0;i<sizeof(IncompatibleAttachments);i++)
|
||||||
|
{
|
||||||
|
if ( IncompatibleAttachments[i][0] == NONE )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if ( IncompatibleAttachments[i][0] == usScopeIndex && IncompatibleAttachments[i][1] == Item[usGunIndex].defaultattachment )
|
||||||
|
{
|
||||||
|
// default attachment wins
|
||||||
|
usScopeIndex = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( usScopeIndex > 0 )
|
||||||
{
|
{
|
||||||
//check for incompatibilities with scope
|
//check for incompatibilities with scope
|
||||||
for(i = 0;i<sizeof(IncompatibleAttachments);i++)
|
for(i = 0;i<sizeof(IncompatibleAttachments);i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user