mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-14 00:54:05 +02:00
#134 fixed
This commit is contained in:
@@ -33,11 +33,6 @@ struct Animation {
|
||||
}
|
||||
|
||||
void setModel(const TR::Model *model) {
|
||||
if (this->model == model)
|
||||
return;
|
||||
|
||||
this->model = model;
|
||||
anims = model ? &level->anims[model->animation] : NULL;
|
||||
time = 0;
|
||||
delta = 0;
|
||||
dir = 1.0f;
|
||||
@@ -46,6 +41,12 @@ struct Animation {
|
||||
next = 0;
|
||||
overrideMask = 0;
|
||||
|
||||
if (this->model == model)
|
||||
return;
|
||||
|
||||
this->model = model;
|
||||
anims = model ? &level->anims[model->animation] : NULL;
|
||||
|
||||
if (overrides) {
|
||||
delete[] overrides;
|
||||
overrides = NULL;
|
||||
|
@@ -1204,7 +1204,7 @@ struct Controller {
|
||||
if (!lockMatrix) {
|
||||
matrix.identity();
|
||||
matrix.translate(pos);
|
||||
if (angle.y != 0.0f) matrix.rotateY(angle.y - animation.rot * animation.delta);
|
||||
if (angle.y != 0.0f) matrix.rotateY(angle.y - (animation.anims != NULL ? (animation.rot * animation.delta) : 0.0f));
|
||||
if (angle.x != 0.0f) matrix.rotateX(angle.x);
|
||||
if (angle.z != 0.0f) matrix.rotateZ(angle.z);
|
||||
}
|
||||
|
Reference in New Issue
Block a user