mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-21 00:20:59 +00:00
- floatified playerisdead
This commit is contained in:
parent
4ded343aa5
commit
583a5bd0e3
4 changed files with 7 additions and 7 deletions
|
@ -115,7 +115,7 @@ int wakeup(DDukeActor* sn, int pn);
|
||||||
int timedexit(int snum);
|
int timedexit(int snum);
|
||||||
void dokneeattack(int snum, const std::initializer_list<int>& respawnlist);
|
void dokneeattack(int snum, const std::initializer_list<int>& respawnlist);
|
||||||
int endoflevel(int snum);
|
int endoflevel(int snum);
|
||||||
void playerisdead(int snum, int psectlotag, int fz, int cz);
|
void playerisdead(int snum, int psectlotag, double fz, double cz);
|
||||||
void footprints(int snum);
|
void footprints(int snum);
|
||||||
int makepainsounds(int snum, int type);
|
int makepainsounds(int snum, int type);
|
||||||
void playerCrouch(int snum);
|
void playerCrouch(int snum);
|
||||||
|
|
|
@ -546,7 +546,7 @@ inline void backupplayer(player_struct* p)
|
||||||
p->horizon.backup();
|
p->horizon.backup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void playerisdead(int snum, int psectlotag, int fz, int cz)
|
void playerisdead(int snum, int psectlotag, double floorz, double ceilingz)
|
||||||
{
|
{
|
||||||
auto p = &ps[snum];
|
auto p = &ps[snum];
|
||||||
auto actor = p->GetActor();
|
auto actor = p->GetActor();
|
||||||
|
@ -604,7 +604,7 @@ void playerisdead(int snum, int psectlotag, int fz, int cz)
|
||||||
{
|
{
|
||||||
if (p->on_warping_sector == 0)
|
if (p->on_warping_sector == 0)
|
||||||
{
|
{
|
||||||
if (abs(p->pos.Z - fz * inttoworld) > (gs.playerheight * 0.5))
|
if (abs(p->pos.Z - floorz) > (gs.playerheight * 0.5))
|
||||||
p->pos.Z += 348/ 256.;
|
p->pos.Z += 348/ 256.;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -625,8 +625,8 @@ void playerisdead(int snum, int psectlotag, int fz, int cz)
|
||||||
|
|
||||||
pushmove(p->pos, &p->cursector, 128, (4 << 8), (20 << 8), CLIPMASK0);
|
pushmove(p->pos, &p->cursector, 128, (4 << 8), (20 << 8), CLIPMASK0);
|
||||||
|
|
||||||
if (fz > cz + (16 << 8) && actor->spr.pal != 1)
|
if (floorz > ceilingz + 16 && actor->spr.pal != 1)
|
||||||
p->angle.rotscrnang = DAngle::fromBuild(p->dead_flag + ((fz + p->player_int_pos().Z) >> 7));
|
p->angle.rotscrnang = DAngle::fromBuild(p->dead_flag + ((floorz + p->pos.Z) * 2));
|
||||||
|
|
||||||
p->on_warping_sector = 0;
|
p->on_warping_sector = 0;
|
||||||
|
|
||||||
|
|
|
@ -2855,7 +2855,7 @@ void processinput_d(int snum)
|
||||||
|
|
||||||
if (pact->spr.extra <= 0 && !ud.god)
|
if (pact->spr.extra <= 0 && !ud.god)
|
||||||
{
|
{
|
||||||
playerisdead(snum, psectlotag, fz, cz);
|
playerisdead(snum, psectlotag, fz * inttoworld, cz * inttoworld);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3533,7 +3533,7 @@ void processinput_r(int snum)
|
||||||
|
|
||||||
if (pact->spr.extra <= 0 && !ud.god)
|
if (pact->spr.extra <= 0 && !ud.god)
|
||||||
{
|
{
|
||||||
playerisdead(snum, psectlotag, fz, cz);
|
playerisdead(snum, psectlotag, fz * inttoworld, cz * inttoworld);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue