Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed|libheretic: Heretic v1.3 saved game thinker translation
XSector's specialData should point to the new thinker_t instance.
  • Loading branch information
danij-deng committed Feb 4, 2014
1 parent 6553ea8 commit a50af7d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doomsday/plugins/heretic/src/p_oldsvg.cpp
Expand Up @@ -36,7 +36,6 @@
#include "hu_inventory.h"
#include <cstdio>
#include <cstring>
#include <de/libdeng2.h>

// Do NOT change this:
#define V13_SAVE_VERSION 130 ///< Version number associated with a recognised heretic.exe game save state.
Expand Down Expand Up @@ -519,7 +518,7 @@ typedef struct {
if(!(temp + V13_THINKER_T_FUNC_OFFSET))
Thinker_SetStasis(&ceiling->thinker, true);

P_ToXSector(ceiling->sector)->specialData = de::function_cast<void*>(T_MoveCeiling);
P_ToXSector(ceiling->sector)->specialData = ceiling;
return true; // Add this thinker.
}

Expand Down Expand Up @@ -557,7 +556,7 @@ typedef struct {

door->thinker.function = T_Door;

P_ToXSector(door->sector)->specialData = de::function_cast<void*>(T_Door);
P_ToXSector(door->sector)->specialData = door;
return true; // Add this thinker.
}

Expand Down Expand Up @@ -601,7 +600,7 @@ typedef struct {

floor->thinker.function = T_MoveFloor;

P_ToXSector(floor->sector)->specialData = de::function_cast<void*>(T_MoveFloor);
P_ToXSector(floor->sector)->specialData = floor;
return true; // Add this thinker.
}

Expand Down Expand Up @@ -648,7 +647,7 @@ typedef struct {
if(!(temp + V13_THINKER_T_FUNC_OFFSET))
Thinker_SetStasis(&plat->thinker, true);

P_ToXSector(plat->sector)->specialData = de::function_cast<void*>(T_PlatRaise);
P_ToXSector(plat->sector)->specialData = plat;
return true; // Add this thinker.
}

Expand Down

0 comments on commit a50af7d

Please sign in to comment.