diff options
author | Thomas Fach-Pedersen | 2016-10-22 18:30:46 +0200 |
---|---|---|
committer | Thomas Fach-Pedersen | 2016-10-22 18:46:28 +0200 |
commit | 669e6be4380f058cf097c686e0edaa75ae500576 (patch) | |
tree | 06c163627a447e1d9acee7820ae6e90713768dc5 /engines/bladerunner/actor.cpp | |
parent | 41e6a5d2a64bbecd37d47a1dc87b4135c2149f4a (diff) | |
download | scummvm-rg350-669e6be4380f058cf097c686e0edaa75ae500576.tar.gz scummvm-rg350-669e6be4380f058cf097c686e0edaa75ae500576.tar.bz2 scummvm-rg350-669e6be4380f058cf097c686e0edaa75ae500576.zip |
BLADERUNNER: Fix uninitialized variable accesses
Fixes a couple of issues reported by valgrind and clang
sanitizers.
In particular, the initialization of Actor::_inCombat means that McCoy
no longer randomly has his gun out at the beginning of the game. In
SliceRenderer::drawInWorld, the assert of _sliceFramePtr has been
moved to after the call to setupFrameInWorld which is the method that
initializes the field. This misplaced assert caused the game to crash
for several people.
Diffstat (limited to 'engines/bladerunner/actor.cpp')
-rw-r--r-- | engines/bladerunner/actor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index 7509bb9575..c778a6dee0 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -78,7 +78,9 @@ void Actor::setup(int actorId) { _fps = 15; _frame_ms = 1000 / _fps; + _isMoving = false; _isTargetable = false; + _inCombat = false; _isInvisible = false; _isImmuneToObstacles = false; |