- gut stuff

This commit is contained in:
Christoph Oelckers 2022-08-23 22:46:54 +02:00
parent d700b11887
commit 25949ce6ab
4 changed files with 8 additions and 8 deletions

View file

@ -2546,11 +2546,11 @@ void gutsdir(DDukeActor* actor, int gtype, int n, int p)
sx = sy = 8;
else sx = sy = 32;
int gutz = actor->int_pos().Z - (8 << 8);
int floorz = getflorzofslopeptr(actor->sector(), actor->spr.pos);
double gutz = actor->spr.pos.Z - 8;
double floorz = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
if (gutz > (floorz - (8 << 8)))
gutz = floorz - (8 << 8);
if (gutz > floorz - 8)
gutz = floorz - 8;
gutz += gs.actorinfo[actor->spr.picnum].gutsoffset;
@ -2560,7 +2560,7 @@ void gutsdir(DDukeActor* actor, int gtype, int n, int p)
int r1 = krand();
int r2 = krand();
// TRANSITIONAL: owned by a player???
EGS(actor->sector(), actor->int_pos().X, actor->int_pos().Y, gutz, gtype, -32, sx, sy, a, 256 + (r2 & 127), -512 - (r1 & 2047), ps[p].GetActor(), 5);
CreateActor(actor->sector(), DVector3(actor->spr.pos.XY(), gutz), gtype, -32, sx, sy, a, 256 + (r2 & 127), -512 - (r1 & 2047), ps[p].GetActor(), 5);
}
}

View file

@ -551,7 +551,7 @@ void guts_d(DDukeActor* actor, int gtype, int n, int p)
if (gutz > (floorz - (8 << 8)))
gutz = floorz - (8 << 8);
gutz += gs.actorinfo[actor->spr.picnum].gutsoffset;
gutz += gs.actorinfo[actor->spr.picnum].gutsoffset * 256;
if (badguy(actor) && actor->spr.pal == 6)
pal = 6;

View file

@ -458,7 +458,7 @@ void guts_r(DDukeActor* actor, int gtype, int n, int p)
if (gutz > (floorz - (8 << 8)))
gutz = floorz - (8 << 8);
gutz += gs.actorinfo[actor->spr.picnum].gutsoffset;
gutz += gs.actorinfo[actor->spr.picnum].gutsoffset * 256;
if (badguy(actor) && actor->spr.pal == 6)
pal = 6;

View file

@ -148,7 +148,7 @@ void initactorflags_d()
settileflag(TFLAG_CLEARINVENTORY, { HURTRAIL, FLOORSLIME, FLOORPLASMA });
settileflag(TFLAG_SLIME, { FLOORSLIME, FLOORSLIME + 1, FLOORSLIME + 2 });
gs.actorinfo[COMMANDER].gutsoffset = -(24 << 8);
gs.actorinfo[COMMANDER].gutsoffset = -24;
for (auto &fa : gs.actorinfo)
{