Revert "Undo unrelated Chinese text changes"

This reverts commit 75332ea219.
This commit is contained in:
rftrdev
2022-11-04 22:42:09 -07:00
parent f140e17b65
commit 7c6f7d6d09
15 changed files with 57 additions and 627 deletions
+7 -14
View File
@@ -1,4 +1,3 @@
#pragma optimize("",off)
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
@@ -3340,11 +3339,10 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness
if ( i > gArmyItemChoices[bSoldierClass][ typeIndex ].ubChoices )
break;
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 (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 )
{
@@ -3366,8 +3364,7 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness
pickItem = FALSE;
//if (usItem > 0 && Item[usItem].randomitem == 0 && ItemIsLegal(usItem))
if (usItem >= 0 && Item[usItem].ubCoolness <= wantedCoolness && ItemIsLegal(usItem))
if (usItem > 0 && Item[usItem].randomitem == 0 && ItemIsLegal(usItem))
{
// On day
if (DayTime() == TRUE)
@@ -3389,9 +3386,6 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness
pickItem = TRUE;
}
}
// if (Item[usItem].randomitem > 0)
// pickItem = FALSE;
}
@@ -3401,9 +3395,8 @@ 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 || Item[usItem].ubCoolness > Item[defaultItem].ubCoolness)
if ( defaultItem == 0 ||
abs((int)wantedCoolness - (int)Item[usItem].ubCoolness) < abs((int)wantedCoolness - (int)Item[defaultItem].ubCoolness))
{
defaultItem = usItem;
}