diff --git a/rehlds/dedicated/src/sys_ded.cpp b/rehlds/dedicated/src/sys_ded.cpp index 1532e45..71745c4 100644 --- a/rehlds/dedicated/src/sys_ded.cpp +++ b/rehlds/dedicated/src/sys_ded.cpp @@ -136,11 +136,8 @@ int RunServer() RunVGUIFrame(); bool bDone = false; - while (true) + while (!bDone) { - if (bDone) - break; - // Running really fast, yield some time to other apps sys->Sleep(1); diff --git a/rehlds/engine/host.cpp b/rehlds/engine/host.cpp index 96b9394..c3c8891 100644 --- a/rehlds/engine/host.cpp +++ b/rehlds/engine/host.cpp @@ -824,7 +824,7 @@ void Host_Speeds(double *time) } #ifndef SWDS - if (cl_gg.value != 0.0f) + if (cl_gg.value != 0.0f) // cvar_t cl_gamegauge { //sub_1D10B2D CL_GGSpeeds(time[3]); @@ -970,7 +970,7 @@ int Host_Frame(float time, int iState, int *stateInfo) time1 = Sys_FloatTime(); _Host_Frame(time); - if (host_profile.value != 0.0) + if (host_profile.value != 0.0f) time2 = Sys_FloatTime(); if (giStateInfo) @@ -980,7 +980,7 @@ int Host_Frame(float time, int iState, int *stateInfo) Cbuf_Execute(); } - if (host_profile.value != 0.0) + if (host_profile.value != 0.0f) { static double timetotal; static int timecount; diff --git a/rehlds/engine/pmovetst.cpp b/rehlds/engine/pmovetst.cpp index 265cafd..8ae2f9c 100644 --- a/rehlds/engine/pmovetst.cpp +++ b/rehlds/engine/pmovetst.cpp @@ -730,7 +730,7 @@ qboolean PM_RecursiveHullCheck(hull_t *hull, int num, float p1f, float p2f, cons return 0; } - while (1) + while (true) { midf = (float)(midf - 0.05); if (midf < 0.0) @@ -773,7 +773,7 @@ qboolean PM_RecursiveHullCheck(hull_t *hull, int num, float p1f, float p2f, cons float DIST_EPSILON = 0.03125f; - while (1) + while (true) { if (num < 0) { @@ -896,7 +896,7 @@ qboolean PM_RecursiveHullCheck(hull_t *hull, int num, float p1f, float p2f, cons return 0; } - while (1) + while (true) { midf = (float)(midf - 0.05); if (midf < 0.0) @@ -923,7 +923,5 @@ qboolean PM_RecursiveHullCheck(hull_t *hull, int num, float p1f, float p2f, cons Con_DPrintf("Trace backed up past 0.0.\n"); return 0; } - - return 0; } #endif // REHLDS_OPT_PEDANTIC \ No newline at end of file