- New Feature: Block iron sights (by Flugente)

o if a gun/attachment has the boolean tag <BlockIronSight> in Items.xml, a gun's iron sights wont be selectable while selecting scope modes.
o if using dual weapons, only iron sights can be used
o new attachmentclass: AC_IRONSIGHT (4194304) for attachable iron sights (display on gun is different from reflex sights, no other differences... yet)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5291 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-05-20 17:18:28 +00:00
parent eb2ca0ba70
commit 93ea315502
7 changed files with 145 additions and 40 deletions
+9
View File
@@ -264,6 +264,7 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
strcmp(name, "TripWire") == 0 ||
strcmp(name, "Directional") == 0 ||
strcmp(name, "DrugType") == 0 ||
strcmp(name, "BlockIronSight") == 0 ||
strcmp(name, "fFlags") == 0 ))
{
@@ -1325,7 +1326,13 @@ itemEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curItem.drugtype = (UINT32) atol(pData->szCharData);
}
else if(strcmp(name, "BlockIronSight") == 0)
{
pData->curElement = ELEMENT;
pData->curItem.blockironsight = (BOOLEAN) atol(pData->szCharData);
}
pData->maxReadDepth--;
}
@@ -1938,6 +1945,8 @@ BOOLEAN WriteItemStats()
FilePrintf(hFile,"\t\t<DrugType>%d</DrugType>\r\n", Item[cnt].drugtype );
FilePrintf(hFile,"\t\t<BlockIronSight>%d</BlockIronSight>\r\n", Item[cnt].blockironsight );
FilePrintf(hFile,"\t</ITEM>\r\n");
}
FilePrintf(hFile,"</ITEMLIST>\r\n");