Merge branch 'master' into newrenderer2

This commit is contained in:
Mitchell Richters 2021-04-15 18:01:26 +10:00
commit 6cebd7fca2
7 changed files with 9 additions and 3 deletions

View file

@ -66,7 +66,7 @@ static const char *cheatGod(int myconnectindex, int state)
auto* p = &ps[myconnectindex];
auto act = p->GetActor();
p->dead_flag = 0;
p->resurrected = true;
act->s.extra = gs.max_player_health;
act->extra = 0;
if (ud.god)

View file

@ -2262,6 +2262,7 @@ int ParseState::parse(void)
ps[g_p].wackedbyactor = nullptr;
ps[g_p].shield_amount = gs.max_armour_amount;
ps[g_p].dead_flag = 0;
ps[g_p].resurrected = false;
ps[g_p].pals.a = 0;
ps[g_p].footprintcount = 0;
ps[g_p].weapreccnt = 0;

View file

@ -84,6 +84,7 @@ void hud_input(int plnum)
{
p->GetActor()->s.extra += 2;
p->last_extra = p->GetActor()->s.extra;
p->resurrected = true;
}
else if (p->GetActor()->s.extra < gs.max_player_health)
p->GetActor()->s.extra = gs.max_player_health;
@ -767,7 +768,7 @@ static void processVehicleInput(player_struct *p, ControlInfo* const hidInput, I
static void FinalizeInput(player_struct *p, InputPacket& input, bool vehicle)
{
if (movementBlocked(p) || p->GetActor()->s.extra <= 0 || (p->dead_flag && !ud.god))
if (movementBlocked(p) || p->GetActor()->s.extra <= 0 || (p->dead_flag && !ud.god && !p->resurrected))
{
// neutralize all movement when blocked or in automap follow mode
loc.fvel = loc.svel = 0;

View file

@ -736,7 +736,7 @@ void playerJump(int snum, int fz, int cz)
void player_struct::apply_seasick(double factor)
{
if (isRRRA() && SeaSick && dead_flag == 0)
if (isRRRA() && SeaSick && (dead_flag == 0 || dead_flag && resurrected))
{
if (SeaSick < 250)
{

View file

@ -81,6 +81,7 @@ void resetplayerstats(int snum)
gFullMap = 0;
p->dead_flag = 0;
p->resurrected = false;
p->wackedbyactor = nullptr;
p->falling_counter = 0;
p->quick_kick = 0;

View file

@ -161,6 +161,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
.Array("weaprecs", w.weaprecs, w.weapreccnt)
("interface_toggle_flag", w.interface_toggle_flag)
("dead_flag", w.dead_flag)
("resurrected", w.resurrected)
("show_empty_weapon", w.show_empty_weapon)
("scuba_amount", w.scuba_amount)
("jetpack_amount", w.jetpack_amount)

View file

@ -244,6 +244,8 @@ struct player_struct
int max_secret_rooms, secret_rooms, max_actors_killed, actors_killed;
bool resurrected;
// Redneck Rampage additions. Those which did not have names in the reconstructed source got one from either RedneckGDX or RedNukem.
// Items were reordered by size.
int stairs;