mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Undo unrelated Chinese text changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user