Restore 2.1 mace setup
This commit is contained in:
parent
8b6a607165
commit
a1c2b7f72e
2 changed files with 39 additions and 13 deletions
|
|
@ -11118,7 +11118,7 @@ static boolean P_SetupMace(mapthing_t *mthing, mobj_t *mobj, boolean *doangle)
|
|||
mnumspokes = mthing->args[1] + 1;
|
||||
mspokeangle = FixedAngle((360*FRACUNIT)/mnumspokes) >> ANGLETOFINESHIFT;
|
||||
mwidth = max(0, mthing->args[2]);
|
||||
mspeed = abs(mthing->args[3] << 4);
|
||||
mspeed = abs(mthing->args[3]);
|
||||
mphase = mthing->args[4] % 360;
|
||||
mpinch = mthing->args[5] % 360;
|
||||
mnumnospokes = mthing->args[6];
|
||||
|
|
|
|||
|
|
@ -7154,19 +7154,45 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
break;
|
||||
}
|
||||
|
||||
mapthings[i].angle = lines[j].frontsector->ceilingheight >> FRACBITS;
|
||||
mapthings[i].pitch = lines[j].frontsector->floorheight >> FRACBITS;
|
||||
mapthings[i].args[0] = lines[j].dx >> FRACBITS;
|
||||
mapthings[i].args[1] = mapthings[i].extrainfo;
|
||||
mapthings[i].args[3] = lines[j].dy >> FRACBITS;
|
||||
mapthings[i].args[4] = sides[lines[j].sidenum[0]].textureoffset >> FRACBITS;
|
||||
mapthings[i].args[7] = -sides[lines[j].sidenum[0]].rowoffset >> FRACBITS;
|
||||
if (lines[j].backsector)
|
||||
if (udmf)
|
||||
{
|
||||
mapthings[i].roll = lines[j].backsector->ceilingheight >> FRACBITS;
|
||||
mapthings[i].args[2] = sides[lines[j].sidenum[1]].rowoffset >> FRACBITS;
|
||||
mapthings[i].args[5] = lines[j].backsector->floorheight >> FRACBITS;
|
||||
mapthings[i].args[6] = sides[lines[j].sidenum[1]].textureoffset >> FRACBITS;
|
||||
mapthings[i].angle = lines[j].frontsector->ceilingheight >> FRACBITS;
|
||||
mapthings[i].pitch = lines[j].frontsector->floorheight >> FRACBITS;
|
||||
mapthings[i].args[0] = lines[j].dx >> FRACBITS;
|
||||
mapthings[i].args[1] = mapthings[i].extrainfo;
|
||||
mapthings[i].args[3] = lines[j].dy >> (FRACBITS-4);
|
||||
mapthings[i].args[4] = sides[lines[j].sidenum[0]].textureoffset >> FRACBITS;
|
||||
mapthings[i].args[7] = -sides[lines[j].sidenum[0]].rowoffset >> FRACBITS;
|
||||
if (lines[j].backsector)
|
||||
{
|
||||
mapthings[i].roll = lines[j].backsector->ceilingheight >> FRACBITS;
|
||||
mapthings[i].args[2] = sides[lines[j].sidenum[1]].rowoffset >> FRACBITS;
|
||||
mapthings[i].args[5] = lines[j].backsector->floorheight >> FRACBITS;
|
||||
mapthings[i].args[6] = sides[lines[j].sidenum[1]].textureoffset >> FRACBITS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fixed_t xspeed = sides[lines[j].sidenum[0]].textureoffset >> FRACBITS;
|
||||
fixed_t zspeed = sides[lines[j].sidenum[0]].rowoffset >> FRACBITS;
|
||||
fixed_t startangle = lines[j].frontsector->floorheight >> FRACBITS;
|
||||
fixed_t maxspeed = lines[j].frontsector->ceilingheight >> FRACBITS;
|
||||
|
||||
if (mapthings[i].type == 1105) // swinging mace
|
||||
{
|
||||
mapthings[i].type = 1104;
|
||||
mapthings[i].args[8] |= TMM_SWING|TMM_SILENT;
|
||||
mapthings[i].args[4] = (180 + startangle) % 360;
|
||||
xspeed = 360 - (startangle % 360);
|
||||
zspeed += 90;
|
||||
}
|
||||
else
|
||||
mapthings[i].args[4] = startangle;
|
||||
|
||||
mapthings[i].args[0] = abs(lines[j].dx >> FRACBITS);
|
||||
mapthings[i].args[3] = abs(min(maxspeed, lines[j].dy >> (FRACBITS-4)));
|
||||
mapthings[i].angle = startangle + zspeed;
|
||||
mapthings[i].pitch = startangle + xspeed;
|
||||
}
|
||||
if (mapthings[i].options & MTF_AMBUSH)
|
||||
mapthings[i].args[8] |= TMM_DOUBLESIZE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue