mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- New Feature: Block iron sights (by Flugente)
o if a gun/attachment has the boolean tag <BlockIronSight> in Items.xml, a gun's iron sights wont be selectable while selecting scope modes. o if using dual weapons, only iron sights can be used o new attachmentclass: AC_IRONSIGHT (4194304) for attachable iron sights (display on gun is different from reflex sights, no other differences... yet) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5291 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3837,6 +3837,27 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
mprintf( sMagX, sNewY, pStr );
|
||||
gprintfinvalidate( sMagX, sNewY, pStr );
|
||||
}
|
||||
// improved iron sights are attachable iron sights (the 'normal' iron sight is the gun itself)
|
||||
else if ( IsAttachmentClass(ObjList[pSoldier->bScopeMode]->usItem, AC_IRONSIGHT ) )
|
||||
{
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoAdvancedIcon, 52, sNewX, sNewY, VO_BLT_TRANSSHADOW, NULL );
|
||||
|
||||
SetFontForeground( FONT_ORANGE );
|
||||
|
||||
INT16 sMagX = sNewX + 13;
|
||||
|
||||
swprintf( pStr, L"*" );
|
||||
|
||||
// Get length of string
|
||||
uiStringLength=StringPixLength(pStr, ITEM_FONT );
|
||||
|
||||
if ( uiBuffer == guiSAVEBUFFER )
|
||||
{
|
||||
RestoreExternBackgroundRect( sNewX, sNewY, 20, 15 );
|
||||
}
|
||||
mprintf( sMagX, sNewY, pStr );
|
||||
gprintfinvalidate( sMagX, sNewY, pStr );
|
||||
}
|
||||
else if ( IsAttachmentClass(ObjList[pSoldier->bScopeMode]->usItem, AC_SIGHT ) )
|
||||
{
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoAdvancedIcon, 53, sNewX, sNewY, VO_BLT_TRANSSHADOW, NULL );
|
||||
|
||||
Reference in New Issue
Block a user