mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Sandro's feature pack (by Sandro)
- Dual Burst/Autofire Enabled - Alternative Weapon Holding (firing from hip + pistol with one hand) - Energy Cost on Weapon Manipulation (holding it shouldered, firing) - Suppression Effectiveness Modified by Caliber and Gun Loudness - No Enemy Auto-ready Weapon Option - Fancy Big Merc Rifle Holding Animations - More Random Idle Animations - Kick in HtH Implemented - Jumping Implemented - (Included Fix for IIS with Martial Arts Bonus) - further infos: http://www.ja-galaxy-forum.com/board/ubbthreads.php/topics/308884/A_Small_Compilation_of_New_Fea.html#Post308884 - you also need the latest GameDir files! git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5471 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3735,7 +3735,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
|
||||
// Flugente: If we display the thermometer for overheating, move the ammo counter a bit to the right
|
||||
if ( gGameOptions.fWeaponOverheating == TRUE && gGameExternalOptions.fDisplayOverheatThermometer == TRUE )
|
||||
sNewX = sX + 6;
|
||||
sNewX = sX + 2; //6; // SANDRO - 6 ps too much, 2 are fine
|
||||
|
||||
// Flugente: check for underbarrel weapons and use that object if necessary
|
||||
OBJECTTYPE* pObjShown = pObject;
|
||||
@@ -3942,8 +3942,19 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
|
||||
std::map<INT8, OBJECTTYPE*> ObjList;
|
||||
GetScopeLists(&pSoldier->inv[HANDPOS], ObjList);
|
||||
|
||||
if (ObjList[pSoldier->bScopeMode] != NULL && IsAttachmentClass(ObjList[pSoldier->bScopeMode]->usItem, AC_SCOPE ) )
|
||||
|
||||
if ( pSoldier->bScopeMode == USE_ALT_WEAPON_HOLD )
|
||||
{
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoAdvancedIcon, 55, sNewX, sNewY, VO_BLT_TRANSSHADOW, NULL );
|
||||
|
||||
SetFontForeground( FONT_ORANGE );
|
||||
|
||||
if ( uiBuffer == guiSAVEBUFFER )
|
||||
{
|
||||
RestoreExternBackgroundRect( sNewX, sNewY, 15, 15 );
|
||||
}
|
||||
}
|
||||
else if (ObjList[pSoldier->bScopeMode] != NULL && IsAttachmentClass(ObjList[pSoldier->bScopeMode]->usItem, AC_SCOPE ) )
|
||||
{
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoAdvancedIcon, 54, sNewX, sNewY, VO_BLT_TRANSSHADOW, NULL );
|
||||
|
||||
@@ -3990,7 +4001,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
mprintf( sMagX, sNewY, pStr );
|
||||
gprintfinvalidate( sMagX, sNewY, pStr );
|
||||
}
|
||||
else if (ObjList[pSoldier->bScopeMode] != NULL && IsAttachmentClass(ObjList[pSoldier->bScopeMode]->usItem, AC_SIGHT ) )
|
||||
else if (ObjList[pSoldier->bScopeMode] != NULL && IsAttachmentClass(ObjList[pSoldier->bScopeMode]->usItem, AC_SIGHT ) )
|
||||
{
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoAdvancedIcon, 53, sNewX, sNewY, VO_BLT_TRANSSHADOW, NULL );
|
||||
|
||||
@@ -4086,6 +4097,36 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
gprintfinvalidate( sNewX, sNewY, pStr );
|
||||
|
||||
}
|
||||
// SANDRO - display BRST/AUTO on the second weapon too, if we are going to fire dual bursts
|
||||
if ( pSoldier && pObject == &(pSoldier->inv[SECONDHANDPOS] ) &&
|
||||
(pSoldier->bWeaponMode == WM_BURST || pSoldier->bWeaponMode == WM_AUTOFIRE) &&
|
||||
Item[pSoldier->inv[HANDPOS].usItem].usItemClass == IC_GUN &&
|
||||
!(Item[ pSoldier->inv[HANDPOS ].usItem ].twohanded ) &&
|
||||
pSoldier->IsValidSecondHandBurst() )
|
||||
{
|
||||
sNewY = sY + 13; // rather arbitrary
|
||||
if ( pSoldier->bWeaponMode == WM_BURST )
|
||||
{
|
||||
swprintf( pStr, New113Message[MSG113_BRST] );
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( pStr, New113Message[MSG113_AUTO] );
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
// Get length of string
|
||||
uiStringLength=StringPixLength(pStr, ITEM_FONT );
|
||||
|
||||
sNewX = sX + sWidth - uiStringLength - 4;
|
||||
|
||||
if ( uiBuffer == guiSAVEBUFFER )
|
||||
{
|
||||
RestoreExternBackgroundRect( sNewX, sNewY, 15, 15 );
|
||||
}
|
||||
mprintf( sNewX, sNewY, pStr );
|
||||
gprintfinvalidate( sNewX, sNewY, pStr );
|
||||
}
|
||||
|
||||
// Flugente: display the time left/frequencies on armed bombs (as we can now arm them in our inventory)
|
||||
if( ( (Item[pObject->usItem].usItemClass & (IC_BOMB)) && ( ( (*pObject)[0]->data.misc.bDetonatorType == BOMB_TIMED ) || ( (*pObject)[0]->data.misc.bDetonatorType == BOMB_REMOTE ) ) ) )
|
||||
@@ -6074,7 +6115,7 @@ void ItemDescAttachmentsCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
// Flugente: if we altered a gun's attachments, re-evaluate the scope mode and sight
|
||||
if ( gGameExternalOptions.fScopeModes && gpItemPointerSoldier && Item[gpItemDescObject->usItem].usItemClass == IC_GUN )
|
||||
{
|
||||
ChangeScopeMode( gpItemPointerSoldier );
|
||||
ChangeScopeMode( gpItemPointerSoldier, 0 );
|
||||
|
||||
// reevaluate sight
|
||||
ManLooksForOtherTeams( gpItemPointerSoldier );
|
||||
@@ -9938,7 +9979,7 @@ void ItemPopupRegionCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[gpItemPopupObject->usItem].usItemClass == IC_GUN )
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[gpItemPopupObject->usItem].usItemClass == IC_GUN && (*gpItemPopupObject)[uiItemPos]->data.gun.ubGunShotsLeft > 0 && !(Item[gpItemPopupObject->usItem].singleshotrocketlauncher) )
|
||||
{
|
||||
EmptyWeaponMagazine( gpItemPopupObject, &gItemPointer, uiItemPos );
|
||||
InternalMAPBeginItemPointer( gpItemPopupSoldier );
|
||||
@@ -9949,7 +9990,7 @@ void ItemPopupRegionCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[gpItemPopupObject->usItem].usItemClass == IC_GUN && !(Item[gpItemPopupObject->usItem].singleshotrocketlauncher) && !( guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE ) )
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[gpItemPopupObject->usItem].usItemClass == IC_GUN && (*gpItemPopupObject)[uiItemPos]->data.gun.ubGunShotsLeft > 0 && !(Item[gpItemPopupObject->usItem].singleshotrocketlauncher) && !( guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE ) )
|
||||
{
|
||||
EmptyWeaponMagazine( gpItemPopupObject, &gItemPointer, uiItemPos );
|
||||
gpItemPointer = &gItemPointer;
|
||||
|
||||
Reference in New Issue
Block a user