Speed pads are now nicer.
Linedef type 4 now works as follows. * Frontside x offset is dash speed. * Effect 4 flag doesn't center the player. (same as before) * Effect 5 flag sends them off in rolling frames. (as a result there is only one speed pad sector type now, not two) * Frontside upper texture is sound to play on launch, defaults to sfx_spdpad when not given
This commit is contained in:
parent
bdbfa178e6
commit
482c1ce665
|
@ -1463,6 +1463,8 @@ static void P_LoadSideDefs2(lumpnum_t lumpnum)
|
||||||
sd->text[6] = 0;
|
sd->text[6] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 4: // Speed pad parameters
|
||||||
case 414: // Play SFX
|
case 414: // Play SFX
|
||||||
{
|
{
|
||||||
sd->toptexture = sd->midtexture = sd->bottomtexture = 0;
|
sd->toptexture = sd->midtexture = sd->bottomtexture = 0;
|
||||||
|
@ -1476,7 +1478,7 @@ static void P_LoadSideDefs2(lumpnum_t lumpnum)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 14: // Bustable block parameter
|
case 14: // Bustable block parameters
|
||||||
case 425: // Calls P_SetMobjState on calling mobj
|
case 425: // Calls P_SetMobjState on calling mobj
|
||||||
case 434: // Custom Power
|
case 434: // Custom Power
|
||||||
case 442: // Calls P_SetMobjState on mobjs of a given type in the tagged sectors
|
case 442: // Calls P_SetMobjState on mobjs of a given type in the tagged sectors
|
||||||
|
|
46
src/p_spec.c
46
src/p_spec.c
|
@ -2415,7 +2415,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
{
|
{
|
||||||
fixed_t sfxnum;
|
fixed_t sfxnum;
|
||||||
|
|
||||||
sfxnum = sides[line->sidenum[0]].toptexture; //P_AproxDistance(line->dx, line->dy)>>FRACBITS;
|
sfxnum = sides[line->sidenum[0]].toptexture;
|
||||||
|
|
||||||
if (line->tag != 0 && line->flags & ML_EFFECT5)
|
if (line->tag != 0 && line->flags & ML_EFFECT5)
|
||||||
{
|
{
|
||||||
|
@ -3650,14 +3650,13 @@ DoneSection2:
|
||||||
// Process Section 3
|
// Process Section 3
|
||||||
switch (special)
|
switch (special)
|
||||||
{
|
{
|
||||||
case 1: // N/A (formerly Ice/Sludge)
|
case 1: // Unused
|
||||||
case 2: // Wind/Current
|
case 2: // Wind/Current
|
||||||
case 3: // N/A (formerly Ice/Sludge and Wind/Current)
|
case 3: // Unused
|
||||||
case 4: // Conveyor Belt
|
case 4: // Conveyor Belt
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5: // Speed pad w/o spin
|
case 5: // Speed pad
|
||||||
case 6: // Speed pad w/ spin
|
|
||||||
if (player->powers[pw_flashing] != 0 && player->powers[pw_flashing] < TICRATE/2)
|
if (player->powers[pw_flashing] != 0 && player->powers[pw_flashing] < TICRATE/2)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3669,7 +3668,13 @@ DoneSection2:
|
||||||
fixed_t linespeed;
|
fixed_t linespeed;
|
||||||
|
|
||||||
lineangle = R_PointToAngle2(lines[i].v1->x, lines[i].v1->y, lines[i].v2->x, lines[i].v2->y);
|
lineangle = R_PointToAngle2(lines[i].v1->x, lines[i].v1->y, lines[i].v2->x, lines[i].v2->y);
|
||||||
linespeed = P_AproxDistance(lines[i].v2->x-lines[i].v1->x, lines[i].v2->y-lines[i].v1->y);
|
linespeed = sides[lines[i].sidenum[0]].textureoffset;
|
||||||
|
|
||||||
|
if (linespeed == 0)
|
||||||
|
{
|
||||||
|
CONS_Debug(DBG_GAMELOGIC, "ERROR: Speed pad (tag %d) at zero speed.\n", sector->tag);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
player->mo->angle = lineangle;
|
player->mo->angle = lineangle;
|
||||||
|
|
||||||
|
@ -3699,7 +3704,7 @@ DoneSection2:
|
||||||
|
|
||||||
P_InstaThrust(player->mo, player->mo->angle, linespeed);
|
P_InstaThrust(player->mo, player->mo->angle, linespeed);
|
||||||
|
|
||||||
if (GETSECSPECIAL(sector->special, 3) == 6 && (player->charability2 == CA2_SPINDASH))
|
if ((lines[i].flags & ML_EFFECT5) && (player->charability2 == CA2_SPINDASH)) // Roll!
|
||||||
{
|
{
|
||||||
if (!(player->pflags & PF_SPINNING))
|
if (!(player->pflags & PF_SPINNING))
|
||||||
player->pflags |= PF_SPINNING;
|
player->pflags |= PF_SPINNING;
|
||||||
|
@ -3708,19 +3713,26 @@ DoneSection2:
|
||||||
}
|
}
|
||||||
|
|
||||||
player->powers[pw_flashing] = TICRATE/3;
|
player->powers[pw_flashing] = TICRATE/3;
|
||||||
S_StartSound(player->mo, sfx_spdpad);
|
|
||||||
|
fixed_t sfxnum = sides[lines[i].sidenum[0]].toptexture;
|
||||||
|
|
||||||
|
if (!sfxnum)
|
||||||
|
sfxnum = sfx_spdpad;
|
||||||
|
|
||||||
|
S_StartSound(player->mo, sfxnum);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7: // N/A (formerly bustable block sprite parameters)
|
case 6: // Unused
|
||||||
case 8:
|
case 7: // Unused
|
||||||
case 9:
|
case 8: // Unused
|
||||||
case 10:
|
case 9: // Unused
|
||||||
case 11:
|
case 10: // Unused
|
||||||
case 12:
|
case 11: // Unused
|
||||||
case 13:
|
case 12: // Unused
|
||||||
case 14:
|
case 13: // Unused
|
||||||
case 15:
|
case 14: // Unused
|
||||||
|
case 15: // Unused
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue