Display warning if there is not enough energy to shoot

Fix issue #949
master
tomangelo2 2017-05-20 20:41:30 +02:00
parent 681d5203e5
commit 47a8f70f0f
1 changed files with 5 additions and 0 deletions

View File

@ -2382,6 +2382,11 @@ bool CScriptFunctions::rFire(CBotVar* var, CBotVar* result, int& exception, void
if ( err != ERR_OK )
{
script->m_taskExecutor->StopForegroundTask();
if ( script->m_errMode == ERM_STOP )
{
exception = err;
return false;
}
return true;
}
}