mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- Duke: Add resurrected
flag to handle resurrection via cheating or when pissing in RR.
This commit is contained in:
parent
f6c4c19b02
commit
aeb16e390c
7 changed files with 9 additions and 3 deletions
|
@ -66,7 +66,7 @@ static const char *cheatGod(int myconnectindex, int state)
|
||||||
auto* p = &ps[myconnectindex];
|
auto* p = &ps[myconnectindex];
|
||||||
auto act = p->GetActor();
|
auto act = p->GetActor();
|
||||||
|
|
||||||
p->dead_flag = 0;
|
p->resurrected = true;
|
||||||
act->s.extra = gs.max_player_health;
|
act->s.extra = gs.max_player_health;
|
||||||
act->extra = 0;
|
act->extra = 0;
|
||||||
if (ud.god)
|
if (ud.god)
|
||||||
|
|
|
@ -2262,6 +2262,7 @@ int ParseState::parse(void)
|
||||||
ps[g_p].wackedbyactor = nullptr;
|
ps[g_p].wackedbyactor = nullptr;
|
||||||
ps[g_p].shield_amount = gs.max_armour_amount;
|
ps[g_p].shield_amount = gs.max_armour_amount;
|
||||||
ps[g_p].dead_flag = 0;
|
ps[g_p].dead_flag = 0;
|
||||||
|
ps[g_p].resurrected = false;
|
||||||
ps[g_p].pals.a = 0;
|
ps[g_p].pals.a = 0;
|
||||||
ps[g_p].footprintcount = 0;
|
ps[g_p].footprintcount = 0;
|
||||||
ps[g_p].weapreccnt = 0;
|
ps[g_p].weapreccnt = 0;
|
||||||
|
|
|
@ -84,6 +84,7 @@ void hud_input(int plnum)
|
||||||
{
|
{
|
||||||
p->GetActor()->s.extra += 2;
|
p->GetActor()->s.extra += 2;
|
||||||
p->last_extra = p->GetActor()->s.extra;
|
p->last_extra = p->GetActor()->s.extra;
|
||||||
|
p->resurrected = true;
|
||||||
}
|
}
|
||||||
else if (p->GetActor()->s.extra < gs.max_player_health)
|
else if (p->GetActor()->s.extra < gs.max_player_health)
|
||||||
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)
|
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
|
// neutralize all movement when blocked or in automap follow mode
|
||||||
loc.fvel = loc.svel = 0;
|
loc.fvel = loc.svel = 0;
|
||||||
|
|
|
@ -736,7 +736,7 @@ void playerJump(int snum, int fz, int cz)
|
||||||
|
|
||||||
void player_struct::apply_seasick(double factor)
|
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)
|
if (SeaSick < 250)
|
||||||
{
|
{
|
||||||
|
|
|
@ -80,6 +80,7 @@ void resetplayerstats(int snum)
|
||||||
|
|
||||||
gFullMap = 0;
|
gFullMap = 0;
|
||||||
p->dead_flag = 0;
|
p->dead_flag = 0;
|
||||||
|
p->resurrected = false;
|
||||||
p->wackedbyactor = nullptr;
|
p->wackedbyactor = nullptr;
|
||||||
p->falling_counter = 0;
|
p->falling_counter = 0;
|
||||||
p->quick_kick = 0;
|
p->quick_kick = 0;
|
||||||
|
|
|
@ -161,6 +161,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
|
||||||
.Array("weaprecs", w.weaprecs, w.weapreccnt)
|
.Array("weaprecs", w.weaprecs, w.weapreccnt)
|
||||||
("interface_toggle_flag", w.interface_toggle_flag)
|
("interface_toggle_flag", w.interface_toggle_flag)
|
||||||
("dead_flag", w.dead_flag)
|
("dead_flag", w.dead_flag)
|
||||||
|
("resurrected", w.resurrected)
|
||||||
("show_empty_weapon", w.show_empty_weapon)
|
("show_empty_weapon", w.show_empty_weapon)
|
||||||
("scuba_amount", w.scuba_amount)
|
("scuba_amount", w.scuba_amount)
|
||||||
("jetpack_amount", w.jetpack_amount)
|
("jetpack_amount", w.jetpack_amount)
|
||||||
|
|
|
@ -244,6 +244,8 @@ struct player_struct
|
||||||
|
|
||||||
int max_secret_rooms, secret_rooms, max_actors_killed, actors_killed;
|
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.
|
// 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.
|
// Items were reordered by size.
|
||||||
int stairs;
|
int stairs;
|
||||||
|
|
Loading…
Reference in a new issue