mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Increment move resolution increase
This commit is contained in:
parent
dc8fbb7c1c
commit
adbdc63895
1 changed files with 12 additions and 11 deletions
23
src/p_map.c
23
src/p_map.c
|
|
@ -2783,7 +2783,12 @@ fixed_t P_GetThingStepUp(mobj_t *thing, fixed_t destX, fixed_t destY)
|
||||||
slopemom.z = 0;
|
slopemom.z = 0;
|
||||||
P_QuantizeMomentumToSlope(&slopemom, thing->standingslope);
|
P_QuantizeMomentumToSlope(&slopemom, thing->standingslope);
|
||||||
fixed_t momentumzdelta = FixedDiv(slopemom.z, FixedHypot(slopemom.x, slopemom.y)); // so this lets us know what the zdelta is for the vector the player is travelling along, in addition to the slope's zdelta in its xydirection
|
fixed_t momentumzdelta = FixedDiv(slopemom.z, FixedHypot(slopemom.x, slopemom.y)); // so this lets us know what the zdelta is for the vector the player is travelling along, in addition to the slope's zdelta in its xydirection
|
||||||
|
if (thing->player)
|
||||||
|
CONS_Printf("%s P_GetThingStepUp %d +", player_names[thing->player-players], maxstep);
|
||||||
maxstep += abs(momentumzdelta);
|
maxstep += abs(momentumzdelta);
|
||||||
|
if (thing->player)
|
||||||
|
CONS_Printf(" %d = %d\n", momentumzdelta, maxstep);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return maxstep;
|
return maxstep;
|
||||||
|
|
@ -2804,13 +2809,6 @@ increment_move
|
||||||
fixed_t thingtop;
|
fixed_t thingtop;
|
||||||
fixed_t stairjank = 0;
|
fixed_t stairjank = 0;
|
||||||
g_tm.floatok = false;
|
g_tm.floatok = false;
|
||||||
fixed_t oldfloorz = INT32_MAX; // Ramp detection
|
|
||||||
pslope_t *oldslope = NULL;
|
|
||||||
angle_t moveangle = R_PointToAngle2(thing->x,thing->y,x,y);
|
|
||||||
|
|
||||||
boolean samepos = false;
|
|
||||||
if (thing->x == x && thing->y == y)
|
|
||||||
samepos = true;
|
|
||||||
|
|
||||||
// reset this to 0 at the start of each trymove call as it's only used here
|
// reset this to 0 at the start of each trymove call as it's only used here
|
||||||
numspechitint = 0U;
|
numspechitint = 0U;
|
||||||
|
|
@ -2820,7 +2818,10 @@ increment_move
|
||||||
radius = max(radius, mapobjectscale);
|
radius = max(radius, mapobjectscale);
|
||||||
|
|
||||||
// And Big Large (tm) movements can skip over slopes.
|
// And Big Large (tm) movements can skip over slopes.
|
||||||
radius = min(radius, 16*mapobjectscale);
|
radius = min(radius, 8*mapobjectscale);
|
||||||
|
|
||||||
|
// if (thing->player)
|
||||||
|
// CONS_Printf("increment_move\n");
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Sal 12/19/2022 -- PIT_CheckThing code now runs
|
// Sal 12/19/2022 -- PIT_CheckThing code now runs
|
||||||
|
|
@ -2860,9 +2861,6 @@ increment_move
|
||||||
|
|
||||||
boolean move_ok = P_CheckPosition(thing, tryx, tryy, result);
|
boolean move_ok = P_CheckPosition(thing, tryx, tryy, result);
|
||||||
|
|
||||||
oldslope = thing->standingslope;
|
|
||||||
oldfloorz = thing->floorz;
|
|
||||||
|
|
||||||
if (P_MobjWasRemoved(thing))
|
if (P_MobjWasRemoved(thing))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -2945,6 +2943,9 @@ increment_move
|
||||||
// If the floor difference is MAXSTEPMOVE or less, and the sector isn't Section1:14, ALWAYS
|
// If the floor difference is MAXSTEPMOVE or less, and the sector isn't Section1:14, ALWAYS
|
||||||
// step down! Formerly required a Section1:13 sector for the full MAXSTEPMOVE, but no more.
|
// step down! Formerly required a Section1:13 sector for the full MAXSTEPMOVE, but no more.
|
||||||
|
|
||||||
|
// if (thing->player && !(thingtop == thing->ceilingz && g_tm.ceilingz > thingtop && g_tm.ceilingz - thingtop <= maxstep))
|
||||||
|
// CONS_Printf("%d == %d && %d < %d && %d - %d <= %d %s\n", thing->z, thing->floorz, g_tm.floorz, thing->z, thing->z, g_tm.floorz, maxstep, thing->z == thing->floorz && g_tm.floorz < thing->z && thing->z - g_tm.floorz <= maxstep ? "True" : "False");
|
||||||
|
|
||||||
if (thingtop == thing->ceilingz && g_tm.ceilingz > thingtop && g_tm.ceilingz - thingtop <= maxstep)
|
if (thingtop == thing->ceilingz && g_tm.ceilingz > thingtop && g_tm.ceilingz - thingtop <= maxstep)
|
||||||
{
|
{
|
||||||
if (flipped)
|
if (flipped)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue