NEVERHOOD: Fix uninitialized variables in Sprite (bug #6663)

This commit is contained in:
johndoe123 2014-06-30 13:09:59 +02:00
parent ae26f9537e
commit b7884f2fba

View File

@ -31,8 +31,20 @@ Sprite::Sprite(NeverhoodEngine *vm, int objectPriority)
: Entity(vm, objectPriority), _x(0), _y(0), _spriteUpdateCb(NULL), _filterXCb(NULL), _filterYCb(NULL),
_dataResource(vm), _doDeltaX(false), _doDeltaY(false), _needRefresh(false), _flags(0), _surface(NULL) {
SetMessageHandler(&Sprite::handleMessage);
_drawOffset.x = 0;
_drawOffset.y = 0;
_drawOffset.width = 0;
_drawOffset.height = 0;
_collisionBounds.x1 = 0;
_collisionBounds.y1 = 0;
_collisionBounds.x2 = 0;
_collisionBounds.y2 = 0;
_collisionBoundsOffset.x = 0;
_collisionBoundsOffset.y = 0;
_collisionBoundsOffset.width = 0;
_collisionBoundsOffset.height = 0;
SetMessageHandler(&Sprite::handleMessage);
}
Sprite::~Sprite() {