mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Remove obsolete stuff from elevator_t
This commit is contained in:
parent
f4282718dc
commit
82bf72f5e1
2 changed files with 6 additions and 13 deletions
|
@ -1926,7 +1926,6 @@ static void SaveElevatorThinker(const thinker_t *th, const UINT8 type)
|
||||||
WRITEFIXED(save_p, ht->delaytimer);
|
WRITEFIXED(save_p, ht->delaytimer);
|
||||||
WRITEFIXED(save_p, ht->floorwasheight);
|
WRITEFIXED(save_p, ht->floorwasheight);
|
||||||
WRITEFIXED(save_p, ht->ceilingwasheight);
|
WRITEFIXED(save_p, ht->ceilingwasheight);
|
||||||
WRITEUINT32(save_p, SavePlayer(ht->player)); // was dummy
|
|
||||||
WRITEUINT32(save_p, SaveLine(ht->sourceline));
|
WRITEUINT32(save_p, SaveLine(ht->sourceline));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3168,7 +3167,7 @@ static thinker_t* LoadFireflickerThinker(actionf_p1 thinker)
|
||||||
//
|
//
|
||||||
// Loads a elevator_t from a save game
|
// Loads a elevator_t from a save game
|
||||||
//
|
//
|
||||||
static thinker_t* LoadElevatorThinker(actionf_p1 thinker, UINT8 floorOrCeiling)
|
static thinker_t* LoadElevatorThinker(actionf_p1 thinker, boolean setplanedata)
|
||||||
{
|
{
|
||||||
elevator_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
elevator_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||||
ht->thinker.function.acp1 = thinker;
|
ht->thinker.function.acp1 = thinker;
|
||||||
|
@ -3187,15 +3186,12 @@ static thinker_t* LoadElevatorThinker(actionf_p1 thinker, UINT8 floorOrCeiling)
|
||||||
ht->delaytimer = READFIXED(save_p);
|
ht->delaytimer = READFIXED(save_p);
|
||||||
ht->floorwasheight = READFIXED(save_p);
|
ht->floorwasheight = READFIXED(save_p);
|
||||||
ht->ceilingwasheight = READFIXED(save_p);
|
ht->ceilingwasheight = READFIXED(save_p);
|
||||||
ht->player = LoadPlayer(READUINT32(save_p)); // was dummy
|
|
||||||
ht->sourceline = LoadLine(READUINT32(save_p));
|
ht->sourceline = LoadLine(READUINT32(save_p));
|
||||||
|
|
||||||
if (ht->sector)
|
if (ht->sector && setplanedata)
|
||||||
{
|
{
|
||||||
if (floorOrCeiling & 2)
|
ht->sector->ceilingdata = ht;
|
||||||
ht->sector->ceilingdata = ht;
|
ht->sector->floordata = ht;
|
||||||
if (floorOrCeiling & 1)
|
|
||||||
ht->sector->floordata = ht;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &ht->thinker;
|
return &ht->thinker;
|
||||||
|
@ -3722,7 +3718,7 @@ static void P_NetUnArchiveThinkers(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case tc_elevator:
|
case tc_elevator:
|
||||||
th = LoadElevatorThinker((actionf_p1)T_MoveElevator, 3);
|
th = LoadElevatorThinker((actionf_p1)T_MoveElevator, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case tc_continuousfalling:
|
case tc_continuousfalling:
|
||||||
|
@ -3745,10 +3741,8 @@ static void P_NetUnArchiveThinkers(void)
|
||||||
th = LoadRaiseThinker((actionf_p1)T_RaiseSector);
|
th = LoadRaiseThinker((actionf_p1)T_RaiseSector);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/// \todo rewrite all the code that uses an elevator_t but isn't an elevator
|
|
||||||
/// \note working on it!
|
|
||||||
case tc_camerascanner:
|
case tc_camerascanner:
|
||||||
th = LoadElevatorThinker((actionf_p1)T_CameraScanner, 0);
|
th = LoadElevatorThinker((actionf_p1)T_CameraScanner, false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case tc_bouncecheese:
|
case tc_bouncecheese:
|
||||||
|
|
|
@ -307,7 +307,6 @@ typedef struct
|
||||||
fixed_t delaytimer;
|
fixed_t delaytimer;
|
||||||
fixed_t floorwasheight; // Height the floor WAS at
|
fixed_t floorwasheight; // Height the floor WAS at
|
||||||
fixed_t ceilingwasheight; // Height the ceiling WAS at
|
fixed_t ceilingwasheight; // Height the ceiling WAS at
|
||||||
player_t *player; // Player who initiated the thinker (used for airbob)
|
|
||||||
line_t *sourceline;
|
line_t *sourceline;
|
||||||
} elevator_t;
|
} elevator_t;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue