Browse Source

Removed gLaraModel

Thomas Buck 10 years ago
parent
commit
ce1314859e
2 changed files with 11 additions and 14 deletions
  1. 0
    3
      src/Game.cpp
  2. 11
    11
      src/OpenRaider.cpp

+ 0
- 3
src/Game.cpp View File

@@ -24,7 +24,6 @@
24 24
 
25 25
 // Old Code compatibility
26 26
 #define TexelScale 256.0f
27
-skeletal_model_t *gLaraModel;
28 27
 
29 28
 #ifndef EXPERIMENTAL_UNFIFIED_ROOM_GEOMETERY
30 29
 #define TextureLimit 24
@@ -556,8 +555,6 @@ void Game::processMoveable(int index, int i, int *ent,
556 555
     // Gather more info if this is lara
557 556
     if (moveable[index].object_id == 0)
558 557
     {
559
-        gLaraModel = r_model; // hack to avoid broken system until new event sys
560
-
561 558
         lara = true;
562 559
         getCamera().translate(pos[0], pos[1] - 470, pos[2]);
563 560
         thing->type = 0x02;

+ 11
- 11
src/OpenRaider.cpp View File

@@ -24,8 +24,6 @@
24 24
 #include "utils/time.h"
25 25
 #include "OpenRaider.h"
26 26
 
27
-extern skeletal_model_t *gLaraModel; //! \fixme
28
-
29 27
 OpenRaider::OpenRaider() {
30 28
     mRunning = false;
31 29
     mFPS = false;
@@ -558,13 +556,14 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
558 556
                 getConsole().print("Pass BOOL to pigtail command!");
559 557
                 return -46;
560 558
             }
561
-            gLaraModel->pigtails = b;
559
+            SkeletalModel *tmp = static_cast<SkeletalModel *>(getGame().mLara->tmpHook);
560
+            tmp->model->pigtails = b;
562 561
             if (b) {
563
-                gLaraModel->ponyOff -= 20;
564
-                gLaraModel->ponytail[1] -= 32;
562
+                tmp->model->ponyOff -= 20;
563
+                tmp->model->ponytail[1] -= 32;
565 564
             } else {
566
-                gLaraModel->ponyOff += 20;
567
-                gLaraModel->ponytail[1] += 32;
565
+                tmp->model->ponyOff += 20;
566
+                tmp->model->ponytail[1] += 32;
568 567
             }
569 568
             getConsole().print("Pigtail is now %s", b ? "on" : "off");
570 569
         } else {
@@ -573,10 +572,11 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
573 572
         }
574 573
     } else if (strcmp(command, "ponypos") == 0) {
575 574
         if (args->size() > 3) {
576
-            gLaraModel->ponytail[0] = (float)atof(args->at(0));
577
-            gLaraModel->ponytail[1] = (float)atof(args->at(1));
578
-            gLaraModel->ponytail[2] = (float)atof(args->at(2));
579
-            gLaraModel->ponytailAngle = (float)atof(args->at(3));
575
+            SkeletalModel *tmp = static_cast<SkeletalModel *>(getGame().mLara->tmpHook);
576
+            tmp->model->ponytail[0] = (float)atof(args->at(0));
577
+            tmp->model->ponytail[1] = (float)atof(args->at(1));
578
+            tmp->model->ponytail[2] = (float)atof(args->at(2));
579
+            tmp->model->ponytailAngle = (float)atof(args->at(3));
580 580
         } else {
581 581
             getConsole().print("Invalid use of ponypos-command!");
582 582
             return -48;

Loading…
Cancel
Save