src/ai/api/ai_transactionmode.cpp
branchnoai
changeset 9560 ff2dde050a4c
parent 9486 a9b5f6b8667c
child 9629 66dde6412125
equal deleted inserted replaced
9559:8fad57b884a7 9560:ff2dde050a4c
    59 
    59 
    60 bool AITransactionMode::Execute()
    60 bool AITransactionMode::Execute()
    61 {
    61 {
    62 	/* Make sure we are stopped */
    62 	/* Make sure we are stopped */
    63 	this->Stop();
    63 	this->Stop();
       
    64 
       
    65 	/* Remove the costs this transaction costs from the total costs, so any
       
    66 	 *  'accounting' running on the background will get the real costs for
       
    67 	 *  executing, and not the double value of both testing and executing */
       
    68 	this->IncreaseDoCommandCosts(-this->GetCosts());
    64 
    69 
    65 	/* Switch to a forced execute mode */
    70 	/* Switch to a forced execute mode */
    66 	AIExecMode exec;
    71 	AIExecMode exec;
    67 
    72 
    68 	/* Reverse stack should be empty */
    73 	/* Reverse stack should be empty */