mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
fixed compiling for MSVC 2017
This commit is contained in:
parent
233033f213
commit
56e8f09ae8
4 changed files with 7 additions and 5 deletions
|
@ -2056,7 +2056,7 @@ EXPORT void HWRAPI(DrawMD2) (INT32 *gl_cmd_buffer, md2_frame_t *frame, FTransfor
|
|||
EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
||||
{
|
||||
static boolean special_splitscreen;
|
||||
float used_fov;
|
||||
double used_fov;
|
||||
pglLoadIdentity();
|
||||
if (stransform)
|
||||
{
|
||||
|
@ -2088,7 +2088,7 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
|||
pglLoadIdentity();
|
||||
if (special_splitscreen)
|
||||
{
|
||||
used_fov = atan(tan(used_fov*M_PI/360)*0.8)*360/M_PI;
|
||||
used_fov = atan(tan(used_fov*M_PIl/360)*0.8)*360/M_PIl;
|
||||
GLPerspective(used_fov, 2*ASPECT_RATIO);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1191,10 +1191,11 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
|||
return;
|
||||
|
||||
{ // Normalize distance to the sum of the two objects' radii, since in a perfect world that would be the distance at the point of collision...
|
||||
fixed_t dist = P_AproxDistance(distx, disty) ?: 1;
|
||||
fixed_t dist = P_AproxDistance(distx, disty);
|
||||
fixed_t nx = FixedDiv(distx, dist);
|
||||
fixed_t ny = FixedDiv(disty, dist);
|
||||
|
||||
dist = dist ? dist : 1;
|
||||
distx = FixedMul(mobj1->radius+mobj2->radius, nx);
|
||||
disty = FixedMul(mobj1->radius+mobj2->radius, ny);
|
||||
|
||||
|
|
|
@ -6662,7 +6662,7 @@ static void P_MovePlayer(player_t *player)
|
|||
//CONS_Printf("leftover turn (%s): %5d or %4d%%\n",
|
||||
// player_names[player-players],
|
||||
// (INT16) (cmd->angleturn - (player->mo->angle>>16)),
|
||||
// (INT16) (cmd->angleturn - (player->mo->angle>>16)) * 100 / (angle_diff ?: 1));
|
||||
// (INT16) (cmd->angleturn - (player->mo->angle>>16)) * 100 / (angle_diff ? angle_diff : 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1314,7 +1314,8 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
if (max(tz, tz2) < FixedMul(MINZ, this_scale)) // non-papersprite clipping is handled earlier
|
||||
return;
|
||||
|
||||
scalestep = (yscale2 - yscale)/(x2 - x1) ?: 1;
|
||||
scalestep = (yscale2 - yscale)/(x2 - x1);
|
||||
scalestep = scalestep ? scalestep : 1;
|
||||
|
||||
// The following two are alternate sorting methods which might be more applicable in some circumstances. TODO - maybe enable via MF2?
|
||||
// sortscale = max(yscale, yscale2);
|
||||
|
|
Loading…
Reference in a new issue