mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- removed beta version build define
- allowed helicopter to land in enemy controlled sector - SHIFT+N now can use goggles attached to the helmet git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@901 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1462,7 +1462,7 @@ BOOLEAN CanCharacterOnDuty( SOLDIERTYPE *pSoldier )
|
|||||||
// enemies in sector
|
// enemies in sector
|
||||||
if( NumEnemiesInSector( pSoldier -> sSectorX, pSoldier -> sSectorY ) > 0 )
|
if( NumEnemiesInSector( pSoldier -> sSectorX, pSoldier -> sSectorY ) > 0 )
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2997,9 +2997,13 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
// swap sungoggles and nightgoggles
|
// swap sungoggles and nightgoggles
|
||||||
case 'N':
|
case 'N':
|
||||||
{
|
{
|
||||||
|
/* CHRISL - Adjusted this option to allow the game to search through Helmet attachments
|
||||||
|
as well as inventory positions.
|
||||||
|
*/
|
||||||
SOLDIERTYPE *pTeamSoldier;
|
SOLDIERTYPE *pTeamSoldier;
|
||||||
INT8 bLoop, bSlot1, bSlot2, temp;
|
OBJECTTYPE * pObj;
|
||||||
INT16 lastBonus=0;
|
INT8 bLoop, bSlot1, bSlot2, bSlot3, temp, tempStatus=0;
|
||||||
|
INT16 lastBonus=0, tempItem=0;
|
||||||
for (bLoop=gTacticalStatus.Team[gbPlayerNum].bFirstID, pTeamSoldier=MercPtrs[bLoop]; bLoop <= gTacticalStatus.Team[gbPlayerNum].bLastID; bLoop++, pTeamSoldier++)
|
for (bLoop=gTacticalStatus.Team[gbPlayerNum].bFirstID, pTeamSoldier=MercPtrs[bLoop]; bLoop <= gTacticalStatus.Team[gbPlayerNum].bLastID; bLoop++, pTeamSoldier++)
|
||||||
{
|
{
|
||||||
if ( OK_CONTROLLABLE_MERC( pTeamSoldier ) && pTeamSoldier->bAssignment == CurrentSquad( ) && !AM_A_ROBOT( pTeamSoldier ) )
|
if ( OK_CONTROLLABLE_MERC( pTeamSoldier ) && pTeamSoldier->bAssignment == CurrentSquad( ) && !AM_A_ROBOT( pTeamSoldier ) )
|
||||||
@@ -3011,7 +3015,9 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
{
|
{
|
||||||
lastBonus=0;
|
lastBonus=0;
|
||||||
bSlot2 = ITEM_NOT_FOUND;
|
bSlot2 = ITEM_NOT_FOUND;
|
||||||
|
bSlot3 = ITEM_NOT_FOUND;
|
||||||
temp = 0;
|
temp = 0;
|
||||||
|
pObj = &(pTeamSoldier->inv[HELMETPOS]);
|
||||||
while (temp != ITEM_NOT_FOUND)
|
while (temp != ITEM_NOT_FOUND)
|
||||||
{
|
{
|
||||||
temp = FindNightGoggles( pTeamSoldier, lastBonus );
|
temp = FindNightGoggles( pTeamSoldier, lastBonus );
|
||||||
@@ -3021,7 +3027,28 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
bSlot2 = temp;
|
bSlot2 = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( bSlot2 != ITEM_NOT_FOUND )
|
for (int i = 0; i < MAX_ATTACHMENTS; i++)
|
||||||
|
{
|
||||||
|
if ( Item[ pObj->usAttachItem[i] ].nightvisionrangebonus > lastBonus && Item[ pObj->usAttachItem[i] ].usItemClass == IC_FACE )
|
||||||
|
{
|
||||||
|
bSlot2 = ITEM_NOT_FOUND;
|
||||||
|
bSlot3 = i;
|
||||||
|
lastBonus = Item[ pObj->usAttachItem[i] ].nightvisionrangebonus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( bSlot3 != ITEM_NOT_FOUND )
|
||||||
|
{
|
||||||
|
// Duplicate item in helmet attachment slot
|
||||||
|
tempItem = pObj->usAttachItem[bSlot3];
|
||||||
|
tempStatus = pObj->bAttachStatus[bSlot3];
|
||||||
|
// Replace helmet attachment with face slot
|
||||||
|
pObj->usAttachItem[bSlot3] = pTeamSoldier->inv[bSlot1].usItem;
|
||||||
|
pObj->bAttachStatus[bSlot3] = pTeamSoldier->inv[bSlot1].bStatus[0];
|
||||||
|
// Replace face slot with helmet attachment from temp
|
||||||
|
pTeamSoldier->inv[bSlot1].usItem = tempItem;
|
||||||
|
pTeamSoldier->inv[bSlot1].bStatus[0] = tempStatus;
|
||||||
|
}
|
||||||
|
else if ( bSlot2 != ITEM_NOT_FOUND )
|
||||||
{
|
{
|
||||||
SwapObjs( &(pTeamSoldier->inv[bSlot1]), &(pTeamSoldier->inv[bSlot2] ) );
|
SwapObjs( &(pTeamSoldier->inv[bSlot1]), &(pTeamSoldier->inv[bSlot2] ) );
|
||||||
}
|
}
|
||||||
@@ -3031,7 +3058,9 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
{
|
{
|
||||||
lastBonus=0;
|
lastBonus=0;
|
||||||
bSlot2 = ITEM_NOT_FOUND;
|
bSlot2 = ITEM_NOT_FOUND;
|
||||||
|
bSlot3 = ITEM_NOT_FOUND;
|
||||||
temp = 0;
|
temp = 0;
|
||||||
|
pObj = &(pTeamSoldier->inv[HELMETPOS]);
|
||||||
while (temp != ITEM_NOT_FOUND)
|
while (temp != ITEM_NOT_FOUND)
|
||||||
{
|
{
|
||||||
temp = FindSunGoggles( pTeamSoldier, lastBonus );
|
temp = FindSunGoggles( pTeamSoldier, lastBonus );
|
||||||
@@ -3041,7 +3070,28 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
bSlot2 = temp;
|
bSlot2 = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( bSlot2 != ITEM_NOT_FOUND )
|
for (int i = 0; i < MAX_ATTACHMENTS; i++)
|
||||||
|
{
|
||||||
|
if ( Item[ pObj->usAttachItem[i] ].brightlightvisionrangebonus > lastBonus && Item[ pObj->usAttachItem[i] ].usItemClass == IC_FACE )
|
||||||
|
{
|
||||||
|
bSlot2 = ITEM_NOT_FOUND;
|
||||||
|
bSlot3 = i;
|
||||||
|
lastBonus = Item[ pObj->usAttachItem[i] ].brightlightvisionrangebonus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( bSlot3 != ITEM_NOT_FOUND )
|
||||||
|
{
|
||||||
|
// Duplicate item in helmet attachment slot
|
||||||
|
tempItem = pObj->usAttachItem[bSlot3];
|
||||||
|
tempStatus = pObj->bAttachStatus[bSlot3];
|
||||||
|
// Replace helmet attachment with face slot
|
||||||
|
pObj->usAttachItem[bSlot3] = pTeamSoldier->inv[bSlot1].usItem;
|
||||||
|
pObj->bAttachStatus[bSlot3] = pTeamSoldier->inv[bSlot1].bStatus[0];
|
||||||
|
// Replace face slot with helmet attachment from temp
|
||||||
|
pTeamSoldier->inv[bSlot1].usItem = tempItem;
|
||||||
|
pTeamSoldier->inv[bSlot1].bStatus[0] = tempStatus;
|
||||||
|
}
|
||||||
|
else if ( bSlot2 != ITEM_NOT_FOUND )
|
||||||
{
|
{
|
||||||
SwapObjs( &(pTeamSoldier->inv[bSlot1]), &(pTeamSoldier->inv[bSlot2] ) );
|
SwapObjs( &(pTeamSoldier->inv[bSlot1]), &(pTeamSoldier->inv[bSlot2] ) );
|
||||||
}
|
}
|
||||||
@@ -3054,6 +3104,9 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
PositionSoldierLight( pTeamSoldier );
|
PositionSoldierLight( pTeamSoldier );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* CHRISL - Adjusted this option to allow the game to search through Helmet attachments
|
||||||
|
as well as inventory positions.
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
#include "Language Defines.h"
|
#include "Language Defines.h"
|
||||||
|
|
||||||
// Remove comment to build Beta version (with lot of debug infos) including the Editor
|
// Remove comment to build Beta version (with lot of debug infos) including the Editor
|
||||||
#define JA2BETAVERSION
|
//#define JA2BETAVERSION
|
||||||
|
|
||||||
// Normal test version
|
// Normal test version
|
||||||
//#define JA2TESTVERSION
|
//#define JA2TESTVERSION
|
||||||
|
|||||||
Reference in New Issue
Block a user