diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/makeYourOwnModelSprite.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/makeYourOwnModelSprite.cpp b/src/makeYourOwnModelSprite.cpp index 1491053..ceb72e1 100644 --- a/src/makeYourOwnModelSprite.cpp +++ b/src/makeYourOwnModelSprite.cpp @@ -38,6 +38,7 @@ class dMakeYourOwn : public dStageActor_c { bool isAnimating; float size; float zOrder; + bool customZ; void setupAnim(const char* name, float rate); void setupModel(const char* arcName, const char* brresName, const char* mdlName); @@ -88,6 +89,8 @@ int dMakeYourOwn::onCreate() { this->zOrder = zLevels[(this->settings >> 16) & 0xF]; + this->customZ = (((this->settings >> 16) & 0xF) != 0); + // Setup the models inside an allocator allocator.link(-1, GameHeaps[0], 0, 0x20); @@ -537,16 +540,16 @@ int dMakeYourOwn::onExecute() { } int dMakeYourOwn::onDraw() { - if ((this->settings >> 16) & 0xF != 0) { + if (customZ) { matrix.translation(pos.x, pos.y, this->zOrder); } // Set where to draw the model : -5500.0 is the official behind layer 2, while 5500.0 is in front of layer 0. else { - matrix.translation(pos.x, pos.y, pos.z -6500.0); } // Set where to draw the model : -5500.0 is the official behind layer 2, while 5500.0 is in front of layer 0. + matrix.translation(pos.x, pos.y, pos.z - 6500.0); } // Set where to draw the model : -5500.0 is the official behind layer 2, while 5500.0 is in front of layer 0. matrix.applyRotationYXZ(&rot.x, &rot.y, &rot.z); // Set how to rotate the drawn model bodyModel.setDrawMatrix(matrix); // Apply matrix bodyModel.setScale(&scale); // Apply scale - bodyModel.calcWorld(false); // Do some shit + bodyModel.calcWorld(true); // Do some shit bodyModel.scheduleForDrawing(); // Add it to the draw list for the game return true; |