Lua: initialize return values to prevent returning garbage if soldier is not found.

Improved r8104 fix to allow Fatima quest (civilians and NPCs with profile can go off screen).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8725 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2020-01-08 17:17:59 +00:00
parent a802c3db63
commit 9e6412a937
2 changed files with 90 additions and 95 deletions
+5 -4
View File
@@ -4863,10 +4863,11 @@ BOOLEAN NewOKDestination( SOLDIERTYPE * pCurrSoldier, INT32 sGridNo, BOOLEAN fPe
INT16 sDesiredLevel;
BOOLEAN fOKCheckStruct;
if ( !GridNoOnVisibleWorldTile( sGridNo ) )
{
return( FALSE );
}
// sevenfm: allow civilians and NPCs with profile to go off screen
if (!GridNoOnVisibleWorldTile(sGridNo) && (pCurrSoldier->bTeam != CIV_TEAM || pCurrSoldier->ubProfile == NO_PROFILE))
{
return(FALSE);
}
if (fPeopleToo && ( bPerson = WhoIsThere2( sGridNo, bLevel ) ) != NOBODY )
{