1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-26 02:38:04 +00:00

Fix arguments parsing for AiWander console command (bug )

This commit is contained in:
Andrei Kortunov 2018-06-16 22:11:10 +04:00
parent 5a9e382efe
commit f3f7487664
2 changed files with 10 additions and 1 deletions
CHANGELOG.md
apps/openmw/mwscript

@ -30,6 +30,7 @@
Bug #4451: Script fails to compile when using "Begin, [ScriptName]" syntax
Bug #4453: Quick keys behaviour is invalid for equipment
Bug #4454: AI opens doors too slow
Bug #4458: AiWander console command handles idle chances incorrectly
Feature #4256: Implement ToggleBorders (TB) console command
Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results
Feature #4222: 360° screenshots

@ -193,10 +193,18 @@ namespace MWScript
Interpreter::Type_Integer time = static_cast<Interpreter::Type_Integer>(runtime[0].mFloat);
runtime.pop();
// Chance for Idle is unused
if (arg0)
{
--arg0;
runtime.pop();
}
std::vector<unsigned char> idleList;
bool repeat = false;
for(int i=1; i < 10 && arg0; ++i)
// Chances for Idle2-Idle9
for(int i=2; i<=9 && arg0; ++i)
{
if(!repeat)
repeat = true;