mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New background property: <animal_friend> will refuse to attack animals, unless attacked by that animal.
New background property: <civgroup_loyal> will refuse to attack neutral members of the same civilian group. Fixed array bound in GetTileSetIndexVector(). git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8731 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -148,8 +148,9 @@ backgroundStartElementHandle(void *userData, const XML_Char *name, const XML_Cha
|
||||
strcmp(name, "traplevel") == 0 ||
|
||||
strcmp(name, "no_male") == 0 ||
|
||||
strcmp(name, "no_female") == 0 ||
|
||||
strcmp(name, "loyalitylossondeath" ) == 0 ))
|
||||
|
||||
strcmp(name, "loyalitylossondeath" ) == 0 ||
|
||||
strcmp(name, "animal_friend") == 0 ||
|
||||
strcmp(name, "civgroup_loyal") == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
|
||||
@@ -654,6 +655,16 @@ backgroundEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curBackground.uiFlags |= (UINT16)atol( pData->szCharData ) ? BACKGROUND_GLOBALOYALITYLOSSONDEATH : 0;
|
||||
}
|
||||
else if (strcmp(name, "animal_friend") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curBackground.uiFlags |= (UINT16)atol(pData->szCharData) ? BACKGROUND_ANIMALFRIEND : 0;
|
||||
}
|
||||
else if (strcmp(name, "civgroup_loyal") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curBackground.uiFlags |= (UINT16)atol(pData->szCharData) ? BACKGROUND_CIVGROUPLOYAL : 0;
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user