mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-02 01:11:19 +00:00
player_t: add icecubevars_t
This commit is contained in:
parent
063d7946a3
commit
e89c34ac74
3 changed files with 26 additions and 0 deletions
|
|
@ -551,6 +551,16 @@ struct powerupvars_t {
|
|||
mobj_t *barrier;
|
||||
};
|
||||
|
||||
// player_t struct for Frozen Production ice cube state
|
||||
struct icecubevars_t {
|
||||
tic_t hitat; // last tic player properly touched frost
|
||||
|
||||
boolean frozen; // frozen in an ice cube
|
||||
UINT8 wiggle; // number of times player wiggled so far
|
||||
tic_t frozenat; // tic that player was frozen
|
||||
UINT8 shaketimer; // while it counts down, ice cube shakes
|
||||
};
|
||||
|
||||
// player_t struct for all alternative viewpoint variables
|
||||
struct altview_t
|
||||
{
|
||||
|
|
@ -965,6 +975,7 @@ struct player_t
|
|||
sonicloopvars_t loop;
|
||||
roundconditions_t roundconditions;
|
||||
powerupvars_t powerup;
|
||||
icecubevars_t icecube;
|
||||
|
||||
level_tally_t tally;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -771,6 +771,13 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
|||
WRITEUINT8(save->p, players[i].tally.showGrade);
|
||||
WRITEUINT8(save->p, players[i].tally.done);
|
||||
}
|
||||
|
||||
// icecubevars_t
|
||||
WRITEUINT32(save->p, players[i].icecube.hitat);
|
||||
WRITEUINT8(save->p, players[i].icecube.frozen);
|
||||
WRITEUINT8(save->p, players[i].icecube.wiggle);
|
||||
WRITEUINT32(save->p, players[i].icecube.frozenat);
|
||||
WRITEUINT8(save->p, players[i].icecube.shaketimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1329,6 +1336,13 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
|||
players[i].tally.done = (boolean)READUINT8(save->p);
|
||||
}
|
||||
|
||||
// icecubevars_t
|
||||
players[i].icecube.hitat = READUINT32(save->p);
|
||||
players[i].icecube.frozen = READUINT8(save->p);
|
||||
players[i].icecube.wiggle = READUINT8(save->p);
|
||||
players[i].icecube.frozenat = READUINT32(save->p);
|
||||
players[i].icecube.shaketimer = READUINT8(save->p);
|
||||
|
||||
//players[i].viewheight = P_GetPlayerViewHeight(players[i]); // scale cannot be factored in at this point
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ TYPEDEF (roundconditions_t);
|
|||
TYPEDEF (skybox_t);
|
||||
TYPEDEF (itemroulette_t);
|
||||
TYPEDEF (powerupvars_t);
|
||||
TYPEDEF (icecubevars_t);
|
||||
TYPEDEF (altview_t);
|
||||
TYPEDEF (player_t);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue