mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Added basic requirements to start snitching (alive, conscious, not in transit etc).
When clicking on move equipment menu, check basic requirements. If soldiers land into enemy sector from helicopter, use gsGridNoSweetSpot instead of default arrival location when ESC is pressed. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8919 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -483,7 +483,7 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ );
|
||||
// Flugente: prisons can riot if there aren't enough guards around
|
||||
void HandlePrison( INT16 sMapX, INT16 sMapY, INT8 bZ );
|
||||
|
||||
// Flugente: assigned mercs can move equipemnt in city sectors
|
||||
// Flugente: assigned mercs can move equipment in city sectors
|
||||
void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ );
|
||||
|
||||
void HandleTrainWorkers( );
|
||||
@@ -515,7 +515,7 @@ void HandleAdministrationAssignments();
|
||||
// Flugente: handle exploration assignements
|
||||
void HandleExplorationAssignments();
|
||||
|
||||
// is the character between secotrs in mvt
|
||||
// is the character between sectors in mvt
|
||||
BOOLEAN CharacterIsBetweenSectors( SOLDIERTYPE *pSoldier );
|
||||
|
||||
// update soldier life
|
||||
@@ -2747,6 +2747,56 @@ BOOLEAN CanCharacterSnitch( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
AssertNotNIL(pSoldier);
|
||||
|
||||
// sevenfm: added basic requirements
|
||||
if (!BasicCanCharacterAssignment(pSoldier, TRUE))
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
// only need to be alive and well to do so right now
|
||||
// alive and conscious
|
||||
if (pSoldier->stats.bLife < OKLIFE)
|
||||
{
|
||||
// dead or unconscious...
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
if (pSoldier->bSectorZ != 0)
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
// in transit?
|
||||
if (IsCharacterInTransit(pSoldier) == TRUE)
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
// character on the move?
|
||||
if (CharacterIsBetweenSectors(pSoldier))
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
// check in helicopter in hostile sector
|
||||
if (pSoldier->bAssignment == VEHICLE)
|
||||
{
|
||||
if ((iHelicopterVehicleId != -1) && (pSoldier->iVehicleId == iHelicopterVehicleId))
|
||||
{
|
||||
// enemies in sector
|
||||
if (NumNonPlayerTeamMembersInSector(pSoldier->sSectorX, pSoldier->sSectorY, ENEMY_TEAM) > 0)
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__EPC)
|
||||
{
|
||||
// epcs can't do this
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
// Flugente: we can't perform most assignments while concealed
|
||||
if ( SPY_LOCATION( pSoldier->bAssignment ) )
|
||||
return( FALSE );
|
||||
@@ -8671,7 +8721,7 @@ void HandlePrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: assigned mercs can move equipemnt in city sectors
|
||||
// Flugente: assigned mercs can move equipment in city sectors
|
||||
void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
{
|
||||
// no underground
|
||||
@@ -14103,7 +14153,8 @@ void AssignmentMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
break;
|
||||
|
||||
case( ASSIGN_MENU_MOVE_ITEMS ):
|
||||
if( 1 )
|
||||
if (CanCharacterPractise(pSoldier))
|
||||
//if( 1 )
|
||||
{
|
||||
gAssignMenuState = ASMENU_NONE;
|
||||
|
||||
@@ -14121,14 +14172,14 @@ void AssignmentMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
DetermineBoxPositions();
|
||||
}
|
||||
}
|
||||
else if( 0 )
|
||||
/*else if( 0 )
|
||||
{
|
||||
fTeamPanelDirty = TRUE;
|
||||
fMapScreenBottomDirty = TRUE;
|
||||
swprintf( sString, zMarksMapScreenText[ 18 ], pSoldier->GetName() );
|
||||
|
||||
DoScreenIndependantMessageBox( sString , MSG_BOX_FLAG_OK, NULL );
|
||||
}
|
||||
}*/
|
||||
break;
|
||||
|
||||
case ASSIGN_MENU_FORTIFY:
|
||||
|
||||
Reference in New Issue
Block a user