mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Implement FOF type 257
This commit is contained in:
parent
e3b86d0c74
commit
5389344a32
4 changed files with 35 additions and 3 deletions
|
@ -1744,6 +1744,31 @@ udmf
|
|||
}
|
||||
}
|
||||
|
||||
257
|
||||
{
|
||||
title = "Quicksand";
|
||||
prefix = "(257)";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
type = 13;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Ripple effect?";
|
||||
type = 11;
|
||||
enum = "yesno";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Sinking speed";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Friction";
|
||||
}
|
||||
}
|
||||
|
||||
258
|
||||
{
|
||||
title = "Laser";
|
||||
|
|
|
@ -3022,6 +3022,13 @@ static void P_ConvertBinaryMap(void)
|
|||
|
||||
lines[i].special = 254;
|
||||
break;
|
||||
case 257: //FOF: Quicksand
|
||||
lines[i].args[0] = lines[i].tag;
|
||||
if (!(lines[i].flags & ML_EFFECT5))
|
||||
lines[i].args[1] = 1; //No ripple effect
|
||||
lines[i].args[2] = lines[i].dx >> FRACBITS; //Sinking speed
|
||||
lines[i].args[3] = lines[i].dy >> FRACBITS; //Friction
|
||||
break;
|
||||
case 258: //FOF: Laser
|
||||
lines[i].args[0] = lines[i].tag;
|
||||
if (lines[i].flags & ML_EFFECT1)
|
||||
|
|
|
@ -7041,7 +7041,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
|
||||
case 257: // Quicksand
|
||||
ffloorflags = FF_EXISTS|FF_QUICKSAND|FF_RENDERALL|FF_ALLSIDES|FF_CUTSPRITES;
|
||||
if (lines[i].flags & ML_EFFECT5)
|
||||
if (!(lines[i].args[1]))
|
||||
ffloorflags |= FF_RIPPLE;
|
||||
|
||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
|
|
|
@ -2844,7 +2844,7 @@ static void P_CheckQuicksand(player_t *player)
|
|||
|
||||
if (topheight >= player->mo->z && bottomheight < player->mo->z + player->mo->height)
|
||||
{
|
||||
sinkspeed = abs(rover->master->v1->x - rover->master->v2->x)>>1;
|
||||
sinkspeed = abs(rover->master->args[2]) << (FRACBITS - 1);
|
||||
|
||||
sinkspeed = FixedDiv(sinkspeed,TICRATE*FRACUNIT);
|
||||
|
||||
|
@ -2873,7 +2873,7 @@ static void P_CheckQuicksand(player_t *player)
|
|||
P_PlayerHitFloor(player, false);
|
||||
}
|
||||
|
||||
friction = abs(rover->master->v1->y - rover->master->v2->y)>>6;
|
||||
friction = abs(rover->master->args[3]) << (FRACBITS - 6);
|
||||
|
||||
player->mo->momx = FixedMul(player->mo->momx, friction);
|
||||
player->mo->momy = FixedMul(player->mo->momy, friction);
|
||||
|
|
Loading…
Reference in a new issue