(svn r22120) -Change: [NoAI] Prevent AIs from getting consistently over their allowed amount of operations by subtracting the amount they went over "budget" from the budget for the next "tick".

This commit is contained in:
rubidium
2011-02-20 20:28:49 +00:00
parent 1fc7b1c451
commit 089d2053d5
2 changed files with 14 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ private:
void *global_pointer; ///< Can be set by who ever initializes Squirrel
SQPrintFunc *print_func; ///< Points to either NULL, or a custom print handler
bool crashed; ///< True if the squirrel script made an error.
int overdrawn_ops; ///< The amount of operations we have overdrawn.
/**
* The internal RunError handler. It looks up the real error and calls RunError with it.