mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
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:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user