diff options
author | Nipun Garg | 2019-06-22 07:13:30 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:55 +0200 |
commit | 653960f58aa623d6155cda6a03632a718f47a2c5 (patch) | |
tree | 38e3c064feb4ef972fe5495763351102070b5f6c /engines/hdb/ai-lists.cpp | |
parent | 154fc3c7f3241f75c2d601e097c692f1b084fa3c (diff) | |
download | scummvm-rg350-653960f58aa623d6155cda6a03632a718f47a2c5.tar.gz scummvm-rg350-653960f58aa623d6155cda6a03632a718f47a2c5.tar.bz2 scummvm-rg350-653960f58aa623d6155cda6a03632a718f47a2c5.zip |
HDB: Shift Action initialization to AI()
Diffstat (limited to 'engines/hdb/ai-lists.cpp')
-rw-r--r-- | engines/hdb/ai-lists.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp index 5bb8c0cf0c..1ef2e41edd 100644 --- a/engines/hdb/ai-lists.cpp +++ b/engines/hdb/ai-lists.cpp @@ -139,8 +139,7 @@ void AI::addToAutoList(int x, int y, const char *luaFuncInit, const char *luaFun const char *get; for (int i = 0;i < kMaxAutoActions;i++) { - if (!_autoActions[i]) { - _autoActions[i] = new AutoAction; + if (!_autoActions[i]->x) { _autoActions[i]->x = x; _autoActions[i]->y = y; _autoActions[i]->activated = false; |