mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- AI controlled soldiers can now jump through windows
- new ini option allows to jump through closed windows, smashing them while doing so git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5682 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+11
-10
@@ -21,7 +21,7 @@ extern BOOLEAN DoesSAMExistHere( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ,
|
||||
|
||||
//----------------legion by Jazz
|
||||
|
||||
BOOLEAN IsJumpableWindowPresentAtGridNo( INT32 sGridNo, INT8 direction2 )
|
||||
BOOLEAN IsJumpableWindowPresentAtGridNo( INT32 sGridNo, INT8 direction2, BOOLEAN fIntactWindowsAlso )
|
||||
{
|
||||
STRUCTURE * pStructure;
|
||||
|
||||
@@ -29,16 +29,17 @@ BOOLEAN IsJumpableWindowPresentAtGridNo( INT32 sGridNo, INT8 direction2 )
|
||||
|
||||
if ( pStructure )
|
||||
{
|
||||
|
||||
if ( ( direction2 == SOUTH || direction2 == NORTH ) && (pStructure->ubWallOrientation == OUTSIDE_TOP_LEFT || pStructure->ubWallOrientation == INSIDE_TOP_LEFT ) && pStructure->fFlags & STRUCTURE_WALLNWINDOW && !(pStructure->fFlags & STRUCTURE_SPECIAL) && ( pStructure->fFlags & STRUCTURE_OPEN ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
if ( ( direction2 == SOUTH || direction2 == NORTH ) && (pStructure->ubWallOrientation == OUTSIDE_TOP_LEFT || pStructure->ubWallOrientation == INSIDE_TOP_LEFT ) && pStructure->fFlags & STRUCTURE_WALLNWINDOW && !(pStructure->fFlags & STRUCTURE_SPECIAL) )
|
||||
{
|
||||
if ( fIntactWindowsAlso || ( pStructure->fFlags & STRUCTURE_OPEN ) )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
if ( ( direction2 == EAST || direction2 == WEST ) && ( pStructure->ubWallOrientation == OUTSIDE_TOP_RIGHT || pStructure->ubWallOrientation == INSIDE_TOP_RIGHT ) && pStructure->fFlags & STRUCTURE_WALLNWINDOW && !(pStructure->fFlags & STRUCTURE_SPECIAL) && ( pStructure->fFlags & STRUCTURE_OPEN ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
if ( ( direction2 == EAST || direction2 == WEST ) && ( pStructure->ubWallOrientation == OUTSIDE_TOP_RIGHT || pStructure->ubWallOrientation == INSIDE_TOP_RIGHT ) && pStructure->fFlags & STRUCTURE_WALLNWINDOW && !(pStructure->fFlags & STRUCTURE_SPECIAL) )
|
||||
{
|
||||
if ( fIntactWindowsAlso || ( pStructure->fFlags & STRUCTURE_OPEN ) )
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
|
||||
Reference in New Issue
Block a user