Undo unrelated Chinese text changes

This commit is contained in:
rftrdev
2022-11-04 22:39:33 -07:00
parent a554f0de17
commit 75332ea219
15 changed files with 629 additions and 59 deletions
+14 -7
View File
@@ -1,3 +1,4 @@
#pragma optimize("",off)
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
@@ -3339,10 +3340,11 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness
if ( i > gArmyItemChoices[bSoldierClass][ typeIndex ].ubChoices )
break;
if (getMatchingCoolness == TRUE)
uiChoice = Random(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices);
else // otherwise there is a chance to pick nothing!
uiChoice = Random(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices + (int)(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices / 3));
uiChoice = Random(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices + (int)(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices / 3));
// if (getMatchingCoolness == TRUE)
// uiChoice = Random(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices);
// else // otherwise there is a chance to pick nothing!
// uiChoice = Random(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices + (int)(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices / 3));
if ( uiChoice >= gArmyItemChoices[bSoldierClass][ typeIndex ].ubChoices )
{
@@ -3364,7 +3366,8 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness
pickItem = FALSE;
if (usItem > 0 && Item[usItem].randomitem == 0 && ItemIsLegal(usItem))
//if (usItem > 0 && Item[usItem].randomitem == 0 && ItemIsLegal(usItem))
if (usItem >= 0 && Item[usItem].ubCoolness <= wantedCoolness && ItemIsLegal(usItem))
{
// On day
if (DayTime() == TRUE)
@@ -3386,6 +3389,9 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness
pickItem = TRUE;
}
}
// if (Item[usItem].randomitem > 0)
// pickItem = FALSE;
}
@@ -3395,8 +3401,9 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness
if (pickItem == TRUE)
{
// pick a default item in case we don't find anything with a matching coolness, but pick the most matching (by coolness) item
if ( defaultItem == 0 ||
abs((int)wantedCoolness - (int)Item[usItem].ubCoolness) < abs((int)wantedCoolness - (int)Item[defaultItem].ubCoolness))
//if ( defaultItem == 0 ||
// abs((int)wantedCoolness - (int)Item[usItem].ubCoolness) < abs((int)wantedCoolness - (int)Item[defaultItem].ubCoolness))
if (defaultItem == 0 || Item[usItem].ubCoolness > Item[defaultItem].ubCoolness)
{
defaultItem = usItem;
}