diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 2 | ||||
-rw-r--r-- | engines/hdb/ai-inventory.cpp | 2 | ||||
-rw-r--r-- | engines/hdb/ai.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index cd13505041..8e2db69d93 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -558,7 +558,7 @@ void AI::initAllEnts() { } for (int i = 0; i < _numInventory; i++) { - AIEntity *temp = _inventory[i].ent; + AIEntity *temp = _inventory[i]->ent; // Clear out all ptrs in entity before writing for (int j = 0; i < kMaxAnimFrames; i++) { diff --git a/engines/hdb/ai-inventory.cpp b/engines/hdb/ai-inventory.cpp index d050b3cfaf..ea23dd2295 100644 --- a/engines/hdb/ai-inventory.cpp +++ b/engines/hdb/ai-inventory.cpp @@ -61,7 +61,7 @@ bool AI::addToInventory(AIEntity *e) { return false; } - memcpy(&_inventory[_numInventory].ent, e, sizeof(AIEntity)); + _inventory[_numInventory]->ent = e; _numInventory++; // If weapon, ready it diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 63eefc745f..89491b6e7b 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -720,7 +720,7 @@ private: int _numGooCups; int _numMonkeystones; - InvEnt _inventory[kMaxInventory]; + InvEnt *_inventory[kMaxInventory]; int _numInventory; Waypoint _waypoints[kMaxWaypoints]; |