(svn r15406) -Fix: make Valuate actually cost a few opcodes to not make it a single opcode method of doing lots of the same thing. This should resolve most of the hiccups caused by AIs.

This commit is contained in:
rubidium
2009-02-08 01:51:48 +00:00
parent 8bd5f10a2c
commit e1b1fd18b5
3 changed files with 13 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
#include "ai_abstractlist.hpp"
#include "../../debug.h"
#include "../../core/alloc_func.hpp"
#include "../../script/squirrel.hpp"
/**
* Base class for any AIAbstractList sorter.
@@ -818,6 +819,8 @@ SQInteger AIAbstractList::Valuate(HSQUIRRELVM vm) {
(*iter).second = (int32)value;
this->buckets[(int32)value].insert((*iter).first);
Squirrel::DecreaseOps(vm, 5);
}
sq_release(vm, &obj_func);