- 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:
Flugente
2012-11-11 05:31:41 +00:00
parent e98c1ce83c
commit 004728d2e4
12 changed files with 297 additions and 100 deletions
+3 -2
View File
@@ -17,6 +17,7 @@
#include "overhead.h"
#include "Random.h"
#include "Pathai.h"
#include "GameSettings.h" // added by Flugente
#endif
@@ -210,7 +211,7 @@ BOOLEAN FindWindowJumpDirection( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bSta
if (direction2 == NORTH || direction2 == WEST)
{
// IF there is a fence in this gridno, return false!
if ( IsJumpableWindowPresentAtGridNo( sGridNo, direction2 ) )
if ( IsJumpableWindowPresentAtGridNo( sGridNo, direction2, gGameExternalOptions.fCanJumpThroughClosedWindows ) )
{
return( FALSE );
}
@@ -241,7 +242,7 @@ BOOLEAN FindWindowJumpDirection( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bSta
// ATE: Check if there is somebody waiting here.....
// Check if we have a fence here
if ( IsJumpableWindowPresentAtGridNo( sNewGridNo , direction2) )
if ( IsJumpableWindowPresentAtGridNo( sNewGridNo , direction2, gGameExternalOptions.fCanJumpThroughClosedWindows) )
{
fFound = TRUE;