mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Add flag to set wind/current/push/pull strength using X offset
This commit is contained in:
parent
3da9fb636a
commit
fe8485cc2f
2 changed files with 18 additions and 10 deletions
|
@ -3036,48 +3036,54 @@ linedeftypes
|
||||||
{
|
{
|
||||||
title = "Wind";
|
title = "Wind";
|
||||||
prefix = "(541)";
|
prefix = "(541)";
|
||||||
flags512text = "[9] Player slides";
|
|
||||||
flags64text = "[6] Exclusive";
|
flags64text = "[6] Exclusive";
|
||||||
|
flags512text = "[9] Player slides";
|
||||||
|
flags8192text = "[13] Use angle and X offset";
|
||||||
}
|
}
|
||||||
|
|
||||||
542
|
542
|
||||||
{
|
{
|
||||||
title = "Upwards Wind";
|
title = "Upwards Wind";
|
||||||
prefix = "(542)";
|
prefix = "(542)";
|
||||||
flags512text = "[9] Player slides";
|
|
||||||
flags64text = "[6] Exclusive";
|
flags64text = "[6] Exclusive";
|
||||||
|
flags512text = "[9] Player slides";
|
||||||
|
flags8192text = "[13] Use X offset";
|
||||||
}
|
}
|
||||||
|
|
||||||
543
|
543
|
||||||
{
|
{
|
||||||
title = "Downwards Wind";
|
title = "Downwards Wind";
|
||||||
prefix = "(543)";
|
prefix = "(543)";
|
||||||
flags512text = "[9] Player slides";
|
|
||||||
flags64text = "[6] Exclusive";
|
flags64text = "[6] Exclusive";
|
||||||
|
flags512text = "[9] Player slides";
|
||||||
|
flags8192text = "[13] Use X offset";
|
||||||
}
|
}
|
||||||
|
|
||||||
544
|
544
|
||||||
{
|
{
|
||||||
title = "Current";
|
title = "Current";
|
||||||
prefix = "(544)";
|
prefix = "(544)";
|
||||||
flags512text = "[9] Player slides";
|
|
||||||
flags64text = "[6] Exclusive";
|
flags64text = "[6] Exclusive";
|
||||||
|
flags512text = "[9] Player slides";
|
||||||
|
flags8192text = "[13] Use angle and X offset";
|
||||||
}
|
}
|
||||||
|
|
||||||
545
|
545
|
||||||
{
|
{
|
||||||
title = "Upwards Current";
|
title = "Upwards Current";
|
||||||
prefix = "(545)";
|
prefix = "(545)";
|
||||||
flags512text = "[9] Player slides";
|
|
||||||
flags64text = "[6] Exclusive";
|
flags64text = "[6] Exclusive";
|
||||||
|
flags512text = "[9] Player slides";
|
||||||
|
flags8192text = "[13] Use X offset";
|
||||||
}
|
}
|
||||||
|
|
||||||
546
|
546
|
||||||
{
|
{
|
||||||
title = "Downwards Current";
|
title = "Downwards Current";
|
||||||
prefix = "(546)";
|
prefix = "(546)";
|
||||||
flags512text = "[9] Player slides";
|
|
||||||
flags64text = "[6] Exclusive";
|
flags64text = "[6] Exclusive";
|
||||||
|
flags512text = "[9] Player slides";
|
||||||
|
flags8192text = "[13] Use X offset";
|
||||||
}
|
}
|
||||||
|
|
||||||
547
|
547
|
||||||
|
@ -3085,6 +3091,7 @@ linedeftypes
|
||||||
title = "Push/Pull";
|
title = "Push/Pull";
|
||||||
prefix = "(547)";
|
prefix = "(547)";
|
||||||
flags64text = "[6] Exclusive";
|
flags64text = "[6] Exclusive";
|
||||||
|
flags8192text = "[13] Use X offset";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5651,17 +5651,18 @@ static void P_ConvertBinaryLinedefTypes(void)
|
||||||
case 544: //Current
|
case 544: //Current
|
||||||
case 545: //Upwards current
|
case 545: //Upwards current
|
||||||
case 546: //Downwards current
|
case 546: //Downwards current
|
||||||
|
fixed_t speed = (lines[i].flags & ML_EFFECT6) ? sides[lines[i].sidenum[0]].textureoffset : R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y);
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = tag;
|
||||||
switch ((lines[i].special - 541) % 3)
|
switch ((lines[i].special - 541) % 3)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
lines[i].args[1] = R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
lines[i].args[1] = speed >> FRACBITS;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
lines[i].args[2] = R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
lines[i].args[2] = speed >> FRACBITS;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
lines[i].args[2] = -R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
lines[i].args[2] = -speed >> FRACBITS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
lines[i].args[3] = (lines[i].special >= 544) ? p_current : p_wind;
|
lines[i].args[3] = (lines[i].special >= 544) ? p_current : p_wind;
|
||||||
|
@ -6308,7 +6309,7 @@ static void P_ConvertBinaryThingTypes(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
mapthings[i].args[0] = mapthings[i].angle;
|
mapthings[i].args[0] = mapthings[i].angle;
|
||||||
mapthings[i].args[1] = P_AproxDistance(line->dx >> FRACBITS, line->dy >> FRACBITS);
|
mapthings[i].args[1] = (line->flags & ML_EFFECT6) ? sides[line->sidenum[0]].textureoffset >> FRACBITS : P_AproxDistance(line->dx >> FRACBITS, line->dy >> FRACBITS);
|
||||||
if (mapthings[i].type == 755)
|
if (mapthings[i].type == 755)
|
||||||
mapthings[i].args[1] *= -1;
|
mapthings[i].args[1] *= -1;
|
||||||
if (mapthings[i].options & MTF_OBJECTSPECIAL)
|
if (mapthings[i].options & MTF_OBJECTSPECIAL)
|
||||||
|
|
Loading…
Reference in a new issue