mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- New Feature: Allow attaching and using underbarrel weapons (by Flugente & JMich)
o You can now attach weapons to other weapons (only one at a time). Comes with additional fire modes (by cycling in tactical with key 'b') o A new item, the KAC masterkey, demonstrates this. Raider and Kelly have one in their starting kit 4. (pics by smeagol) o works both in OCTh and NCTH. Aiming is done via the main gun, but all physical values of the attached gun are considered. o reload an underbarrel gun while it is attached by dropping the ammo on the main gun while an underbarrel fire mode is active. Cycle firemodes in tactical by pressing 'b' o Attachments to underbarrel weapons are inseparable while weapon is attached, but they do work. - Overheating weapons additions (by Flugente) o New option OVERHEATING_DISPLAY_THERMOMETER_RED_OFFSET controls how red the temperature bar is at the beginning. o New option OVERHEATING_SET_ZERO_UPON_NEW_SECTOR sets temperature of items on the floor to zero if loading a new sector git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5133 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+10
-9
@@ -2531,15 +2531,18 @@ void UIHandleMercAttack( SOLDIERTYPE *pSoldier , SOLDIERTYPE *pTargetSoldier, IN
|
||||
INT32 iHandleReturn;
|
||||
INT32 sTargetGridNo;
|
||||
INT8 bTargetLevel;
|
||||
UINT16 usItem;
|
||||
LEVELNODE *pIntNode;
|
||||
STRUCTURE *pStructure;
|
||||
INT32 sGridNo, sNewGridNo;
|
||||
UINT8 ubItemCursor;
|
||||
UINT16 usItem;
|
||||
LEVELNODE* pIntNode;
|
||||
STRUCTURE* pStructure;
|
||||
INT32 sGridNo, sNewGridNo;
|
||||
UINT8 ubItemCursor;
|
||||
|
||||
// get cursor
|
||||
ubItemCursor = GetActionModeCursor( pSoldier );
|
||||
|
||||
OBJECTTYPE* pObj = pSoldier->GetUsedWeapon(&pSoldier->inv[HANDPOS]);
|
||||
usItem = pSoldier->GetUsedWeaponNumber(&pSoldier->inv[HANDPOS]);
|
||||
|
||||
if ( !(gTacticalStatus.uiFlags & INCOMBAT) && pTargetSoldier && Item[ pSoldier->inv[ HANDPOS ].usItem ].usItemClass & IC_WEAPON )
|
||||
{
|
||||
if ( NPCFirstDraw( pSoldier, pTargetSoldier ) )
|
||||
@@ -2555,8 +2558,6 @@ void UIHandleMercAttack( SOLDIERTYPE *pSoldier , SOLDIERTYPE *pTargetSoldier, IN
|
||||
|
||||
// Set aim time to one in UI
|
||||
pSoldier->aiData.bAimTime = (pSoldier->aiData.bShownAimTime );
|
||||
usItem = pSoldier->inv[ HANDPOS ].usItem;
|
||||
|
||||
// ATE: Check if we are targeting an interactive tile, and adjust gridno accordingly...
|
||||
pIntNode = GetCurInteractiveTileGridNoAndStructure( &sGridNo, &pStructure );
|
||||
|
||||
@@ -2642,11 +2643,11 @@ void UIHandleMercAttack( SOLDIERTYPE *pSoldier , SOLDIERTYPE *pTargetSoldier, IN
|
||||
|
||||
if (pSoldier->bWeaponMode == WM_ATTACHED_GL || pSoldier->bWeaponMode == WM_ATTACHED_GL_BURST || pSoldier->bWeaponMode == WM_ATTACHED_GL_AUTO )
|
||||
{
|
||||
iHandleReturn = HandleItem( pSoldier, sTargetGridNo, bTargetLevel, GetAttachedGrenadeLauncher(&pSoldier->inv[ HANDPOS ]), TRUE );
|
||||
iHandleReturn = HandleItem( pSoldier, sTargetGridNo, bTargetLevel, GetAttachedGrenadeLauncher(pObj), TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
iHandleReturn = HandleItem( pSoldier, sTargetGridNo, bTargetLevel, pSoldier->inv[ HANDPOS ].usItem, TRUE );
|
||||
iHandleReturn = HandleItem( pSoldier, sTargetGridNo, bTargetLevel, usItem, TRUE );
|
||||
}
|
||||
|
||||
if ( iHandleReturn < 0 )
|
||||
|
||||
Reference in New Issue
Block a user