mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Feature improvement: tripwire, tripwire mines and directional eplosives can now be planted with the map editor.
- The action item system has been repaired for this. It has never worked correctly prior to this, but the errors never occured. - New items from GameDir 1538 are required for this to work. They are direct copies of existing items, except for a new tag, <usActionItemFlag>. - The name of the new action items should clarify in the editor what an item does. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5565 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+11
-3
@@ -276,7 +276,8 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
|
||||
strcmp(name, "LockPickModifier") == 0 ||
|
||||
strcmp(name, "CrowbarModifier") == 0 ||
|
||||
strcmp(name, "DisarmModifier") == 0 ||
|
||||
strcmp(name, "RepairModifier") == 0 ))
|
||||
strcmp(name, "RepairModifier") == 0 ||
|
||||
strcmp(name, "usActionItemFlag") == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("itemStartElementHandle: going into element, name = %s",name) );
|
||||
@@ -1387,7 +1388,12 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.dirtIncreaseFactor = (FLOAT) atof(pData->szCharData);
|
||||
}
|
||||
|
||||
else if(strcmp(name, "usActionItemFlag") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.usActionItemFlag = (UINT32) atol(pData->szCharData);
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
|
||||
@@ -2019,7 +2025,9 @@ BOOLEAN WriteItemStats()
|
||||
|
||||
FilePrintf(hFile,"\t\t<DamageChance>%d</DamageChance>\r\n", Item[cnt].usDamageChance );
|
||||
FilePrintf(hFile,"\t\t<DirtIncreaseFactor>%4.2f</DirtIncreaseFactor>\r\n", Item[cnt].dirtIncreaseFactor );
|
||||
|
||||
|
||||
FilePrintf(hFile,"\t\t<usActionItemFlag>%d</usActionItemFlag>\r\n", Item[cnt].usActionItemFlag );
|
||||
|
||||
FilePrintf(hFile,"\t</ITEM>\r\n");
|
||||
}
|
||||
FilePrintf(hFile,"</ITEMLIST>\r\n");
|
||||
|
||||
Reference in New Issue
Block a user