diff --git a/src/objects/rideroid.c b/src/objects/rideroid.c index 64ed0cc5c..d9d739b51 100644 --- a/src/objects/rideroid.c +++ b/src/objects/rideroid.c @@ -52,6 +52,8 @@ static void plr_resetRideroidVars(player_t *p) p->rdaddmomx = 0; p->rdaddmomy = 0; p->rdaddmomz = 0; + + P_SetTarget(&p->mo->tracer, NULL); } // kills the rideroid and removes it from the map. @@ -255,6 +257,8 @@ void Obj_RideroidThink(mobj_t *mo) // if we're here, we made it to the rideroid and we can use it, or something like that! + P_SetTarget(&p->mo->tracer, mo); // keep a reference of the rideroid in the player for convenience. + // calculate the maximum speed we can move at. // the values are a little arbitrary but they work for how little use these have. diff --git a/src/p_map.c b/src/p_map.c index 9f3afa154..dd23deae7 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1902,19 +1902,6 @@ static BlockItReturn_t PIT_CheckLine(line_t *ld) return BMIT_CONTINUE; // force no collide } - // a bit of a hacky behaviour, but not that I know where else it would go. - if (tm.blockingline->flags & ML_TFERLINE) - { - if (tm.thing->type == MT_RIDEROID) - { - Obj_getPlayerOffRideroid(tm.thing); - } - else if (tm.thing->type == MT_PLAYER && tm.thing->player && tm.thing->player->dlzrocket) - { - Obj_DLZRocketDismount(tm.thing->player); - } - } - if (!ld->backsector) // one sided line { if (P_PointOnLineSide(tm.thing->x, tm.thing->y, ld)) diff --git a/src/p_spec.c b/src/p_spec.c index 599ee327f..b7654af55 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -46,6 +46,7 @@ #include "console.h" // CON_LogMessage #include "k_respawn.h" #include "k_terrain.h" +#include "k_objects.h" #include "acs/interface.h" #include "m_easing.h" @@ -1379,6 +1380,7 @@ boolean P_CanActivateSpecial(INT16 special) { case 2001: // Finish line case 2003: // Respawn line + case 2005: // Dismount Flying Object (always true here so that conditions are only kept on execution) { return true; } @@ -4466,6 +4468,18 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha } break; + case 2005: // Dismount Flying object + // the rideroid is a bit complex so it's the one controlling the player rather than the player controlling it. + // so it is the object needing to be checked for rather than the player + if (mo->player && mo->player->rideroid && mo->tracer + && !P_MobjWasRemoved(mo->tracer) && mo->tracer->type == MT_RIDEROID) + Obj_getPlayerOffRideroid(mo->tracer); + + // dlz rockets are simpler and are tied to the player hence why we check for the player here instead. + if (mo->player && mo->player->dlzrocket) + Obj_DLZRocketDismount(mo->player); + break; + default: break; } @@ -9279,9 +9293,9 @@ void T_Pusher(pusher_t *p) if (thing->angle - angle > ANGLE_180) thing->player->drawangle = angle - (angle - thing->angle) / 8; else - thing->player->drawangle = angle + (thing->angle - angle) / 8; + thing->player->drawangle = angle + (thing->angle - angle) / 8; //P_SetPlayerAngle(thing->player, thing->angle); - + } if (p->exclusive) @@ -9424,7 +9438,7 @@ void P_DoQuakeOffset(UINT8 view, mappoint_t *viewPos, mappoint_t *offset) viewPos->z - quake->epicenter->z ) - distBuffer; - + fixed_t distEase = FixedDiv(max(epidist, 0), quake->radius); distEase = min(distEase, FRACUNIT); ir = Easing_InCubic(distEase, ir, 0); diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index f4e11bad4..35e8e39ac 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -415,6 +415,7 @@ boolean R_IsDebugLine(seg_t *line) { case 2001: // Ring Racers: Finish Line case 2003: // Ring Racers: Respawn Line + case 2005: // Ring Racers: Dismount flying object Line return true; } } diff --git a/src/r_debug.cpp b/src/r_debug.cpp index 500816305..b4a767944 100644 --- a/src/r_debug.cpp +++ b/src/r_debug.cpp @@ -75,6 +75,9 @@ UINT8 R_DebugLineColor(const line_t *ld) case 2003: // Ring Racers: Respawn Line return alt ? 0x23 : 0x00; // red, white + + case 2005: // Ring Racers: Dismount flying object Line + return alt ? 0x86 : 0x36; // blue, orange } return 0x00;