mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Revert "Undo unrelated Chinese text changes"
This reverts commit 75332ea219.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user