mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
************************************************************
* Merged Source Code from Development Trunk: Revision 4063 * ************************************************************ - Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - This will be the Source for the Beta 2011 Test git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+18
-14
@@ -338,16 +338,19 @@ void InteractWithOpenableStruct( SOLDIERTYPE *pSoldier, STRUCTURE *pStructure, U
|
||||
if ( pDoor )
|
||||
{
|
||||
if ( DoTrapCheckOnStartingMenu( pSoldier, pDoor ) )
|
||||
{
|
||||
fTrapsFound = TRUE;
|
||||
}
|
||||
{
|
||||
fTrapsFound = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// Pull Up Menu
|
||||
if ( !fTrapsFound )
|
||||
{
|
||||
InitDoorOpenMenu( pSoldier, pStructure, ubDirection, TRUE );
|
||||
}
|
||||
if ( !fTrapsFound )
|
||||
{
|
||||
// HEADROCK HAM 4: Why not just close the object? Why do we need a menu if there's only one option on it (CLOSE)?
|
||||
// P.S. I don't think it's even possible for opened structures to be trapped to begin with.
|
||||
//InitDoorOpenMenu( pSoldier, pStructure, ubDirection, TRUE );
|
||||
pSoldier->ChangeSoldierState( GetAnimStateForInteraction( pSoldier, fDoor, CLOSE_DOOR ), 0, FALSE );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -475,7 +478,7 @@ BOOLEAN HandleOpenableStruct( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *p
|
||||
if ( pStructure->fFlags & STRUCTURE_OPEN )
|
||||
{
|
||||
// Set costs for these
|
||||
sAPCost = APBPConstants[AP_OPEN_DOOR];
|
||||
sAPCost = GetAPsToOpenDoor( pSoldier ); // SANDRO
|
||||
sBPCost = APBPConstants[BP_OPEN_DOOR];
|
||||
|
||||
fHandleDoor = TRUE;
|
||||
@@ -500,7 +503,7 @@ BOOLEAN HandleOpenableStruct( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *p
|
||||
|
||||
// Set costs for these
|
||||
// Set AP costs to that of opening a door
|
||||
sAPCost = APBPConstants[AP_OPEN_DOOR];
|
||||
sAPCost = GetAPsToOpenDoor( pSoldier ); // SANDRO
|
||||
sBPCost = APBPConstants[BP_OPEN_DOOR];
|
||||
|
||||
pSoldier->ChangeSoldierState( GetAnimStateForInteraction( pSoldier, fDoor, END_OPEN_DOOR ), 0, FALSE );
|
||||
@@ -584,7 +587,7 @@ BOOLEAN HandleOpenableStruct( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *p
|
||||
if ( pDoor == NULL )
|
||||
{
|
||||
// Set costs for these
|
||||
sAPCost = APBPConstants[AP_OPEN_DOOR];
|
||||
sAPCost = GetAPsToOpenDoor( pSoldier ); // SANDRO
|
||||
sBPCost = APBPConstants[BP_OPEN_DOOR];
|
||||
|
||||
// Open if it's not locked....
|
||||
@@ -689,7 +692,7 @@ BOOLEAN HandleOpenableStruct( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *p
|
||||
case HANDLE_DOOR_EXPLODE:
|
||||
|
||||
// Set costs for these
|
||||
sAPCost = APBPConstants[AP_EXPLODE_DOOR];
|
||||
sAPCost = GetAPsToBombDoor( pSoldier ); // SANDRO
|
||||
sBPCost = APBPConstants[BP_EXPLODE_DOOR];
|
||||
|
||||
if ( pDoor == NULL )
|
||||
@@ -717,7 +720,7 @@ BOOLEAN HandleOpenableStruct( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *p
|
||||
case HANDLE_DOOR_LOCKPICK:
|
||||
|
||||
// Set costs for these
|
||||
sAPCost = APBPConstants[AP_PICKLOCK];
|
||||
sAPCost = GetAPsToPicklock( pSoldier ); // SANDRO
|
||||
sBPCost = APBPConstants[BP_PICKLOCK];
|
||||
|
||||
// Attempt to pick lock
|
||||
@@ -834,7 +837,7 @@ BOOLEAN HandleOpenableStruct( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *p
|
||||
case HANDLE_DOOR_UNTRAP:
|
||||
|
||||
// Set costs for these
|
||||
sAPCost = APBPConstants[AP_UNTRAP_DOOR];
|
||||
sAPCost = GetAPsToUntrapDoor( pSoldier ); // SANDRO
|
||||
sBPCost = APBPConstants[BP_UNTRAP_DOOR];
|
||||
|
||||
// OK, if we have no lock, show that!
|
||||
@@ -931,7 +934,8 @@ BOOLEAN HandleOpenableStruct( SOLDIERTYPE *pSoldier, INT32 sGridNo, STRUCTURE *p
|
||||
else
|
||||
{
|
||||
// Set costs for these
|
||||
sAPCost = APBPConstants[AP_OPEN_DOOR];
|
||||
// SANDRO - changed this
|
||||
sAPCost = GetAPsToOpenDoor( pSoldier );
|
||||
sBPCost = APBPConstants[BP_OPEN_DOOR];
|
||||
|
||||
// Open if it's not locked....
|
||||
|
||||
Reference in New Issue
Block a user