mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- New Feature: Spotter skill (available to every merc) allows a merc to be spotter for other snipers. Spotter items have to be in hands, spending APs cancels action.
- renamed GetObjectNCTHModifier to GetObjectModifier, as function is no longer used exclusively for NCTH Warning: GameDir >= r1896 is required. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6694 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+10
-2
@@ -278,7 +278,8 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
|
||||
strcmp(name, "FlashLightRange") == 0 ||
|
||||
strcmp(name, "ItemChoiceTimeSetting") == 0 ||
|
||||
strcmp(name, "buddyitem") == 0 ||
|
||||
strcmp(name, "SleepModifier") == 0))
|
||||
strcmp(name, "SleepModifier") == 0 ||
|
||||
strcmp(name, "usSpotting") == 0))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("itemStartElementHandle: going into element, name = %s",name) );
|
||||
@@ -1438,6 +1439,12 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.ubSleepModifier = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "usSpotting") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
// values between 0 and 100 only
|
||||
pData->curItem.usSpotting = min(100, max(0, (INT16) atol(pData->szCharData) ) );
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
@@ -2080,7 +2087,8 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile,"\t\t<ItemChoiceTimeSetting>%d</ItemChoiceTimeSetting>\r\n", Item[cnt].usItemChoiceTimeSetting );
|
||||
FilePrintf(hFile,"\t\t<buddyitem>%d</buddyitem>\r\n", Item[cnt].usBuddyItem );
|
||||
FilePrintf(hFile,"\t\t<SleepModifier>%d</SleepModifier>\r\n", Item[cnt].ubSleepModifier );
|
||||
|
||||
FilePrintf(hFile,"\t\t<usSpotting>%d</usSpotting>\r\n", Item[cnt].usSpotting );
|
||||
|
||||
FilePrintf(hFile,"\t</ITEM>\r\n");
|
||||
}
|
||||
FilePrintf(hFile,"</ITEMLIST>\r\n");
|
||||
|
||||
Reference in New Issue
Block a user