Skip to content
Permalink
Browse files

Fix a few compilation errors on MSVC

  • Loading branch information...
Kangz committed Feb 8, 2015
1 parent 059c026 commit 74597400e55b87beb06474eb0c383af8f2ee5d08
Showing with 6 additions and 4 deletions.
  1. +4 −2 src/common/System.cpp
  2. +2 −2 src/gamelogic/game/g_buildable.cpp
@@ -64,8 +64,8 @@ void SleepFor(SteadyClock::duration time)
{
#ifdef _WIN32
static ULONG maxRes = 0;
static NTSTATUS WINAPI (*pNtSetTimerResolution)(ULONG resolution, BOOLEAN set_resolution, ULONG* current_resolution);
static NTSTATUS WINAPI (*pNtDelayExecution)(BOOLEAN alertable, const LARGE_INTEGER* timeout);
static NTSTATUS(WINAPI *pNtSetTimerResolution) (ULONG resolution, BOOLEAN set_resolution, ULONG* current_resolution);
static NTSTATUS(WINAPI *pNtDelayExecution) (BOOLEAN alertable, const LARGE_INTEGER* timeout);
if (maxRes == 0) {
// Load ntdll.dll functions
std::string errorString;
@@ -215,6 +215,8 @@ static LONG WINAPI CrashHandler(PEXCEPTION_POINTERS ExceptionInfo)
// TODO: backtrace

Sys::Error("Crashed with exception 0x%lx: %s", ExceptionInfo->ExceptionRecord->ExceptionCode, WindowsExceptionString(ExceptionInfo->ExceptionRecord->ExceptionCode));

return EXCEPTION_CONTINUE_EXECUTION;
}
void SetupCrashHandler()
{
@@ -1255,7 +1255,7 @@ bool ASpiker_Fire( gentity_t *self )

for ( int row = 0; row < SPIKER_MISSILEROWS; row++ )
{
float polar = ( ( (float)row + SPIKER_ROWOFFSET ) * M_PI_2 ) / (float)SPIKER_MISSILEROWS;
float polar = ( ( (float)row + SPIKER_ROWOFFSET ) * M_PI / 2 ) / (float)SPIKER_MISSILEROWS;
float perim = 2.0f * M_PI * sin( 0.5f * polar );

totalPerimeter += perim;
@@ -1269,7 +1269,7 @@ bool ASpiker_Fire( gentity_t *self )

for ( int row = 0; row < SPIKER_MISSILEROWS; row++ )
{
float polar = ( ( (float)row + SPIKER_ROWOFFSET ) * M_PI_2 ) / (float)SPIKER_MISSILEROWS;
float polar = ( ( (float)row + SPIKER_ROWOFFSET ) * M_PI / 2 ) / (float)SPIKER_MISSILEROWS;
float perim = 2.0f * M_PI * sin( 0.5f * polar );

RotatePointAroundVector( dir, rotAxis, normal, RAD2DEG( polar ) );

0 comments on commit 7459740

Please sign in to comment.
You can’t perform that action at this time.