mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
Merged from revision: 7129
Updates/Improvements (by Sevenfm) 1. Quick inventory items: Press [ALT] + [1..0] for quick access to predefined items in tactical (ja2_options.ini: QUICK_ITEM_0 to QUICK_ITEM_9) Press [ALT] + [`] (tilde key left to [1]) to put item back to inventory and switch hands. The item will be put in the same slot it was taken from (unless it was stacked or game was reloaded). 2. Also a few quick hotkeys: [ALT] + [q] - switch to sling (same as [SHIFT] + [k]) [CTRL] + [q] - switch hands [SHIFT] + [q] - drop item from main hand to the ground Additional info: -some hotkeys do not work in cheat mode -only NIV -only one-handed items supported -stacked items currently not supported -remembered item slot is lost when you reload game 3. A few small fixes for dynamic tooltips and other things git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7130 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -56,6 +56,9 @@ void DrawMouseTooltip(void);
|
||||
|
||||
void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
{
|
||||
if(!pSoldier)
|
||||
return;
|
||||
|
||||
// WANNE: No tooltips on bloodcats, bugs, tanks, roboter
|
||||
if ( CREATURE_OR_BLOODCAT( pSoldier ) || TANK ( pSoldier ) ||
|
||||
AM_A_ROBOT( pSoldier))
|
||||
@@ -141,10 +144,12 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
if (gGameExternalOptions.fEnableDynamicSoldierTooltips && fMercIsUsingScope == 0 && !gGameExternalOptions.gfAllowUDTRange)
|
||||
{
|
||||
// add 10% to max tooltip viewing distance per level of the merc
|
||||
uiMaxTooltipDistance *= 1 + (EffectiveExpLevel(MercPtrs[ gusSelectedSoldier ])/ 10); // SANDRO - changed to effective level calc
|
||||
// sevenfm: fixed incorrect integer calculation
|
||||
uiMaxTooltipDistance = (INT32)( uiMaxTooltipDistance * ( 1 + ( (FLOAT)( EffectiveExpLevel( MercPtrs[ gusSelectedSoldier ] ) ) / 10.0 ) ) ); // SANDRO - changed to effective level calc
|
||||
|
||||
if ( gGameExternalOptions.gfAllowLimitedVision )
|
||||
uiMaxTooltipDistance *= 1 - (gGameExternalOptions.ubVisDistDecreasePerRainIntensity / 100);
|
||||
// sevenfm: this calculation doesn't make sense: disabled
|
||||
//if ( gGameExternalOptions.gfAllowLimitedVision )
|
||||
// uiMaxTooltipDistance *= 1 - (gGameExternalOptions.ubVisDistDecreasePerRainIntensity / 100);
|
||||
|
||||
if ( !(Item[MercPtrs[gusSelectedSoldier]->inv[HEAD1POS].usItem].nightvisionrangebonus > 0) &&
|
||||
!(Item[MercPtrs[gusSelectedSoldier]->inv[HEAD2POS].usItem].nightvisionrangebonus > 0) &&
|
||||
@@ -337,12 +342,12 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
|
||||
swprintf( pStrInfo, gzTooltipStrings[STR_TT_CAT_ARMOR] );
|
||||
if ( ubTooltipDetailLevel == DL_Basic )
|
||||
{
|
||||
if ( gGameExternalOptions.fEnableSoldierTooltipHelmet )
|
||||
swprintf( pStrInfo, L"%s%s", pStrInfo, pSoldier->inv[HELMETPOS].usItem ? gzTooltipStrings[STR_TT_HELMET] : L"" );
|
||||
if ( gGameExternalOptions.fEnableSoldierTooltipVest )
|
||||
swprintf( pStrInfo, L"%s%s", pStrInfo, pSoldier->inv[VESTPOS].usItem ? gzTooltipStrings[STR_TT_VEST] : L"" );
|
||||
if ( gGameExternalOptions.fEnableSoldierTooltipLeggings )
|
||||
swprintf( pStrInfo, L"%s%s", pStrInfo, pSoldier->inv[LEGPOS].usItem ? gzTooltipStrings[STR_TT_LEGGINGS] : L"" );
|
||||
if ( gGameExternalOptions.fEnableSoldierTooltipHelmet && pSoldier->inv[HELMETPOS].usItem )
|
||||
swprintf( pStrInfo, L"%s%s ", pStrInfo, gzTooltipStrings[STR_TT_HELMET] );
|
||||
if ( gGameExternalOptions.fEnableSoldierTooltipVest && pSoldier->inv[VESTPOS].usItem )
|
||||
swprintf( pStrInfo, L"%s%s ", pStrInfo, gzTooltipStrings[STR_TT_VEST] );
|
||||
if ( gGameExternalOptions.fEnableSoldierTooltipLeggings && pSoldier->inv[LEGPOS].usItem )
|
||||
swprintf( pStrInfo, L"%s%s", pStrInfo, gzTooltipStrings[STR_TT_LEGGINGS] );
|
||||
wcscat( pStrInfo, L"\n" );
|
||||
}
|
||||
else // ubTooltipDetailLevel == DL_Limited
|
||||
|
||||
Reference in New Issue
Block a user