Codechange: Get/pass engine by reference instead of pointer.
This commit is contained in:
committed by
Peter Nelson
parent
7ff0c67f77
commit
55098a2f2e
@@ -310,8 +310,8 @@ ScriptObject::DisableDoCommandScope::DisableDoCommandScope()
|
||||
IncreaseDoCommandCosts(res.GetCost());
|
||||
if (!_generating_world) {
|
||||
/* Charge a nominal fee for asynchronously executed commands */
|
||||
Squirrel *engine = ScriptObject::GetActiveInstance().engine;
|
||||
Squirrel::DecreaseOps(engine->GetVM(), 100);
|
||||
Squirrel &engine = *ScriptObject::GetActiveInstance().engine;
|
||||
Squirrel::DecreaseOps(engine.GetVM(), 100);
|
||||
}
|
||||
if (callback != nullptr) {
|
||||
/* Insert return value into to stack and throw a control code that
|
||||
|
||||
Reference in New Issue
Block a user