diff --git a/src/k_kart.c b/src/k_kart.c index 52b4cc64..4ceb8b72 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1194,13 +1194,13 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid) momdify = mobj1->momy - mobj2->momy; // if the speed difference is less than this let's assume they're going proportionately faster from each other - if (P_AproxDistance(momdifx, momdify) < 25*FRACUNIT) + if (P_AproxDistance(momdifx, momdify) < (25*mapheaderinfo[gamemap-1]->mobj_scale)) { fixed_t momdiflength = P_AproxDistance(momdifx, momdify); fixed_t normalisedx = FixedDiv(momdifx, momdiflength); fixed_t normalisedy = FixedDiv(momdify, momdiflength); - momdifx = FixedMul(25*FRACUNIT, normalisedx); - momdify = FixedMul(25*FRACUNIT, normalisedy); + momdifx = FixedMul((25*mapheaderinfo[gamemap-1]->mobj_scale), normalisedx); + momdify = FixedMul((25*mapheaderinfo[gamemap-1]->mobj_scale), normalisedy); } distx = mobj1->x - mobj2->x; @@ -2836,7 +2836,7 @@ static void K_KartDrift(player_t *player, boolean onground) } // Drifting: left or right? - if ((player->cmd.buttons & BT_DRIFTLEFT) && player->speed > (10<<16) && player->kartstuff[k_jmp] == 1 + if ((player->cmd.buttons & BT_DRIFTLEFT) && player->speed > FixedMul(10<<16, player->mo->scale) && player->kartstuff[k_jmp] == 1 && (player->kartstuff[k_drift] == 0 || player->kartstuff[k_driftend] == 1)) // && player->kartstuff[k_drift] != 1) { // Starting left drift @@ -2844,7 +2844,7 @@ static void K_KartDrift(player_t *player, boolean onground) player->kartstuff[k_driftend] = 0; player->kartstuff[k_driftcharge] = 0; } - else if ((player->cmd.buttons & BT_DRIFTRIGHT) && player->speed > (10<<16) && player->kartstuff[k_jmp] == 1 + else if ((player->cmd.buttons & BT_DRIFTRIGHT) && player->speed > FixedMul(10<<16, player->mo->scale) && player->kartstuff[k_jmp] == 1 && (player->kartstuff[k_drift] == 0 || player->kartstuff[k_driftend] == 1)) // && player->kartstuff[k_drift] != -1) { // Starting right drift @@ -2908,7 +2908,7 @@ static void K_KartDrift(player_t *player, boolean onground) // Stop drifting if (player->kartstuff[k_spinouttimer] > 0 // banana peel - || player->speed < (10<<16)) // you're too slow! + || player->speed < FixedMul(10<<16, player->mo->scale)) // you're too slow! { player->kartstuff[k_drift] = 0; player->kartstuff[k_driftcharge] = 0; @@ -4822,17 +4822,17 @@ static void K_drawKartSpeedometer(void) if (cv_speedometer.value == 1) { - convSpeed = FixedMul(stplyr->speed, 142371)/FRACUNIT; // 2.172409058 + convSpeed = FixedDiv(FixedMul(stplyr->speed, 142371), mapheaderinfo[gamemap-1]->mobj_scale)/FRACUNIT; // 2.172409058 V_DrawKartString(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, va("%3d km/h", convSpeed)); } else if (cv_speedometer.value == 2) { - convSpeed = FixedMul(stplyr->speed, 88465)/FRACUNIT; // 1.349868774 + convSpeed = FixedDiv(FixedMul(stplyr->speed, 88465), mapheaderinfo[gamemap-1]->mobj_scale)/FRACUNIT; // 1.349868774 V_DrawKartString(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, va("%3d mph", convSpeed)); } else if (cv_speedometer.value == 3) { - convSpeed = stplyr->speed/FRACUNIT; + convSpeed = FixedDiv(stplyr->speed, mapheaderinfo[gamemap-1]->mobj_scale)/FRACUNIT; V_DrawKartString(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, va("%3d fu/s", convSpeed)); } } diff --git a/src/p_map.c b/src/p_map.c index 2a5ee710..0a52d6fb 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2754,7 +2754,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) if (!(thing->flags & MF_NOCLIP)) { //All things are affected by their scale. - fixed_t maxstep = MAXSTEPMOVE; //FixedMul(MAXSTEPMOVE, thing->scale); + fixed_t maxstep = FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale); if (thing->player) { @@ -3192,8 +3192,8 @@ static void P_HitBounceLine(line_t *ld) movelen = P_AproxDistance(tmxmove, tmymove); - if (slidemo->player && movelen < 15*FRACUNIT) - movelen = 15*FRACUNIT; + if (slidemo->player && movelen < (15*mapheaderinfo[gamemap-1]->mobj_scale)) + movelen = (15*mapheaderinfo[gamemap-1]->mobj_scale); tmxmove += FixedMul(movelen, FINECOSINE(lineangle)); tmymove += FixedMul(movelen, FINESINE(lineangle)); diff --git a/src/p_user.c b/src/p_user.c index 75a34559..467a5057 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8351,32 +8351,32 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall camspeed = cv_cam_speed.value; camstill = cv_cam_still.value; camrotate = cv_cam_rotate.value; - camdist = FixedMul(cv_cam_dist.value, mo->scale); - camheight = FixedMul(cv_cam_height.value, mo->scale); + camdist = FixedMul(cv_cam_dist.value, mapheaderinfo[gamemap-1]->mobj_scale); + camheight = FixedMul(cv_cam_height.value, mapheaderinfo[gamemap-1]->mobj_scale); } else if (thiscam == &camera2) // Camera 2 { camspeed = cv_cam2_speed.value; camstill = cv_cam2_still.value; camrotate = cv_cam2_rotate.value; - camdist = FixedMul(cv_cam2_dist.value, mo->scale); - camheight = FixedMul(cv_cam2_height.value, mo->scale); + camdist = FixedMul(cv_cam2_dist.value, mapheaderinfo[gamemap-1]->mobj_scale); + camheight = FixedMul(cv_cam2_height.value, mapheaderinfo[gamemap-1]->mobj_scale); } else if (thiscam == &camera3) // Camera 3 { camspeed = cv_cam3_speed.value; camstill = cv_cam3_still.value; camrotate = cv_cam3_rotate.value; - camdist = FixedMul(cv_cam3_dist.value, mo->scale); - camheight = FixedMul(cv_cam3_height.value, mo->scale); + camdist = FixedMul(cv_cam3_dist.value, mapheaderinfo[gamemap-1]->mobj_scale); + camheight = FixedMul(cv_cam3_height.value, mapheaderinfo[gamemap-1]->mobj_scale); } else // Camera 4 { camspeed = cv_cam4_speed.value; camstill = cv_cam4_still.value; camrotate = cv_cam4_rotate.value; - camdist = FixedMul(cv_cam4_dist.value, mo->scale); - camheight = FixedMul(cv_cam4_height.value, mo->scale); + camdist = FixedMul(cv_cam4_dist.value, mapheaderinfo[gamemap-1]->mobj_scale); + camheight = FixedMul(cv_cam4_height.value, mapheaderinfo[gamemap-1]->mobj_scale); } #ifdef REDSANALOG @@ -8536,18 +8536,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall dist = FixedMul(dist, 3*FRACUNIT/2); height = FixedMul(height, 3*FRACUNIT/2); } - else if (splitscreen > 1) // smallscreen splits should get 7/8 distance (shorter feels better, oddly enough) - { - dist = FixedMul(dist, 7*FRACUNIT/8); - height = FixedMul(height, 7*FRACUNIT/8); - } - - // x1.2 dist for analog - /*if (P_AnalogMove(player)) - { - dist = FixedMul(dist, 6*FRACUNIT/5); - height = FixedMul(height, 6*FRACUNIT/5); - }*/ if (player->climbing || player->exiting || player->playerstate == PST_DEAD || (player->pflags & (PF_MACESPIN|PF_ITEMHANG|PF_ROPEHANG))) dist <<= 1;