mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
[Fix] Incorrect displaying info and tooltips in Advances Properties Tab
* Tooltips were shifted by one position due to wrong handling "Accuracy modifier".
* DrawAdvancedValues():
if ( iFloatModifier[0] > 1.0 || ( fComparisonMode && iComparedFloatModifier[0] > 1.0 ) )
it checks number of laser range tiles (iFloatModifier[0] > 1.0, "meters" / CELL_X_SIZE) right before actual drawing a line with values. So if someone put 1..9 into XML (<BestLaserRange>) it will not print that value. But number of "meters" was checked (like x > 0) everywhere prior to this code.
so all the code before decided to draw line with icon for laser range, but the guilty code line didn't
I suppose not to draw laser info at all if a modder screwed up <BestLaserRange> putting a 1..9 value
so all values 0..9 basically mean 0 tiles, i.e. there is no laser ability.
This commit is contained in:
@@ -1823,8 +1823,8 @@ void CalculateWeapondata()
|
||||
pObjUsed = pObjPlatform;
|
||||
}
|
||||
|
||||
gunrange = GunRange( pObjUsed, pSoldier ) / 10;
|
||||
laserrange = GetBestLaserRange( pObjPlatform ) / 10;
|
||||
gunrange = GunRange( pObjUsed, pSoldier ) / CELL_X_SIZE;
|
||||
laserrange = GetBestLaserRange( pObjPlatform ) / CELL_X_SIZE;
|
||||
|
||||
if ( Item[pObjUsed->usItem].usItemClass & IC_LAUNCHER )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user