- Fix: negative values for ExplosionSoundID or AltExplosionSoundID in ExplosionData.xml cause a game crash, even though negative values are intended

- armed vehicles always get the 'mounted' bonus for their guns
- removed unused code
- increased ASD starting resources

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8115 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-03-21 20:07:56 +00:00
parent 9e97538d89
commit be346d07ef
9 changed files with 37 additions and 95 deletions
+4 -4
View File
@@ -119,12 +119,12 @@ explosionDataEndElementHandle(void *userData, const XML_Char *name)
else if(strcmp(name, "ExplosionSoundID") == 0)
{
pData->curElement = ELEMENT;
pData->expData.uiExplosionSoundID = (UINT32) strtoul(pData->szCharData, NULL, 0);
pData->expData.sExplosionSoundID = (INT32) strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "AltExplosionSoundID") == 0)
{
pData->curElement = ELEMENT;
pData->expData.uiAltExplosionSoundID = (UINT32) strtoul(pData->szCharData, NULL, 0);
pData->expData.sAltExplosionSoundID = (INT32)strtoul( pData->szCharData, NULL, 0 );
}
else if(strcmp(name, "BlastFilename") == 0)
{
@@ -230,8 +230,8 @@ BOOLEAN WriteExplosionDataStats()
FilePrintf(hFile,"\t\t<TransKeyFrame>%d</TransKeyFrame>\r\n", gExpAniData[cnt].ubTransKeyFrame);
FilePrintf(hFile,"\t\t<DamageKeyFrame>%d</DamageKeyFrame>\r\n", gExpAniData[cnt].ubDamageKeyFrame);
FilePrintf(hFile,"\t\t<ExplosionSoundID>%d</ExplosionSoundID>\r\n", gExpAniData[cnt].uiExplosionSoundID);
FilePrintf(hFile,"\t\t<AltExplosionSoundID>%d</AltExplosionSoundID>\r\n", gExpAniData[cnt].uiAltExplosionSoundID);
FilePrintf(hFile,"\t\t<ExplosionSoundID>%d</ExplosionSoundID>\r\n", gExpAniData[cnt].sExplosionSoundID );
FilePrintf(hFile,"\t\t<AltExplosionSoundID>%d</AltExplosionSoundID>\r\n", gExpAniData[cnt].sAltExplosionSoundID );
FilePrintf(hFile,"\t\t<BlastFilename>%s</BlastFilename>\r\n", gExpAniData[cnt].zBlastFilename);
FilePrintf(hFile,"\t\t<BlastSpeed>%d</BlastSpeed>\r\n", gExpAniData[cnt].sBlastSpeed);