From 1b2437900cd30b0d6b7626a9ff2e59e063598b01 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Thu, 4 Jul 2019 01:20:01 +0530 Subject: HDB: Do not declare AIEntity every frame --- engines/hdb/hdb.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/hdb/hdb.cpp') diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 4c48e06e59..b9ae6c100f 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -692,6 +692,8 @@ Common::Error HDBGame::run() { lua->executeFile("test.lua"); #endif + AIEntity *e; + while (!shouldQuit()) { Common::Event event; @@ -744,7 +746,7 @@ Common::Error HDBGame::run() { _ai->processCines(); //_window->drawDialog(); - AIEntity *e = _ai->getPlayer(); + e = _ai->getPlayer(); if (e && e->level < 2) _ai->drawWayPoints(); -- cgit v1.2.3