Ver código fonte

Runs again. Wrong SkeletalModels used?

Thomas Buck 10 anos atrás
pai
commit
4061e9ff5e
3 arquivos alterados com 17 adições e 3 exclusões
  1. 4
    0
      ChangeLog.md
  2. 5
    0
      TODO.md
  3. 8
    3
      src/SkeletalModel.cpp

+ 4
- 0
ChangeLog.md Ver arquivo

@@ -2,6 +2,10 @@
2 2
 
3 3
 ## OpenRaider (0.1.3) xythobuz <xythobuz@xythobuz.de>
4 4
 
5
+    [ 20140516 ]
6
+    * Finished moving the Entity/SkeletalModel logic into classes
7
+    * Currently seems as if wrong SkeletalModels are used for entities?
8
+
5 9
     [ 20140515 ]
6 10
     * Slight cmake script improvements
7 11
     * Created Entity class that will also get animation state

+ 5
- 0
TODO.md Ver arquivo

@@ -17,6 +17,11 @@ There are these DebugModel, DebugMap flags...?
17 17
 ## Changes
18 18
 
19 19
 * Using std::vector with [] is not bound checked. Segfaults were caused because the upper bound of the argument was never checked and garbage was returned... Do consistent checks, or use .at() as it throws an exception
20
+* Creating the Room class has introduced a bug that crashes when walking the level:
21
+
22
+    Assertion failed: (sector < (int)mRooms.at(room)->sizeSectors()), function isWall, file /Users/thomas/Projekte/OpenRaider/src/World.cpp, line 180.
23
+
24
+* The wrong SkeletalModels are used by other entities...?
20 25
 
21 26
 ## Cmake
22 27
 

+ 8
- 3
src/SkeletalModel.cpp Ver arquivo

@@ -81,9 +81,14 @@ BoneFrame::BoneFrame(TombRaider &tr, unsigned int index, unsigned int i, unsigne
81 81
     tr2_moveable_t *moveable = tr.Moveable();
82 82
     tr2_item_t *item = tr.Item();
83 83
 
84
-    pos[0] = (short)*frame[*frame_offset + 6];
85
-    pos[1] = (short)*frame[*frame_offset + 7];
86
-    pos[2] = (short)*frame[*frame_offset + 8];
84
+    /*!
85
+     * \fixme Do we really need to keep frame and frame_offset
86
+     * at the top level, passing pointers?!
87
+     */
88
+
89
+    pos[0] = (short)((*frame)[(*frame_offset) + 6]);
90
+    pos[1] = (short)((*frame)[(*frame_offset) + 7]);
91
+    pos[2] = (short)((*frame)[(*frame_offset) + 8]);
87 92
 
88 93
     yaw = ((item[i].angle >> 14) & 0x03);
89 94
     yaw *= 90;

Carregando…
Cancelar
Salvar