diff --git a/GameVersion.cpp b/GameVersion.cpp
index e42f7f25..60319c54 100644
--- a/GameVersion.cpp
+++ b/GameVersion.cpp
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else
//RELEASE BUILD VERSION
- INT16 zVersionLabel[256] = { L"Release v1.13.477" };
+ INT16 zVersionLabel[256] = { L"Release v1.13.478" };
#endif
-INT8 czVersionNumber[16] = { "Build 06.08.25" };
+INT8 czVersionNumber[16] = { "Build 06.08.26" };
INT16 zTrackingNumber[16] = { L"Z" };
diff --git a/Init.cpp b/Init.cpp
index f055da35..36c7a273 100644
--- a/Init.cpp
+++ b/Init.cpp
@@ -87,7 +87,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
{
char fileName[MAX_PATH];
- // WANNE: Enemy drops
+ // WANNE: Enemy drops - begin
strcpy(fileName, directoryName);
strcat(fileName, ENEMYMISCDROPSFILENAME);
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
@@ -117,16 +117,10 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
if(!ReadInEnemyArmourDropsStats(gEnemyArmourDrops, fileName))
return FALSE;
-
-
+ // WANNE: Enemy drops - end
-
-
-
- // --------
-
strcpy(fileName, directoryName);
strcat(fileName, AMMOTYPESFILENAME);
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
diff --git a/JA2.suo b/JA2.suo
index 9d1cfdcf..06d66244 100644
Binary files a/JA2.suo and b/JA2.suo differ
diff --git a/Tactical/EnemyItemDrops.h b/Tactical/EnemyItemDrops.h
index d31f3831..f2bc9169 100644
--- a/Tactical/EnemyItemDrops.h
+++ b/Tactical/EnemyItemDrops.h
@@ -6,35 +6,40 @@
typedef struct
{
UINT8 ubWeaponType;
- UINT8 ubDropRate;
+ UINT8 ubEnemyDropRate;
+ UINT8 ubMilitiaDropRate;
UINT32 uiIndex;
} WEAPON_DROPS;
typedef struct
{
UINT32 uiType;
- UINT8 ubDropRate;
+ UINT8 ubEnemyDropRate;
+ UINT8 ubMilitiaDropRate;
UINT32 uiIndex;
} AMMO_DROPS;
typedef struct
{
UINT8 ubType;
- UINT8 ubDropRate;
+ UINT8 ubEnemyDropRate;
+ UINT8 ubMilitiaDropRate;
UINT32 uiIndex;
} EXPLOSIVE_DROPS;
typedef struct
{
UINT8 ubArmourClass;
- UINT8 ubDropRate;
+ UINT8 ubEnemyDropRate;
+ UINT8 ubMilitiaDropRate;
UINT32 uiIndex;
} ARMOUR_DROPS;
typedef struct
{
UINT32 usItemClass;
- UINT8 ubDropRate;
+ UINT8 ubEnemyDropRate;
+ UINT8 ubMilitiaDropRate;
UINT32 uiIndex;
} MISC_DROPS;
diff --git a/Tactical/Inventory Choosing.cpp b/Tactical/Inventory Choosing.cpp
index 2d1060dd..d024637c 100644
--- a/Tactical/Inventory Choosing.cpp
+++ b/Tactical/Inventory Choosing.cpp
@@ -2459,10 +2459,7 @@ else
if(! (pp->Inv[ i ].fFlags & OBJECT_NO_OVERWRITE ) && pp->Inv[ i ].usItem != 0)
{
// Weapon
- if( uiItemClass == IC_GUN || uiItemClass == IC_BLADE ||
- uiItemClass == IC_THROWING_KNIFE || uiItemClass == IC_LAUNCHER ||
- uiItemClass == IC_TENTACLES || uiItemClass == IC_THROWN ||
- uiItemClass == IC_PUNCH)
+ if( uiItemClass == IC_GUN)
{
// Find matching weaponType in the XML
for (j = 0; j < MAX_DROP_ITEMS; j++)
@@ -2479,11 +2476,25 @@ else
if (uiRandomValue == 0)
uiRandomValue++;
- // Drop the weapon!
- if (uiRandomValue <= gEnemyWeaponDrops[j].ubDropRate)
+ // militia
+ if ( SOLDIER_CLASS_MILITIA( bSoldierClass ) )
{
- pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ // Drop the item!
+ if (uiRandomValue <= gEnemyWeaponDrops[j].ubMilitiaDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
}
+ // enemy
+ else
+ {
+ // Drop the item!
+ if (uiRandomValue <= gEnemyWeaponDrops[j].ubEnemyDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
+ }
+
break;
}
}
@@ -2506,11 +2517,24 @@ else
if (uiRandomValue == 0)
uiRandomValue++;
- // Drop the weapon!
- if (uiRandomValue <= gEnemyAmmoDrops[j].ubDropRate)
+ // militia
+ if ( SOLDIER_CLASS_MILITIA( bSoldierClass ) )
{
- pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ // Drop the item!
+ if (uiRandomValue <= gEnemyAmmoDrops[j].ubMilitiaDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
}
+ else
+ {
+ // Drop the item!
+ if (uiRandomValue <= gEnemyAmmoDrops[j].ubEnemyDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
+ }
+
break;
}
}
@@ -2533,11 +2557,26 @@ else
if (uiRandomValue == 0)
uiRandomValue++;
- // Drop the weapon!
- if (uiRandomValue <= gEnemyExplosiveDrops[j].ubDropRate)
+ // militia
+ if ( SOLDIER_CLASS_MILITIA( bSoldierClass ) )
{
- pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ // Drop the item!
+ if (uiRandomValue <= gEnemyExplosiveDrops[j].ubMilitiaDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
}
+ // enemy
+ else
+ {
+ // Drop the item!
+ if (uiRandomValue <= gEnemyExplosiveDrops[j].ubEnemyDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
+ }
+
+
break;
}
}
@@ -2560,19 +2599,35 @@ else
if (uiRandomValue == 0)
uiRandomValue++;
- // Drop the weapon!
- if (uiRandomValue <= gEnemyArmourDrops[j].ubDropRate)
+ // militia
+ if ( SOLDIER_CLASS_MILITIA( bSoldierClass ) )
{
- pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ // Drop the item!
+ if (uiRandomValue <= gEnemyArmourDrops[j].ubMilitiaDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
}
+ // enemy
+ else
+ {
+ // Drop the item!
+ if (uiRandomValue <= gEnemyArmourDrops[j].ubEnemyDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
+ }
+
break;
}
}
}
// Misc
- else if (uiItemClass == IC_MEDKIT || uiItemClass == IC_KIT ||
- uiItemClass == IC_APPLIABLE || uiItemClass == IC_FACE ||
- uiItemClass == IC_KEY || uiItemClass == IC_MISC || uiItemClass == IC_MONEY)
+ else if (uiItemClass == IC_BLADE || uiItemClass == IC_MEDKIT || uiItemClass == IC_KIT ||
+ uiItemClass == IC_THROWING_KNIFE || uiItemClass == IC_LAUNCHER ||
+ uiItemClass == IC_APPLIABLE || uiItemClass == IC_FACE || uiItemClass == IC_TENTACLES ||
+ uiItemClass == IC_THROWN || uiItemClass == IC_PUNCH || uiItemClass == IC_KEY ||
+ uiItemClass == IC_MISC || uiItemClass == IC_MONEY)
{
// Find matching armour in the XML
for (j = 0; j < MAX_DROP_ITEMS; j++)
@@ -2589,11 +2644,25 @@ else
if (uiRandomValue == 0)
uiRandomValue++;
- // Drop the weapon!
- if (uiRandomValue <= gEnemyMiscDrops[j].ubDropRate)
+ // militia
+ if ( SOLDIER_CLASS_MILITIA( bSoldierClass ) )
{
- pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ // Drop the item!
+ if (uiRandomValue <= gEnemyMiscDrops[j].ubMilitiaDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
}
+ // enemy
+ else
+ {
+ // Drop the item!
+ if (uiRandomValue <= gEnemyMiscDrops[j].ubEnemyDropRate)
+ {
+ pp->Inv[ i ].fFlags &= ~OBJECT_UNDROPPABLE;
+ }
+ }
+
break;
}
}
diff --git a/Tactical/XML_EnemyAmmoDrops.cpp b/Tactical/XML_EnemyAmmoDrops.cpp
index b7e26fd7..1fec113a 100644
--- a/Tactical/XML_EnemyAmmoDrops.cpp
+++ b/Tactical/XML_EnemyAmmoDrops.cpp
@@ -86,7 +86,8 @@ ammoDropStartElementHandle(void *userData, const char *name, const char **atts)
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiIndex") == 0 ||
strcmp(name, "uiType") == 0 ||
- strcmp(name, "ubDropRate") == 0 ))
+ strcmp(name, "ubEnemyDropRate") == 0 ||
+ strcmp(name, "ubMilitiaDropRate") == 0))
{
pData->curElement = ELEMENT_PROPERTY;
@@ -143,10 +144,15 @@ ammoDropEndElementHandle(void *userData, const char *name)
pData->curElement = ELEMENT;
pData->curAmmoDrop.uiType = (UINT32) atol(pData->szCharData);
}
- else if(strcmp(name, "ubDropRate") == 0)
+ else if(strcmp(name, "ubEnemyDropRate") == 0)
{
pData->curElement = ELEMENT;
- pData->curAmmoDrop.ubDropRate = (UINT8) atol(pData->szCharData);
+ pData->curAmmoDrop.ubEnemyDropRate = (UINT8) atol(pData->szCharData);
+ }
+ else if(strcmp(name, "ubMilitiaDropRate") == 0)
+ {
+ pData->curElement = ELEMENT;
+ pData->curAmmoDrop.ubMilitiaDropRate = (UINT8) atol(pData->szCharData);
}
pData->maxReadDepth--;
@@ -242,7 +248,8 @@ BOOLEAN WriteEnemyAmmoDropsStats(AMMO_DROPS *pEnemyAmmoDrops, STR fileName)
FilePrintf(hFile,"\t\t%d\r\n", cnt);
FilePrintf(hFile,"\t\t%d\r\n", pEnemyAmmoDrops[cnt].uiType);
- FilePrintf(hFile,"\t\t%d\r\n", pEnemyAmmoDrops[cnt].ubDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyAmmoDrops[cnt].ubEnemyDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyAmmoDrops[cnt].ubMilitiaDropRate);
FilePrintf(hFile,"\t\r\n");
}
diff --git a/Tactical/XML_EnemyArmourDrops.cpp b/Tactical/XML_EnemyArmourDrops.cpp
index c2c7067f..edcbd1cd 100644
--- a/Tactical/XML_EnemyArmourDrops.cpp
+++ b/Tactical/XML_EnemyArmourDrops.cpp
@@ -86,7 +86,8 @@ armourDropStartElementHandle(void *userData, const char *name, const char **atts
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiIndex") == 0 ||
strcmp(name, "ubArmourClass") == 0 ||
- strcmp(name, "ubDropRate") == 0 ))
+ strcmp(name, "ubEnemyDropRate") == 0 ||
+ strcmp(name, "ubMilitiaDropRate") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
@@ -143,10 +144,15 @@ armourDropEndElementHandle(void *userData, const char *name)
pData->curElement = ELEMENT;
pData->curArmourDrop.ubArmourClass = (UINT8) atol(pData->szCharData);
}
- else if(strcmp(name, "ubDropRate") == 0)
+ else if(strcmp(name, "ubEnemyDropRate") == 0)
{
pData->curElement = ELEMENT;
- pData->curArmourDrop.ubDropRate = (UINT8) atol(pData->szCharData);
+ pData->curArmourDrop.ubEnemyDropRate = (UINT8) atol(pData->szCharData);
+ }
+ else if (strcmp(name, "ubMilitiaDropRate") == 0)
+ {
+ pData->curElement = ELEMENT;
+ pData->curArmourDrop.ubMilitiaDropRate = (UINT8) atol(pData->szCharData);
}
pData->maxReadDepth--;
@@ -242,7 +248,8 @@ BOOLEAN WriteEnemyArmourDropsStats(ARMOUR_DROPS *pEnemyArmourDrops, STR fileName
FilePrintf(hFile,"\t\t%d\r\n", cnt);
FilePrintf(hFile,"\t\t%d\r\n", pEnemyArmourDrops[cnt].ubArmourClass);
- FilePrintf(hFile,"\t\t%d\r\n", pEnemyArmourDrops[cnt].ubDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyArmourDrops[cnt].ubEnemyDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyArmourDrops[cnt].ubMilitiaDropRate);
FilePrintf(hFile,"\t\r\n");
}
diff --git a/Tactical/XML_EnemyExplosiveDrops.cpp b/Tactical/XML_EnemyExplosiveDrops.cpp
index b641253e..b6f7cb9f 100644
--- a/Tactical/XML_EnemyExplosiveDrops.cpp
+++ b/Tactical/XML_EnemyExplosiveDrops.cpp
@@ -86,7 +86,8 @@ explosiveDropStartElementHandle(void *userData, const char *name, const char **a
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiIndex") == 0 ||
strcmp(name, "ubType") == 0 ||
- strcmp(name, "ubDropRate") == 0 ))
+ strcmp(name, "ubEnemyDropRate") == 0 ||
+ strcmp(name, "ubMilitiaDropRate") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
@@ -143,10 +144,15 @@ explosiveDropEndElementHandle(void *userData, const char *name)
pData->curElement = ELEMENT;
pData->curExplosiveDrop.ubType = (UINT8) atol(pData->szCharData);
}
- else if(strcmp(name, "ubDropRate") == 0)
+ else if(strcmp(name, "ubEnemyDropRate") == 0)
{
pData->curElement = ELEMENT;
- pData->curExplosiveDrop.ubDropRate = (UINT8) atol(pData->szCharData);
+ pData->curExplosiveDrop.ubEnemyDropRate = (UINT8) atol(pData->szCharData);
+ }
+ else if(strcmp(name, "ubMilitiaDropRate") == 0)
+ {
+ pData->curElement = ELEMENT;
+ pData->curExplosiveDrop.ubMilitiaDropRate = (UINT8) atol(pData->szCharData);
}
pData->maxReadDepth--;
@@ -242,7 +248,8 @@ BOOLEAN WriteEnemyExplosiveDropsStats(EXPLOSIVE_DROPS *pEnemyExplosiveDrops, STR
FilePrintf(hFile,"\t\t%d\r\n", cnt);
FilePrintf(hFile,"\t\t%d\r\n", pEnemyExplosiveDrops[cnt].ubType);
- FilePrintf(hFile,"\t\t%d\r\n", pEnemyExplosiveDrops[cnt].ubDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyExplosiveDrops[cnt].ubEnemyDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyExplosiveDrops[cnt].ubMilitiaDropRate);
FilePrintf(hFile,"\t\r\n");
}
diff --git a/Tactical/XML_EnemyMiscDrops.cpp b/Tactical/XML_EnemyMiscDrops.cpp
index d8c96537..39437990 100644
--- a/Tactical/XML_EnemyMiscDrops.cpp
+++ b/Tactical/XML_EnemyMiscDrops.cpp
@@ -86,7 +86,8 @@ miscDropStartElementHandle(void *userData, const char *name, const char **atts)
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiIndex") == 0 ||
strcmp(name, "usItemClass") == 0 ||
- strcmp(name, "ubDropRate") == 0 ))
+ strcmp(name, "ubEnemyDropRate") == 0 ||
+ strcmp(name, "ubMilitiaDropRate") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
@@ -143,10 +144,15 @@ miscDropEndElementHandle(void *userData, const char *name)
pData->curElement = ELEMENT;
pData->curMiscDrop.usItemClass = (UINT32) atol(pData->szCharData);
}
- else if(strcmp(name, "ubDropRate") == 0)
+ else if(strcmp(name, "ubEnemyDropRate") == 0)
{
pData->curElement = ELEMENT;
- pData->curMiscDrop.ubDropRate = (UINT8) atol(pData->szCharData);
+ pData->curMiscDrop.ubEnemyDropRate = (UINT8) atol(pData->szCharData);
+ }
+ else if(strcmp(name, "ubMilitiaDropRate") == 0)
+ {
+ pData->curElement = ELEMENT;
+ pData->curMiscDrop.ubMilitiaDropRate = (UINT8) atol(pData->szCharData);
}
pData->maxReadDepth--;
@@ -242,7 +248,8 @@ BOOLEAN WriteEnemyMiscDropsStats(MISC_DROPS *pEnemyMiscDrops, STR fileName)
FilePrintf(hFile,"\t\t%d\r\n", cnt);
FilePrintf(hFile,"\t\t%d\r\n", pEnemyMiscDrops[cnt].usItemClass);
- FilePrintf(hFile,"\t\t%d\r\n", pEnemyMiscDrops[cnt].ubDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyMiscDrops[cnt].ubEnemyDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyMiscDrops[cnt].ubMilitiaDropRate);
FilePrintf(hFile,"\t\r\n");
}
diff --git a/Tactical/XML_EnemyWeaponDrops.cpp b/Tactical/XML_EnemyWeaponDrops.cpp
index 6f17b3f8..0e38ee17 100644
--- a/Tactical/XML_EnemyWeaponDrops.cpp
+++ b/Tactical/XML_EnemyWeaponDrops.cpp
@@ -86,7 +86,8 @@ weaponDropStartElementHandle(void *userData, const char *name, const char **atts
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiIndex") == 0 ||
strcmp(name, "ubWeaponType") == 0 ||
- strcmp(name, "ubDropRate") == 0 ))
+ strcmp(name, "ubEnemyDropRate") == 0 ||
+ strcmp(name, "ubMilitiaDropRate") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
@@ -143,10 +144,15 @@ weaponDropEndElementHandle(void *userData, const char *name)
pData->curElement = ELEMENT;
pData->curWeaponDrop.ubWeaponType = (UINT8) atol(pData->szCharData);
}
- else if(strcmp(name, "ubDropRate") == 0)
+ else if(strcmp(name, "ubEnemyDropRate") == 0)
{
pData->curElement = ELEMENT;
- pData->curWeaponDrop.ubDropRate = (UINT8) atol(pData->szCharData);
+ pData->curWeaponDrop.ubEnemyDropRate = (UINT8) atol(pData->szCharData);
+ }
+ else if(strcmp(name, "ubMilitiaDropRate") == 0)
+ {
+ pData->curElement = ELEMENT;
+ pData->curWeaponDrop.ubMilitiaDropRate = (UINT8) atol(pData->szCharData);
}
pData->maxReadDepth--;
@@ -242,7 +248,8 @@ BOOLEAN WriteEnemyWeaponDropsStats(WEAPON_DROPS *pEnemyWeaponDrops, STR fileName
FilePrintf(hFile,"\t\t%d\r\n", cnt);
FilePrintf(hFile,"\t\t%d\r\n", pEnemyWeaponDrops[cnt].ubWeaponType);
- FilePrintf(hFile,"\t\t%d\r\n", pEnemyWeaponDrops[cnt].ubDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyWeaponDrops[cnt].ubEnemyDropRate);
+ FilePrintf(hFile,"\t\t%d\r\n", pEnemyWeaponDrops[cnt].ubMilitiaDropRate);
FilePrintf(hFile,"\t\r\n");
}