mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- New feature: zombies can now spawn from corpses, if you specify that option in the preferences screen (by Flugente)
o if set to off, no zombies will spawn. This can also be changed in mid-game o for more information on how this works and how to set it up, see http://www.bears-pit.com/board/ubbthreads.php/topics/295746/Zombies_WH40K_and_more.html#Post295746 o with the tag <PoisonPercentage>, you can now poison guns or ammo. This is the percentage of damage dealt that will be poisonous (see zombie thread for an explanation) o The zombie option can only be enabled in a single player game o AI fix: to prevent the endless clock problem, the AI now ends the turn if the same actor calls the decision routine over 100 times in a single turn. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5313 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -79,7 +79,8 @@ ammotypeStartElementHandle(void *userData, const XML_Char *name, const XML_Char
|
||||
strcmp(name, "acidic") == 0 ||
|
||||
strcmp(name, "tracerEffect") == 0 ||
|
||||
strcmp(name, "monsterSpit") == 0 ||
|
||||
strcmp(name, "temperatureModificator") == 0 ))
|
||||
strcmp(name, "temperatureModificator") == 0 ||
|
||||
strcmp(name, "PoisonPercentage") == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
|
||||
@@ -282,6 +283,15 @@ ammotypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curAmmoType.temperatureModificator = (FLOAT) atof(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "PoisonPercentage") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curAmmoType.poisonPercentage = (INT16) atol(pData->szCharData);
|
||||
|
||||
// check: poisonPercentage must be between 0 and 100, fit bad values
|
||||
pData->curAmmoType.poisonPercentage = max(0, pData->curAmmoType.poisonPercentage);
|
||||
pData->curAmmoType.poisonPercentage = min(100, pData->curAmmoType.poisonPercentage);
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
@@ -404,6 +414,7 @@ BOOLEAN WriteAmmoTypeStats()
|
||||
FilePrintf(hFile,"\t\t<lockBustingPower>%d</lockBustingPower>\r\n", AmmoTypes[cnt].lockBustingPower );
|
||||
FilePrintf(hFile,"\t\t<tracerEffect>%d</tracerEffect>\r\n", AmmoTypes[cnt].tracerEffect );
|
||||
FilePrintf(hFile,"\t\t<temperatureModificator>%4.2f</temperatureModificator>\r\n", AmmoTypes[cnt].temperatureModificator );
|
||||
FilePrintf(hFile,"\t\t<PoisonPercentage>%d</PoisonPercentage>\r\n", AmmoTypes[cnt].poisonPercentage );
|
||||
|
||||
|
||||
FilePrintf(hFile,"\t</AMMOTYPE>\r\n");
|
||||
|
||||
Reference in New Issue
Block a user