diff --git a/.gitignore b/.gitignore index d57b91e..b3bcc9d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,8 @@ cmake_install.cmake *.user .waf-* waf-* +.waf3-* +waf3-* .lock* *.pyc +.vscode/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index d40ce3c..f21211a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,10 @@ if(64BIT AND CMAKE_SIZEOF_VOID_P EQUAL 4) message(FATAL_ERROR "You enabled XASH_64BIT, but compiler can't create 64 bit code!") endif() +# Xash3D FWGS Library Naming Scheme compliance +# see documentation: https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/library-naming.md +include(LibraryNaming) + if(64BIT) message(STATUS "Building for 64 Bit") else() @@ -89,10 +93,11 @@ if(${CMAKE_VERSION} VERSION_LESS "3.0.2") endif() if(NOT MSVC) - add_compile_options(-Wempty-body) # GCC/Clang flag + #add_compile_options(-Wempty-body) # GCC/Clang flag add_compile_options(-Wreturn-type) # GCC/Clang flag endif() + if(BUILD_CLIENT) add_subdirectory(cl_dll) endif() diff --git a/README.md b/README.md index 1957b06..d15da99 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # TF15-Client [![Build Status](https://travis-ci.com/Aimless-Wanderer/tf15-client.svg)](https://travis-ci.com/Aimless-Wanderer/tf15-client) -Team Fortress Classic 1.5 client rewrite. \ No newline at end of file +Team Fortress Classic 1.5 client rewrite. diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index c2eaef6..f9d2c43 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -25,6 +25,11 @@ project (CLDLL) set (CLDLL_LIBRARY client) +include(CheckIncludeFile) +check_include_file("tgmath.h" HAVE_TGMATH_H) +if(HAVE_TGMATH_H) + add_definitions(-DHAVE_TGMATH_H) +endif() add_definitions(-DCLIENT_WEAPONS -DCLIENT_DLL) @@ -125,15 +130,15 @@ if (GOLDSOURCE_SUPPORT) target_link_libraries( ${CLDLL_LIBRARY} ${CMAKE_DL_LIBS} ) endif() +if(WIN32) + target_link_libraries( ${CLDLL_LIBRARY} user32.lib ) +endif() + set_target_properties (${CLDLL_LIBRARY} PROPERTIES POSITION_INDEPENDENT_CODE 1) if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(CLDLL_NAME "client") - if(64BIT) - set(CLDLL_NAME "client64") - endif() - set_target_properties(${CLDLL_LIBRARY} PROPERTIES OUTPUT_NAME ${CLDLL_NAME} PREFIX "") diff --git a/cl_dll/GameStudioModelRenderer.cpp b/cl_dll/GameStudioModelRenderer.cpp index 570b337..f32def4 100644 --- a/cl_dll/GameStudioModelRenderer.cpp +++ b/cl_dll/GameStudioModelRenderer.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "studio_util.h" #include "r_studioint.h" diff --git a/cl_dll/GameStudioModelRenderer_Sample.cpp b/cl_dll/GameStudioModelRenderer_Sample.cpp index ee8e8f9..8910d80 100644 --- a/cl_dll/GameStudioModelRenderer_Sample.cpp +++ b/cl_dll/GameStudioModelRenderer_Sample.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "studio_util.h" #include "r_studioint.h" diff --git a/cl_dll/IGameClientExports.h b/cl_dll/IGameClientExports.h index 6ba8c31..b9f3248 100644 --- a/cl_dll/IGameClientExports.h +++ b/cl_dll/IGameClientExports.h @@ -8,20 +8,8 @@ #ifndef IGAMECLIENTEXPORTS_H #define IGAMECLIENTEXPORTS_H -#ifdef _WIN32 -#pragma once -#endif - #include "../common/interface.h" -#ifdef _WIN32 -#define CLIENT_DLLNAME "cl_dlls/client.dll" -#elif defined(OSX) -#define CLIENT_DLLNAME "cl_dlls/client.dylib" -#elif defined(LINUX) -#define CLIENT_DLLNAME "cl_dlls/client.so" -#endif - class IGameClientExports : public IBaseInterface { public: @@ -39,5 +27,4 @@ class IGameClientExports : public IBaseInterface #define GAMECLIENTEXPORTS_INTERFACE_VERSION "GameClientExports001" - #endif \ No newline at end of file diff --git a/cl_dll/IGameMenuExports.h b/cl_dll/IGameMenuExports.h index 84d9d0d..3b2ec87 100644 --- a/cl_dll/IGameMenuExports.h +++ b/cl_dll/IGameMenuExports.h @@ -12,9 +12,6 @@ #define MAINUI_DLLNAME "cl_dlls/menu.so" #endif -#define MENU_TEAM 2 -#define MENU_CLASS 3 - class IGameMenuExports : public IBaseInterface { public: diff --git a/cl_dll/MOTD.cpp b/cl_dll/MOTD.cpp index 439fb9c..7947a15 100644 --- a/cl_dll/MOTD.cpp +++ b/cl_dll/MOTD.cpp @@ -80,13 +80,13 @@ int CHudMOTD::Draw( float fTime ) { ypos = ROW_RANGE_MIN + 7 + scroll; if( ypos > ROW_RANGE_MIN + 4 ) - scroll-= ( ypos - ( ROW_RANGE_MIN + 4 ) ) / 3.0; + scroll-= ( ypos - ( ROW_RANGE_MIN + 4 ) ) / 3.0f; if( ypos + height < ROW_RANGE_MAX ) - scroll+= ( ROW_RANGE_MAX - ( ypos + height ) ) / 3.0; + scroll+= ( ROW_RANGE_MAX - ( ypos + height ) ) / 3.0f; ypos_r = ROW_RANGE_MIN; height = ROW_RANGE_MAX; } - int ymax = ypos + height; + // int ymax = ypos + height; if( xmax > ScreenWidth - 30 ) xmax = ScreenWidth - 30; gHUD.DrawDarkRectangle( xpos - 5, ypos_r - 5, xmax - xpos + 10, height + 10 ); while( *ch ) @@ -157,7 +157,7 @@ int CHudMOTD::MsgFunc_MOTD( const char *pszName, int iSize, void *pbuf ) if( length > m_iMaxLength ) { m_iMaxLength = length; - length = 0; + // length = 0; } m_bShow = true; } diff --git a/cl_dll/Makefile.MinGW b/cl_dll/Makefile.MinGW index ee33ab4..eb8919a 100644 --- a/cl_dll/Makefile.MinGW +++ b/cl_dll/Makefile.MinGW @@ -82,7 +82,8 @@ INCLUDES = \ DEFINES = \ -Wno-write-strings \ -DCLIENT_WEAPONS \ - -DCLIENT_DLL + -DCLIENT_DLL \ + -DNO_VOICEGAMEMGR FLAGS = -m32 -g OBJS = $(CPP_SOURCES:.cpp=.o) $(C_SOURCES:.c=.o) diff --git a/cl_dll/StudioModelRenderer.cpp b/cl_dll/StudioModelRenderer.cpp index 83a43a5..f6c990b 100644 --- a/cl_dll/StudioModelRenderer.cpp +++ b/cl_dll/StudioModelRenderer.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "studio_util.h" #include "r_studioint.h" @@ -146,27 +146,27 @@ void CStudioModelRenderer::StudioCalcBoneAdj( float dadt, float *adj, const byte int a, b; a = ( pcontroller1[j] + 128 ) % 256; b = ( pcontroller2[j] + 128 ) % 256; - value = ( ( a * dadt ) + ( b * ( 1 - dadt ) ) - 128 ) * ( 360.0 / 256.0 ) + pbonecontroller[j].start; + value = ( ( a * dadt ) + ( b * ( 1.0f - dadt ) ) - 128.0f ) * ( 360.0f / 256.0f ) + pbonecontroller[j].start; } else { - value = ( ( pcontroller1[i] * dadt + ( pcontroller2[i] ) * ( 1.0 - dadt ) ) ) * ( 360.0 / 256.0 ) + pbonecontroller[j].start; + value = ( ( pcontroller1[i] * dadt + ( pcontroller2[i] ) * ( 1.0f - dadt ) ) ) * ( 360.0f / 256.0f ) + pbonecontroller[j].start; } } else { - value = ( pcontroller1[i] * dadt + pcontroller2[i] * ( 1.0 - dadt ) ) / 255.0; - if( value < 0 ) value = 0; - if( value > 1.0 ) value = 1.0; - value = ( 1.0 - value ) * pbonecontroller[j].start + value * pbonecontroller[j].end; + value = ( pcontroller1[i] * dadt + pcontroller2[i] * ( 1.0f - dadt ) ) / 255.0f; + if( value < 0.0f ) value = 0.0f; + if( value > 1.0f ) value = 1.0f; + value = ( 1.0f - value ) * pbonecontroller[j].start + value * pbonecontroller[j].end; } // Con_DPrintf( "%d %d %f : %f\n", m_pCurrentEntity->curstate.controller[j], m_pCurrentEntity->latched.prevcontroller[j], value, dadt ); } else { - value = mouthopen / 64.0; - if( value > 1.0 ) value = 1.0; - value = ( 1.0 - value ) * pbonecontroller[j].start + value * pbonecontroller[j].end; + value = mouthopen / 64.0f; + if( value > 1.0f ) value = 1.0f; + value = ( 1.0f - value ) * pbonecontroller[j].start + value * pbonecontroller[j].end; // Con_DPrintf( "%d %f\n", mouthopen, value ); } switch( pbonecontroller[j].type & STUDIO_TYPES ) @@ -174,7 +174,7 @@ void CStudioModelRenderer::StudioCalcBoneAdj( float dadt, float *adj, const byte case STUDIO_XR: case STUDIO_YR: case STUDIO_ZR: - adj[j] = value * ( M_PI / 180.0 ); + adj[j] = value * ( M_PI_F / 180.0f ); break; case STUDIO_X: case STUDIO_Y: @@ -313,7 +313,7 @@ void CStudioModelRenderer::StudioCalcBonePosition( int frame, float s, mstudiobo // and there's more data in the span if( panimvalue->num.valid > k + 1 ) { - pos[j] += ( panimvalue[k + 1].value * ( 1.0 - s ) + s * panimvalue[k + 2].value ) * pbone->scale[j]; + pos[j] += ( panimvalue[k + 1].value * ( 1.0f - s ) + s * panimvalue[k + 2].value ) * pbone->scale[j]; } else { @@ -325,7 +325,7 @@ void CStudioModelRenderer::StudioCalcBonePosition( int frame, float s, mstudiobo // are we at the end of the repeating values section and there's another section with data? if( panimvalue->num.total <= k + 1 ) { - pos[j] += ( panimvalue[panimvalue->num.valid].value * ( 1.0 - s ) + s * panimvalue[panimvalue->num.valid + 2].value ) * pbone->scale[j]; + pos[j] += ( panimvalue[panimvalue->num.valid].value * ( 1.0f - s ) + s * panimvalue[panimvalue->num.valid + 2].value ) * pbone->scale[j]; } else { @@ -352,12 +352,12 @@ void CStudioModelRenderer::StudioSlerpBones( vec4_t q1[], float pos1[][3], vec4_ vec4_t q3; float s1; - if( s < 0 ) - s = 0; - else if( s > 1.0 ) - s = 1.0; + if( s < 0.0f ) + s = 0.0f; + else if( s > 1.0f ) + s = 1.0f; - s1 = 1.0 - s; + s1 = 1.0f - s; for( i = 0; i < m_pStudioHeader->numbones; i++ ) { @@ -418,17 +418,17 @@ void CStudioModelRenderer::StudioPlayerBlend( mstudioseqdesc_t *pseqdesc, int *p *pBlend = ( *pPitch * 3 ); if( *pBlend < pseqdesc->blendstart[0] ) { - *pPitch -= pseqdesc->blendstart[0] / 3.0; + *pPitch -= pseqdesc->blendstart[0] / 3.0f; *pBlend = 0; } else if( *pBlend > pseqdesc->blendend[0] ) { - *pPitch -= pseqdesc->blendend[0] / 3.0; + *pPitch -= pseqdesc->blendend[0] / 3.0f; *pBlend = 255; } else { - if( pseqdesc->blendend[0] - pseqdesc->blendstart[0] < 0.1 ) // catch qc error + if( pseqdesc->blendend[0] - pseqdesc->blendstart[0] < 0.1f ) // catch qc error *pBlend = 127; else *pBlend = 255 * ( *pBlend - pseqdesc->blendstart[0] ) / ( pseqdesc->blendend[0] - pseqdesc->blendstart[0] ); @@ -483,11 +483,11 @@ void CStudioModelRenderer::StudioSetUpTransform( int trivial_accept ) if( m_fDoInterp ) { // ugly hack to interpolate angle, position. current is reached 0.1 seconds after being set - f = f - 1.0; + f = f - 1.0f; } else { - f = 0; + f = 0.0f; } for( i = 0; i < 3; i++ ) @@ -497,7 +497,7 @@ void CStudioModelRenderer::StudioSetUpTransform( int trivial_accept ) // NOTE: Because multiplayer lag can be relatively large, we don't want to cap // f at 1.5 anymore. - //if( f > -1.0 && f < 1.5 ) {} + //if( f > -1.0f && f < 1.5f ) {} //Con_DPrintf( "%.0f %.0f\n",m_pCurrentEntity->msg_angles[0][YAW], m_pCurrentEntity->msg_angles[1][YAW] ); for( i = 0; i < 3; i++ ) { @@ -507,13 +507,13 @@ void CStudioModelRenderer::StudioSetUpTransform( int trivial_accept ) ang2 = m_pCurrentEntity->latched.prevangles[i]; d = ang1 - ang2; - if( d > 180 ) + if( d > 180.0f ) { - d -= 360; + d -= 360.0f; } - else if( d < -180 ) + else if( d < -180.0f ) { - d += 360; + d += 360.0f; } angles[i] += d * f; @@ -555,9 +555,9 @@ void CStudioModelRenderer::StudioSetUpTransform( int trivial_accept ) { for( i = 0; i < 4; i++ ) { - (*m_paliastransform)[0][i] *= m_fSoftwareXScale * ( 1.0 / ( ZISCALE * 0x10000 ) ); - (*m_paliastransform)[1][i] *= m_fSoftwareYScale * ( 1.0 / ( ZISCALE * 0x10000 ) ); - (*m_paliastransform)[2][i] *= 1.0 / ( ZISCALE * 0x10000 ); + (*m_paliastransform)[0][i] *= m_fSoftwareXScale * ( 1.0f / ( ZISCALE * 0x10000 ) ); + (*m_paliastransform)[1][i] *= m_fSoftwareYScale * ( 1.0f / ( ZISCALE * 0x10000 ) ); + (*m_paliastransform)[2][i] *= 1.0f / ( ZISCALE * 0x10000 ); } } } @@ -575,14 +575,14 @@ StudioEstimateInterpolant */ float CStudioModelRenderer::StudioEstimateInterpolant( void ) { - float dadt = 1.0; + float dadt = 1.0f; - if( m_fDoInterp && ( m_pCurrentEntity->curstate.animtime >= m_pCurrentEntity->latched.prevanimtime + 0.01 ) ) + if( m_fDoInterp && ( m_pCurrentEntity->curstate.animtime >= m_pCurrentEntity->latched.prevanimtime + 0.01f ) ) { - dadt = ( m_clTime - m_pCurrentEntity->curstate.animtime ) / 0.1; - if( dadt > 2.0 ) + dadt = ( m_clTime - m_pCurrentEntity->curstate.animtime ) / 0.1f; + if( dadt > 2.0f ) { - dadt = 2.0; + dadt = 2.0f; } } return dadt; @@ -606,14 +606,14 @@ void CStudioModelRenderer::StudioCalcRotations( float pos[][3], vec4_t *q, mstud if( f > pseqdesc->numframes - 1 ) { - f = 0; // bah, fix this bug with changing sequences too fast + f = 0.0f; // bah, fix this bug with changing sequences too fast } // BUG ( somewhere else ) but this code should validate this data. // This could cause a crash if the frame # is negative, so we'll go ahead // and clamp it here - else if( f < -0.01 ) + else if( f < -0.01f ) { - f = -0.01; + f = -0.01f; } frame = (int)f; @@ -643,18 +643,18 @@ void CStudioModelRenderer::StudioCalcRotations( float pos[][3], vec4_t *q, mstud if( pseqdesc->motiontype & STUDIO_X ) { - pos[pseqdesc->motionbone][0] = 0.0; + pos[pseqdesc->motionbone][0] = 0.0f; } if( pseqdesc->motiontype & STUDIO_Y ) { - pos[pseqdesc->motionbone][1] = 0.0; + pos[pseqdesc->motionbone][1] = 0.0f; } if( pseqdesc->motiontype & STUDIO_Z ) { - pos[pseqdesc->motionbone][2] = 0.0; + pos[pseqdesc->motionbone][2] = 0.0f; } - s = 0 * ( ( 1.0 - ( f - (int)( f ) ) ) / ( pseqdesc->numframes ) ) * m_pCurrentEntity->curstate.framerate; + s = 0 * ( ( 1.0f - ( f - (int)( f ) ) ) / ( pseqdesc->numframes ) ) * m_pCurrentEntity->curstate.framerate; if( pseqdesc->motiontype & STUDIO_LX ) { @@ -687,15 +687,15 @@ void CStudioModelRenderer::StudioFxTransform( cl_entity_t *ent, float transform[ int axis = gEngfuncs.pfnRandomLong( 0, 1 ); if( axis == 1 ) // Choose between x & z axis = 2; - VectorScale( transform[axis], gEngfuncs.pfnRandomFloat( 1, 1.484 ), transform[axis] ); + VectorScale( transform[axis], gEngfuncs.pfnRandomFloat( 1.0f, 1.484f ), transform[axis] ); } else if( gEngfuncs.pfnRandomLong( 0, 49 ) == 0 ) { float offset; - int axis = gEngfuncs.pfnRandomLong(0,1); + /*int axis = gEngfuncs.pfnRandomLong(0,1); if( axis == 1 ) // Choose between x & z - axis = 2; - offset = gEngfuncs.pfnRandomFloat( -10, 10 ); + axis = 2;*/ + offset = gEngfuncs.pfnRandomFloat( -10.0f, 10.0f ); transform[gEngfuncs.pfnRandomLong( 0, 2 )][3] += offset; } break; @@ -703,7 +703,7 @@ void CStudioModelRenderer::StudioFxTransform( cl_entity_t *ent, float transform[ { float scale; - scale = 1.0 + ( m_clTime - ent->curstate.animtime ) * 10.0; + scale = 1.0f + ( m_clTime - ent->curstate.animtime ) * 10.0f; if( scale > 2 ) // Don't blow up more than 200% scale = 2; transform[0][1] *= scale; @@ -742,7 +742,7 @@ float CStudioModelRenderer::StudioEstimateFrame( mstudioseqdesc_t *pseqdesc ) if( pseqdesc->numframes <= 1 ) { - f = 0; + f = 0.0; } else { @@ -1305,10 +1305,10 @@ void CStudioModelRenderer::StudioEstimateGait( entity_state_t *pplayer ) vec3_t est_velocity; dt = ( m_clTime - m_clOldTime ); - if( dt < 0 ) - dt = 0; - else if( dt > 1.0 ) - dt = 1; + if( dt < 0.0f ) + dt = 0.0f; + else if( dt > 1.0f ) + dt = 1.0f; if( dt == 0 || m_pPlayerInfo->renderframe == m_nFrameCount ) { @@ -1338,29 +1338,29 @@ void CStudioModelRenderer::StudioEstimateGait( entity_state_t *pplayer ) if( est_velocity[1] == 0 && est_velocity[0] == 0 ) { float flYawDiff = m_pCurrentEntity->angles[YAW] - m_pPlayerInfo->gaityaw; - flYawDiff = flYawDiff - (int)( flYawDiff / 360 ) * 360; - if( flYawDiff > 180 ) - flYawDiff -= 360; - if( flYawDiff < -180 ) - flYawDiff += 360; - - if( dt < 0.25 ) - flYawDiff *= dt * 4; + flYawDiff = flYawDiff - (int)( flYawDiff / 360.0f ) * 360.0f; + if( flYawDiff > 180.0f ) + flYawDiff -= 360.0f; + if( flYawDiff < -180.0f ) + flYawDiff += 360.0f; + + if( dt < 0.25f ) + flYawDiff *= dt * 4.0f; else flYawDiff *= dt; m_pPlayerInfo->gaityaw += flYawDiff; - m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw - (int)( m_pPlayerInfo->gaityaw / 360 ) * 360; + m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw - (int)( m_pPlayerInfo->gaityaw / 360.0f ) * 360.0f; m_flGaitMovement = 0; } else { - m_pPlayerInfo->gaityaw = ( atan2( est_velocity[1], est_velocity[0] ) * 180 / M_PI ); - if( m_pPlayerInfo->gaityaw > 180 ) - m_pPlayerInfo->gaityaw = 180; - if( m_pPlayerInfo->gaityaw < -180 ) - m_pPlayerInfo->gaityaw = -180; + m_pPlayerInfo->gaityaw = ( atan2( est_velocity[1], est_velocity[0] ) * 180.0f / M_PI_F ); + if( m_pPlayerInfo->gaityaw > 180.0f ) + m_pPlayerInfo->gaityaw = 180.0f; + if( m_pPlayerInfo->gaityaw < -180.0f ) + m_pPlayerInfo->gaityaw = -180.0f; } } @@ -1394,10 +1394,10 @@ void CStudioModelRenderer::StudioProcessGait( entity_state_t *pplayer ) // Con_DPrintf( "%f %d\n", m_pCurrentEntity->angles[PITCH], m_pCurrentEntity->blending[0] ); dt = ( m_clTime - m_clOldTime ); - if( dt < 0 ) - dt = 0; - else if( dt > 1.0 ) - dt = 1; + if( dt < 0.0f ) + dt = 0.0f; + else if( dt > 1.0f ) + dt = 1.0f; StudioEstimateGait( pplayer ); @@ -1405,38 +1405,38 @@ void CStudioModelRenderer::StudioProcessGait( entity_state_t *pplayer ) // calc side to side turning flYaw = m_pCurrentEntity->angles[YAW] - m_pPlayerInfo->gaityaw; - flYaw = flYaw - (int)( flYaw / 360 ) * 360; - if( flYaw < -180 ) - flYaw = flYaw + 360; - if( flYaw > 180 ) - flYaw = flYaw - 360; + flYaw = flYaw - (int)( flYaw / 360.0f ) * 360.0f; + if( flYaw < -180.0f ) + flYaw = flYaw + 360.0f; + if( flYaw > 180.0f ) + flYaw = flYaw - 360.0f; - if( flYaw > 120 ) + if( flYaw > 120.0f ) { - m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw - 180; + m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw - 180.0f; m_flGaitMovement = -m_flGaitMovement; - flYaw = flYaw - 180; + flYaw = flYaw - 180.0f; } - else if( flYaw < -120 ) + else if( flYaw < -120.0f ) { - m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw + 180; + m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw + 180.0f; m_flGaitMovement = -m_flGaitMovement; - flYaw = flYaw + 180; + flYaw = flYaw + 180.0f; } // adjust torso - m_pCurrentEntity->curstate.controller[0] = ( ( flYaw / 4.0 ) + 30 ) / ( 60.0 / 255.0 ); - m_pCurrentEntity->curstate.controller[1] = ( ( flYaw / 4.0 ) + 30 ) / ( 60.0 / 255.0 ); - m_pCurrentEntity->curstate.controller[2] = ( ( flYaw / 4.0 ) + 30 ) / ( 60.0 / 255.0 ); - m_pCurrentEntity->curstate.controller[3] = ( ( flYaw / 4.0 ) + 30 ) / ( 60.0 / 255.0 ); + m_pCurrentEntity->curstate.controller[0] = ( ( flYaw / 4.0f ) + 30.0f ) / ( 60.0f / 255.0f ); + m_pCurrentEntity->curstate.controller[1] = ( ( flYaw / 4.0f ) + 30.0f ) / ( 60.0f / 255.0f ); + m_pCurrentEntity->curstate.controller[2] = ( ( flYaw / 4.0f ) + 30.0f ) / ( 60.0f / 255.0f ); + m_pCurrentEntity->curstate.controller[3] = ( ( flYaw / 4.0f ) + 30.0f ) / ( 60.0f / 255.0f ); m_pCurrentEntity->latched.prevcontroller[0] = m_pCurrentEntity->curstate.controller[0]; m_pCurrentEntity->latched.prevcontroller[1] = m_pCurrentEntity->curstate.controller[1]; m_pCurrentEntity->latched.prevcontroller[2] = m_pCurrentEntity->curstate.controller[2]; m_pCurrentEntity->latched.prevcontroller[3] = m_pCurrentEntity->curstate.controller[3]; m_pCurrentEntity->angles[YAW] = m_pPlayerInfo->gaityaw; - if( m_pCurrentEntity->angles[YAW] < -0 ) - m_pCurrentEntity->angles[YAW] += 360; + if( m_pCurrentEntity->angles[YAW] < -0.0f ) + m_pCurrentEntity->angles[YAW] += 360.0f; m_pCurrentEntity->latched.prevangles[YAW] = m_pCurrentEntity->angles[YAW]; if( pplayer->gaitsequence >= m_pStudioHeader->numseq ) diff --git a/cl_dll/ammo.cpp b/cl_dll/ammo.cpp index 4a4437b..7be34e2 100644 --- a/cl_dll/ammo.cpp +++ b/cl_dll/ammo.cpp @@ -77,7 +77,7 @@ void WeaponsResource::LoadWeaponSprites( WEAPON *pWeapon ) else iRes = 640; - char sz[128]; + char sz[256]; if( !pWeapon ) return; @@ -864,7 +864,7 @@ int CHudAmmo::Draw( float flTime ) a = (int)Q_max( MIN_ALPHA, m_fFade ); if( m_fFade > 0 ) - m_fFade -= ( gHUD.m_flTimeDelta * 20 ); + m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f ); UnpackRGB( r, g, b, RGB_YELLOWISH ); diff --git a/cl_dll/ammo_secondary.cpp b/cl_dll/ammo_secondary.cpp index 786f862..4034c86 100644 --- a/cl_dll/ammo_secondary.cpp +++ b/cl_dll/ammo_secondary.cpp @@ -63,7 +63,7 @@ int CHudAmmoSecondary::Draw( float flTime ) UnpackRGB( r, g, b, RGB_YELLOWISH ); a = (int)Q_max( MIN_ALPHA, m_fFade ); if( m_fFade > 0 ) - m_fFade -= ( gHUD.m_flTimeDelta * 20 ); // slowly lower alpha to fade out icons + m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f ); // slowly lower alpha to fade out icons ScaleColors( r, g, b, a ); AmmoWidth = gHUD.GetSpriteRect( gHUD.m_HUD_number_0 ).right - gHUD.GetSpriteRect( gHUD.m_HUD_number_0 ).left; diff --git a/cl_dll/battery.cpp b/cl_dll/battery.cpp index 675458e..d9d9022 100644 --- a/cl_dll/battery.cpp +++ b/cl_dll/battery.cpp @@ -98,7 +98,7 @@ int CHudBattery::Draw( float flTime ) if( m_fFade > FADE_TIME ) m_fFade = FADE_TIME; - m_fFade -= ( gHUD.m_flTimeDelta * 20 ); + m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f ); if( m_fFade <= 0 ) { a = 128; diff --git a/cl_dll/cdll_int.cpp b/cl_dll/cdll_int.cpp index 2f64fab..981a828 100644 --- a/cl_dll/cdll_int.cpp +++ b/cl_dll/cdll_int.cpp @@ -142,7 +142,7 @@ HUD_ConnectionlessPacket int DLLEXPORT HUD_ConnectionlessPacket( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size ) { // Parse stuff from args - int max_buffer_size = *response_buffer_size; + // int max_buffer_size = *response_buffer_size; // Zero it out since we aren't going to respond. // If we wanted to response, we'd write data into response_buffer diff --git a/cl_dll/com_weapons.cpp b/cl_dll/com_weapons.cpp index 198c533..4b9ae33 100644 --- a/cl_dll/com_weapons.cpp +++ b/cl_dll/com_weapons.cpp @@ -161,7 +161,7 @@ Always 0.0 on client, even if not predicting weapons ( won't get called */ float UTIL_WeaponTimeBase( void ) { - return 0.0; + return 0.0f; } static unsigned int glSeed = 0; @@ -254,7 +254,7 @@ float UTIL_SharedRandomFloat( unsigned int seed, float low, float high ) tensixrand = U_Random() & 65535; - offset = (float)tensixrand / 65536.0; + offset = (float)tensixrand / 65536.0f; return ( low + offset * range ); } diff --git a/cl_dll/death.cpp b/cl_dll/death.cpp index b0667ec..d2c41e3 100644 --- a/cl_dll/death.cpp +++ b/cl_dll/death.cpp @@ -71,7 +71,7 @@ int CHudDeathNotice::Init( void ) HOOK_MESSAGE( DeathMsg ); - CVAR_CREATE( "hud_deathnotice_time", "6", 0 ); + CVAR_CREATE( "hud_deathnotice_time", "6", FCVAR_ARCHIVE ); return 1; } @@ -204,7 +204,7 @@ int CHudDeathNotice::MsgFunc_DeathMsg( const char *pszName, int iSize, void *pbu // Get the Victim's name const char *victim_name = ""; // If victim is -1, the killer killed a specific, non-player object (like a sentrygun) - if( ( (char)victim ) != -1 ) + if( ( (signed char)victim ) != -1 ) victim_name = g_PlayerInfoList[victim].name; if( !victim_name ) { @@ -219,7 +219,7 @@ int CHudDeathNotice::MsgFunc_DeathMsg( const char *pszName, int iSize, void *pbu } // Is it a non-player object kill? - if( ( (char)victim ) == -1 ) + if( ( (signed char)victim ) == -1 ) { rgDeathNoticeList[i].iNonPlayerKill = TRUE; diff --git a/cl_dll/demo.cpp b/cl_dll/demo.cpp index f114ead..63e333b 100644 --- a/cl_dll/demo.cpp +++ b/cl_dll/demo.cpp @@ -88,12 +88,12 @@ void DLLEXPORT Demo_ReadBuffer( int size, unsigned char *buffer ) g_demosniperorg[1] = *(float *)&buffer[i]; i += sizeof(float); g_demosniperorg[2] = *(float *)&buffer[i]; - i += sizeof(float); + // i += sizeof(float); } break; case TYPE_ZOOM: g_demozoom = *(float *)&buffer[i]; - i += sizeof(float); + // i += sizeof(float); break; default: gEngfuncs.Con_DPrintf( "Unknown demo buffer type, skipping.\n" ); diff --git a/cl_dll/entity.cpp b/cl_dll/entity.cpp index 025a0d7..aeafb14 100644 --- a/cl_dll/entity.cpp +++ b/cl_dll/entity.cpp @@ -321,12 +321,12 @@ void Particles( void ) curtime = gEngfuncs.GetClientTime(); - if( ( curtime - lasttime ) < 2.0 ) + if( ( curtime - lasttime ) < 2.0f ) return; if( !color ) { - color = gEngfuncs.pfnRegisterVariable ( "color","255 0 0", 0 ); + color = gEngfuncs.pfnRegisterVariable( "color", "255 0 0", 0 ); } lasttime = curtime; @@ -344,8 +344,8 @@ void Particles( void ) for( j = 0; j < 3; j++ ) { - p->org[j] = v_origin[j] + gEngfuncs.pfnRandomFloat( -32.0, 32.0 ); - p->vel[j] = gEngfuncs.pfnRandomFloat( -100.0, 100.0 ); + p->org[j] = v_origin[j] + gEngfuncs.pfnRandomFloat( -32.0f, 32.0f ); + p->vel[j] = gEngfuncs.pfnRandomFloat( -100.0f, 100.0f ); } if( color ) @@ -363,7 +363,7 @@ void Particles( void ) gEngfuncs.pEfxAPI->R_GetPackedColor( &p->packedColor, p->color ); // p->die is set to current time so all you have to do is add an additional time to it - p->die += 3.0; + p->die += 3.0f; } } */ @@ -386,7 +386,7 @@ void TempEnts( void ) curtime = gEngfuncs.GetClientTime(); - if( ( curtime - lasttime ) < 10.0 ) + if( ( curtime - lasttime ) < 10.0f ) return; lasttime = curtime; @@ -419,11 +419,11 @@ void TempEnts( void ) p->entity.curstate.origin[j] = origin[j]; // Store velocity in baseline origin - p->entity.baseline.origin[j] = gEngfuncs.pfnRandomFloat( -100, 100 ); + p->entity.baseline.origin[j] = gEngfuncs.pfnRandomFloat( -100.0f, 100.0f ); } // p->die is set to current time so all you have to do is add an additional time to it - p->die += 10.0; + p->die += 10.0f; } } */ @@ -639,7 +639,7 @@ void DLLEXPORT HUD_TempEntUpdate ( //freq = client_time * 0.01; fastFreq = client_time * 5.5; gravity = -frametime * cl_gravity; - gravitySlow = gravity * 0.5; + gravitySlow = gravity * 0.5f; while( pTemp ) { @@ -647,7 +647,7 @@ void DLLEXPORT HUD_TempEntUpdate ( active = 1; - life = pTemp->die - client_time; + life = pTemp->die - (float)client_time; pnext = pTemp->next; if( life < 0 ) { @@ -687,9 +687,9 @@ void DLLEXPORT HUD_TempEntUpdate ( gEngfuncs.pEfxAPI->R_SparkEffect( pTemp->entity.origin, 8, -200, 200 ); // Reduce life - pTemp->entity.baseline.framerate -= 0.1; + pTemp->entity.baseline.framerate -= 0.1f; - if( pTemp->entity.baseline.framerate <= 0.0 ) + if( pTemp->entity.baseline.framerate <= 0.0f ) { pTemp->die = client_time; } @@ -713,11 +713,11 @@ void DLLEXPORT HUD_TempEntUpdate ( } else if( pTemp->flags & FTENT_SINEWAVE ) { - pTemp->x += pTemp->entity.baseline.origin[0] * frametime; - pTemp->y += pTemp->entity.baseline.origin[1] * frametime; + pTemp->x += pTemp->entity.baseline.origin[0] * (float)frametime; + pTemp->y += pTemp->entity.baseline.origin[1] * (float)frametime; pTemp->entity.origin[0] = pTemp->x + sin( pTemp->entity.baseline.origin[2] + client_time * pTemp->entity.prevstate.frame ) * ( 10 * pTemp->entity.curstate.framerate ); - pTemp->entity.origin[1] = pTemp->y + sin( pTemp->entity.baseline.origin[2] + fastFreq + 0.7 ) * ( 8 * pTemp->entity.curstate.framerate ); + pTemp->entity.origin[1] = pTemp->y + sin( pTemp->entity.baseline.origin[2] + fastFreq + 0.7f ) * ( 8 * pTemp->entity.curstate.framerate ); pTemp->entity.origin[2] += pTemp->entity.baseline.origin[2] * frametime; } else if( pTemp->flags & FTENT_SPIRAL ) @@ -726,19 +726,19 @@ void DLLEXPORT HUD_TempEntUpdate ( s = sin( pTemp->entity.baseline.origin[2] + fastFreq ); c = cos( pTemp->entity.baseline.origin[2] + fastFreq );*/ - pTemp->entity.origin[0] += pTemp->entity.baseline.origin[0] * frametime + 8 * sin( client_time * 20 + (size_t)pTemp ); - pTemp->entity.origin[1] += pTemp->entity.baseline.origin[1] * frametime + 4 * sin( client_time * 30 + (size_t)pTemp ); - pTemp->entity.origin[2] += pTemp->entity.baseline.origin[2] * frametime; + pTemp->entity.origin[0] += pTemp->entity.baseline.origin[0] * (float)frametime + 8 * sin( client_time * 20 + (size_t)pTemp ); + pTemp->entity.origin[1] += pTemp->entity.baseline.origin[1] * (float)frametime + 4 * sin( client_time * 30 + (size_t)pTemp ); + pTemp->entity.origin[2] += pTemp->entity.baseline.origin[2] * (float)frametime; } else { for( i = 0; i < 3; i++ ) - pTemp->entity.origin[i] += pTemp->entity.baseline.origin[i] * frametime; + pTemp->entity.origin[i] += pTemp->entity.baseline.origin[i] * (float)frametime; } if( pTemp->flags & FTENT_SPRANIMATE ) { - pTemp->entity.curstate.frame += frametime * pTemp->entity.curstate.framerate; + pTemp->entity.curstate.frame += (float)frametime * pTemp->entity.curstate.framerate; if( pTemp->entity.curstate.frame >= pTemp->frameMax ) { pTemp->entity.curstate.frame = pTemp->entity.curstate.frame - (int)( pTemp->entity.curstate.frame ); @@ -768,9 +768,9 @@ void DLLEXPORT HUD_TempEntUpdate ( if( pTemp->flags & FTENT_ROTATE ) { - pTemp->entity.angles[0] += pTemp->entity.baseline.angles[0] * frametime; - pTemp->entity.angles[1] += pTemp->entity.baseline.angles[1] * frametime; - pTemp->entity.angles[2] += pTemp->entity.baseline.angles[2] * frametime; + pTemp->entity.angles[0] += pTemp->entity.baseline.angles[0] * (float)frametime; + pTemp->entity.angles[1] += pTemp->entity.baseline.angles[1] * (float)frametime; + pTemp->entity.angles[2] += pTemp->entity.baseline.angles[2] * (float)frametime; VectorCopy( pTemp->entity.angles, pTemp->entity.latched.prevangles ); } @@ -822,7 +822,7 @@ void DLLEXPORT HUD_TempEntUpdate ( { // Chop spark speeds a bit more // - VectorScale( pTemp->entity.baseline.origin, 0.6, pTemp->entity.baseline.origin ); + VectorScale( pTemp->entity.baseline.origin, 0.6f, pTemp->entity.baseline.origin ); if( Length( pTemp->entity.baseline.origin ) < 10 ) { @@ -842,13 +842,13 @@ void DLLEXPORT HUD_TempEntUpdate ( float proj, damp; // Place at contact point - VectorMA( pTemp->entity.prevstate.origin, traceFraction * frametime, pTemp->entity.baseline.origin, pTemp->entity.origin ); + VectorMA( pTemp->entity.prevstate.origin, traceFraction * (float)frametime, pTemp->entity.baseline.origin, pTemp->entity.origin ); // Damp velocity damp = pTemp->bounceFactor; if( pTemp->flags & ( FTENT_GRAVITY | FTENT_SLOWGRAVITY ) ) { - damp *= 0.5; - if( traceNormal[2] > 0.9 ) // Hit floor? + damp *= 0.5f; + if( traceNormal[2] > 0.9f ) // Hit floor? { if( pTemp->entity.baseline.origin[2] <= 0 && pTemp->entity.baseline.origin[2] >= gravity*3 ) { diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index d8b8233..bba3339 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -72,18 +72,18 @@ void EV_SnarkFire( struct event_args_s *args ); void EV_TrainPitchAdjust( struct event_args_s *args ); } -#define VECTOR_CONE_1DEGREES Vector( 0.00873, 0.00873, 0.00873 ) -#define VECTOR_CONE_2DEGREES Vector( 0.01745, 0.01745, 0.01745 ) -#define VECTOR_CONE_3DEGREES Vector( 0.02618, 0.02618, 0.02618 ) -#define VECTOR_CONE_4DEGREES Vector( 0.03490, 0.03490, 0.03490 ) -#define VECTOR_CONE_5DEGREES Vector( 0.04362, 0.04362, 0.04362 ) -#define VECTOR_CONE_6DEGREES Vector( 0.05234, 0.05234, 0.05234 ) -#define VECTOR_CONE_7DEGREES Vector( 0.06105, 0.06105, 0.06105 ) -#define VECTOR_CONE_8DEGREES Vector( 0.06976, 0.06976, 0.06976 ) -#define VECTOR_CONE_9DEGREES Vector( 0.07846, 0.07846, 0.07846 ) -#define VECTOR_CONE_10DEGREES Vector( 0.08716, 0.08716, 0.08716 ) -#define VECTOR_CONE_15DEGREES Vector( 0.13053, 0.13053, 0.13053 ) -#define VECTOR_CONE_20DEGREES Vector( 0.17365, 0.17365, 0.17365 ) +#define VECTOR_CONE_1DEGREES Vector( 0.00873f, 0.00873f, 0.00873f ) +#define VECTOR_CONE_2DEGREES Vector( 0.01745f, 0.01745f, 0.01745f ) +#define VECTOR_CONE_3DEGREES Vector( 0.02618f, 0.02618f, 0.02618f ) +#define VECTOR_CONE_4DEGREES Vector( 0.03490f, 0.03490f, 0.03490f ) +#define VECTOR_CONE_5DEGREES Vector( 0.04362f, 0.04362f, 0.04362f ) +#define VECTOR_CONE_6DEGREES Vector( 0.05234f, 0.05234f, 0.05234f ) +#define VECTOR_CONE_7DEGREES Vector( 0.06105f, 0.06105f, 0.06105f ) +#define VECTOR_CONE_8DEGREES Vector( 0.06976f, 0.06976f, 0.06976f ) +#define VECTOR_CONE_9DEGREES Vector( 0.07846f, 0.07846f, 0.07846f ) +#define VECTOR_CONE_10DEGREES Vector( 0.08716f, 0.08716f, 0.08716f ) +#define VECTOR_CONE_15DEGREES Vector( 0.13053f, 0.13053f, 0.13053f ) +#define VECTOR_CONE_20DEGREES Vector( 0.17365f, 0.17365f, 0.17365f ) // play a strike sound based on the texture that was hit by the attack traceline. VecSrc/VecEnd are the // original traceline endpoints used by the attacker, iBulletType is the type of bullet that hit the texture. @@ -425,7 +425,7 @@ void EV_HLDM_FireBullets( int idx, float *forward, float *right, float *up, int tracer = EV_HLDM_CheckTracer( idx, vecSrc, tr.endpos, forward, right, iBulletType, iTracerFreq, tracerCount ); // do damage, paint decals - if( tr.fraction != 1.0 ) + if( tr.fraction != 1.0f ) { switch( iBulletType ) { @@ -901,14 +901,14 @@ void EV_FireGauss( event_args_t *args ) if( EV_IsLocal( idx ) ) { - V_PunchAxis( 0, -2.0 ); + V_PunchAxis( 0.0f, -2.0f ); gEngfuncs.pEventAPI->EV_WeaponAnimation( GAUSS_FIRE2, 2 ); if( m_fPrimaryFire == false ) g_flApplyVel = flDamage; } - gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/gauss2.wav", 0.5 + flDamage * ( 1.0 / 400.0 ), ATTN_NORM, 0, 85 + gEngfuncs.pfnRandomLong( 0, 0x1f ) ); + gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/gauss2.wav", 0.5f + flDamage * ( 1.0f / 400.0f ), ATTN_NORM, 0, 85 + gEngfuncs.pfnRandomLong( 0, 0x1f ) ); while( flDamage > 10 && nMaxHits > 0 ) { @@ -943,10 +943,10 @@ void EV_FireGauss( event_args_t *args ) idx | 0x1000, tr.endpos, m_iBeam, - 0.1, - m_fPrimaryFire ? 1.0 : 2.5, - 0.0, - m_fPrimaryFire ? 128.0 : flDamage, + 0.1f, + m_fPrimaryFire ? 1.0f : 2.5f, + 0.0f, + m_fPrimaryFire ? 128.0f : flDamage, 0, 0, 0, @@ -960,10 +960,10 @@ void EV_FireGauss( event_args_t *args ) gEngfuncs.pEfxAPI->R_BeamPoints( vecSrc, tr.endpos, m_iBeam, - 0.1, - m_fPrimaryFire ? 1.0 : 2.5, - 0.0, - m_fPrimaryFire ? 128.0 : flDamage, + 0.1f, + m_fPrimaryFire ? 1.0f : 2.5f, + 0.0f, + m_fPrimaryFire ? 128.0f : flDamage, 0, 0, 0, @@ -985,13 +985,13 @@ void EV_FireGauss( event_args_t *args ) n = -DotProduct( tr.plane.normal, forward ); - if( n < 0.5 ) // 60 degrees + if( n < 0.5f ) // 60 degrees { // ALERT( at_console, "reflect %f\n", n ); // reflect vec3_t r; - VectorMA( forward, 2.0 * n, tr.plane.normal, r ); + VectorMA( forward, 2.0f * n, tr.plane.normal, r ); flMaxFrac = flMaxFrac - tr.fraction; @@ -1000,18 +1000,18 @@ void EV_FireGauss( event_args_t *args ) VectorMA( tr.endpos, 8.0, forward, vecSrc ); VectorMA( vecSrc, 8192.0, forward, vecDest ); - gEngfuncs.pEfxAPI->R_TempSprite( tr.endpos, vec3_origin, 0.2, m_iGlow, kRenderGlow, kRenderFxNoDissipation, flDamage * n / 255.0, flDamage * n * 0.5 * 0.1, FTENT_FADEOUT ); + gEngfuncs.pEfxAPI->R_TempSprite( tr.endpos, vec3_origin, 0.2, m_iGlow, kRenderGlow, kRenderFxNoDissipation, flDamage * n / 255.0f, flDamage * n * 0.5f * 0.1f, FTENT_FADEOUT ); vec3_t fwd; VectorAdd( tr.endpos, tr.plane.normal, fwd ); - gEngfuncs.pEfxAPI->R_Sprite_Trail( TE_SPRITETRAIL, tr.endpos, fwd, m_iBalls, 3, 0.1, gEngfuncs.pfnRandomFloat( 10, 20 ) / 100.0, 100, + gEngfuncs.pEfxAPI->R_Sprite_Trail( TE_SPRITETRAIL, tr.endpos, fwd, m_iBalls, 3, 0.1, gEngfuncs.pfnRandomFloat( 10.0f, 20.0f ) / 100.0f, 100, 255, 100 ); // lose energy - if( n == 0 ) + if( n == 0.0f ) { - n = 0.1; + n = 0.1f; } flDamage = flDamage * ( 1 - n ); @@ -1021,7 +1021,7 @@ void EV_FireGauss( event_args_t *args ) // tunnel EV_HLDM_DecalGunshot( &tr, BULLET_MONSTER_12MM ); - gEngfuncs.pEfxAPI->R_TempSprite( tr.endpos, vec3_origin, 1.0, m_iGlow, kRenderGlow, kRenderFxNoDissipation, flDamage / 255.0, 6.0, FTENT_FADEOUT ); + gEngfuncs.pEfxAPI->R_TempSprite( tr.endpos, vec3_origin, 1.0, m_iGlow, kRenderGlow, kRenderFxNoDissipation, flDamage / 255.0f, 6.0f, FTENT_FADEOUT ); // limit it to one hole punch if( fHasPunched ) @@ -1067,7 +1067,7 @@ void EV_FireGauss( event_args_t *args ) { vec3_t fwd; VectorSubtract( tr.endpos, forward, fwd ); - gEngfuncs.pEfxAPI->R_Sprite_Trail( TE_SPRITETRAIL, tr.endpos, fwd, m_iBalls, 3, 0.1, gEngfuncs.pfnRandomFloat( 10, 20 ) / 100.0, 100, + gEngfuncs.pEfxAPI->R_Sprite_Trail( TE_SPRITETRAIL, tr.endpos, fwd, m_iBalls, 3, 0.1, gEngfuncs.pfnRandomFloat( 10.0f, 20.0f ) / 100.0f, 100, 255, 100 ); } @@ -1076,13 +1076,13 @@ void EV_FireGauss( event_args_t *args ) EV_HLDM_DecalGunshot( &beam_tr, BULLET_MONSTER_12MM ); - gEngfuncs.pEfxAPI->R_TempSprite( beam_tr.endpos, vec3_origin, 0.1, m_iGlow, kRenderGlow, kRenderFxNoDissipation, flDamage / 255.0, 6.0, FTENT_FADEOUT ); + gEngfuncs.pEfxAPI->R_TempSprite( beam_tr.endpos, vec3_origin, 0.1, m_iGlow, kRenderGlow, kRenderFxNoDissipation, flDamage / 255.0f, 6.0f, FTENT_FADEOUT ); // balls { vec3_t fwd; VectorSubtract( beam_tr.endpos, forward, fwd ); - gEngfuncs.pEfxAPI->R_Sprite_Trail( TE_SPRITETRAIL, beam_tr.endpos, fwd, m_iBalls, (int)( flDamage * 0.3 ), 0.1, gEngfuncs.pfnRandomFloat( 10, 20 ) / 100.0, 200, + gEngfuncs.pEfxAPI->R_Sprite_Trail( TE_SPRITETRAIL, beam_tr.endpos, fwd, m_iBalls, (int)( flDamage * 0.3f ), 0.1, gEngfuncs.pfnRandomFloat( 10.0f, 20.0f ) / 100.0f, 200, 255, 40 ); } @@ -1102,11 +1102,11 @@ void EV_FireGauss( event_args_t *args ) { // slug doesn't punch through ever with primary // fire, so leave a little glowy bit and make some balls - gEngfuncs.pEfxAPI->R_TempSprite( tr.endpos, vec3_origin, 0.2, m_iGlow, kRenderGlow, kRenderFxNoDissipation, 200.0 / 255.0, 0.3, FTENT_FADEOUT ); + gEngfuncs.pEfxAPI->R_TempSprite( tr.endpos, vec3_origin, 0.2, m_iGlow, kRenderGlow, kRenderFxNoDissipation, 200.0f / 255.0f, 0.3, FTENT_FADEOUT ); { vec3_t fwd; VectorAdd( tr.endpos, tr.plane.normal, fwd ); - gEngfuncs.pEfxAPI->R_Sprite_Trail( TE_SPRITETRAIL, tr.endpos, fwd, m_iBalls, 8, 0.6, gEngfuncs.pfnRandomFloat( 10, 20 ) / 100.0, 100, + gEngfuncs.pEfxAPI->R_Sprite_Trail( TE_SPRITETRAIL, tr.endpos, fwd, m_iBalls, 8, 0.6, gEngfuncs.pfnRandomFloat( 10.0f, 20.0f ) / 100.0f, 100, 255, 200 ); } } @@ -1238,7 +1238,7 @@ void EV_FireCrossbow2( event_args_t *args ) VectorMA( vecSrc, 8192, forward, vecEnd ); gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/xbow_fire1.wav", 1, ATTN_NORM, 0, 93 + gEngfuncs.pfnRandomLong( 0, 0xF ) ); - gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_ITEM, "weapons/xbow_reload1.wav", gEngfuncs.pfnRandomFloat( 0.95, 1.0 ), ATTN_NORM, 0, 93 + gEngfuncs.pfnRandomLong( 0, 0xF ) ); + gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_ITEM, "weapons/xbow_reload1.wav", gEngfuncs.pfnRandomFloat( 0.95f, 1.0f ), ATTN_NORM, 0, 93 + gEngfuncs.pfnRandomLong( 0, 0xF ) ); if( EV_IsLocal( idx ) ) { @@ -1257,7 +1257,7 @@ void EV_FireCrossbow2( event_args_t *args ) gEngfuncs.pEventAPI->EV_PlayerTrace( vecSrc, vecEnd, PM_STUDIO_BOX, -1, &tr ); //We hit something - if( tr.fraction < 1.0 ) + if( tr.fraction < 1.0f ) { physent_t *pe = gEngfuncs.pEventAPI->EV_GetPhysent( tr.ent ); @@ -1277,7 +1277,7 @@ void EV_FireCrossbow2( event_args_t *args ) //Stick to world but don't stick to glass, it might break and leave the bolt floating. It can still stick to other non-transparent breakables though. else if( pe->rendermode == kRenderNormal ) { - gEngfuncs.pEventAPI->EV_PlaySound( 0, tr.endpos, CHAN_BODY, "weapons/xbow_hit1.wav", gEngfuncs.pfnRandomFloat( 0.95, 1.0 ), ATTN_NORM, 0, PITCH_NORM ); + gEngfuncs.pEventAPI->EV_PlaySound( 0, tr.endpos, CHAN_BODY, "weapons/xbow_hit1.wav", gEngfuncs.pfnRandomFloat( 0.95f, 1.0f ), ATTN_NORM, 0, PITCH_NORM ); //Not underwater, do some sparks... if( gEngfuncs.PM_PointContents( tr.endpos, NULL ) != CONTENTS_WATER ) @@ -1313,7 +1313,7 @@ void EV_FireCrossbow( event_args_t *args ) VectorCopy( args->origin, origin ); gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/xbow_fire1.wav", 1, ATTN_NORM, 0, 93 + gEngfuncs.pfnRandomLong( 0, 0xF ) ); - gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_ITEM, "weapons/xbow_reload1.wav", gEngfuncs.pfnRandomFloat( 0.95, 1.0 ), ATTN_NORM, 0, 93 + gEngfuncs.pfnRandomLong( 0, 0xF ) ); + gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_ITEM, "weapons/xbow_reload1.wav", gEngfuncs.pfnRandomFloat( 0.95f, 1.0f ), ATTN_NORM, 0, 93 + gEngfuncs.pfnRandomLong( 0, 0xF ) ); //Only play the weapon anims if I shot it. if( EV_IsLocal( idx ) ) @@ -1323,7 +1323,7 @@ void EV_FireCrossbow( event_args_t *args ) else if ( args->iparam2 ) gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE3, 1 ); - V_PunchAxis( 0, -2.0 ); + V_PunchAxis( 0.0f, -2.0f ); } } //====================== @@ -1541,13 +1541,13 @@ void EV_EgonStop( event_args_t *args ) { if( pBeam ) { - pBeam->die = 0.0; + pBeam->die = 0.0f; pBeam = NULL; } if( pBeam2 ) { - pBeam2->die = 0.0; + pBeam2->die = 0.0f; pBeam2 = NULL; } @@ -1667,10 +1667,10 @@ void EV_TripmineFire( event_args_t *args ) // Now add in all of the players. gEngfuncs.pEventAPI->EV_SetSolidPlayers ( idx - 1 ); gEngfuncs.pEventAPI->EV_SetTraceHull( 2 ); - gEngfuncs.pEventAPI->EV_PlayerTrace( vecSrc, vecSrc + forward * 128, PM_NORMAL, -1, &tr ); + gEngfuncs.pEventAPI->EV_PlayerTrace( vecSrc, vecSrc + forward * 128.0f, PM_NORMAL, -1, &tr ); //Hit something solid - if( tr.fraction < 1.0 ) + if( tr.fraction < 1.0f ) gEngfuncs.pEventAPI->EV_WeaponAnimation ( TRIPMINE_DRAW, 0 ); gEngfuncs.pEventAPI->EV_PopPMStates(); @@ -1722,7 +1722,7 @@ void EV_SnarkFire( event_args_t *args ) gEngfuncs.pEventAPI->EV_PlayerTrace( vecSrc + forward * 20, vecSrc + forward * 64, PM_NORMAL, -1, &tr ); //Find space to drop the thing. - if( tr.allsolid == 0 && tr.startsolid == 0 && tr.fraction > 0.25 ) + if( tr.allsolid == 0 && tr.startsolid == 0 && tr.fraction > 0.25f ) gEngfuncs.pEventAPI->EV_WeaponAnimation( SQUEAK_THROW, 0 ); gEngfuncs.pEventAPI->EV_PopPMStates(); @@ -1751,9 +1751,9 @@ void EV_TrainPitchAdjust( event_args_t *args ) us_params = (unsigned short)args->iparam1; stop = args->bparam1; - m_flVolume = (float)( us_params & 0x003f ) / 40.0; + m_flVolume = (float)( us_params & 0x003f ) / 40.0f; noise = (int)( ( ( us_params ) >> 12 ) & 0x0007 ); - pitch = (int)( 10.0 * (float)( ( us_params >> 6 ) & 0x003f ) ); + pitch = (int)( 10.0f * (float)( ( us_params >> 6 ) & 0x003f ) ); switch( noise ) { diff --git a/cl_dll/flashlight.cpp b/cl_dll/flashlight.cpp index ee3d6d2..3ec6997 100644 --- a/cl_dll/flashlight.cpp +++ b/cl_dll/flashlight.cpp @@ -50,7 +50,7 @@ void CHudFlashlight::Reset( void ) m_fFade = 0; m_fOn = 0; m_iBat = 100; - m_flBat = 1.0; + m_flBat = 1.0f; } int CHudFlashlight::VidInit( void ) @@ -75,7 +75,7 @@ int CHudFlashlight::MsgFunc_FlashBat( const char *pszName, int iSize, void *pbu BEGIN_READ( pbuf, iSize ); int x = READ_BYTE(); m_iBat = x; - m_flBat = ( (float)x ) / 100.0; + m_flBat = ( (float)x ) / 100.0f; return 1; } @@ -86,7 +86,7 @@ int CHudFlashlight::MsgFunc_Flashlight( const char *pszName, int iSize, void *p m_fOn = READ_BYTE(); int x = READ_BYTE(); m_iBat = x; - m_flBat = ( (float)x ) / 100.0; + m_flBat = ( (float)x ) / 100.0f; return 1; } @@ -119,7 +119,7 @@ int CHudFlashlight::Draw( float flTime ) else a = MIN_ALPHA; - if( m_flBat < 0.20 ) + if( m_flBat < 0.20f ) UnpackRGB( r,g,b, RGB_REDISH ); else UnpackRGB( r,g,b, RGB_YELLOWISH ); @@ -144,7 +144,7 @@ int CHudFlashlight::Draw( float flTime ) // draw the flashlight energy level x = ScreenWidth - m_iWidth - m_iWidth / 2; - int iOffset = m_iWidth * ( 1.0 - m_flBat ); + int iOffset = m_iWidth * ( 1.0f - m_flBat ); if( iOffset < m_iWidth ) { rc = *m_prc2; diff --git a/cl_dll/geiger.cpp b/cl_dll/geiger.cpp index 097889b..89d2b95 100644 --- a/cl_dll/geiger.cpp +++ b/cl_dll/geiger.cpp @@ -66,7 +66,7 @@ int CHudGeiger::Draw( float flTime ) int pct; float flvol = 0.0f; //int rg[3]; - int i; + int i = 0; if( m_iGeigerRange < 1000 && m_iGeigerRange > 0 ) { @@ -78,7 +78,7 @@ int CHudGeiger::Draw( float flTime ) else if( m_iGeigerRange > 600 ) { pct = 2; - flvol = 0.4; //Con_Printf( "range > 600\n" ); + flvol = 0.4f; //Con_Printf( "range > 600\n" ); //rg[0] = 1; //rg[1] = 1; i = 2; @@ -86,7 +86,7 @@ int CHudGeiger::Draw( float flTime ) else if( m_iGeigerRange > 500 ) { pct = 4; - flvol = 0.5; //Con_Printf( "range > 500\n" ); + flvol = 0.5f; //Con_Printf( "range > 500\n" ); //rg[0] = 1; //rg[1] = 2; i = 2; @@ -94,7 +94,7 @@ int CHudGeiger::Draw( float flTime ) else if( m_iGeigerRange > 400 ) { pct = 8; - flvol = 0.6; //Con_Printf( "range > 400\n" ); + flvol = 0.6f; //Con_Printf( "range > 400\n" ); //rg[0] = 1; //rg[1] = 2; //rg[2] = 3; @@ -103,7 +103,7 @@ int CHudGeiger::Draw( float flTime ) else if( m_iGeigerRange > 300 ) { pct = 8; - flvol = 0.7; //Con_Printf( "range > 300\n" ); + flvol = 0.7f; //Con_Printf( "range > 300\n" ); //rg[0] = 2; //rg[1] = 3; //rg[2] = 4; @@ -112,7 +112,7 @@ int CHudGeiger::Draw( float flTime ) else if( m_iGeigerRange > 200 ) { pct = 28; - flvol = 0.78; //Con_Printf( "range > 200\n" ); + flvol = 0.78f; //Con_Printf( "range > 200\n" ); //rg[0] = 2; //rg[1] = 3; //rg[2] = 4; @@ -121,7 +121,7 @@ int CHudGeiger::Draw( float flTime ) else if( m_iGeigerRange > 150 ) { pct = 40; - flvol = 0.80; //Con_Printf( "range > 150\n" ); + flvol = 0.80f; //Con_Printf( "range > 150\n" ); //rg[0] = 3; //rg[1] = 4; //rg[2] = 5; @@ -139,7 +139,7 @@ int CHudGeiger::Draw( float flTime ) else if( m_iGeigerRange > 75 ) { pct = 80; - flvol = 0.9; //Con_Printf( "range > 75\n" ); + flvol = 0.9f; //Con_Printf( "range > 75\n" ); //gflGeigerDelay = cl.time + GEIGERDELAY * 0.75; //rg[0] = 4; //rg[1] = 5; @@ -149,7 +149,7 @@ int CHudGeiger::Draw( float flTime ) else if( m_iGeigerRange > 50 ) { pct = 90; - flvol = 0.95; //Con_Printf( "range > 50\n" ); + flvol = 0.95f; //Con_Printf( "range > 50\n" ); //rg[0] = 5; //rg[1] = 6; i = 2; @@ -157,17 +157,17 @@ int CHudGeiger::Draw( float flTime ) else { pct = 95; - flvol = 1.0; //Con_Printf( "range < 50\n" ); + flvol = 1.0f; //Con_Printf( "range < 50\n" ); //rg[0] = 5; //rg[1] = 6; i = 2; } - flvol = ( flvol * ( ( rand() & 127 ) ) / 255 ) + 0.25; // UTIL_RandomFloat( 0.25, 0.5 ); + flvol = ( flvol * ( ( rand() & 127 ) ) / 255 ) + 0.25f; // UTIL_RandomFloat( 0.25f, 0.5f ); if( ( rand() & 127 ) < pct || ( rand() & 127 ) < pct ) { - //S_StartDynamicSound( -1, 0, rgsfx[rand() % i], r_origin, flvol, 1.0, 0, 100 ); + //S_StartDynamicSound( -1, 0, rgsfx[rand() % i], r_origin, flvol, 1.0f, 0, 100 ); char sz[256]; int j = rand() & 1; diff --git a/cl_dll/health.cpp b/cl_dll/health.cpp index bde24f9..e14182b 100644 --- a/cl_dll/health.cpp +++ b/cl_dll/health.cpp @@ -18,9 +18,9 @@ // implementation of CHudHealth class // -#include "stdio.h" -#include "stdlib.h" -#include "math.h" +#include +#include +#include #include "hud.h" #include "cl_util.h" @@ -152,13 +152,14 @@ int CHudHealth::MsgFunc_Damage( const char *pszName, int iSize, void *pbuf ) // Green <-> Yellow <-> Red ramp void CHudHealth::GetPainColor( int &r, int &g, int &b ) { +#if 0 int iHealth = m_iHealth; if( iHealth > 25 ) iHealth -= 25; else if( iHealth < 0 ) iHealth = 0; -#if 0 + g = iHealth * 255 / 100; r = 255 - g; b = 0; @@ -191,7 +192,7 @@ int CHudHealth::Draw( float flTime ) // Has health changed? Flash the health # if( m_fFade ) { - m_fFade -= ( gHUD.m_flTimeDelta * 20 ); + m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f ); if( m_fFade <= 0 ) { a = MIN_ALPHA; @@ -270,27 +271,27 @@ void CHudHealth::CalcDamageDirection( vec3_t vecFrom ) } else { - if( side > 0 ) + if( side > 0.0f ) { - if( side > 0.3 ) + if( side > 0.3f ) m_fAttackFront = Q_max( m_fAttackFront, side ); } else { float f = fabs( side ); - if( f > 0.3 ) + if( f > 0.3f ) m_fAttackRear = Q_max( m_fAttackRear, f ); } - if( front > 0 ) + if( front > 0.0f ) { - if( front > 0.3 ) + if( front > 0.3f ) m_fAttackRight = Q_max( m_fAttackRight, front ); } else { float f = fabs( front ); - if( f > 0.3 ) + if( f > 0.3f ) m_fAttackLeft = Q_max( m_fAttackLeft, f ); } } @@ -310,10 +311,10 @@ int CHudHealth::DrawPain( float flTime ) float fFade = gHUD.m_flTimeDelta * 2; // SPR_Draw top - if( m_fAttackFront > 0.4 ) + if( m_fAttackFront > 0.4f ) { GetPainColor( r, g, b ); - shade = a * Q_max( m_fAttackFront, 0.5 ); + shade = a * Q_max( m_fAttackFront, 0.5f ); ScaleColors( r, g, b, shade ); SPR_Set( m_hSprite, r, g, b ); @@ -324,10 +325,10 @@ int CHudHealth::DrawPain( float flTime ) } else m_fAttackFront = 0; - if( m_fAttackRight > 0.4 ) + if( m_fAttackRight > 0.4f ) { GetPainColor( r, g, b ); - shade = a * Q_max( m_fAttackRight, 0.5 ); + shade = a * Q_max( m_fAttackRight, 0.5f ); ScaleColors( r, g, b, shade ); SPR_Set( m_hSprite, r, g, b ); @@ -339,10 +340,10 @@ int CHudHealth::DrawPain( float flTime ) else m_fAttackRight = 0; - if( m_fAttackRear > 0.4 ) + if( m_fAttackRear > 0.4f ) { GetPainColor( r, g, b ); - shade = a * Q_max( m_fAttackRear, 0.5 ); + shade = a * Q_max( m_fAttackRear, 0.5f ); ScaleColors( r, g, b, shade ); SPR_Set( m_hSprite, r, g, b ); @@ -354,10 +355,10 @@ int CHudHealth::DrawPain( float flTime ) else m_fAttackRear = 0; - if( m_fAttackLeft > 0.4 ) + if( m_fAttackLeft > 0.4f ) { GetPainColor( r, g, b ); - shade = a * Q_max( m_fAttackLeft, 0.5 ); + shade = a * Q_max( m_fAttackLeft, 0.5f ); ScaleColors( r, g, b, shade ); SPR_Set( m_hSprite, r, g, b ); @@ -382,7 +383,7 @@ int CHudHealth::DrawDamage( float flTime ) UnpackRGB( r, g, b, RGB_YELLOWISH ); - a = (int)( fabs( sin( flTime * 2 ) ) * 256.0 ); + a = (int)( fabs( sin( flTime * 2.0f ) ) * 256.0f ); ScaleColors( r, g, b, a ); @@ -461,7 +462,7 @@ void CHudHealth::UpdateTiles( float flTime, long bitsDamage ) if( pdmg->y ) pdmg->y -= giDmgHeight; } - pdmg = &m_dmg[i]; + // pdmg = &m_dmg[i]; } } diff --git a/cl_dll/hud.cpp b/cl_dll/hud.cpp index e62321a..46224c1 100644 --- a/cl_dll/hud.cpp +++ b/cl_dll/hud.cpp @@ -207,8 +207,9 @@ void CHud::Init( void ) m_iLogo = 0; m_iFOV = 0; - CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 ); - default_fov = CVAR_CREATE( "default_fov", "90", 0 ); + CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", FCVAR_ARCHIVE ); + CVAR_CREATE( "cl_autowepswitch", "1", FCVAR_ARCHIVE | FCVAR_USERINFO ); + default_fov = CVAR_CREATE( "default_fov", "90", FCVAR_ARCHIVE ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); diff --git a/cl_dll/hud_redraw.cpp b/cl_dll/hud_redraw.cpp index ca4c30c..d9a954b 100644 --- a/cl_dll/hud_redraw.cpp +++ b/cl_dll/hud_redraw.cpp @@ -15,7 +15,8 @@ // // hud_redraw.cpp // -#include +#include + #include "hud.h" #include "cl_util.h" //#include "triangleapi.h" @@ -86,7 +87,7 @@ int CHud::Redraw( float flTime, int intermission ) { m_fOldTime = m_flTime; // save time of previous redraw m_flTime = flTime; - m_flTimeDelta = (double)m_flTime - m_fOldTime; + m_flTimeDelta = (double)( m_flTime - m_fOldTime ); static float m_flShotTime = 0; // Clock was reset, reset delta @@ -97,7 +98,7 @@ int CHud::Redraw( float flTime, int intermission ) { // Take a screenshot if the client's got the cvar set if( CVAR_GET_FLOAT( "hud_takesshots" ) != 0 ) - m_flShotTime = flTime + 1.0; // Take a screenshot in a second + m_flShotTime = flTime + 1.0f; // Take a screenshot in a second } if( m_flShotTime && m_flShotTime < flTime ) diff --git a/cl_dll/hud_spectator.cpp b/cl_dll/hud_spectator.cpp index 889dc68..f666b5e 100644 --- a/cl_dll/hud_spectator.cpp +++ b/cl_dll/hud_spectator.cpp @@ -69,10 +69,10 @@ void SpectatorSpray( void ) VectorScale( forward, 128, forward ); VectorAdd( forward, v_origin, forward ); pmtrace_t * trace = gEngfuncs.PM_TraceLine( v_origin, forward, PM_TRACELINE_PHYSENTSONLY, 2, -1 ); - if( trace->fraction != 1.0 ) + if( trace->fraction != 1.0f ) { sprintf( string, "drc_spray %.2f %.2f %.2f %i", - trace->endpos[0], trace->endpos[1], trace->endpos[2], trace->ent ); + (double)trace->endpos[0], (double)trace->endpos[1], (double)trace->endpos[2], trace->ent ); gEngfuncs.pfnServerCmd( string ); } } @@ -355,7 +355,7 @@ int CHudSpectator::Draw( float flTime ) int lx; char string[256]; - float * color; + float *color; // draw only in spectator mode if( !g_iUser1 ) @@ -820,8 +820,8 @@ bool CHudSpectator::IsActivePlayer( cl_entity_t *ent ) bool CHudSpectator::ParseOverviewFile() { - char filename[255] = { 0 }; - char levelname[255] = { 0 }; + char filename[512] = { 0 }; + char levelname[256] = { 0 }; char token[1024] = { 0 }; float height; @@ -987,15 +987,15 @@ void CHudSpectator::DrawOverviewLayer() float screenaspect, xs, ys, xStep, yStep, x, y, z; int ix, iy, i, xTiles, yTiles, frame; - qboolean hasMapImage = m_MapSprite?TRUE:FALSE; - model_t * dummySprite = (struct model_s *)gEngfuncs.GetSpritePointer( m_hsprUnkownMap); + qboolean hasMapImage = m_MapSprite ? TRUE : FALSE; + model_t *dummySprite = (struct model_s *)gEngfuncs.GetSpritePointer( m_hsprUnkownMap ); - if ( hasMapImage) + if( hasMapImage ) { - i = m_MapSprite->numframes / (4*3); - i = sqrt(float(i)); - xTiles = i*4; - yTiles = i*3; + i = m_MapSprite->numframes / ( 4 * 3 ); + i = sqrt( float( i ) ); + xTiles = i * 4; + yTiles = i * 3; } else { @@ -1014,7 +1014,7 @@ void CHudSpectator::DrawOverviewLayer() gEngfuncs.pTriAPI->RenderMode( kRenderTransTexture ); gEngfuncs.pTriAPI->CullFace( TRI_NONE ); - gEngfuncs.pTriAPI->Color4f( 1.0, 1.0, 1.0, 1.0 ); + gEngfuncs.pTriAPI->Color4f( 1.0f, 1.0f, 1.0f, 1.0f ); frame = 0; @@ -1143,7 +1143,7 @@ void CHudSpectator::DrawOverviewEntities() gEngfuncs.pTriAPI->Begin( TRI_QUADS ); - gEngfuncs.pTriAPI->Color4f( 1.0, 1.0, 1.0, 1.0 ); + gEngfuncs.pTriAPI->Color4f( 1.0f, 1.0f, 1.0f, 1.0f ); gEngfuncs.pTriAPI->TexCoord2f(1, 0); VectorMA( origin, 16.0f * sizeScale, up, point ); @@ -1183,28 +1183,28 @@ void CHudSpectator::DrawOverviewEntities() hSpriteModel = (struct model_s *)gEngfuncs.GetSpritePointer( m_hsprBeam ); gEngfuncs.pTriAPI->SpriteTexture( hSpriteModel, 0 ); - gEngfuncs.pTriAPI->Color4f( r, g, b, 0.3 ); + gEngfuncs.pTriAPI->Color4f( r, g, b, 0.3f ); gEngfuncs.pTriAPI->Begin( TRI_QUADS ); - gEngfuncs.pTriAPI->TexCoord2f( 1, 0 ); - gEngfuncs.pTriAPI->Vertex3f( origin[0] + 4, origin[1] + 4, origin[2] - zScale ); - gEngfuncs.pTriAPI->TexCoord2f( 0, 0 ); - gEngfuncs.pTriAPI->Vertex3f( origin[0] - 4, origin[1] - 4, origin[2] - zScale ); - gEngfuncs.pTriAPI->TexCoord2f( 0, 1 ); - gEngfuncs.pTriAPI->Vertex3f( origin[0] - 4, origin[1] - 4, z ); - gEngfuncs.pTriAPI->TexCoord2f( 1, 1 ); - gEngfuncs.pTriAPI->Vertex3f( origin[0] + 4, origin[1] + 4, z ); + gEngfuncs.pTriAPI->TexCoord2f( 1.0f, 0.0f ); + gEngfuncs.pTriAPI->Vertex3f( origin[0] + 4.0f, origin[1] + 4.0f, origin[2] - zScale ); + gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 0.0f ); + gEngfuncs.pTriAPI->Vertex3f( origin[0] - 4.0f, origin[1] - 4.0f, origin[2] - zScale ); + gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 1.0f ); + gEngfuncs.pTriAPI->Vertex3f( origin[0] - 4.0f, origin[1] - 4.0f, z ); + gEngfuncs.pTriAPI->TexCoord2f( 1.0f, 1.0f ); + gEngfuncs.pTriAPI->Vertex3f( origin[0] + 4.0f, origin[1] + 4.0f, z ); gEngfuncs.pTriAPI->End(); gEngfuncs.pTriAPI->Begin( TRI_QUADS ); - gEngfuncs.pTriAPI->TexCoord2f( 1, 0 ); - gEngfuncs.pTriAPI->Vertex3f( origin[0] - 4, origin[1] + 4, origin[2] - zScale ); - gEngfuncs.pTriAPI->TexCoord2f( 0, 0 ); - gEngfuncs.pTriAPI->Vertex3f( origin[0] + 4, origin[1] - 4, origin[2] - zScale ); - gEngfuncs.pTriAPI->TexCoord2f( 0, 1 ); - gEngfuncs.pTriAPI->Vertex3f( origin[0] + 4, origin[1] - 4, z ); - gEngfuncs.pTriAPI->TexCoord2f( 1, 1 ); - gEngfuncs.pTriAPI->Vertex3f( origin[0] - 4, origin[1] + 4, z ); + gEngfuncs.pTriAPI->TexCoord2f( 1.0f, 0.0f ); + gEngfuncs.pTriAPI->Vertex3f( origin[0] - 4.0f, origin[1] + 4.0f, origin[2] - zScale ); + gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 0.0f ); + gEngfuncs.pTriAPI->Vertex3f( origin[0] + 4.0f, origin[1] - 4.0f, origin[2] - zScale ); + gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 1.0f ); + gEngfuncs.pTriAPI->Vertex3f( origin[0] + 4.0f, origin[1] - 4.0f, z ); + gEngfuncs.pTriAPI->TexCoord2f( 1.0f, 1.0f ); + gEngfuncs.pTriAPI->Vertex3f( origin[0] - 4.0f, origin[1] + 4.0f, z ); gEngfuncs.pTriAPI->End(); // calculate screen position for name and infromation in hud::draw() @@ -1265,7 +1265,7 @@ void CHudSpectator::DrawOverviewEntities() gEngfuncs.pTriAPI->RenderMode( kRenderTransAdd ); gEngfuncs.pTriAPI->SpriteTexture( hSpriteModel, 0 ); - gEngfuncs.pTriAPI->Color4f( r, g, b, 1.0 ); + gEngfuncs.pTriAPI->Color4f( r, g, b, 1.0f ); AngleVectors( angles, forward, NULL, NULL ); VectorScale( forward, 512.0f, forward ); @@ -1282,13 +1282,13 @@ void CHudSpectator::DrawOverviewEntities() VectorTransform( forward, rmatrix , left ); gEngfuncs.pTriAPI->Begin( TRI_TRIANGLES ); - gEngfuncs.pTriAPI->TexCoord2f( 0, 0 ); + gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 0.0f ); gEngfuncs.pTriAPI->Vertex3f( x + right[0], y + right[1], ( z + right[2] ) * zScale); - gEngfuncs.pTriAPI->TexCoord2f( 0, 1 ); + gEngfuncs.pTriAPI->TexCoord2f( 0.0f, 1.0f ); gEngfuncs.pTriAPI->Vertex3f( x, y, z * zScale ); - gEngfuncs.pTriAPI->TexCoord2f( 1, 1 ); + gEngfuncs.pTriAPI->TexCoord2f( 1.0f, 1.0f ); gEngfuncs.pTriAPI->Vertex3f( x + left[0], y + left[1], ( z + left[2] ) * zScale ); gEngfuncs.pTriAPI->End (); } @@ -1329,7 +1329,7 @@ void CHudSpectator::CheckOverviewEntities() bool CHudSpectator::AddOverviewEntity( int type, struct cl_entity_s *ent, const char *modelname) { HSPRITE hSprite = 0; - double duration = -1.0f; // duration -1 means show it only this frame; + double duration = -1.0; // duration -1 means show it only this frame; if( !ent ) return false; diff --git a/cl_dll/hud_update.cpp b/cl_dll/hud_update.cpp index cecbb62..f431bba 100644 --- a/cl_dll/hud_update.cpp +++ b/cl_dll/hud_update.cpp @@ -16,7 +16,7 @@ // hud_update.cpp // -#include +#include #include "hud.h" #include "cl_util.h" #include diff --git a/cl_dll/in_camera.cpp b/cl_dll/in_camera.cpp index 12ad41f..3b08957 100644 --- a/cl_dll/in_camera.cpp +++ b/cl_dll/in_camera.cpp @@ -28,16 +28,16 @@ extern cl_enginefunc_t gEngfuncs; //-------------------------------------------------- Constants -#define CAM_DIST_DELTA 1.0 -#define CAM_ANGLE_DELTA 2.5 -#define CAM_ANGLE_SPEED 2.5 -#define CAM_MIN_DIST 30.0 -#define CAM_ANGLE_MOVE .5 -#define MAX_ANGLE_DIFF 10.0 -#define PITCH_MAX 90.0 -#define PITCH_MIN 0 -#define YAW_MAX 135.0 -#define YAW_MIN -135.0 +#define CAM_DIST_DELTA 1.0f +#define CAM_ANGLE_DELTA 2.5f +#define CAM_ANGLE_SPEED 2.5f +#define CAM_MIN_DIST 30.0f +#define CAM_ANGLE_MOVE 0.5f +#define MAX_ANGLE_DIFF 10.0f +#define PITCH_MAX 90.0f +#define PITCH_MIN 0.0f +#define YAW_MAX 135.0f +#define YAW_MIN -135.0f enum ECAM_Command { @@ -91,35 +91,35 @@ float MoveToward( float cur, float goal, float maxspeed ) { if( cur != goal ) { - if( fabs( cur - goal ) > 180.0 ) + if( fabs( cur - goal ) > 180.0f ) { if( cur < goal ) - cur += 360.0; + cur += 360.0f; else - cur -= 360.0; + cur -= 360.0f; } if( cur < goal ) { - if( cur < goal - 1.0 ) - cur += ( goal - cur ) / 4.0; + if( cur < goal - 1.0f ) + cur += ( goal - cur ) * 0.25f; else cur = goal; } else { - if( cur > goal + 1.0 ) - cur -= ( cur - goal ) / 4.0; + if( cur > goal + 1.0f ) + cur -= ( cur - goal ) * 0.25f; else cur = goal; } } // bring cur back into range - if( cur < 0 ) - cur += 360.0; - else if( cur >= 360 ) - cur -= 360; + if( cur < 0.0f ) + cur += 360.0f; + else if( cur >= 360.0f ) + cur -= 360.0f; return cur; } @@ -172,7 +172,7 @@ void DLLEXPORT CAM_Think( void ) if( cam_contain->value ) { gEngfuncs.GetClientOrigin( origin ); - ext[0] = ext[1] = ext[2] = 0.0; + ext[0] = ext[1] = ext[2] = 0.0f; } #endif camAngles[PITCH] = cam_idealpitch->value; @@ -195,7 +195,7 @@ void DLLEXPORT CAM_Think( void ) //keep the camera within certain limits around the player (ie avoid certain bad viewing angles) if( cam_mouse.x>gEngfuncs.GetWindowCenterX() ) { - //if( ( camAngles[YAW] >= 225.0 ) || ( camAngles[YAW] < 135.0 ) ) + //if( ( camAngles[YAW] >= 225.0f ) || ( camAngles[YAW] < 135.0f ) ) if( camAngles[YAW] < c_maxyaw->value ) { camAngles[YAW] += CAM_ANGLE_MOVE * ( ( cam_mouse.x - gEngfuncs.GetWindowCenterX() ) / 2 ); @@ -207,7 +207,7 @@ void DLLEXPORT CAM_Think( void ) } else if( cam_mouse.x 225.0 ) ) + //if( ( camAngles[YAW] <= 135.0f ) || ( camAngles[YAW] > 225.0f ) ) if( camAngles[YAW] > c_minyaw->value ) { camAngles[YAW] -= CAM_ANGLE_MOVE * ( ( gEngfuncs.GetWindowCenterX() - cam_mouse.x ) / 2 ); @@ -363,10 +363,10 @@ void DLLEXPORT CAM_Think( void ) if( camAngles[PITCH] - viewangles[PITCH] != cam_idealpitch->value ) camAngles[PITCH] = MoveToward( camAngles[PITCH], cam_idealpitch->value + viewangles[PITCH], CAM_ANGLE_SPEED ); - if( fabs( camAngles[2] - cam_idealdist->value ) < 2.0 ) + if( fabs( camAngles[2] - cam_idealdist->value ) < 2.0f ) camAngles[2] = cam_idealdist->value; else - camAngles[2] += ( cam_idealdist->value - camAngles[2] ) / 4.0; + camAngles[2] += ( cam_idealdist->value - camAngles[2] ) * 0.25f; } #ifdef LATER if( cam_contain->value ) @@ -382,9 +382,9 @@ void DLLEXPORT CAM_Think( void ) // check line from r_refdef.vieworg to pnt memset( &clip, 0, sizeof(moveclip_t) ); - ext[0] = ext[1] = ext[2] = 0.0; + ext[0] = ext[1] = ext[2] = 0.0f; clip.trace = SV_ClipMoveToEntity( sv.edicts, r_refdef.vieworg, ext, ext, pnt ); - if( clip.trace.fraction != 1.0 ) + if( clip.trace.fraction != 1.0f ) return; } #endif diff --git a/cl_dll/input.cpp b/cl_dll/input.cpp index d149da9..3550bbe 100644 --- a/cl_dll/input.cpp +++ b/cl_dll/input.cpp @@ -821,7 +821,7 @@ void DLLEXPORT CL_CreateMove( float frametime, struct usercmd_s *cmd, int active // clip to maxspeed spd = gEngfuncs.GetClientMaxspeed(); - if( spd != 0.0 ) + if( spd != 0.0f ) { // scale the 3 speeds so that the total velocity is not > cl.maxspeed float fmov = sqrt( ( cmd->forwardmove * cmd->forwardmove ) + ( cmd->sidemove * cmd->sidemove ) + ( cmd->upmove * cmd->upmove ) ); diff --git a/cl_dll/input_xash3d.cpp b/cl_dll/input_xash3d.cpp index 2ff572e..2be1ffb 100644 --- a/cl_dll/input_xash3d.cpp +++ b/cl_dll/input_xash3d.cpp @@ -82,42 +82,42 @@ void IN_ToggleButtons( float forwardmove, float sidemove ) } } - if( forwardmove > 0.7 && !( moveflags & F ) ) + if( forwardmove > 0.7f && !( moveflags & F ) ) { moveflags |= F; in_forward.state |= BUTTON_DOWN; } - if( forwardmove < 0.7 && ( moveflags & F ) ) + if( forwardmove < 0.7f && ( moveflags & F ) ) { moveflags &= ~F; in_forward.state &= ~BUTTON_DOWN; } - if( forwardmove < -0.7 && !( moveflags & B ) ) + if( forwardmove < -0.7f && !( moveflags & B ) ) { moveflags |= B; in_back.state |= BUTTON_DOWN; } - if( forwardmove > -0.7 && ( moveflags & B ) ) + if( forwardmove > -0.7f && ( moveflags & B ) ) { moveflags &= ~B; in_back.state &= ~BUTTON_DOWN; } - if( sidemove > 0.9 && !( moveflags & R ) ) + if( sidemove > 0.9f && !( moveflags & R ) ) { moveflags |= R; in_moveright.state |= BUTTON_DOWN; } - if( sidemove < 0.9 && ( moveflags & R ) ) + if( sidemove < 0.9f && ( moveflags & R ) ) { moveflags &= ~R; in_moveright.state &= ~BUTTON_DOWN; } - if( sidemove < -0.9 && !( moveflags & L ) ) + if( sidemove < -0.9f && !( moveflags & L ) ) { moveflags |= L; in_moveleft.state |= BUTTON_DOWN; } - if( sidemove > -0.9 && ( moveflags & L ) ) + if( sidemove > -0.9f && ( moveflags & L ) ) { moveflags &= ~L; in_moveleft.state &= ~BUTTON_DOWN; diff --git a/cl_dll/message.cpp b/cl_dll/message.cpp index bbd59d9..29834a1 100644 --- a/cl_dll/message.cpp +++ b/cl_dll/message.cpp @@ -66,22 +66,22 @@ float CHudMessage::FadeBlend( float fadein, float fadeout, float hold, float loc float fadeTime = fadein + hold; float fadeBlend; - if( localTime < 0 ) + if( localTime < 0.0f ) return 0; if( localTime < fadein ) { - fadeBlend = 1 - ( ( fadein - localTime ) / fadein ); + fadeBlend = 1.0f - ( ( fadein - localTime ) / fadein ); } else if( localTime > fadeTime ) { - if( fadeout > 0 ) - fadeBlend = 1 - ( ( localTime - fadeTime ) / fadeout ); + if( fadeout > 0.0f ) + fadeBlend = 1.0f - ( ( localTime - fadeTime ) / fadeout ); else - fadeBlend = 0; + fadeBlend = 0.0f; } else - fadeBlend = 1; + fadeBlend = 1.0f; return fadeBlend; } @@ -91,14 +91,14 @@ int CHudMessage::XPosition( float x, int width, int totalWidth ) { int xPos; - if( x == -1 ) + if( x == -1.0f ) { xPos = ( ScreenWidth - width ) / 2; } else { - if( x < 0 ) - xPos = ( 1.0 + x ) * ScreenWidth - totalWidth; // Alight right + if( x < 0.0f ) + xPos = ( 1.0f + x ) * ScreenWidth - totalWidth; // Alight right else xPos = x * ScreenWidth; } @@ -116,12 +116,12 @@ int CHudMessage::YPosition( float y, int height ) int yPos; if( y == -1 ) // Centered? - yPos = ( ScreenHeight - height ) * 0.5; + yPos = ( ScreenHeight - height ) * 0.5f; else { // Alight bottom? if ( y < 0 ) - yPos = ( 1.0 + y ) * ScreenHeight - height; // Alight bottom + yPos = ( 1.0f + y ) * ScreenHeight - height; // Alight bottom else // align top yPos = y * ScreenHeight; } @@ -164,18 +164,20 @@ void CHudMessage::MessageScanNextChar( void ) float deltaTime = m_parms.time - m_parms.charTime; destRed = destGreen = destBlue = 0; - if ( m_parms.time > m_parms.fadeTime ) + if( m_parms.time > m_parms.fadeTime ) { blend = m_parms.fadeBlend; } - else if ( deltaTime > m_parms.pMessage->fxtime ) + else if( deltaTime > m_parms.pMessage->fxtime ) + { blend = 0; // pure dest + } else { destRed = m_parms.pMessage->r2; destGreen = m_parms.pMessage->g2; destBlue = m_parms.pMessage->b2; - blend = 255 - (deltaTime * (1.0/m_parms.pMessage->fxtime) * 255.0 + 0.5); + blend = 255 - ( deltaTime * ( 1.0f / m_parms.pMessage->fxtime) * 255.0f + 0.5f ); } } break; @@ -208,7 +210,7 @@ void CHudMessage::MessageScanStart( void ) if( m_parms.time < m_parms.pMessage->fadein ) { - m_parms.fadeBlend = ( ( m_parms.pMessage->fadein - m_parms.time ) * ( 1.0 / m_parms.pMessage->fadein ) * 255 ); + m_parms.fadeBlend = ( ( m_parms.pMessage->fadein - m_parms.time ) * ( 1.0f / m_parms.pMessage->fadein ) * 255 ); } else if( m_parms.time > m_parms.fadeTime ) { @@ -350,9 +352,9 @@ int CHudMessage::Draw( float fTime ) // Assume m_parms.time contains last time if( m_pMessages[i] ) { - pMessage = m_pMessages[i]; + // pMessage = m_pMessages[i]; if( m_startTime[i] > gHUD.m_flTime ) - m_startTime[i] = gHUD.m_flTime + m_parms.time - m_startTime[i] + 0.2; // Server takes 0.2 seconds to spawn, adjust for this + m_startTime[i] = gHUD.m_flTime + m_parms.time - m_startTime[i] + 0.2f; // Server takes 0.2 seconds to spawn, adjust for this } } @@ -428,11 +430,11 @@ void CHudMessage::MessageAdd( const char *pName, float time ) g_pCustomMessage.g2 = 110; g_pCustomMessage.b2 = 0; g_pCustomMessage.a2 = 0; - g_pCustomMessage.x = -1; // Centered - g_pCustomMessage.y = 0.7; - g_pCustomMessage.fadein = 0.01; - g_pCustomMessage.fadeout = 1.5; - g_pCustomMessage.fxtime = 0.25; + g_pCustomMessage.x = -1.0f; // Centered + g_pCustomMessage.y = 0.7f; + g_pCustomMessage.fadein = 0.01f; + g_pCustomMessage.fadeout = 1.5f; + g_pCustomMessage.fxtime = 0.25f; g_pCustomMessage.holdtime = 5; g_pCustomMessage.pName = g_pCustomName; strcpy( g_pCustomText, pName ); @@ -452,9 +454,9 @@ void CHudMessage::MessageAdd( const char *pName, float time ) } // get rid of any other messages in same location (only one displays at a time) - if( fabs( tempMessage->y - m_pMessages[j]->y ) < 0.0001 ) + if( fabs( tempMessage->y - m_pMessages[j]->y ) < 0.0001f ) { - if ( fabs( tempMessage->x - m_pMessages[j]->x ) < 0.0001 ) + if( fabs( tempMessage->x - m_pMessages[j]->x ) < 0.0001f ) { m_pMessages[j] = NULL; } diff --git a/cl_dll/saytext.cpp b/cl_dll/saytext.cpp index b084f44..bf8eca8 100644 --- a/cl_dll/saytext.cpp +++ b/cl_dll/saytext.cpp @@ -259,7 +259,7 @@ void CHudSayText::EnsureTextFitsInOneLineAndWrapIfHaveTo( int line ) if( !last_break ) last_break = x - 1; - x = last_break; + // x = last_break; // find an empty string slot int j; diff --git a/cl_dll/scoreboard.cpp b/cl_dll/scoreboard.cpp index 3361aa0..721980f 100644 --- a/cl_dll/scoreboard.cpp +++ b/cl_dll/scoreboard.cpp @@ -171,12 +171,12 @@ int CHudScoreboard::Draw( float fTime ) DrawUtfString( PL_RANGE_MAX + xpos_rel - 35, ypos, ScreenWidth, "pkt loss", 255, 140, 0 ); } - list_slot += 1.2; + list_slot += 1.2f; ypos = ROW_RANGE_MIN + ( list_slot * ROW_GAP ); // xpos = NAME_RANGE_MIN + xpos_rel; FillRGBA( xpos - 4, ypos, FAR_RIGHT -2, 1, 255, 140, 0, 255 ); // draw the seperator line - list_slot += 0.8; + list_slot += 0.8f; if( !gHUD.m_Teamplay ) { @@ -328,7 +328,7 @@ int CHudScoreboard::Draw( float fTime ) } // draw all the players who are not in a team - list_slot += 0.5; + list_slot += 0.5f; DrawPlayers( xpos_rel, list_slot, 0, "" ); return 1; diff --git a/cl_dll/studio_util.cpp b/cl_dll/studio_util.cpp index 6e488dc..7ac385f 100644 --- a/cl_dll/studio_util.cpp +++ b/cl_dll/studio_util.cpp @@ -23,13 +23,13 @@ void AngleMatrix( const float *angles, float (*matrix)[4] ) float angle; float sr, sp, sy, cr, cp, cy; - angle = angles[YAW] * ( M_PI*2 / 360 ); + angle = angles[YAW] * ( M_PI_F * 2.0f / 360.0f ); sy = sin( angle ); cy = cos( angle ); - angle = angles[PITCH] * ( M_PI*2 / 360 ); + angle = angles[PITCH] * ( M_PI_F * 2.0f / 360.0f ); sp = sin( angle ); cp = cos( angle ); - angle = angles[ROLL] * ( M_PI*2 / 360 ); + angle = angles[ROLL] * ( M_PI_F * 2.0f / 360.0f ); sr = sin( angle ); cr = cos( angle ); @@ -43,9 +43,9 @@ void AngleMatrix( const float *angles, float (*matrix)[4] ) matrix[0][2] = (cr * sp * cy + -sr * -sy); matrix[1][2] = (cr * sp * sy + -sr* cy); matrix[2][2] = cr * cp; - matrix[0][3] = 0.0; - matrix[1][3] = 0.0; - matrix[2][3] = 0.0; + matrix[0][3] = 0.0f; + matrix[1][3] = 0.0f; + matrix[2][3] = 0.0f; } /* @@ -73,9 +73,9 @@ CrossProduct */ void CrossProduct( const float *v1, const float *v2, float *cross ) { - cross[0] = v1[1]*v2[2] - v1[2]*v2[1]; - cross[1] = v1[2]*v2[0] - v1[0]*v2[2]; - cross[2] = v1[0]*v2[1] - v1[1]*v2[0]; + cross[0] = v1[1] * v2[2] - v1[2] * v2[1]; + cross[1] = v1[2] * v2[0] - v1[0] * v2[2]; + cross[2] = v1[0] * v2[1] - v1[1] * v2[0]; } /* @@ -139,13 +139,13 @@ void AngleQuaternion( float *angles, vec4_t quaternion ) float sr, sp, sy, cr, cp, cy; // FIXME: rescale the inputs to 1/2 angle - angle = angles[2] * 0.5; + angle = angles[2] * 0.5f; sy = sin( angle ); cy = cos( angle ); - angle = angles[1] * 0.5; + angle = angles[1] * 0.5f; sp = sin( angle ); cp = cos( angle ); - angle = angles[0] * 0.5; + angle = angles[0] * 0.5f; sr = sin( angle ); cr = cos( angle ); @@ -185,18 +185,18 @@ void QuaternionSlerp( vec4_t p, vec4_t q, float t, vec4_t qt ) cosom = p[0] * q[0] + p[1] * q[1] + p[2] * q[2] + p[3] * q[3]; - if( ( 1.0 + cosom ) > 0.000001 ) + if( ( 1.0f + cosom ) > 0.000001f ) { - if( ( 1.0 - cosom ) > 0.000001 ) + if( ( 1.0f - cosom ) > 0.000001f ) { omega = acos( cosom ); sinom = sin( omega ); - sclp = sin( ( 1.0 - t ) * omega ) / sinom; + sclp = sin( ( 1.0f - t ) * omega ) / sinom; sclq = sin( t * omega ) / sinom; } else { - sclp = 1.0 - t; + sclp = 1.0f - t; sclq = t; } for( i = 0; i < 4; i++ ) @@ -210,8 +210,8 @@ void QuaternionSlerp( vec4_t p, vec4_t q, float t, vec4_t qt ) qt[1] = q[0]; qt[2] = -q[3]; qt[3] = q[2]; - sclp = sin( ( 1.0 - t ) * ( 0.5 * M_PI ) ); - sclq = sin( t * ( 0.5 * M_PI ) ); + sclp = sin( ( 1.0f - t ) * ( 0.5f * M_PI_F ) ); + sclq = sin( t * ( 0.5f * M_PI_F ) ); for( i = 0; i < 3; i++ ) { qt[i] = sclp * p[i] + sclq * qt[i]; @@ -227,17 +227,17 @@ QuaternionMatrix */ void QuaternionMatrix( vec4_t quaternion, float (*matrix)[4] ) { - matrix[0][0] = 1.0 - 2.0 * quaternion[1] * quaternion[1] - 2.0 * quaternion[2] * quaternion[2]; - matrix[1][0] = 2.0 * quaternion[0] * quaternion[1] + 2.0 * quaternion[3] * quaternion[2]; - matrix[2][0] = 2.0 * quaternion[0] * quaternion[2] - 2.0 * quaternion[3] * quaternion[1]; + matrix[0][0] = 1.0f - 2.0f * quaternion[1] * quaternion[1] - 2.0f * quaternion[2] * quaternion[2]; + matrix[1][0] = 2.0f * quaternion[0] * quaternion[1] + 2.0f * quaternion[3] * quaternion[2]; + matrix[2][0] = 2.0f * quaternion[0] * quaternion[2] - 2.0f * quaternion[3] * quaternion[1]; - matrix[0][1] = 2.0 * quaternion[0] * quaternion[1] - 2.0 * quaternion[3] * quaternion[2]; - matrix[1][1] = 1.0 - 2.0 * quaternion[0] * quaternion[0] - 2.0 * quaternion[2] * quaternion[2]; - matrix[2][1] = 2.0 * quaternion[1] * quaternion[2] + 2.0 * quaternion[3] * quaternion[0]; + matrix[0][1] = 2.0f * quaternion[0] * quaternion[1] - 2.0f * quaternion[3] * quaternion[2]; + matrix[1][1] = 1.0f - 2.0f * quaternion[0] * quaternion[0] - 2.0f * quaternion[2] * quaternion[2]; + matrix[2][1] = 2.0f * quaternion[1] * quaternion[2] + 2.0f * quaternion[3] * quaternion[0]; - matrix[0][2] = 2.0 * quaternion[0] * quaternion[2] + 2.0 * quaternion[3] * quaternion[1]; - matrix[1][2] = 2.0 * quaternion[1] * quaternion[2] - 2.0 * quaternion[3] * quaternion[0]; - matrix[2][2] = 1.0 - 2.0 * quaternion[0] * quaternion[0] - 2.0 * quaternion[1] * quaternion[1]; + matrix[0][2] = 2.0f * quaternion[0] * quaternion[2] + 2.0f * quaternion[3] * quaternion[1]; + matrix[1][2] = 2.0f * quaternion[1] * quaternion[2] - 2.0f * quaternion[3] * quaternion[0]; + matrix[2][2] = 1.0f - 2.0f * quaternion[0] * quaternion[0] - 2.0f * quaternion[1] * quaternion[1]; } /* diff --git a/cl_dll/studio_util.h b/cl_dll/studio_util.h index 83de704..12d165c 100644 --- a/cl_dll/studio_util.h +++ b/cl_dll/studio_util.h @@ -13,6 +13,10 @@ #define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h #endif +#ifndef M_PI_F +#define M_PI_F (float)M_PI +#endif + #ifndef PITCH // MOVEMENT INFO // up / down diff --git a/cl_dll/tfc/tf_defs.h b/cl_dll/tfc/tf_defs.h index a7a5724..82875db 100644 --- a/cl_dll/tfc/tf_defs.h +++ b/cl_dll/tfc/tf_defs.h @@ -34,4 +34,26 @@ #define WEAPON_LASER (WEAPON_HOOK + 20) #define WEAPON_PIPEBOMB_LAUNCHER (WEAPON_HOOK + 21) #define WEAPON_KNIFE (WEAPON_HOOK + 22) -#define WEAPON_BENCHMARK (WEAPON_HOOK + 23) \ No newline at end of file +#define WEAPON_BENCHMARK (WEAPON_HOOK + 23) + +#define MENU_DEFAULT 1 +#define MENU_TEAM 2 +#define MENU_CLASS 3 +#define MENU_MAPBRIEFING 4 +#define MENU_INTRO 5 +#define MENU_CLASSHELP 6 +#define MENU_CLASSHELP2 7 +#define MENU_REPEATHELP 8 +#define MENU_SPECHELP 9 +#define MENU_SPY 12 +#define MENU_SPY_SKIN 13 +#define MENU_SPY_COLOR 14 +#define MENU_ENGINEER 15 +#define MENU_ENGINEER_FIX_DISPENSER 16 +#define MENU_ENGINEER_FIX_SENTRYGUN 17 +#define MENU_ENGINEER_FIX_MORTAR 18 +#define MENU_DISPENSER 19 +#define MENU_CLASS_CHANGE 20 +#define MENU_TEAM_CHANGE 21 +#define MENU_REFRESH_RATE 25 +#define MENU_VOICETWEAK 50 \ No newline at end of file diff --git a/cl_dll/tfc/tf_objects.cpp b/cl_dll/tfc/tf_objects.cpp index 89bc2b8..e3652d9 100644 --- a/cl_dll/tfc/tf_objects.cpp +++ b/cl_dll/tfc/tf_objects.cpp @@ -68,25 +68,25 @@ void UpdateBeams( void ) if( pBeam ) { pBeam->target = tr.endpos; - pBeam->die = gEngfuncs.GetClientTime() + 0.1; // We keep it alive just a little bit forward in the future, just in case. + pBeam->die = gEngfuncs.GetClientTime() + 0.1f; // We keep it alive just a little bit forward in the future, just in case. } if( pBeam2 ) { pBeam2->target = tr.endpos; - pBeam2->die = gEngfuncs.GetClientTime() + 0.1; // We keep it alive just a little bit forward in the future, just in case. + pBeam2->die = gEngfuncs.GetClientTime() + 0.1f; // We keep it alive just a little bit forward in the future, just in case. } /* if( pFlare ) // Vit_amiN: beam flare { pFlare->entity.origin = tr.endpos; - pFlare->die = gEngfuncs.GetClientTime() + 0.1; // We keep it alive just a little bit forward in the future, just in case. + pFlare->die = gEngfuncs.GetClientTime() + 0.1f; // We keep it alive just a little bit forward in the future, just in case. if( gEngfuncs.GetMaxClients() != 1 ) // Singleplayer always draws the egon's energy beam flare { pFlare->flags |= FTENT_NOMODEL; - if( !( tr.allsolid || tr.ent <= 0 || tr.fraction == 1.0 ) ) // Beam hit some non-world entity + if( !( tr.allsolid || tr.ent <= 0 || tr.fraction == 1.0f ) ) // Beam hit some non-world entity { physent_t *pEntity = gEngfuncs.pEventAPI->EV_GetPhysent( tr.ent ); diff --git a/cl_dll/tfc/tf_weapons.cpp b/cl_dll/tfc/tf_weapons.cpp index 96247d9..7294d29 100644 --- a/cl_dll/tfc/tf_weapons.cpp +++ b/cl_dll/tfc/tf_weapons.cpp @@ -166,7 +166,7 @@ BOOL CBasePlayerWeapon::DefaultReload( int iClipSize, int iAnim, float fDelay, i m_fInReload = TRUE; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0f; return TRUE; } @@ -221,8 +221,8 @@ BOOL CBasePlayerWeapon::DefaultDeploy( const char *szViewModel, const char *szWe SendWeaponAnim( iAnim, skiplocal, body ); g_irunninggausspred = false; - m_pPlayer->m_flNextAttack = 0.5; - m_flTimeWeaponIdle = 1.0; + m_pPlayer->m_flNextAttack = 0.5f; + m_flTimeWeaponIdle = 1.0f; return TRUE; } @@ -236,7 +236,7 @@ BOOL CBasePlayerWeapon::PlayEmptySound( void ) { if( m_iPlayEmptySound ) { - HUD_PlaySound( "weapons/357_cock1.wav", 0.8 ); + HUD_PlaySound( "weapons/357_cock1.wav", 0.8f ); m_iPlayEmptySound = 0; return 0; } @@ -299,8 +299,8 @@ Vector CBaseEntity::FireBulletsPlayer ( ULONG cShots, Vector vecSrc, Vector vecD { // get circular gaussian spread do { - x = RANDOM_FLOAT( -0.5, 0.5 ) + RANDOM_FLOAT( -0.5, 0.5 ); - y = RANDOM_FLOAT( -0.5, 0.5 ) + RANDOM_FLOAT( -0.5, 0.5 ); + x = RANDOM_FLOAT( -0.5f, 0.5f ) + RANDOM_FLOAT( -0.5f, 0.5f ); + y = RANDOM_FLOAT( -0.5f, 0.5f ) + RANDOM_FLOAT( -0.5f, 0.5f ); z = x * x + y * y; } while( z > 1 ); } @@ -308,13 +308,13 @@ Vector CBaseEntity::FireBulletsPlayer ( ULONG cShots, Vector vecSrc, Vector vecD { //Use player's random seed. // get circular gaussian spread - x = UTIL_SharedRandomFloat( shared_rand + iShot, -0.5, 0.5 ) + UTIL_SharedRandomFloat( shared_rand + ( 1 + iShot ) , -0.5, 0.5 ); - y = UTIL_SharedRandomFloat( shared_rand + ( 2 + iShot ), -0.5, 0.5 ) + UTIL_SharedRandomFloat( shared_rand + ( 3 + iShot ), -0.5, 0.5 ); - z = x * x + y * y; + x = UTIL_SharedRandomFloat( shared_rand + iShot, -0.5f, 0.5f ) + UTIL_SharedRandomFloat( shared_rand + ( 1 + iShot ) , -0.5f, 0.5f ); + y = UTIL_SharedRandomFloat( shared_rand + ( 2 + iShot ), -0.5f, 0.5f ) + UTIL_SharedRandomFloat( shared_rand + ( 3 + iShot ), -0.5f, 0.5f ); + // z = x * x + y * y; } } - return Vector( x * vecSpread.x, y * vecSpread.y, 0.0 ); + return Vector( x * vecSpread.x, y * vecSpread.y, 0.0f ); } /* @@ -326,7 +326,7 @@ Handles weapon firing, reloading, etc. */ void CBasePlayerWeapon::ItemPostFrame( void ) { - if( ( m_fInReload ) && ( m_pPlayer->m_flNextAttack <= 0.0 ) ) + if( ( m_fInReload ) && ( m_pPlayer->m_flNextAttack <= 0.0f ) ) { #if 0 // FIXME, need ammo on client to make this work right // complete the reload. @@ -341,7 +341,7 @@ void CBasePlayerWeapon::ItemPostFrame( void ) m_fInReload = FALSE; } - if( ( m_pPlayer->pev->button & IN_ATTACK2 ) && ( m_flNextSecondaryAttack <= 0.0 ) ) + if( ( m_pPlayer->pev->button & IN_ATTACK2 ) && ( m_flNextSecondaryAttack <= 0.0f ) ) { if( pszAmmo2() && !m_pPlayer->m_rgAmmo[SecondaryAmmoIndex()] ) { @@ -351,7 +351,7 @@ void CBasePlayerWeapon::ItemPostFrame( void ) SecondaryAttack(); m_pPlayer->pev->button &= ~IN_ATTACK2; } - else if( ( m_pPlayer->pev->button & IN_ATTACK ) && ( m_flNextPrimaryAttack <= 0.0 ) ) + else if( ( m_pPlayer->pev->button & IN_ATTACK ) && ( m_flNextPrimaryAttack <= 0.0f ) ) { if( ( m_iClip == 0 && pszAmmo1() ) || ( iMaxClip() == -1 && !m_pPlayer->m_rgAmmo[PrimaryAmmoIndex()] ) ) { @@ -371,7 +371,7 @@ void CBasePlayerWeapon::ItemPostFrame( void ) m_fFireOnEmpty = FALSE; // weapon is useable. Reload if empty and weapon has waited as long as it has to after firing - if( m_iClip == 0 && !( iFlags() & ITEM_FLAG_NOAUTORELOAD ) && m_flNextPrimaryAttack < 0.0 ) + if( m_iClip == 0 && !( iFlags() & ITEM_FLAG_NOAUTORELOAD ) && m_flNextPrimaryAttack < 0.0f ) { Reload(); return; @@ -486,7 +486,7 @@ Don't actually trace, but act like the trace didn't hit anything. void UTIL_TraceLine( const Vector &vecStart, const Vector &vecEnd, IGNORE_MONSTERS igmon, edict_t *pentIgnore, TraceResult *ptr ) { memset( ptr, 0, sizeof(*ptr) ); - ptr->flFraction = 1.0; + ptr->flFraction = 1.0f; } /* @@ -949,73 +949,73 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm pto->fuser1 = pCurrent->pev->fuser1; // Decrement weapon counters, server does this at same time ( during post think, after doing everything else ) - pto->m_flNextReload -= cmd->msec / 1000.0; - pto->m_fNextAimBonus -= cmd->msec / 1000.0; - pto->m_flNextPrimaryAttack -= cmd->msec / 1000.0; - pto->m_flNextSecondaryAttack -= cmd->msec / 1000.0; - pto->m_flTimeWeaponIdle -= cmd->msec / 1000.0; - pto->fuser1 -= cmd->msec / 1000.0; + pto->m_flNextReload -= cmd->msec / 1000.0f; + pto->m_fNextAimBonus -= cmd->msec / 1000.0f; + pto->m_flNextPrimaryAttack -= cmd->msec / 1000.0f; + pto->m_flNextSecondaryAttack -= cmd->msec / 1000.0f; + pto->m_flTimeWeaponIdle -= cmd->msec / 1000.0f; + pto->fuser1 -= cmd->msec / 1000.0f; to->client.vuser3[2] = pCurrent->m_iSecondaryAmmoType; to->client.vuser4[0] = pCurrent->m_iPrimaryAmmoType; to->client.vuser4[1] = player.m_rgAmmo[pCurrent->m_iPrimaryAmmoType]; to->client.vuser4[2] = player.m_rgAmmo[pCurrent->m_iSecondaryAmmoType]; -/* if( pto->m_flPumpTime != -9999 ) +/* if( pto->m_flPumpTime != -9999.0f ) { - pto->m_flPumpTime -= cmd->msec / 1000.0; - if( pto->m_flPumpTime < -0.001 ) - pto->m_flPumpTime = -0.001; + pto->m_flPumpTime -= cmd->msec / 1000.0f; + if( pto->m_flPumpTime < -0.001f ) + pto->m_flPumpTime = -0.001f; }*/ - if( pto->m_fNextAimBonus < -1.0 ) + if( pto->m_fNextAimBonus < -1.0f ) { - pto->m_fNextAimBonus = -1.0; + pto->m_fNextAimBonus = -1.0f; } - if( pto->m_flNextPrimaryAttack < -1.0 ) + if( pto->m_flNextPrimaryAttack < -1.0f ) { - pto->m_flNextPrimaryAttack = -1.0; + pto->m_flNextPrimaryAttack = -1.0f; } - if( pto->m_flNextSecondaryAttack < -0.001 ) + if( pto->m_flNextSecondaryAttack < -0.001f ) { - pto->m_flNextSecondaryAttack = -0.001; + pto->m_flNextSecondaryAttack = -0.001f; } - if( pto->m_flTimeWeaponIdle < -0.001 ) + if( pto->m_flTimeWeaponIdle < -0.001f ) { - pto->m_flTimeWeaponIdle = -0.001; + pto->m_flTimeWeaponIdle = -0.001f; } - if( pto->m_flNextReload < -0.001 ) + if( pto->m_flNextReload < -0.001f ) { - pto->m_flNextReload = -0.001; + pto->m_flNextReload = -0.001f; } - if( pto->fuser1 < -0.001 ) + if( pto->fuser1 < -0.001f ) { - pto->fuser1 = -0.001; + pto->fuser1 = -0.001f; } } // m_flNextAttack is now part of the weapons, but is part of the player instead - to->client.m_flNextAttack -= cmd->msec / 1000.0; - if( to->client.m_flNextAttack < -0.001 ) + to->client.m_flNextAttack -= cmd->msec / 1000.0f; + if( to->client.m_flNextAttack < -0.001f ) { - to->client.m_flNextAttack = -0.001; + to->client.m_flNextAttack = -0.001f; } - to->client.fuser2 -= cmd->msec / 1000.0; - if( to->client.fuser2 < -0.001 ) + to->client.fuser2 -= cmd->msec / 1000.0f; + if( to->client.fuser2 < -0.001f ) { - to->client.fuser2 = -0.001; + to->client.fuser2 = -0.001f; } - to->client.fuser3 -= cmd->msec / 1000.0; - if( to->client.fuser3 < -0.001 ) + to->client.fuser3 -= cmd->msec / 1000.0f; + if( to->client.fuser3 < -0.001f ) { - to->client.fuser3 = -0.001; + to->client.fuser3 = -0.001f; } // Store off the last position from the predicted state. diff --git a/cl_dll/util.cpp b/cl_dll/util.cpp index 655bde6..cda9fdf 100644 --- a/cl_dll/util.cpp +++ b/cl_dll/util.cpp @@ -18,9 +18,9 @@ // implementation of class-less helper functions // -#include "stdio.h" -#include "stdlib.h" -#include "math.h" +#include +#include +#include #include "hud.h" #include "cl_util.h" @@ -30,20 +30,22 @@ #define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h #endif +#ifndef M_PI_F +#define M_PI_F (float)M_PI +#endif + extern vec3_t vec3_origin; #ifdef _MSC_VER vec3_t vec3_origin; #endif -double sqrt( double x ); - float Length( const float *v ) { int i; float length; - length = 0; + length = 0.0f; for( i = 0; i < 3; i++ ) length += v[i] * v[i]; length = sqrt( length ); // FIXME @@ -55,29 +57,29 @@ void VectorAngles( const float *forward, float *angles ) { float tmp, yaw, pitch; - if( forward[1] == 0 && forward[0] == 0 ) + if( forward[1] == 0.0f && forward[0] == 0.0f ) { - yaw = 0; - if( forward[2] > 0 ) - pitch = 90; + yaw = 0.0f; + if( forward[2] > 0.0f ) + pitch = 90.0f; else - pitch = 270; + pitch = 270.0f; } else { - yaw = ( atan2( forward[1], forward[0]) * 180 / M_PI ); - if( yaw < 0 ) - yaw += 360; + yaw = ( atan2( forward[1], forward[0]) * 180.0f / M_PI_F ); + if( yaw < 0.0f ) + yaw += 360.0f; tmp = sqrt( forward[0] * forward[0] + forward[1] * forward[1] ); - pitch = ( atan2( forward[2], tmp ) * 180 / M_PI ); - if( pitch < 0 ) - pitch += 360; + pitch = ( atan2( forward[2], tmp ) * 180.0f / M_PI_F ); + if( pitch < 0.0f ) + pitch += 360.0f; } angles[0] = pitch; angles[1] = yaw; - angles[2] = 0; + angles[2] = 0.0f; } float VectorNormalize( float *v ) @@ -89,7 +91,7 @@ float VectorNormalize( float *v ) if( length ) { - ilength = 1 / length; + ilength = 1.0f / length; v[0] *= ilength; v[1] *= ilength; v[2] *= ilength; diff --git a/cl_dll/util_vector.h b/cl_dll/util_vector.h index 477d97b..93166a6 100644 --- a/cl_dll/util_vector.h +++ b/cl_dll/util_vector.h @@ -20,9 +20,9 @@ #define UTIL_VECTOR_H // Misc C-runtime library headers -#include "stdio.h" -#include "stdlib.h" -#include "math.h" +#include +#include +#include // Header file containing definition of globalvars_t and entvars_t typedef unsigned int func_t; // diff --git a/cl_dll/view.cpp b/cl_dll/view.cpp index b6828e8..4707599 100644 --- a/cl_dll/view.cpp +++ b/cl_dll/view.cpp @@ -40,6 +40,10 @@ extern "C" #define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h #endif +#ifndef M_PI_F +#define M_PI_F (float)M_PI +#endif + extern "C" { int CL_IsThirdPerson( void ); @@ -126,13 +130,13 @@ void V_NormalizeAngles( float *angles ) // Normalize angles for( i = 0; i < 3; i++ ) { - if( angles[i] > 180.0 ) + if( angles[i] > 180.0f ) { - angles[i] -= 360.0; + angles[i] -= 360.0f; } - else if( angles[i] < -180.0 ) + else if( angles[i] < -180.0f ) { - angles[i] += 360.0; + angles[i] += 360.0f; } } } @@ -160,13 +164,13 @@ void V_InterpolateAngles( float *start, float *end, float *output, float frac ) ang2 = end[i]; d = ang2 - ang1; - if( d > 180 ) + if( d > 180.0f ) { - d -= 360; + d -= 360.0f; } - else if( d < -180 ) + else if( d < -180.0f ) { - d += 360; + d += 360.0f; } output[i] = ang1 + d * frac; @@ -199,11 +203,11 @@ float V_CalcBob( struct ref_params_s *pparams ) if( cycle < cl_bobup->value ) { - cycle = M_PI * cycle / cl_bobup->value; + cycle = M_PI_F * cycle / cl_bobup->value; } else { - cycle = M_PI + M_PI * ( cycle - cl_bobup->value )/( 1.0 - cl_bobup->value ); + cycle = M_PI_F + M_PI_F * ( cycle - cl_bobup->value )/( 1.0f - cl_bobup->value ); } // bob is proportional to simulated velocity in the xy plane @@ -212,9 +216,9 @@ float V_CalcBob( struct ref_params_s *pparams ) vel[2] = 0; bob = sqrt( vel[0] * vel[0] + vel[1] * vel[1] ) * cl_bob->value; - bob = bob * 0.3 + bob * 0.7 * sin(cycle); - bob = Q_min( bob, 4 ); - bob = Q_max( bob, -7 ); + bob = bob * 0.3f + bob * 0.7f * sin(cycle); + bob = Q_min( bob, 4.0f ); + bob = Q_max( bob, -7.0f ); return bob; } @@ -234,7 +238,7 @@ float V_CalcRoll( vec3_t angles, vec3_t velocity, float rollangle, float rollspe AngleVectors( angles, forward, right, up ); side = DotProduct( velocity, right ); - sign = side < 0 ? -1 : 1; + sign = side < 0.0f ? -1.0f : 1.0f; side = fabs( side ); value = rollangle; @@ -290,11 +294,11 @@ void V_CalcGunAngle( struct ref_params_s *pparams ) return; viewent->angles[YAW] = pparams->viewangles[YAW] + pparams->crosshairangle[YAW]; - viewent->angles[PITCH] = -pparams->viewangles[PITCH] + pparams->crosshairangle[PITCH] * 0.25; + viewent->angles[PITCH] = -pparams->viewangles[PITCH] + pparams->crosshairangle[PITCH] * 0.25f; viewent->angles[ROLL] -= v_idlescale * sin( pparams->time * v_iroll_cycle.value ) * v_iroll_level.value; // don't apply all of the v_ipitch to prevent normally unseen parts of viewmodel from coming into view. - viewent->angles[PITCH] -= v_idlescale * sin( pparams->time * v_ipitch_cycle.value ) * ( v_ipitch_level.value * 0.5 ); + viewent->angles[PITCH] -= v_idlescale * sin( pparams->time * v_ipitch_cycle.value ) * ( v_ipitch_level.value * 0.5f ); viewent->angles[YAW] -= v_idlescale * sin( pparams->time * v_iyaw_cycle.value ) * v_iyaw_level.value; VectorCopy( viewent->angles, viewent->curstate.angles ); @@ -453,15 +457,15 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) } gEngfuncs.V_CalcShake(); - gEngfuncs.V_ApplyShake( pparams->vieworg, pparams->viewangles, 1.0 ); + gEngfuncs.V_ApplyShake( pparams->vieworg, pparams->viewangles, 1.0f ); // never let view origin sit exactly on a node line, because a water plane can // dissapear when viewed with the eye exactly on it. // FIXME, we send origin at 1/128 now, change this? // the server protocol only specifies to 1/16 pixel, so add 1/32 in each axis - pparams->vieworg[0] += 1.0 / 32; - pparams->vieworg[1] += 1.0 / 32; - pparams->vieworg[2] += 1.0 / 32; + pparams->vieworg[0] += 1.0f / 32.0f; + pparams->vieworg[1] += 1.0f / 32.0f; + pparams->vieworg[2] += 1.0f / 32.0f; // Check for problems around water, move the viewer artificially if necessary // -- this prevents drawing errors in GL due to waves @@ -481,13 +485,13 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) pwater = gEngfuncs.GetEntityByIndex( waterEntity ); if( pwater && ( pwater->model != NULL ) ) { - waterDist += ( pwater->curstate.scale * 16 ); // Add in wave height + waterDist += ( pwater->curstate.scale * 16.0f ); // Add in wave height } } } else { - waterEntity = 0; // Don't need this in software + // waterEntity = 0; // Don't need this in software } VectorCopy( pparams->vieworg, point ); @@ -553,7 +557,7 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) { vec3_t ofs; - ofs[0] = ofs[1] = ofs[2] = 0.0; + ofs[0] = ofs[1] = ofs[2] = 0.0f; CL_CameraOffset( (float *)&ofs ); @@ -586,18 +590,18 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) VectorAdd( view->origin, pparams->viewheight, view->origin ); // Let the viewmodel shake at about 10% of the amplitude - gEngfuncs.V_ApplyShake( view->origin, view->angles, 0.9 ); + gEngfuncs.V_ApplyShake( view->origin, view->angles, 0.9f ); for( i = 0; i < 3; i++ ) { - view->origin[i] += bob * 0.4 * pparams->forward[i]; + view->origin[i] += bob * 0.4f * pparams->forward[i]; } view->origin[2] += bob; // throw in a little tilt. - view->angles[YAW] -= bob * 0.5; - view->angles[ROLL] -= bob * 1; - view->angles[PITCH] -= bob * 0.3; + view->angles[YAW] -= bob * 0.5f; + view->angles[ROLL] -= bob * 1.0f; + view->angles[PITCH] -= bob * 0.3f; if( cl_viewbob && cl_viewbob->value ) VectorCopy( view->angles, view->curstate.angles ); @@ -605,25 +609,25 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) // pushing the view origin down off of the same X/Z plane as the ent's origin will give the // gun a very nice 'shifting' effect when the player looks up/down. If there is a problem // with view model distortion, this may be a cause. (SJB). - view->origin[2] -= 1; + view->origin[2] -= 1.0f; // fudge position around to keep amount of weapon visible // roughly equal with different FOV - if( pparams->viewsize == 110 ) + if( pparams->viewsize == 110.0f ) { - view->origin[2] += 1; + view->origin[2] += 1.0f; } - else if( pparams->viewsize == 100 ) + else if( pparams->viewsize == 100.0f ) { - view->origin[2] += 2; + view->origin[2] += 2.0f; } - else if( pparams->viewsize == 90 ) + else if( pparams->viewsize == 90.0f ) { - view->origin[2] += 1; + view->origin[2] += 1.0f; } - else if( pparams->viewsize == 80 ) + else if( pparams->viewsize == 80.0f ) { - view->origin[2] += 0.5; + view->origin[2] += 0.5f; } // Add in the punchangle, if any @@ -636,7 +640,7 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) // smooth out stair step ups #if 1 - if( !pparams->smoothing && pparams->onground && pparams->simorg[2] - oldz > 0 ) + if( !pparams->smoothing && pparams->onground && pparams->simorg[2] - oldz > 0.0f ) { float steptime; @@ -646,11 +650,11 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) //FIXME I_Error( "steptime < 0" ); steptime = 0; - oldz += steptime * 150; + oldz += steptime * 150.0f; if( oldz > pparams->simorg[2] ) oldz = pparams->simorg[2]; - if( pparams->simorg[2] - oldz > 18 ) - oldz = pparams->simorg[2]- 18; + if( pparams->simorg[2] - oldz > 18.0f ) + oldz = pparams->simorg[2]- 18.0f; pparams->vieworg[2] += oldz - pparams->simorg[2]; view->origin[2] += oldz - pparams->simorg[2]; } @@ -665,7 +669,7 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) VectorSubtract( pparams->simorg, lastorg, delta ); - if( Length( delta ) != 0.0 ) + if( Length( delta ) != 0.0f ) { VectorCopy( pparams->simorg, ViewInterp.Origins[ViewInterp.CurrentOrigin & ORIGIN_MASK] ); ViewInterp.OriginTime[ViewInterp.CurrentOrigin & ORIGIN_MASK] = pparams->time; @@ -682,9 +686,9 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) int foundidx; float t; - if( cl_vsmoothing->value < 0.0 ) + if( cl_vsmoothing->value < 0.0f ) { - gEngfuncs.Cvar_SetValue( "cl_vsmoothing", 0.0 ); + gEngfuncs.Cvar_SetValue( "cl_vsmoothing", 0.0f ); } t = pparams->time - cl_vsmoothing->value; @@ -696,7 +700,7 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) break; } - if( i < ORIGIN_MASK && ViewInterp.OriginTime[foundidx & ORIGIN_MASK] != 0.0 ) + if( i < ORIGIN_MASK && ViewInterp.OriginTime[foundidx & ORIGIN_MASK] != 0.0f ) { // Interpolate vec3_t delta; @@ -713,7 +717,7 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) VectorMA( ViewInterp.Origins[foundidx & ORIGIN_MASK], frac, delta, neworg ); // Dont interpolate large changes - if( Length( delta ) < 64 ) + if( Length( delta ) < 64.0f ) { VectorSubtract( neworg, pparams->simorg, delta ); @@ -735,13 +739,13 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) float pitch = camAngles[0]; // Normalize angles - if( pitch > 180 ) - pitch -= 360.0; - else if( pitch < -180 ) - pitch += 360; + if( pitch > 180.0f ) + pitch -= 360.0f; + else if( pitch < -180.0f ) + pitch += 360.0f; // Player pitch is inverted - pitch /= -3.0; + pitch /= -3.0f; // Slam local player's pitch value ent->angles[0] = pitch; @@ -796,7 +800,7 @@ void V_SmoothInterpolateAngles( float * startAngle, float * endAngle, float * fi { frac = degreesPerSec * v_frametime; - threshhold= degreesPerSec / 4; + threshhold= degreesPerSec / 4.0f; if( absd < threshhold ) { @@ -811,7 +815,7 @@ void V_SmoothInterpolateAngles( float * startAngle, float * endAngle, float * fi } else { - if( d > 0 ) + if( d > 0.0f ) finalAngle[i] = startAngle[i] + frac; else finalAngle[i] = startAngle[i] - frac; @@ -907,7 +911,7 @@ void V_GetChaseOrigin( float * angles, float * origin, float distance, float * r VectorCopy( ent1->origin, newOrigin ); if( ent1->player ) - newOrigin[2] += 17; // head level of living player + newOrigin[2] += 17.0f; // head level of living player // get new angle towards second target if( ent2 ) @@ -921,7 +925,7 @@ void V_GetChaseOrigin( float * angles, float * origin, float distance, float * r // if no second target is given, look down to dead player newAngle[0] = 90.0f; newAngle[1] = 0.0f; - newAngle[2] = 0; + newAngle[2] = 0.0f; } // and smooth view @@ -962,12 +966,12 @@ void V_GetSingleTargetCam( cl_entity_t * ent1, float * angle, float * origin ) if( ent1->player ) { if( deadPlayer ) - newOrigin[2] += 2; //laying on ground + newOrigin[2] += 2.0f; //laying on ground else - newOrigin[2] += 17; // head level of living player + newOrigin[2] += 17.0f; // head level of living player } else - newOrigin[2]+= 8; // object, tricky, must be above bomb in CS + newOrigin[2]+= 8.0f; // object, tricky, must be above bomb in CS // we have no second target, choose view direction based on // show front of primary target @@ -1005,13 +1009,13 @@ float MaxAngleBetweenAngles( float *a1, float *a2 ) for( int i = 0; i < 3; i++ ) { d = a2[i] - a1[i]; - if( d > 180 ) + if( d > 180.0f ) { - d -= 360; + d -= 360.0f; } - else if( d < -180 ) + else if( d < -180.0f ) { - d += 360; + d += 360.0f; } d = fabs( d ); @@ -1046,9 +1050,9 @@ void V_GetDoubleTargetsCam( cl_entity_t *ent1, cl_entity_t *ent2, float *angle, VectorCopy( ent1->origin, newOrigin ); if( ent1->player ) - newOrigin[2] += 17; // head level of living player + newOrigin[2] += 17.0f; // head level of living player else - newOrigin[2] += 8; // object, tricky, must be above bomb in CS + newOrigin[2] += 8.0f; // object, tricky, must be above bomb in CS // get new angle towards second target VectorSubtract( ent2->origin, ent1->origin, newAngle ); @@ -1151,9 +1155,9 @@ void V_GetDirectedChasePosition(cl_entity_t *ent1, cl_entity_t *ent2,float *angl VectorCopy( ent1->origin, newOrigin ); if( ent1->player ) - newOrigin[2] += 17; // head level of living player + newOrigin[2] += 17.0f; // head level of living player else - newOrigin[2] += 8; // object, tricky, must be above bomb in CS + newOrigin[2] += 8.0f; // object, tricky, must be above bomb in CS V_GetChaseOrigin( angle, newOrigin, distance, origin ); } @@ -1192,14 +1196,14 @@ void V_GetChasePos( int target, float *cl_angles, float *origin, float *angles ) if( cl_angles == NULL ) // no mouse angles given, use entity angles ( locked mode ) { VectorCopy( ent->angles, angles); - angles[0] *= -1; + angles[0] *= -1.0f; } else VectorCopy( cl_angles, angles ); VectorCopy( ent->origin, origin ); - origin[2] += 28; // DEFAULT_VIEWHEIGHT - some offset + origin[2] += 28.0f; // DEFAULT_VIEWHEIGHT - some offset V_GetChaseOrigin( angles, origin, cl_chasedist->value, origin ); } @@ -1234,15 +1238,15 @@ void V_GetInEyePos( int target, float *origin, float *angles ) if( ent->curstate.solid == SOLID_NOT ) { - angles[ROLL] = 80; // dead view angle - origin[2] += -8 ; // PM_DEAD_VIEWHEIGHT + angles[ROLL] = 80.0f; // dead view angle + origin[2] += -8.0f; // PM_DEAD_VIEWHEIGHT } else if( ent->curstate.usehull == 1 ) - origin[2] += 12; // VEC_DUCK_VIEW; + origin[2] += 12.0f; // VEC_DUCK_VIEW; else // exacty eye position can't be caluculated since it depends on // client values like cl_bobcycle, this offset matches the default values - origin[2] += 28; // DEFAULT_VIEWHEIGHT + origin[2] += 28.0f; // DEFAULT_VIEWHEIGHT } void V_GetMapFreePosition( float *cl_angles, float *origin, float *angles ) @@ -1306,7 +1310,7 @@ void V_GetMapChasePosition( int target, float *cl_angles, float *origin, float * VectorNormalize( forward ); - VectorMA( origin, -1536, forward, origin ); + VectorMA( origin, -1536.0f, forward, origin ); } int V_FindViewModelByWeaponModel( int weaponindex ) @@ -1567,8 +1571,8 @@ void V_DropPunchAngle( float frametime, float *ev_punchangle ) float len; len = VectorNormalize( ev_punchangle ); - len -= ( 10.0 + len * 0.5 ) * frametime; - len = Q_max( len, 0.0 ); + len -= ( 10.0f + len * 0.5f ) * (float)frametime; + len = Q_max( len, 0.0f ); VectorScale( ev_punchangle, len, ev_punchangle ); } @@ -1619,14 +1623,14 @@ float CalcFov( float fov_x, float width, float height ) float a; float x; - if( fov_x < 1 || fov_x > 179 ) - fov_x = 90; // error, set to 90 + if( fov_x < 1.0f || fov_x > 179.0f ) + fov_x = 90.0f; // error, set to 90 - x = width / tan( fov_x / 360 * M_PI ); + x = width / tan( fov_x / 360.0f * M_PI_F ); a = atan ( height / x ); - a = a * 360 / M_PI; + a = a * 360.0f / M_PI_F; return a; } @@ -1648,8 +1652,8 @@ void V_Move( int mx, int my ) fov = CalcFov( in_fov, (float)ScreenWidth, (float)ScreenHeight ); - c_x = (float)ScreenWidth / 2.0; - c_y = (float)ScreenHeight / 2.0; + c_x = (float)ScreenWidth / 2.0f; + c_y = (float)ScreenHeight / 2.0f; dx = (float)mx - c_x; dy = (float)my - c_y; @@ -1658,8 +1662,8 @@ void V_Move( int mx, int my ) fx = dx / c_x; fy = dy / c_y; - dX = fx * in_fov / 2.0 ; - dY = fy * fov / 2.0; + dX = fx * in_fov / 2.0f; + dY = fy * fov / 2.0f; newangles = v_angles; @@ -1674,10 +1678,10 @@ void V_Move( int mx, int my ) // Trace tr = *( gEngfuncs.PM_TraceLine( (float *)&v_origin, (float *)&farpoint, PM_TRACELINE_PHYSENTSONLY, 2 /*point sized hull*/, -1 ) ); - if( tr.fraction != 1.0 && tr.ent != 0 ) + if( tr.fraction != 1.0f && tr.ent != 0 ) { hitent = PM_GetPhysEntInfo( tr.ent ); - PM_ParticleLine( (float *)&v_origin, (float *)&tr.endpos, 5, 1.0, 0.0 ); + PM_ParticleLine( (float *)&v_origin, (float *)&tr.endpos, 5, 1.0f, 0.0f ); } else { diff --git a/cl_dll/wscript b/cl_dll/wscript index 18d8f63..aa2d4e4 100644 --- a/cl_dll/wscript +++ b/cl_dll/wscript @@ -4,15 +4,17 @@ from waflib import Utils import os - + def options(opt): # stub return def configure(conf): - if conf.env.GOLDSRC: - if conf.env.DEST_OS != 'win32': - conf.check_cc(lib='dl') + if conf.env.GOLDSRC and conf.env.DEST_OS != 'win32': + conf.check_cc(lib='dl') + + if conf.env.DEST_OS == 'win32': + conf.check_cxx( lib='user32' ) def build(bld): source = bld.path.parent.ant_glob([ @@ -46,9 +48,12 @@ def build(bld): defines += ['GOLDSOURCE_SUPPORT'] libs = [] - if bld.env.GOLDSRC: + if bld.env.GOLDSRC and bld.env.DEST_OS != 'win32': libs += ['DL'] + if bld.env.DEST_OS == 'win32': + libs += ["USER32"] + if bld.env.DEST_OS not in ['android']: install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR) else: @@ -56,12 +61,12 @@ def build(bld): bld.shlib( source = source, - target = 'client', + target = 'client' + bld.env.POSTFIX, features = 'c cxx', includes = includes, defines = defines, use = libs, install_path = install_path, subsystem = bld.env.MSVC_SUBSYSTEM, - idx = 1 + idx = bld.get_taskgen_count() ) diff --git a/cmake/LibraryNaming.cmake b/cmake/LibraryNaming.cmake new file mode 100644 index 0000000..2258107 --- /dev/null +++ b/cmake/LibraryNaming.cmake @@ -0,0 +1,107 @@ +include(CheckSymbolExists) + +# generated(see comments in public/build.h) +set(CMAKE_REQUIRED_INCLUDES "${CMAKE_SOURCE_DIR}/public/") +check_symbol_exists(XASH_64BIT "build.h" XASH_64BIT) +check_symbol_exists(XASH_AMD64 "build.h" XASH_AMD64) +check_symbol_exists(XASH_ANDROID "build.h" XASH_ANDROID) +check_symbol_exists(XASH_APPLE "build.h" XASH_APPLE) +check_symbol_exists(XASH_ARM "build.h" XASH_ARM) +check_symbol_exists(XASH_ARM64 "build.h" XASH_ARM64) +check_symbol_exists(XASH_ARM_HARDFP "build.h" XASH_ARM_HARDFP) +check_symbol_exists(XASH_ARM_SOFTFP "build.h" XASH_ARM_SOFTFP) +check_symbol_exists(XASH_ARMv4 "build.h" XASH_ARMv4) +check_symbol_exists(XASH_ARMv5 "build.h" XASH_ARMv5) +check_symbol_exists(XASH_ARMv6 "build.h" XASH_ARMv6) +check_symbol_exists(XASH_ARMv7 "build.h" XASH_ARMv7) +check_symbol_exists(XASH_BIG_ENDIAN "build.h" XASH_BIG_ENDIAN) +check_symbol_exists(XASH_BSD "build.h" XASH_BSD) +check_symbol_exists(XASH_E2K "build.h" XASH_E2K) +check_symbol_exists(XASH_EMSCRIPTEN "build.h" XASH_EMSCRIPTEN) +check_symbol_exists(XASH_FREEBSD "build.h" XASH_FREEBSD) +check_symbol_exists(XASH_IOS "build.h" XASH_IOS) +check_symbol_exists(XASH_JS "build.h" XASH_JS) +check_symbol_exists(XASH_LINUX "build.h" XASH_LINUX) +check_symbol_exists(XASH_LITTLE_ENDIAN "build.h" XASH_LITTLE_ENDIAN) +check_symbol_exists(XASH_MINGW "build.h" XASH_MINGW) +check_symbol_exists(XASH_MIPS "build.h" XASH_MIPS) +check_symbol_exists(XASH_MOBILE_PLATFORM "build.h" XASH_MOBILE_PLATFORM) +check_symbol_exists(XASH_MSVC "build.h" XASH_MSVC) +check_symbol_exists(XASH_NETBSD "build.h" XASH_NETBSD) +check_symbol_exists(XASH_OPENBSD "build.h" XASH_OPENBSD) +check_symbol_exists(XASH_WIN32 "build.h" XASH_WIN32) +check_symbol_exists(XASH_WIN64 "build.h" XASH_WIN64) +check_symbol_exists(XASH_X86 "build.h" XASH_X86) +unset(CMAKE_REQUIRED_INCLUDES) + +# engine/common/build.c +if(XASH_ANDROID) + set(BUILDOS "android") +elseif(XASH_WIN32 OR XASH_LINUX OR XASH_APPLE) + set(BUILDOS "") # no prefix for default OS +elseif(XASH_FREEBSD) + set(BUILDOS "freebsd") +elseif(XASH_NETBSD) + set(BUILDOS "netbsd") +elseif(XASH_OPENBSD) + set(BUILDOS "openbsd") +elseif(XASH_EMSCRIPTEN) + set(BUILDOS "emscripten") +else() + message(SEND_ERROR "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug") +endif() + +if(XASH_AMD64) + set(BUILDARCH "amd64") +elseif(XASH_X86) + set(BUILDARCH "") +elseif(XASH_ARM64) + set(BUILDARCH "arm64") +elseif(XASH_ARM) + set(BUILDARCH "armv") + if(XASH_ARMv7) + set(BUILDARCH "${BUILDARCH}7") + elseif(XASH_ARMv6) + set(BUILDARCH "${BUILDARCH}6") + elseif(XASH_ARMv5) + set(BUILDARCH "${BUILDARCH}5") + elseif(XASH_ARMv4) + set(BUILDARCH "${BUILDARCH}4") + else() + message(SEND_ERROR "Unknown ARM") + endif() + + if(XASH_ARM_HARDFP) + set(BUILDARCH "${BUILDARCH}hf") + else() + set(BUILDARCH "${BUILDARCH}l") + endif() +elseif(XASH_MIPS AND XASH_BIG_ENDIAN) + set(BUILDARCH "mips") +elseif(XASH_MIPS AND XASH_LITTLE_ENDIAN) + set(BUILDARCH "mipsel") +elseif(XASH_JS) + set(BUILDARCH "javascript") +elseif(XASH_E2K) + set(BUILDARCH "e2k") +else() + message(SEND_ERROR "Place your architecture name here! If this is a mistake, try to fix conditions above and report a bug") +endif() + +if(BUILDOS STREQUAL "android") + set(POSTFIX "") # force disable for Android, as Android ports aren't distributed in normal way and doesn't follow library naming +elif(BUILDOS AND BUILDARCH) + set(POSTFIX "_${BUILDOS}_${BUILDARCH}") +elseif(BUILDARCH) + set(POSTFIX "_${BUILDARCH}") +else() + set(POSTFIX "") +endif() + +message(STATUS "Library postfix: " ${POSTFIX}) + +set(CMAKE_RELEASE_POSTFIX ${POSTFIX}) +set(CMAKE_DEBUG_POSTFIX ${POSTFIX}) +set(CMAKE_RELWITHDEBINFO_POSTFIX ${POSTFIX}) +set(CMAKE_MINSIZEREL_POSTFIX ${POSTFIX}) +set(CMAKE_POSTFIX ${POSTFIX}) diff --git a/common/com_model.h b/common/com_model.h index abc8e8e..631373f 100644 --- a/common/com_model.h +++ b/common/com_model.h @@ -173,7 +173,7 @@ typedef struct mleaf_s } mleaf_t; -typedef struct msurface_s +struct msurface_s { int visframe; // should be drawn when node is crossed @@ -205,7 +205,7 @@ typedef struct msurface_s color24 *samples; // note: this is the actual lightmap data for this surface decal_t *pdecals; -} msurface_t; +}; typedef struct msurfmesh_s { diff --git a/common/mathlib.h b/common/mathlib.h index 6bcf76e..afe4435 100644 --- a/common/mathlib.h +++ b/common/mathlib.h @@ -16,22 +16,31 @@ #pragma once #ifndef MATHLIB_H #define MATHLIB_H +#ifndef __cplusplus #include +#ifdef HAVE_TGMATH_H +#include +#endif // HAVE_TGMATH_H +#else // __cplusplus +#include +#endif // __cplusplus typedef float vec_t; -typedef vec_t vec2_t[2]; -#ifndef DID_VEC3_T_DEFINE +#if !defined DID_VEC3_T_DEFINE #define DID_VEC3_T_DEFINE typedef vec_t vec3_t[3]; #endif -typedef vec_t vec4_t[4]; // x,y,z,w #ifndef M_PI #define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h #endif +#ifndef M_PI_F +#define M_PI_F (float)M_PI +#endif + struct mplane_s; extern vec3_t vec3_origin; diff --git a/common/ref_params.h b/common/ref_params.h index 61527ec..3a0c185 100644 --- a/common/ref_params.h +++ b/common/ref_params.h @@ -12,7 +12,7 @@ * without written permission from Valve LLC. * ****/ -#pragma once + #ifndef REF_PARAMS_H #define REF_PARAMS_H @@ -68,8 +68,6 @@ typedef struct ref_params_s int nextView; // the renderer calls ClientDLL_CalcRefdef() and Renderview // so long in cycles until this value is 0 (multiple views) int onlyClientDraw; // if !=0 nothing is drawn by the engine except clientDraw functions -// Xash3D extension - float fov_x, fov_y; // actual fov can be overrided on nextView } ref_params_t; // same as ref_params but for overview mode @@ -80,11 +78,28 @@ typedef struct ref_overview_s float xLeft; float xRight; - float xTop; - float xBottom; + float yTop; + float yBottom; float zFar; float zNear; float flZoom; } ref_overview_t; -#endif//REF_PARAMS_H +// ref_viewpass_t->flags +#define RF_DRAW_WORLD (1<<0) // pass should draw the world (otherwise it's player menu model) +#define RF_DRAW_CUBEMAP (1<<1) // special 6x pass to render cubemap\skybox sides +#define RF_DRAW_OVERVIEW (1<<2) // overview mode is active +#define RF_ONLY_CLIENTDRAW (1<<3) // nothing is drawn by the engine except clientDraw functions + +// intermediate struct for viewpass (or just a single frame) +typedef struct ref_viewpass_s +{ + int viewport[4]; // size of new viewport + vec3_t vieworigin; // view origin + vec3_t viewangles; // view angles + int viewentity; // entitynum (P2: Savior uses this) + float fov_x, fov_y; // vertical & horizontal FOV + int flags; // if !=0 nothing is drawn by the engine except clientDraw functions +} ref_viewpass_t; + +#endif//REF_PARAMS_H \ No newline at end of file diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index 18fe622..dba94d8 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -25,6 +25,12 @@ project (SVDLL) set (SVDLL_LIBRARY server) +include(CheckIncludeFile) +check_include_file("tgmath.h" HAVE_TGMATH_H) +if(HAVE_TGMATH_H) + add_definitions(-DHAVE_TGMATH_H) +endif() + add_definitions(-DCLIENT_WEAPONS) if(NOT MSVC) @@ -149,9 +155,6 @@ set_target_properties (${SVDLL_LIBRARY} PROPERTIES if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(SVDLL_NAME "${SERVER_LIBRARY_NAME}") - if(64BIT) - set(SVDLL_NAME "${SERVER_LIBRARY_NAME}64") - endif() set_target_properties(${SVDLL_LIBRARY} PROPERTIES OUTPUT_NAME ${SVDLL_NAME} diff --git a/dlls/Makefile b/dlls/Makefile deleted file mode 100644 index 3599b9c..0000000 --- a/dlls/Makefile +++ /dev/null @@ -1,190 +0,0 @@ -# -# Half-Life Full SDK 2.3 hl_i386.so Makefile for x86 Linux -# -# October 2002 by Leon Hartwig (hartwig@valvesoftware.com) -# - -DLLNAME=hl - -ARCH=i386 - -#make sure this is the correct compiler for your system -CC?=gcc -CXX?=g++ - -DLL_SRCDIR=. -ENGINE_SRCDIR=../engine -COMMON_SRCDIR=../common -WPN_SHARED_SRCDIR=./wpn_shared -PM_SHARED_SRCDIR=../pm_shared -GAME_SHARED_SRCDIR=../game_shared - -DLL_OBJDIR=$(DLL_SRCDIR)/obj -WPN_SHARED_OBJDIR=$(WPN_SHARED_SRCDIR)/obj -PM_SHARED_OBJDIR=$(PM_SHARED_SRCDIR)/obj -GAME_SHARED_OBJDIR=$(GAME_SHARED_SRCDIR)/obj - -BASE_CFLAGS= -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \ - -DCLIENT_WEAPONS -DNO_VOICEGAMEMGR - -#safe optimization -CFLAGS=$(BASE_CFLAGS) -m32 -w -O1 - -#full optimization -#CFLAGS=$(BASE_CFLAGS) -w -O1 -m486 -ffast-math -funroll-loops \ - -fomit-frame-pointer -fexpensive-optimizations \ - -malign-loops=2 -malign-jumps=2 -malign-functions=2 - -#use these when debugging -#CFLAGS=$(BASE_CFLAGS) -g - -INCLUDEDIRS=-I. -I$(ENGINE_SRCDIR) -I$(COMMON_SRCDIR) -I$(PM_SHARED_SRCDIR) -I$(GAME_SHARED_SRCDIR) - -LDFLAGS= - -SHLIBEXT=so -SHLIBCFLAGS=-fPIC -SHLIBLDFLAGS=-shared - -DO_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) $(INCLUDEDIRS) -o $@ -c $< -DO_CXX=$(CXX) $(CFLAGS) $(SHLIBCFLAGS) $(INCLUDEDIRS) -o $@ -c $< - -############################################################################# -# SETUP AND BUILD -# GAME -############################################################################# - -$(DLL_OBJDIR)/%.o: $(DLL_SRCDIR)/%.cpp - $(DO_CXX) - -$(WPN_SHARED_OBJDIR)/%.o: $(WPN_SHARED_SRCDIR)/%.cpp - $(DO_CXX) - -$(GAME_SHARED_OBJDIR)/%.o: $(GAME_SHARED_SRCDIR)/%.cpp - $(DO_CXX) - -$(PM_SHARED_OBJDIR)/%.o: $(PM_SHARED_SRCDIR)/%.c - $(DO_CC) - -OBJ = \ - $(DLL_OBJDIR)/aflock.o \ - $(DLL_OBJDIR)/agrunt.o \ - $(DLL_OBJDIR)/airtank.o \ - $(DLL_OBJDIR)/animating.o \ - $(DLL_OBJDIR)/animation.o \ - $(DLL_OBJDIR)/apache.o \ - $(DLL_OBJDIR)/barnacle.o \ - $(DLL_OBJDIR)/barney.o \ - $(DLL_OBJDIR)/bigmomma.o \ - $(DLL_OBJDIR)/bloater.o \ - $(DLL_OBJDIR)/bmodels.o \ - $(DLL_OBJDIR)/bullsquid.o \ - $(DLL_OBJDIR)/buttons.o \ - $(DLL_OBJDIR)/cbase.o \ - $(DLL_OBJDIR)/client.o \ - $(DLL_OBJDIR)/combat.o \ - $(DLL_OBJDIR)/controller.o \ - $(DLL_OBJDIR)/crossbow.o \ - $(DLL_OBJDIR)/crowbar.o \ - $(DLL_OBJDIR)/defaultai.o \ - $(DLL_OBJDIR)/doors.o \ - $(DLL_OBJDIR)/effects.o \ - $(DLL_OBJDIR)/egon.o \ - $(DLL_OBJDIR)/explode.o \ - $(DLL_OBJDIR)/flyingmonster.o \ - $(DLL_OBJDIR)/func_break.o \ - $(DLL_OBJDIR)/func_tank.o \ - $(DLL_OBJDIR)/game.o \ - $(DLL_OBJDIR)/gamerules.o \ - $(DLL_OBJDIR)/gargantua.o \ - $(DLL_OBJDIR)/gauss.o \ - $(DLL_OBJDIR)/genericmonster.o \ - $(DLL_OBJDIR)/ggrenade.o \ - $(DLL_OBJDIR)/globals.o \ - $(DLL_OBJDIR)/gman.o \ - $(DLL_OBJDIR)/h_ai.o \ - $(DLL_OBJDIR)/h_battery.o \ - $(DLL_OBJDIR)/h_cine.o \ - $(DLL_OBJDIR)/h_cycler.o \ - $(DLL_OBJDIR)/h_export.o \ - $(DLL_OBJDIR)/handgrenade.o \ - $(DLL_OBJDIR)/hassassin.o \ - $(DLL_OBJDIR)/headcrab.o \ - $(DLL_OBJDIR)/healthkit.o \ - $(DLL_OBJDIR)/hgrunt.o \ - $(DLL_OBJDIR)/hornet.o \ - $(DLL_OBJDIR)/hornetgun.o \ - $(DLL_OBJDIR)/houndeye.o \ - $(DLL_OBJDIR)/ichthyosaur.o \ - $(DLL_OBJDIR)/islave.o \ - $(DLL_OBJDIR)/items.o \ - $(DLL_OBJDIR)/leech.o \ - $(DLL_OBJDIR)/lights.o \ - $(DLL_OBJDIR)/maprules.o \ - $(DLL_OBJDIR)/monstermaker.o \ - $(DLL_OBJDIR)/monsters.o \ - $(DLL_OBJDIR)/monsterstate.o \ - $(DLL_OBJDIR)/mortar.o \ - $(DLL_OBJDIR)/mp5.o \ - $(DLL_OBJDIR)/multiplay_gamerules.o \ - $(DLL_OBJDIR)/nihilanth.o \ - $(DLL_OBJDIR)/nodes.o \ - $(DLL_OBJDIR)/observer.o \ - $(DLL_OBJDIR)/osprey.o \ - $(DLL_OBJDIR)/pathcorner.o \ - $(DLL_OBJDIR)/plane.o \ - $(DLL_OBJDIR)/plats.o \ - $(DLL_OBJDIR)/player.o \ - $(DLL_OBJDIR)/playermonster.o \ - $(DLL_OBJDIR)/python.o \ - $(DLL_OBJDIR)/rat.o \ - $(DLL_OBJDIR)/roach.o \ - $(DLL_OBJDIR)/rpg.o \ - $(DLL_OBJDIR)/satchel.o \ - $(DLL_OBJDIR)/schedule.o \ - $(DLL_OBJDIR)/scientist.o \ - $(DLL_OBJDIR)/scripted.o \ - $(DLL_OBJDIR)/shotgun.o \ - $(DLL_OBJDIR)/singleplay_gamerules.o \ - $(DLL_OBJDIR)/skill.o \ - $(DLL_OBJDIR)/sound.o \ - $(DLL_OBJDIR)/soundent.o \ - $(DLL_OBJDIR)/spectator.o \ - $(DLL_OBJDIR)/squadmonster.o \ - $(DLL_OBJDIR)/squeakgrenade.o \ - $(DLL_OBJDIR)/subs.o \ - $(DLL_OBJDIR)/talkmonster.o \ - $(DLL_OBJDIR)/teamplay_gamerules.o \ - $(DLL_OBJDIR)/tempmonster.o \ - $(DLL_OBJDIR)/tentacle.o \ - $(DLL_OBJDIR)/triggers.o \ - $(DLL_OBJDIR)/tripmine.o \ - $(DLL_OBJDIR)/turret.o \ - $(DLL_OBJDIR)/util.o \ - $(DLL_OBJDIR)/weapons.o \ - $(DLL_OBJDIR)/world.o \ - $(DLL_OBJDIR)/xen.o \ - $(DLL_OBJDIR)/zombie.o \ - $(DLL_OBJDIR)/glock.o \ - $(PM_SHARED_OBJDIR)/pm_debug.o \ - $(PM_SHARED_OBJDIR)/pm_math.o \ - $(PM_SHARED_OBJDIR)/pm_shared.o -# $(GAME_SHARED_OBJDIR)/voice_gamemgr.o - -$(DLLNAME)_$(ARCH).$(SHLIBEXT) : neat $(OBJ) - $(CXX) $(CFLAGS) $(SHLIBLDFLAGS) $(LDFLAGS) -o $@ $(OBJ) - -neat: - -mkdir $(DLL_OBJDIR) - -mkdir $(WPN_SHARED_OBJDIR) - -mkdir $(GAME_SHARED_OBJDIR) - -mkdir $(PM_SHARED_OBJDIR) -clean: - -rm -f $(OBJ) - -rm -f $(DLLNAME)_$(ARCH).$(SHLIBEXT) -spotless: clean - -rm -r $(DLL_OBJDIR) - -rm -r $(WPN_SHARED_OBJDIR) - -rm -r $(GAME_SHARED_OBJDIR) - -rm -r $(PM_SHARED_OBJDIR) - diff --git a/dlls/animating.cpp b/dlls/animating.cpp index 95e8b86..cab2c19 100644 --- a/dlls/animating.cpp +++ b/dlls/animating.cpp @@ -43,27 +43,27 @@ IMPLEMENT_SAVERESTORE( CBaseAnimating, CBaseDelay ) //========================================================= float CBaseAnimating::StudioFrameAdvance( float flInterval ) { - if( flInterval == 0.0 ) + if( flInterval == 0.0f ) { flInterval = gpGlobals->time - pev->animtime; - if( flInterval <= 0.001 ) + if( flInterval <= 0.001f ) { pev->animtime = gpGlobals->time; - return 0.0; + return 0.0f; } } if( !pev->animtime ) - flInterval = 0.0; + flInterval = 0.0f; pev->frame += flInterval * m_flFrameRate * pev->framerate; pev->animtime = gpGlobals->time; - if( pev->frame < 0.0 || pev->frame >= 256.0 ) + if( pev->frame < 0.0f || pev->frame >= 256.0f ) { if( m_fSequenceLoops ) - pev->frame -= (int)( pev->frame / 256.0 ) * 256.0; + pev->frame -= (int)( pev->frame / 256.0f ) * 256.0f; else - pev->frame = ( pev->frame < 0.0 ) ? 0 : 255; + pev->frame = ( pev->frame < 0.0f ) ? 0.0f : 255.0f; m_fSequenceFinished = TRUE; // just in case it wasn't caught in GetEvents } @@ -142,7 +142,7 @@ void CBaseAnimating::DispatchAnimEvents( float flInterval ) } // FIXME: I have to do this or some events get missed, and this is probably causing the problem below - flInterval = 0.1; + flInterval = 0.1f; // FIX: this still sometimes hits events twice float flStart = pev->frame + ( m_flLastEventCheck - pev->animtime ) * m_flFrameRate * pev->framerate; @@ -150,7 +150,7 @@ void CBaseAnimating::DispatchAnimEvents( float flInterval ) m_flLastEventCheck = pev->animtime + flInterval; m_fSequenceFinished = FALSE; - if( flEnd >= 256 || flEnd <= 0.0 ) + if( flEnd >= 256.0f || flEnd <= 0.0f ) m_fSequenceFinished = TRUE; int index = 0; @@ -258,7 +258,7 @@ void CBaseAnimating::SetSequenceBox( void ) { // expand box for rotation // find min / max for rotations - float yaw = pev->angles.y * ( M_PI / 180.0 ); + float yaw = pev->angles.y * ( M_PI_F / 180.0f ); Vector xvector, yvector; xvector.x = cos( yaw ); @@ -270,8 +270,8 @@ void CBaseAnimating::SetSequenceBox( void ) bounds[0] = mins; bounds[1] = maxs; - Vector rmin( 9999, 9999, 9999 ); - Vector rmax( -9999, -9999, -9999 ); + Vector rmin( 9999.0f, 9999.0f, 9999.0f ); + Vector rmax( -9999.0f, -9999.0f, -9999.0f ); Vector base, transformed; for( int i = 0; i <= 1; i++ ) @@ -304,8 +304,8 @@ void CBaseAnimating::SetSequenceBox( void ) } } } - rmin.z = 0; - rmax.z = rmin.z + 1; + rmin.z = 0.0f; + rmax.z = rmin.z + 1.0f; UTIL_SetSize( pev, rmin, rmax ); } } diff --git a/dlls/animation.cpp b/dlls/animation.cpp index 9f70f3d..6ebddc0 100644 --- a/dlls/animation.cpp +++ b/dlls/animation.cpp @@ -226,8 +226,8 @@ void GetSequenceInfo( void *pmodel, entvars_t *pev, float *pflFrameRate, float * if( pev->sequence >= pstudiohdr->numseq ) { - *pflFrameRate = 0.0; - *pflGroundSpeed = 0.0; + *pflFrameRate = 0.0f; + *pflGroundSpeed = 0.0f; return; } @@ -235,14 +235,14 @@ void GetSequenceInfo( void *pmodel, entvars_t *pev, float *pflFrameRate, float * if( pseqdesc->numframes > 1 ) { - *pflFrameRate = 256 * pseqdesc->fps / ( pseqdesc->numframes - 1 ); + *pflFrameRate = 256.0f * pseqdesc->fps / ( pseqdesc->numframes - 1 ); *pflGroundSpeed = sqrt( pseqdesc->linearmovement[0] * pseqdesc->linearmovement[0] + pseqdesc->linearmovement[1] * pseqdesc->linearmovement[1] + pseqdesc->linearmovement[2] * pseqdesc->linearmovement[2] ); *pflGroundSpeed = *pflGroundSpeed * pseqdesc->fps / ( pseqdesc->numframes - 1 ); } else { - *pflFrameRate = 256.0; - *pflGroundSpeed = 0.0; + *pflFrameRate = 256.0f; + *pflGroundSpeed = 0.0f; } } @@ -279,13 +279,13 @@ int GetAnimationEvent( void *pmodel, entvars_t *pev, MonsterEvent_t *pMonsterEve if( pseqdesc->numframes > 1 ) { - flStart *= ( pseqdesc->numframes - 1 ) / 256.0; - flEnd *= (pseqdesc->numframes - 1) / 256.0; + flStart *= ( pseqdesc->numframes - 1 ) / 256.0f; + flEnd *= (pseqdesc->numframes - 1) / 256.0f; } else { - flStart = 0; - flEnd = 1.0; + flStart = 0.0f; + flEnd = 1.0f; } for( ; index < pseqdesc->numevents; index++ ) @@ -333,19 +333,19 @@ float SetController( void *pmodel, entvars_t *pev, int iController, float flValu flValue = -flValue; // does the controller not wrap? - if( pbonecontroller->start + 359.0 >= pbonecontroller->end ) + if( pbonecontroller->start + 359.0f >= pbonecontroller->end ) { - if( flValue > ( ( pbonecontroller->start + pbonecontroller->end ) / 2.0 ) + 180 ) - flValue = flValue - 360; - if( flValue < ( ( pbonecontroller->start + pbonecontroller->end) / 2.0 ) - 180 ) - flValue = flValue + 360; + if( flValue > ( ( pbonecontroller->start + pbonecontroller->end ) * 0.5f ) + 180.0f ) + flValue = flValue - 360.0f; + if( flValue < ( ( pbonecontroller->start + pbonecontroller->end ) * 0.5f ) - 180.0f ) + flValue = flValue + 360.0f; } else { - if( flValue > 360 ) - flValue = flValue - (int)( flValue / 360.0 ) * 360.0; - else if( flValue < 0 ) - flValue = flValue + (int)( ( flValue / -360.0 ) + 1 ) * 360.0; + if( flValue > 360.0f ) + flValue = flValue - (int)( flValue / 360.0f ) * 360.0f; + else if( flValue < 0.0f ) + flValue = flValue + (int)( ( flValue / -360.0f ) + 1.0f ) * 360.0f; } } @@ -357,7 +357,7 @@ float SetController( void *pmodel, entvars_t *pev, int iController, float flValu setting = 255; pev->controller[iController] = setting; - return setting * ( 1.0 / 255.0 ) * (pbonecontroller->end - pbonecontroller->start ) + pbonecontroller->start; + return setting * ( 1.0f / 255.0f ) * (pbonecontroller->end - pbonecontroller->start ) + pbonecontroller->start; } float SetBlending( void *pmodel, entvars_t *pev, int iBlender, float flValue ) @@ -382,12 +382,12 @@ float SetBlending( void *pmodel, entvars_t *pev, int iBlender, float flValue ) flValue = -flValue; // does the controller not wrap? - if( pseqdesc->blendstart[iBlender] + 359.0 >= pseqdesc->blendend[iBlender] ) + if( pseqdesc->blendstart[iBlender] + 359.0f >= pseqdesc->blendend[iBlender] ) { - if( flValue > ( ( pseqdesc->blendstart[iBlender] + pseqdesc->blendend[iBlender] ) / 2.0 ) + 180 ) - flValue = flValue - 360; - if( flValue < ( ( pseqdesc->blendstart[iBlender] + pseqdesc->blendend[iBlender] ) / 2.0 ) - 180 ) - flValue = flValue + 360; + if( flValue > ( ( pseqdesc->blendstart[iBlender] + pseqdesc->blendend[iBlender] ) * 0.5f ) + 180.0f ) + flValue = flValue - 360.0f; + if( flValue < ( ( pseqdesc->blendstart[iBlender] + pseqdesc->blendend[iBlender] ) * 0.5f ) - 180.0f ) + flValue = flValue + 360.0f; } } @@ -400,7 +400,7 @@ float SetBlending( void *pmodel, entvars_t *pev, int iBlender, float flValue ) pev->blending[iBlender] = setting; - return setting * ( 1.0 / 255.0 ) * ( pseqdesc->blendend[iBlender] - pseqdesc->blendstart[iBlender] ) + pseqdesc->blendstart[iBlender]; + return setting * ( 1.0f / 255.0f ) * ( pseqdesc->blendend[iBlender] - pseqdesc->blendstart[iBlender] ) + pseqdesc->blendstart[iBlender]; } int FindTransition( void *pmodel, int iEndingAnim, int iGoalAnim, int *piDir ) diff --git a/dlls/bmodels.cpp b/dlls/bmodels.cpp index b75a0fa..a8b8f00 100644 --- a/dlls/bmodels.cpp +++ b/dlls/bmodels.cpp @@ -42,7 +42,7 @@ extern DLL_GLOBAL Vector g_vecAttackDir; // Vector VecBModelOrigin( entvars_t* pevBModel ) { - return pevBModel->absmin + ( pevBModel->size * 0.5 ); + return pevBModel->absmin + ( pevBModel->size * 0.5f ); } // =================== FUNC_WALL ============================================== @@ -162,8 +162,8 @@ void CFuncConveyor::Spawn( void ) pev->skin = 0; // Don't want the engine thinking we've got special contents on this brush } - if( pev->speed == 0 ) - pev->speed = 100; + if( pev->speed == 0.0f ) + pev->speed = 100.0f; UpdateSpeed( pev->speed ); } @@ -172,7 +172,7 @@ void CFuncConveyor::Spawn( void ) void CFuncConveyor::UpdateSpeed( float speed ) { // Encode it as an integer with 4 fractional bits - int speedCode = (int)( fabs( speed ) * 16.0 ); + int speedCode = (int)( fabs( speed ) * 16.0f ); if( speed < 0 ) pev->rendercolor.x = 1; @@ -303,17 +303,17 @@ void CFuncRotating::KeyValue( KeyValueData* pkvd ) { if( FStrEq( pkvd->szKeyName, "fanfriction" ) ) { - m_flFanFriction = atof( pkvd->szValue ) / 100; + m_flFanFriction = atof( pkvd->szValue ) * 0.01f; pkvd->fHandled = TRUE; } else if( FStrEq( pkvd->szKeyName, "Volume" ) ) { - m_flVolume = atof( pkvd->szValue ) / 10.0; + m_flVolume = atof( pkvd->szValue ) * 0.1f; - if( m_flVolume > 1.0 ) - m_flVolume = 1.0; - if( m_flVolume < 0.0 ) - m_flVolume = 0.0; + if( m_flVolume > 1.0f ) + m_flVolume = 1.0f; + if( m_flVolume < 0.0f ) + m_flVolume = 0.0f; pkvd->fHandled = TRUE; } else if( FStrEq( pkvd->szKeyName, "spawnorigin" ) ) @@ -352,8 +352,8 @@ void CFuncRotating::Spawn() m_pitch = PITCH_NORM - 1; // maintain compatibility with previous maps - if( m_flVolume == 0.0 ) - m_flVolume = 1.0; + if( m_flVolume == 0.0f ) + m_flVolume = 1.0f; // if the designer didn't set a sound attenuation, default to one. m_flAttenuation = ATTN_NORM; @@ -372,21 +372,21 @@ void CFuncRotating::Spawn() } // prevent divide by zero if level designer forgets friction! - if( m_flFanFriction == 0 ) + if( m_flFanFriction == 0.0f ) { - m_flFanFriction = 1; + m_flFanFriction = 1.0f; } if( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_Z_AXIS ) ) - pev->movedir = Vector( 0, 0, 1 ); + pev->movedir = Vector( 0.0f, 0.0f, 1.0f ); else if( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_X_AXIS ) ) - pev->movedir = Vector( 1, 0, 0 ); + pev->movedir = Vector( 1.0f, 0.0f, 0.0f ); else - pev->movedir = Vector( 0, 1, 0 ); // y-axis + pev->movedir = Vector( 0.0f, 1.0f, 0.0f ); // y-axis // check for reverse rotation if( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_BACKWARDS ) ) - pev->movedir = pev->movedir * -1; + pev->movedir = pev->movedir * -1.0f; // some rotating objects like fake volumetric lights will not be solid. if( FBitSet( pev->spawnflags, SF_ROTATING_NOT_SOLID ) ) @@ -406,8 +406,8 @@ void CFuncRotating::Spawn() SetUse( &CFuncRotating::RotatingUse ); // did level designer forget to assign speed? - if( pev->speed <= 0 ) - pev->speed = 0; + if( pev->speed <= 0.0f ) + pev->speed = 0.0f; // Removed this per level designers request. -- JAY // if( pev->dmg == 0 ) @@ -417,7 +417,7 @@ void CFuncRotating::Spawn() if( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_INSTANT ) ) { SetThink( &CBaseEntity::SUB_CallUseToggle ); - pev->nextthink = pev->ltime + 1.5; // leave a magic delay for client to start up + pev->nextthink = pev->ltime + 1.5f; // leave a magic delay for client to start up } // can this brush inflict pain? if( FBitSet( pev->spawnflags, SF_BRUSH_HURT ) ) @@ -476,7 +476,7 @@ void CFuncRotating::Precache( void ) // make sure we restart the sound. 1.5 sec delay is magic number. KDB SetThink( &CFuncRotating::SpinUp ); - pev->nextthink = pev->ltime + 1.5; + pev->nextthink = pev->ltime + 1.5f; } } @@ -527,7 +527,7 @@ void CFuncRotating::RampPitchVol( int fUp ) // calc volume and pitch as % of final vol and pitch fpct = vecCur / vecFinal; //if (fUp) - // fvol = m_flVolume * (0.5 + fpct/2.0); // spinup volume ramps up from 50% max vol + // fvol = m_flVolume * (0.5f + fpct/2.0f); // spinup volume ramps up from 50% max vol //else fvol = m_flVolume * fpct; // slowdown volume ramps down to 0 @@ -549,7 +549,7 @@ void CFuncRotating::SpinUp( void ) { Vector vecAVel;//rotational velocity - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; pev->avelocity = pev->avelocity + ( pev->movedir * ( pev->speed * m_flFanFriction ) ); vecAVel = pev->avelocity;// cache entity's rotational velocity @@ -580,23 +580,23 @@ void CFuncRotating::SpinDown( void ) Vector vecAVel;//rotational velocity vec_t vecdir; - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; pev->avelocity = pev->avelocity - ( pev->movedir * ( pev->speed * m_flFanFriction ) );//spin down slower than spinup vecAVel = pev->avelocity;// cache entity's rotational velocity - if( pev->movedir.x != 0 ) + if( pev->movedir.x != 0.0f ) vecdir = pev->movedir.x; - else if( pev->movedir.y != 0 ) + else if( pev->movedir.y != 0.0f ) vecdir = pev->movedir.y; else vecdir = pev->movedir.z; // if we've met or exceeded target speed, set target speed and stop thinking // (note: must check for movedir > 0 or < 0) - if( ( ( vecdir > 0 ) && ( vecAVel.x <= 0 && vecAVel.y <= 0 && vecAVel.z <= 0 ) ) || - ( ( vecdir < 0 ) && ( vecAVel.x >= 0 && vecAVel.y >= 0 && vecAVel.z >= 0 ) ) ) + if( ( ( vecdir > 0.0f ) && ( vecAVel.x <= 0.0f && vecAVel.y <= 0.0f && vecAVel.z <= 0.0f ) ) || + ( ( vecdir < 0.0f ) && ( vecAVel.x >= 0.0f && vecAVel.y >= 0.0f && vecAVel.z >= 0.0f ) ) ) { pev->avelocity = g_vecZero;// set speed in case we overshot @@ -615,7 +615,7 @@ void CFuncRotating::SpinDown( void ) void CFuncRotating::Rotate( void ) { - pev->nextthink = pev->ltime + 10; + pev->nextthink = pev->ltime + 10.0f; } //========================================================= @@ -633,15 +633,15 @@ void CFuncRotating::RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller, //EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, STRING( pev->noiseStop ), // m_flVolume, m_flAttenuation, 0, m_pitch ); - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; } else// fan is not moving, so start it { SetThink( &CFuncRotating::SpinUp ); EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, STRING( pev->noiseRunning ), - 0.01, m_flAttenuation, 0, FANPITCHMIN ); + 0.01f, m_flAttenuation, 0, FANPITCHMIN ); - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; } } else if( !FBitSet( pev->spawnflags, SF_BRUSH_ACCDCC ) )//this is a normal start/stop brush. @@ -654,7 +654,7 @@ void CFuncRotating::RotatingUse( CBaseEntity *pActivator, CBaseEntity *pCaller, // EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, STRING( pev->noiseStop ), // m_flVolume, m_flAttenuation, 0, m_pitch ); - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; // pev->avelocity = g_vecZero; } else @@ -729,7 +729,7 @@ void CPendulum::KeyValue( KeyValueData *pkvd ) } else if( FStrEq( pkvd->szKeyName, "damp" ) ) { - m_damp = atof( pkvd->szValue ) * 0.001; + m_damp = atof( pkvd->szValue ) * 0.001f; pkvd->fHandled = TRUE; } else @@ -752,18 +752,18 @@ void CPendulum::Spawn( void ) if( m_distance == 0 ) return; - if( pev->speed == 0 ) - pev->speed = 100; + if( pev->speed == 0.0f ) + pev->speed = 100.0f; - m_accel = ( pev->speed * pev->speed ) / ( 2 * fabs( m_distance ) ); // Calculate constant acceleration from speed and distance + m_accel = ( pev->speed * pev->speed ) / ( 2.0f * fabs( m_distance ) ); // Calculate constant acceleration from speed and distance m_maxSpeed = pev->speed; m_start = pev->angles; - m_center = pev->angles + ( m_distance * 0.5 ) * pev->movedir; + m_center = pev->angles + ( m_distance * 0.5f ) * pev->movedir; if( FBitSet( pev->spawnflags, SF_BRUSH_ROTATE_INSTANT ) ) { SetThink( &CBaseEntity::SUB_CallUseToggle ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } pev->speed = 0; SetUse( &CPendulum::PendulumUse ); @@ -790,14 +790,14 @@ void CPendulum::PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ } else { - pev->speed = 0; // Dead stop + pev->speed = 0.0f; // Dead stop SetThink( NULL ); pev->avelocity = g_vecZero; } } else { - pev->nextthink = pev->ltime + 0.1; // Start the pendulum moving + pev->nextthink = pev->ltime + 0.1f; // Start the pendulum moving m_time = gpGlobals->time; // Save time to calculate dt SetThink( &CPendulum::Swing ); m_dampSpeed = m_maxSpeed; @@ -807,7 +807,7 @@ void CPendulum::PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ void CPendulum::Stop( void ) { pev->angles = m_start; - pev->speed = 0; + pev->speed = 0.0f; SetThink( NULL ); pev->avelocity = g_vecZero; } @@ -825,7 +825,7 @@ void CPendulum::Swing( void ) dt = gpGlobals->time - m_time; // How much time has passed? m_time = gpGlobals->time; // Remember the last time called - if( delta > 0 && m_accel > 0 ) + if( delta > 0.0f && m_accel > 0.0f ) pev->speed -= m_accel * dt; // Integrate velocity else pev->speed += m_accel * dt; @@ -838,12 +838,12 @@ void CPendulum::Swing( void ) pev->avelocity = pev->speed * pev->movedir; // Call this again - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; if( m_damp ) { m_dampSpeed -= m_damp * m_dampSpeed * dt; - if( m_dampSpeed < 30.0 ) + if( m_dampSpeed < 30.0f ) { pev->angles = m_center; pev->speed = 0; @@ -869,7 +869,7 @@ void CPendulum::Touch( CBaseEntity *pOther ) return; // calculate damage based on rotation speed - float damage = pev->dmg * pev->speed * 0.01; + float damage = pev->dmg * pev->speed * 0.01f; if( damage < 0 ) damage = -damage; diff --git a/dlls/buttons.cpp b/dlls/buttons.cpp index f7441b3..8344c81 100644 --- a/dlls/buttons.cpp +++ b/dlls/buttons.cpp @@ -163,7 +163,7 @@ void CMultiSource::Spawn() pev->solid = SOLID_NOT; pev->movetype = MOVETYPE_NONE; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; pev->spawnflags |= SF_MULTI_INIT; // Until it's initialized SetThink( &CMultiSource::Register ); } @@ -476,7 +476,7 @@ void CBaseButton::Spawn() if( FBitSet( pev->spawnflags, SF_BUTTON_SPARK_IF_OFF ) )// this button should spark in OFF state { SetThink( &CBaseButton::ButtonSpark ); - pev->nextthink = gpGlobals->time + 0.5;// no hurry, make sure everything else spawns + pev->nextthink = gpGlobals->time + 0.5f;// no hurry, make sure everything else spawns } SetMovedir( pev ); @@ -485,29 +485,29 @@ void CBaseButton::Spawn() pev->solid = SOLID_BSP; SET_MODEL( ENT( pev ), STRING( pev->model ) ); - if( pev->speed == 0 ) - pev->speed = 40; + if( pev->speed == 0.0f ) + pev->speed = 40.0f; if( pev->health > 0 ) { pev->takedamage = DAMAGE_YES; } - if( m_flWait == 0 ) - m_flWait = 1; - if( m_flLip == 0 ) - m_flLip = 4; + if( m_flWait == 0.0f ) + m_flWait = 1.0f; + if( m_flLip == 0.0f ) + m_flLip = 4.0f; m_toggle_state = TS_AT_BOTTOM; m_vecPosition1 = pev->origin; // Subtract 2 from size because the engine expands bboxes by 1 in all directions making the size too big - m_vecPosition2 = m_vecPosition1 + ( pev->movedir * ( fabs( pev->movedir.x * ( pev->size.x - 2 ) ) + fabs( pev->movedir.y * ( pev->size.y - 2 ) ) + fabs( pev->movedir.z * ( pev->size.z - 2 ) ) - m_flLip ) ); + m_vecPosition2 = m_vecPosition1 + ( pev->movedir * ( fabs( pev->movedir.x * ( pev->size.x - 2.0f ) ) + fabs( pev->movedir.y * ( pev->size.y - 2.0f ) ) + fabs( pev->movedir.z * ( pev->size.z - 2.0f ) ) - m_flLip ) ); // Is this a non-moving button? - if( ( ( m_vecPosition2 - m_vecPosition1 ).Length() < 1 ) || ( pev->spawnflags & SF_BUTTON_DONTMOVE ) ) + if( ( ( m_vecPosition2 - m_vecPosition1 ).Length() < 1.0f ) || ( pev->spawnflags & SF_BUTTON_DONTMOVE ) ) m_vecPosition2 = m_vecPosition1; - m_fStayPushed = m_flWait == -1 ? TRUE : FALSE; + m_fStayPushed = m_flWait == -1.0f ? TRUE : FALSE; m_fRotating = FALSE; // if the button is flagged for USE button activation only, take away it's touch function and add a use function @@ -607,11 +607,11 @@ const char *ButtonSound( int sound ) // void DoSpark( entvars_t *pev, const Vector &location ) { - Vector tmp = location + pev->size * 0.5; + Vector tmp = location + pev->size * 0.5f; UTIL_Sparks( tmp ); - float flVolume = RANDOM_FLOAT( 0.25 , 0.75 ) * 0.4;//random volume range - switch( (int)( RANDOM_FLOAT( 0, 1 ) * 6 ) ) + float flVolume = RANDOM_FLOAT( 0.25f, 0.75f ) * 0.4f;//random volume range + switch( (int)( RANDOM_FLOAT( 0.0f, 1.0f ) * 6.0f ) ) { case 0: EMIT_SOUND( ENT( pev ), CHAN_VOICE, "buttons/spark1.wav", flVolume, ATTN_NORM ); @@ -637,7 +637,7 @@ void DoSpark( entvars_t *pev, const Vector &location ) void CBaseButton::ButtonSpark( void ) { SetThink( &CBaseButton::ButtonSpark ); - pev->nextthink = gpGlobals->time + 0.1 + RANDOM_FLOAT( 0, 1.5 );// spark again at random interval + pev->nextthink = gpGlobals->time + 0.1f + RANDOM_FLOAT( 0.0f, 1.5f );// spark again at random interval DoSpark( pev, pev->mins ); } @@ -657,7 +657,7 @@ void CBaseButton::ButtonUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ { if( !m_fStayPushed && FBitSet( pev->spawnflags, SF_BUTTON_TOGGLE ) ) { - EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noise ), 1, ATTN_NORM ); + EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noise ), 1.0f, ATTN_NORM ); //SUB_UseTargets( m_eoActivator ); ButtonReturn(); @@ -795,7 +795,7 @@ void CBaseButton::ButtonReturn( void ) { ASSERT( m_toggle_state == TS_AT_TOP ); m_toggle_state = TS_GOING_DOWN; - + SetMoveDone( &CBaseButton::ButtonBackHome ); if( !m_fRotating ) LinearMove( m_vecPosition1, pev->speed ); @@ -852,7 +852,7 @@ void CBaseButton::ButtonBackHome( void ) if( FBitSet( pev->spawnflags, SF_BUTTON_SPARK_IF_OFF ) ) { SetThink( &CBaseButton::ButtonSpark ); - pev->nextthink = gpGlobals->time + 0.5;// no hurry. + pev->nextthink = gpGlobals->time + 0.5f;// no hurry. } } @@ -883,7 +883,7 @@ void CRotButton::Spawn( void ) // check for clockwise rotation if( FBitSet( pev->spawnflags, SF_DOOR_ROTATE_BACKWARDS ) ) - pev->movedir = pev->movedir * -1; + pev->movedir = pev->movedir * -1.0f; pev->movetype = MOVETYPE_PUSH; @@ -894,8 +894,8 @@ void CRotButton::Spawn( void ) SET_MODEL( ENT( pev ), STRING( pev->model ) ); - if( pev->speed == 0 ) - pev->speed = 40; + if( pev->speed == 0.0f ) + pev->speed = 40.0f; if( m_flWait == 0 ) m_flWait = 1; @@ -910,7 +910,7 @@ void CRotButton::Spawn( void ) m_vecAngle2 = pev->angles + pev->movedir * m_flMoveDistance; ASSERTSZ( m_vecAngle1 != m_vecAngle2, "rotating button start/end positions are equal" ); - m_fStayPushed = m_flWait == -1 ? TRUE : FALSE; + m_fStayPushed = m_flWait == -1.0f ? TRUE : FALSE; m_fRotating = TRUE; // if the button is flagged for USE button activation only, take away it's touch function and add a use function @@ -984,10 +984,10 @@ void CMomentaryRotButton::Spawn( void ) { CBaseToggle::AxisDir( pev ); - if( pev->speed == 0 ) - pev->speed = 100; + if( pev->speed == 0.0f ) + pev->speed = 100.0f; - if( m_flMoveDistance < 0 ) + if( m_flMoveDistance < 0.0f ) { m_start = pev->angles + pev->movedir * m_flMoveDistance; m_end = pev->angles; @@ -1087,14 +1087,14 @@ void CMomentaryRotButton::UpdateSelf( float value ) } m_lastUsed = 1; - pev->nextthink = pev->ltime + 0.1; - if( m_direction > 0 && value >= 1.0 ) + pev->nextthink = pev->ltime + 0.1f; + if( m_direction > 0 && value >= 1.0f ) { pev->avelocity = g_vecZero; pev->angles = m_end; return; } - else if( m_direction < 0 && value <= 0 ) + else if( m_direction < 0 && value <= 0.0f ) { pev->avelocity = g_vecZero; pev->angles = m_start; @@ -1106,9 +1106,9 @@ void CMomentaryRotButton::UpdateSelf( float value ) // HACKHACK -- If we're going slow, we'll get multiple player packets per frame, bump nexthink on each one to avoid stalling if( pev->nextthink < pev->ltime ) - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; else - pev->nextthink += 0.1; + pev->nextthink += 0.1f; pev->avelocity = m_direction * pev->speed * pev->movedir; SetThink( &CMomentaryRotButton::Off ); @@ -1140,7 +1140,7 @@ void CMomentaryRotButton::Off( void ) if( FBitSet( pev->spawnflags, SF_PENDULUM_AUTO_RETURN ) && m_returnSpeed > 0 ) { SetThink( &CMomentaryRotButton::Return ); - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; m_direction = -1; } else @@ -1152,23 +1152,23 @@ void CMomentaryRotButton::Return( void ) float value = CBaseToggle::AxisDelta( pev->spawnflags, pev->angles, m_start ) / m_flMoveDistance; UpdateAllButtons( value, 0 ); // This will end up calling UpdateSelfReturn() n times, but it still works right - if( value > 0 ) + if( value > 0.0f ) UpdateTarget( value ); } void CMomentaryRotButton::UpdateSelfReturn( float value ) { - if( value <= 0 ) + if( value <= 0.0f ) { pev->avelocity = g_vecZero; pev->angles = m_start; - pev->nextthink = -1; + pev->nextthink = -1.0f; SetThink( NULL ); } else { pev->avelocity = -m_returnSpeed * pev->movedir; - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; } } @@ -1221,10 +1221,10 @@ void CEnvSpark::Spawn( void ) else SetThink( &CEnvSpark::SparkThink ); - pev->nextthink = gpGlobals->time + 0.1 + RANDOM_FLOAT( 0, 1.5 ); + pev->nextthink = gpGlobals->time + 0.1f + RANDOM_FLOAT( 0.0f, 1.5f ); - if( m_flDelay <= 0 ) - m_flDelay = 1.5; + if( m_flDelay <= 0.0f ) + m_flDelay = 1.5f; Precache(); } @@ -1259,7 +1259,7 @@ void CEnvSpark::KeyValue( KeyValueData *pkvd ) void EXPORT CEnvSpark::SparkThink( void ) { - pev->nextthink = gpGlobals->time + 0.1 + RANDOM_FLOAT( 0, m_flDelay ); + pev->nextthink = gpGlobals->time + 0.1f + RANDOM_FLOAT( 0.0f, m_flDelay ); DoSpark( pev, pev->origin ); } @@ -1267,7 +1267,7 @@ void EXPORT CEnvSpark::SparkStart( CBaseEntity *pActivator, CBaseEntity *pCaller { SetUse( &CEnvSpark::SparkStop ); SetThink( &CEnvSpark::SparkThink ); - pev->nextthink = gpGlobals->time + 0.1 + RANDOM_FLOAT( 0, m_flDelay ); + pev->nextthink = gpGlobals->time + 0.1f + RANDOM_FLOAT( 0.0f, m_flDelay ); } void EXPORT CEnvSpark::SparkStop( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) @@ -1305,7 +1305,7 @@ void CButtonTarget::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE { if( !ShouldToggle( useType, (int)pev->frame ) ) return; - pev->frame = 1-pev->frame; + pev->frame = 1 - pev->frame; if( pev->frame ) SUB_UseTargets( pActivator, USE_ON, 0 ); else diff --git a/dlls/cbase.cpp b/dlls/cbase.cpp index a4e88ec..b781310 100644 --- a/dlls/cbase.cpp +++ b/dlls/cbase.cpp @@ -156,8 +156,8 @@ int DispatchSpawn( edict_t *pent ) if( pEntity ) { // Initialize these or entities who don't link to the world won't have anything in here - pEntity->pev->absmin = pEntity->pev->origin - Vector( 1, 1, 1 ); - pEntity->pev->absmax = pEntity->pev->origin + Vector( 1, 1, 1 ); + pEntity->pev->absmin = pEntity->pev->origin - Vector( 1.0f, 1.0f, 1.0f ); + pEntity->pev->absmax = pEntity->pev->origin + Vector( 1.0f, 1.0f, 1.0f ); pEntity->Spawn(); @@ -562,13 +562,13 @@ int CBaseEntity::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, fl // figure momentum add (don't let hurt brushes or other triggers move player) if( ( !FNullEnt( pevInflictor ) ) && (pev->movetype == MOVETYPE_WALK || pev->movetype == MOVETYPE_STEP ) && ( pevAttacker->solid != SOLID_TRIGGER ) ) { - Vector vecDir = pev->origin - ( pevInflictor->absmin + pevInflictor->absmax ) * 0.5; + Vector vecDir = pev->origin - ( pevInflictor->absmin + pevInflictor->absmax ) * 0.5f; vecDir = vecDir.Normalize(); - float flForce = flDamage * ( ( 32 * 32 * 72.0 ) / ( pev->size.x * pev->size.y * pev->size.z ) ) * 5; + float flForce = flDamage * ( ( 32.0f * 32.0f * 72.0f ) / ( pev->size.x * pev->size.y * pev->size.z ) ) * 5.0f; - if( flForce > 1000.0 ) - flForce = 1000.0; + if( flForce > 1000.0f ) + flForce = 1000.0f; pev->velocity = pev->velocity + vecDir * flForce; } @@ -710,7 +710,7 @@ void CBaseEntity::MakeDormant( void ) // Don't draw SetBits( pev->effects, EF_NODRAW ); // Don't think - pev->nextthink = 0; + pev->nextthink = 0.0f; // Relink UTIL_SetOrigin( pev, pev->origin ); } @@ -723,30 +723,30 @@ int CBaseEntity::IsDormant( void ) BOOL CBaseEntity::IsInWorld( void ) { // position - if( pev->origin.x >= 4096 ) + if( pev->origin.x >= 4096.0f ) return FALSE; - if( pev->origin.y >= 4096 ) + if( pev->origin.y >= 4096.0f ) return FALSE; - if( pev->origin.z >= 4096 ) + if( pev->origin.z >= 4096.0f ) return FALSE; - if( pev->origin.x <= -4096 ) + if( pev->origin.x <= -4096.0f ) return FALSE; - if( pev->origin.y <= -4096 ) + if( pev->origin.y <= -4096.0f ) return FALSE; - if( pev->origin.z <= -4096 ) + if( pev->origin.z <= -4096.0f ) return FALSE; // speed - if( pev->velocity.x >= 2000 ) + if( pev->velocity.x >= 2000.0f ) return FALSE; - if( pev->velocity.y >= 2000 ) + if( pev->velocity.y >= 2000.0f ) return FALSE; - if( pev->velocity.z >= 2000 ) + if( pev->velocity.z >= 2000.0f ) return FALSE; - if( pev->velocity.x <= -2000 ) + if( pev->velocity.x <= -2000.0f ) return FALSE; - if( pev->velocity.y <= -2000 ) + if( pev->velocity.y <= -2000.0f ) return FALSE; - if( pev->velocity.z <= -2000 ) + if( pev->velocity.z <= -2000.0f ) return FALSE; return TRUE; diff --git a/dlls/cbase.h b/dlls/cbase.h index 5ef5cd3..3f30afa 100644 --- a/dlls/cbase.h +++ b/dlls/cbase.h @@ -535,6 +535,7 @@ class CBaseEntity #define SetTouch( a ) TouchSet( static_cast (a), #a ) #define SetUse( a ) UseSet( static_cast (a), #a ) #define SetBlocked( a ) BlockedSet( static_cast (a), #a ) +#define ResetThink() SetThink(NULL) #else diff --git a/dlls/client.cpp b/dlls/client.cpp index 1073c5b..6c0a5dc 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -149,7 +149,7 @@ void set_suicide_frame( entvars_t *pev ) pev->solid = SOLID_NOT; pev->movetype = MOVETYPE_TOSS; pev->deadflag = DEAD_DEAD; - pev->nextthink = -1; + pev->nextthink = -1.0f; } @@ -246,7 +246,7 @@ void ClientKill( edict_t *pEntity ) if( pl->m_fNextSuicideTime > gpGlobals->time ) return; // prevent suiciding too ofter - pl->m_fNextSuicideTime = gpGlobals->time + 1; // don't let them suicide for 5 seconds after suiciding + pl->m_fNextSuicideTime = gpGlobals->time + 1.0f; // don't let them suicide for 5 seconds after suiciding // have the player kill themself pev->health = 0; @@ -272,6 +272,7 @@ void ClientPutInServer( edict_t *pEntity ) pPlayer = GetClassPtr( (CBasePlayer *)pev ); pPlayer->SetCustomDecalFrames( -1 ); // Assume none; + pPlayer->SetPrefsFromUserinfo( g_engfuncs.pfnGetInfoKeyBuffer( pEntity ) ); // Allocate a CBasePlayer for pev, and call spawn pPlayer->Spawn(); @@ -570,7 +571,7 @@ void ClientCommand( edict_t *pEntity ) } else if( FStrEq(pcmd, "give" ) ) { - if( g_flWeaponCheat != 0.0 ) + if( g_flWeaponCheat != 0.0f ) { int iszItem = ALLOC_STRING( CMD_ARGV( 1 ) ); // Make a copy of the classname GetClassPtr( (CBasePlayer *)pev )->GiveNamedItem( STRING( iszItem ) ); @@ -578,7 +579,7 @@ void ClientCommand( edict_t *pEntity ) } else if( FStrEq( pcmd, "fire" ) ) { - if( g_flWeaponCheat != 0.0 ) + if( g_flWeaponCheat != 0.0f ) { CBaseEntity *pPlayer = CBaseEntity::Instance( pEntity ); if( CMD_ARGC() > 1 ) @@ -1376,7 +1377,7 @@ int AddToFullPack( struct entity_state_s *state, int e, edict_t *ent, edict_t *h // // Round animtime to nearest millisecond - state->animtime = (int)( 1000.0 * ent->v.animtime ) / 1000.0; + state->animtime = (int)( 1000.0f * ent->v.animtime ) / 1000.0f; memcpy( state->origin, ent->v.origin, 3 * sizeof(float) ); memcpy( state->angles, ent->v.angles, 3 * sizeof(float) ); @@ -1834,9 +1835,9 @@ int GetWeaponData( struct edict_s *player, struct weapon_data_s *info ) item->m_iId = II.iId; item->m_iClip = gun->m_iClip; - item->m_flTimeWeaponIdle = Q_max( gun->m_flTimeWeaponIdle, -0.001 ); - item->m_flNextPrimaryAttack = Q_max( gun->m_flNextPrimaryAttack, -0.001 ); - item->m_flNextSecondaryAttack = Q_max( gun->m_flNextSecondaryAttack, -0.001 ); + item->m_flTimeWeaponIdle = Q_max( gun->m_flTimeWeaponIdle, -0.001f ); + item->m_flNextPrimaryAttack = Q_max( gun->m_flNextPrimaryAttack, -0.001f ); + item->m_flNextSecondaryAttack = Q_max( gun->m_flNextSecondaryAttack, -0.001f ); item->m_fInReload = gun->m_fInReload; item->m_fInSpecialReload = gun->m_fInSpecialReload; item->fuser1 = Q_max( gun->pev->fuser1, -0.001 ); @@ -2081,7 +2082,7 @@ One of the ENGINE_FORCE_UNMODIFIED files failed the consistency check for the sp int InconsistentFile( const edict_t *player, const char *filename, char *disconnect_message ) { // Server doesn't care? - if( CVAR_GET_FLOAT( "mp_consistency" ) != 1 ) + if( CVAR_GET_FLOAT( "mp_consistency" ) != 1.0f ) return 0; // Default behavior is to kick the player diff --git a/dlls/combat.cpp b/dlls/combat.cpp index 9f221cc..df079af 100644 --- a/dlls/combat.cpp +++ b/dlls/combat.cpp @@ -48,8 +48,8 @@ void CGib::LimitVelocity( void ) // ceiling at 1500. The gib velocity equation is not bounded properly. Rather than tune it // in 3 separate places again, I'll just limit it here. - if( length > 1500.0 ) - pev->velocity = pev->velocity.Normalize() * 1500; // This should really be sv_maxvelocity * 0.75 or something + if( length > 1500.0f ) + pev->velocity = pev->velocity.Normalize() * 1500.0f; // This should really be sv_maxvelocity * 0.75 or something } @@ -72,9 +72,9 @@ void CGib::SpawnStickyGibs( entvars_t *pevVictim, Vector vecOrigin, int cGibs ) if( pevVictim ) { - pGib->pev->origin.x = vecOrigin.x + RANDOM_FLOAT( -3, 3 ); - pGib->pev->origin.y = vecOrigin.y + RANDOM_FLOAT( -3, 3 ); - pGib->pev->origin.z = vecOrigin.z + RANDOM_FLOAT( -3, 3 ); + pGib->pev->origin.x = vecOrigin.x + RANDOM_FLOAT( -3.0f, 3.0f ); + pGib->pev->origin.y = vecOrigin.y + RANDOM_FLOAT( -3.0f, 3.0f ); + pGib->pev->origin.z = vecOrigin.z + RANDOM_FLOAT( -3.0f, 3.0f ); /* pGib->pev->origin.x = pevVictim->absmin.x + pevVictim->size.x * ( RANDOM_FLOAT( 0, 1 ) ); @@ -83,32 +83,32 @@ void CGib::SpawnStickyGibs( entvars_t *pevVictim, Vector vecOrigin, int cGibs ) */ // make the gib fly away from the attack vector - pGib->pev->velocity = g_vecAttackDir * -1; + pGib->pev->velocity = g_vecAttackDir * -1.0f; // mix in some noise - pGib->pev->velocity.x += RANDOM_FLOAT( -0.15, 0.15 ); - pGib->pev->velocity.y += RANDOM_FLOAT( -0.15, 0.15 ); - pGib->pev->velocity.z += RANDOM_FLOAT( -0.15, 0.15 ); + pGib->pev->velocity.x += RANDOM_FLOAT( -0.15f, 0.15f ); + pGib->pev->velocity.y += RANDOM_FLOAT( -0.15f, 0.15f ); + pGib->pev->velocity.z += RANDOM_FLOAT( -0.15f, 0.15f ); - pGib->pev->velocity = pGib->pev->velocity * 900; + pGib->pev->velocity = pGib->pev->velocity * 900.0f; - pGib->pev->avelocity.x = RANDOM_FLOAT( 250, 400 ); - pGib->pev->avelocity.y = RANDOM_FLOAT( 250, 400 ); + pGib->pev->avelocity.x = RANDOM_FLOAT( 250.0f, 400.0f ); + pGib->pev->avelocity.y = RANDOM_FLOAT( 250.0f, 400.0f ); // copy owner's blood color pGib->m_bloodColor = ( CBaseEntity::Instance( pevVictim ) )->BloodColor(); if( pevVictim->health > -50 ) { - pGib->pev->velocity = pGib->pev->velocity * 0.7; + pGib->pev->velocity = pGib->pev->velocity * 0.7f; } else if( pevVictim->health > -200 ) { - pGib->pev->velocity = pGib->pev->velocity * 2; + pGib->pev->velocity = pGib->pev->velocity * 2.0f; } else { - pGib->pev->velocity = pGib->pev->velocity * 4; + pGib->pev->velocity = pGib->pev->velocity * 4.0f; } pGib->pev->movetype = MOVETYPE_TOSS; @@ -148,31 +148,31 @@ void CGib::SpawnHeadGib( entvars_t *pevVictim ) entvars_t *pevPlayer; pevPlayer = VARS( pentPlayer ); - pGib->pev->velocity = ( ( pevPlayer->origin + pevPlayer->view_ofs ) - pGib->pev->origin ).Normalize() * 300; - pGib->pev->velocity.z += 100; + pGib->pev->velocity = ( ( pevPlayer->origin + pevPlayer->view_ofs ) - pGib->pev->origin ).Normalize() * 300.0f; + pGib->pev->velocity.z += 100.0f; } else { - pGib->pev->velocity = Vector( RANDOM_FLOAT( -100, 100 ), RANDOM_FLOAT( -100, 100 ), RANDOM_FLOAT( 200, 300 ) ); + pGib->pev->velocity = Vector( RANDOM_FLOAT( -100.0f, 100.0f ), RANDOM_FLOAT( -100.0f, 100.0f ), RANDOM_FLOAT( 200.0f, 300.0f ) ); } - pGib->pev->avelocity.x = RANDOM_FLOAT( 100, 200 ); - pGib->pev->avelocity.y = RANDOM_FLOAT( 100, 300 ); + pGib->pev->avelocity.x = RANDOM_FLOAT( 100.0f, 200.0f ); + pGib->pev->avelocity.y = RANDOM_FLOAT( 100.0f, 300.0f ); // copy owner's blood color pGib->m_bloodColor = ( CBaseEntity::Instance( pevVictim ) )->BloodColor(); if( pevVictim->health > -50 ) { - pGib->pev->velocity = pGib->pev->velocity * 0.7; + pGib->pev->velocity = pGib->pev->velocity * 0.7f; } else if( pevVictim->health > -200 ) { - pGib->pev->velocity = pGib->pev->velocity * 2; + pGib->pev->velocity = pGib->pev->velocity * 2.0f; } else { - pGib->pev->velocity = pGib->pev->velocity * 4; + pGib->pev->velocity = pGib->pev->velocity * 4.0f; } } pGib->LimitVelocity(); @@ -210,37 +210,37 @@ void CGib::SpawnRandomGibs( entvars_t *pevVictim, int cGibs, int human ) if( pevVictim ) { // spawn the gib somewhere in the monster's bounding volume - pGib->pev->origin.x = pevVictim->absmin.x + pevVictim->size.x * (RANDOM_FLOAT ( 0 , 1 ) ); - pGib->pev->origin.y = pevVictim->absmin.y + pevVictim->size.y * (RANDOM_FLOAT ( 0 , 1 ) ); - pGib->pev->origin.z = pevVictim->absmin.z + pevVictim->size.z * (RANDOM_FLOAT ( 0 , 1 ) ) + 1; // absmin.z is in the floor because the engine subtracts 1 to enlarge the box + pGib->pev->origin.x = pevVictim->absmin.x + pevVictim->size.x * ( RANDOM_FLOAT( 0.0f, 1.0f ) ); + pGib->pev->origin.y = pevVictim->absmin.y + pevVictim->size.y * ( RANDOM_FLOAT( 0.0f, 1.0f ) ); + pGib->pev->origin.z = pevVictim->absmin.z + pevVictim->size.z * ( RANDOM_FLOAT( 0.0f, 1.0f ) ) + 1.0f; // absmin.z is in the floor because the engine subtracts 1 to enlarge the box // make the gib fly away from the attack vector - pGib->pev->velocity = g_vecAttackDir * -1; + pGib->pev->velocity = g_vecAttackDir * -1.0f; // mix in some noise - pGib->pev->velocity.x += RANDOM_FLOAT( -0.25, 0.25 ); - pGib->pev->velocity.y += RANDOM_FLOAT( -0.25, 0.25 ); - pGib->pev->velocity.z += RANDOM_FLOAT( -0.25, 0.25 ); + pGib->pev->velocity.x += RANDOM_FLOAT( -0.25f, 0.25f ); + pGib->pev->velocity.y += RANDOM_FLOAT( -0.25f, 0.25f ); + pGib->pev->velocity.z += RANDOM_FLOAT( -0.25f, 0.25f ); - pGib->pev->velocity = pGib->pev->velocity * RANDOM_FLOAT( 300, 400 ); + pGib->pev->velocity = pGib->pev->velocity * RANDOM_FLOAT( 300.0f, 400.0f ); - pGib->pev->avelocity.x = RANDOM_FLOAT( 100, 200 ); - pGib->pev->avelocity.y = RANDOM_FLOAT( 100, 300 ); + pGib->pev->avelocity.x = RANDOM_FLOAT( 100.0f, 200.0f ); + pGib->pev->avelocity.y = RANDOM_FLOAT( 100.0f, 300.0f ); // copy owner's blood color pGib->m_bloodColor = ( CBaseEntity::Instance( pevVictim ) )->BloodColor(); if( pevVictim->health > -50 ) { - pGib->pev->velocity = pGib->pev->velocity * 0.7; + pGib->pev->velocity = pGib->pev->velocity * 0.7f; } else if( pevVictim->health > -200 ) { - pGib->pev->velocity = pGib->pev->velocity * 2; + pGib->pev->velocity = pGib->pev->velocity * 2.0f; } else { - pGib->pev->velocity = pGib->pev->velocity * 4; + pGib->pev->velocity = pGib->pev->velocity * 4.0f; } pGib->pev->solid = SOLID_BBOX; @@ -360,7 +360,7 @@ Activity CBaseMonster::GetDeathActivity( void ) deathActivity = ACT_DIESIMPLE;// in case we can't find any special deaths to do. UTIL_MakeVectors( pev->angles ); - flDot = DotProduct( gpGlobals->v_forward, g_vecAttackDir * -1 ); + flDot = DotProduct( gpGlobals->v_forward, g_vecAttackDir * -1.0f ); switch( m_LastHitGroup ) { @@ -374,11 +374,11 @@ Activity CBaseMonster::GetDeathActivity( void ) case HITGROUP_GENERIC: // try to pick a death based on attack direction fTriedDirection = TRUE; - if( flDot > 0.3 ) + if( flDot > 0.3f ) { deathActivity = ACT_DIEFORWARD; } - else if( flDot <= -0.3 ) + else if( flDot <= -0.3f ) { deathActivity = ACT_DIEBACKWARD; } @@ -387,11 +387,11 @@ Activity CBaseMonster::GetDeathActivity( void ) // try to pick a death based on attack direction fTriedDirection = TRUE; - if( flDot > 0.3 ) + if( flDot > 0.3f ) { deathActivity = ACT_DIEFORWARD; } - else if( flDot <= -0.3 ) + else if( flDot <= -0.3f ) { deathActivity = ACT_DIEBACKWARD; } @@ -410,11 +410,11 @@ Activity CBaseMonster::GetDeathActivity( void ) else { // cannot perform the ideal region-specific death, so try a direction. - if( flDot > 0.3 ) + if( flDot > 0.3f ) { deathActivity = ACT_DIEFORWARD; } - else if( flDot <= -0.3 ) + else if( flDot <= -0.3f ) { deathActivity = ACT_DIEBACKWARD; } @@ -430,9 +430,9 @@ Activity CBaseMonster::GetDeathActivity( void ) if( deathActivity == ACT_DIEFORWARD ) { // make sure there's room to fall forward - UTIL_TraceHull( vecSrc, vecSrc + gpGlobals->v_forward * 64, dont_ignore_monsters, head_hull, edict(), &tr ); + UTIL_TraceHull( vecSrc, vecSrc + gpGlobals->v_forward * 64.0f, dont_ignore_monsters, head_hull, edict(), &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { deathActivity = ACT_DIESIMPLE; } @@ -441,9 +441,9 @@ Activity CBaseMonster::GetDeathActivity( void ) if( deathActivity == ACT_DIEBACKWARD ) { // make sure there's room to fall backward - UTIL_TraceHull( vecSrc, vecSrc - gpGlobals->v_forward * 64, dont_ignore_monsters, head_hull, edict(), &tr ); + UTIL_TraceHull( vecSrc, vecSrc - gpGlobals->v_forward * 64.0f, dont_ignore_monsters, head_hull, edict(), &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { deathActivity = ACT_DIESIMPLE; } @@ -459,12 +459,12 @@ Activity CBaseMonster::GetDeathActivity( void ) Activity CBaseMonster::GetSmallFlinchActivity( void ) { Activity flinchActivity; - BOOL fTriedDirection; + // BOOL fTriedDirection; //float flDot; - fTriedDirection = FALSE; + // fTriedDirection = FALSE; UTIL_MakeVectors( pev->angles ); - //flDot = DotProduct( gpGlobals->v_forward, g_vecAttackDir * -1 ); + //flDot = DotProduct( gpGlobals->v_forward, g_vecAttackDir * -1.0f ); switch( m_LastHitGroup ) { @@ -515,9 +515,9 @@ void CBaseMonster::BecomeDead( void ) // make the corpse fly away from the attack vector pev->movetype = MOVETYPE_TOSS; //pev->flags &= ~FL_ONGROUND; - //pev->origin.z += 2; - //pev->velocity = g_vecAttackDir * -1; - //pev->velocity = pev->velocity * RANDOM_FLOAT( 300, 400 ); + //pev->origin.z += 2.0f; + //pev->velocity = g_vecAttackDir * -1.0f; + //pev->velocity = pev->velocity * RANDOM_FLOAT( 300.0f, 400.0f ); } BOOL CBaseMonster::ShouldGibMonster( int iGib ) @@ -534,12 +534,12 @@ void CBaseMonster::CallGibMonster( void ) if( HasHumanGibs() ) { - if( CVAR_GET_FLOAT( "violence_hgibs" ) == 0 ) + if( CVAR_GET_FLOAT( "violence_hgibs" ) == 0.0f ) fade = TRUE; } else if( HasAlienGibs() ) { - if( CVAR_GET_FLOAT( "violence_agibs" ) == 0 ) + if( CVAR_GET_FLOAT( "violence_agibs" ) == 0.0f ) fade = TRUE; } @@ -639,7 +639,7 @@ void CBaseEntity::SUB_StartFadeOut( void ) pev->solid = SOLID_NOT; pev->avelocity = g_vecZero; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; SetThink( &CBaseEntity::SUB_FadeOut ); } @@ -648,12 +648,12 @@ void CBaseEntity::SUB_FadeOut( void ) if( pev->renderamt > 7 ) { pev->renderamt -= 7; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } else { pev->renderamt = 0; - pev->nextthink = gpGlobals->time + 0.2; + pev->nextthink = gpGlobals->time + 0.2f; SetThink( &CBaseEntity::SUB_Remove ); } } @@ -687,7 +687,7 @@ void CGib::WaitTillLand( void ) else { // wait and check again in another half second. - pev->nextthink = gpGlobals->time + 0.5; + pev->nextthink = gpGlobals->time + 0.5f; } } @@ -704,18 +704,18 @@ void CGib::BounceGibTouch( CBaseEntity *pOther ) if( pev->flags & FL_ONGROUND ) { - pev->velocity = pev->velocity * 0.9; - pev->angles.x = 0; - pev->angles.z = 0; - pev->avelocity.x = 0; - pev->avelocity.z = 0; + pev->velocity = pev->velocity * 0.9f; + pev->angles.x = 0.0f; + pev->angles.z = 0.0f; + pev->avelocity.x = 0.0f; + pev->avelocity.z = 0.0f; } else { if( g_Language != LANGUAGE_GERMAN && m_cBloodDecals > 0 && m_bloodColor != DONT_BLEED ) { - vecSpot = pev->origin + Vector( 0, 0, 8 );//move up a bit, and trace down. - UTIL_TraceLine( vecSpot, vecSpot + Vector( 0, 0, -24 ), ignore_monsters, ENT( pev ), &tr ); + vecSpot = pev->origin + Vector( 0.0f, 0.0f, 8.0f );//move up a bit, and trace down. + UTIL_TraceLine( vecSpot, vecSpot + Vector( 0.0f, 0.0f, -24.0f ), ignore_monsters, ENT( pev ), &tr ); UTIL_BloodDecalTrace( &tr, m_bloodColor ); @@ -727,7 +727,7 @@ void CGib::BounceGibTouch( CBaseEntity *pOther ) float volume; float zvel = fabs( pev->velocity.z ); - volume = 0.8 * Q_min( 1.0, ( (float)zvel ) / 450.0 ); + volume = 0.8f * Q_min( 1.0f, zvel / 450.0f ); CBreakable::MaterialSoundRandom( edict(), (Materials)m_material, volume ); } @@ -743,7 +743,7 @@ void CGib::StickyGibTouch( CBaseEntity *pOther ) TraceResult tr; SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + 10; + pev->nextthink = gpGlobals->time + 10.0f; if( !FClassnameIs( pOther->pev, "worldspawn" ) ) { @@ -751,11 +751,11 @@ void CGib::StickyGibTouch( CBaseEntity *pOther ) return; } - UTIL_TraceLine( pev->origin, pev->origin + pev->velocity * 32, ignore_monsters, ENT( pev ), &tr ); + UTIL_TraceLine( pev->origin, pev->origin + pev->velocity * 32.0f, ignore_monsters, ENT( pev ), &tr ); UTIL_BloodDecalTrace( &tr, m_bloodColor ); - pev->velocity = tr.vecPlaneNormal * -1; + pev->velocity = tr.vecPlaneNormal * -1.0f; pev->angles = UTIL_VecToAngles( pev->velocity ); pev->velocity = g_vecZero; pev->avelocity = g_vecZero; @@ -768,7 +768,7 @@ void CGib::StickyGibTouch( CBaseEntity *pOther ) void CGib::Spawn( const char *szGibModel ) { pev->movetype = MOVETYPE_BOUNCE; - pev->friction = 0.55; // deading the bounce a bit + pev->friction = 0.55f; // deading the bounce a bit // sometimes an entity inherits the edict from a former piece of glass, // and will spawn using the same render FX or rendermode! bad! @@ -781,7 +781,7 @@ void CGib::Spawn( const char *szGibModel ) SET_MODEL( ENT( pev ), szGibModel ); UTIL_SetSize( pev, Vector( 0, 0, 0 ), Vector( 0, 0, 0 ) ); - pev->nextthink = gpGlobals->time + 4; + pev->nextthink = gpGlobals->time + 4.0f; m_lifeTime = 25; SetThink( &CGib::WaitTillLand ); SetTouch( &CGib::BounceGibTouch ); @@ -927,7 +927,7 @@ int CBaseMonster::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, f } else { - m_vecEnemyLKP = pev->origin + ( g_vecAttackDir * 64 ); + m_vecEnemyLKP = pev->origin + ( g_vecAttackDir * 64.0f ); } MakeIdealYaw( m_vecEnemyLKP ); @@ -935,12 +935,12 @@ int CBaseMonster::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, f // add pain to the conditions // !!!HACKHACK - fudged for now. Do we want to have a virtual function to determine what is light and // heavy damage per monster class? - if( flDamage > 0 ) + if( flDamage > 0.0f ) { SetConditions( bits_COND_LIGHT_DAMAGE ); } - if( flDamage >= 20 ) + if( flDamage >= 20.0f ) { SetConditions( bits_COND_HEAVY_DAMAGE ); } @@ -965,7 +965,7 @@ int CBaseMonster::DeadTakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacke CBaseEntity *pInflictor = CBaseEntity::Instance( pevInflictor ); if( pInflictor ) { - vecDir = ( pInflictor->Center() - Vector ( 0, 0, 10 ) - Center() ).Normalize(); + vecDir = ( pInflictor->Center() - Vector ( 0.0f, 0.0f, 10.0f ) - Center() ).Normalize(); vecDir = g_vecAttackDir = vecDir.Normalize(); } } @@ -973,8 +973,8 @@ int CBaseMonster::DeadTakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacke #if 0// turn this back on when the bounding box issues are resolved. pev->flags &= ~FL_ONGROUND; - pev->origin.z += 1; - + pev->origin.z += 1.0f; + // let the damage scoot the corpse around a bit. if( !FNullEnt( pevInflictor ) && ( pevAttacker->solid != SOLID_TRIGGER ) ) { @@ -991,7 +991,7 @@ int CBaseMonster::DeadTakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacke return 0; } // Accumulate corpse gibbing damage, so you can gib with multiple hits - pev->health -= flDamage * 0.1; + pev->health -= flDamage * 0.1f; } return 1; @@ -999,11 +999,11 @@ int CBaseMonster::DeadTakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacke float CBaseMonster::DamageForce( float damage ) { - float force = damage * ( ( 32 * 32 * 72.0 ) / ( pev->size.x * pev->size.y * pev->size.z ) ) * 5; + float force = damage * ( ( 32.0f * 32.0f * 72.0f ) / ( pev->size.x * pev->size.y * pev->size.z ) ) * 5.0f; - if( force > 1000.0 ) + if( force > 1000.0f ) { - force = 1000.0; + force = 1000.0f; } return force; @@ -1023,11 +1023,11 @@ void RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacke if( flRadius ) falloff = flDamage / flRadius; else - falloff = 1.0; + falloff = 1.0f; int bInWater = ( UTIL_PointContents( vecSrc ) == CONTENTS_WATER ); - vecSrc.z += 1;// in case grenade is lying on the ground + vecSrc.z += 1.0f;// in case grenade is lying on the ground if( !pevAttacker ) pevAttacker = pevInflictor; @@ -1054,27 +1054,27 @@ void RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacke UTIL_TraceLine( vecSrc, vecSpot, dont_ignore_monsters, ENT( pevInflictor ), &tr ); - if( tr.flFraction == 1.0 || tr.pHit == pEntity->edict() ) + if( tr.flFraction == 1.0f || tr.pHit == pEntity->edict() ) { // the explosion can 'see' this entity, so hurt them! if( tr.fStartSolid ) { // if we're stuck inside them, fixup the position and distance tr.vecEndPos = vecSrc; - tr.flFraction = 0.0; + tr.flFraction = 0.0f; } // decrease damage for an ent that's farther from the bomb. flAdjustedDamage = ( vecSrc - tr.vecEndPos ).Length() * falloff; flAdjustedDamage = flDamage - flAdjustedDamage; - if( flAdjustedDamage < 0 ) + if( flAdjustedDamage < 0.0f ) { - flAdjustedDamage = 0; + flAdjustedDamage = 0.0f; } // ALERT( at_console, "hit %s\n", STRING( pEntity->pev->classname ) ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { ClearMultiDamage(); pEntity->TraceAttack( pevInflictor, flAdjustedDamage, ( tr.vecEndPos - vecSrc ).Normalize(), &tr, bitsDamageType ); @@ -1091,12 +1091,12 @@ void RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacke void CBaseMonster::RadiusDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType ) { - ::RadiusDamage( pev->origin, pevInflictor, pevAttacker, flDamage, flDamage * 2.5, iClassIgnore, bitsDamageType ); + ::RadiusDamage( pev->origin, pevInflictor, pevAttacker, flDamage, flDamage * 2.5f, iClassIgnore, bitsDamageType ); } void CBaseMonster::RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType ) { - ::RadiusDamage( vecSrc, pevInflictor, pevAttacker, flDamage, flDamage * 2.5, iClassIgnore, bitsDamageType ); + ::RadiusDamage( vecSrc, pevInflictor, pevAttacker, flDamage, flDamage * 2.5f, iClassIgnore, bitsDamageType ); } //========================================================= @@ -1117,7 +1117,7 @@ CBaseEntity* CBaseMonster::CheckTraceHullAttack( float flDist, int iDamage, int UTIL_MakeAimVectors( pev->angles ); Vector vecStart = pev->origin; - vecStart.z += pev->size.z * 0.5; + vecStart.z += pev->size.z * 0.5f; Vector vecEnd = vecStart + ( gpGlobals->v_forward * flDist ); UTIL_TraceHull( vecStart, vecEnd, dont_ignore_monsters, head_hull, ENT( pev ), &tr ); @@ -1219,7 +1219,7 @@ BOOL CBaseEntity::FVisible( CBaseEntity *pEntity ) UTIL_TraceLine( vecLookerOrigin, vecTargetOrigin, ignore_monsters, ignore_glass, ENT( pev )/*pentIgnore*/, &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { return FALSE;// Line of sight is not established } @@ -1242,7 +1242,7 @@ BOOL CBaseEntity::FVisible( const Vector &vecOrigin ) UTIL_TraceLine( vecLookerOrigin, vecOrigin, ignore_monsters, ignore_glass, ENT( pev )/*pentIgnore*/, &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { return FALSE;// Line of sight is not established } @@ -1259,7 +1259,7 @@ TraceAttack */ void CBaseEntity::TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType) { - Vector vecOrigin = ptr->vecEndPos - vecDir * 4; + Vector vecOrigin = ptr->vecEndPos - vecDir * 4.0f; if( pev->takedamage ) { @@ -1281,7 +1281,7 @@ void CBaseEntity::TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vec //========================================================= void CBaseMonster::TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType ) { - Vector vecOrigin = ptr->vecEndPos - vecDir * 4; + Vector vecOrigin = ptr->vecEndPos - vecDir * 4.0f; ALERT( at_console, "%d\n", ptr->iHitgroup ); @@ -1367,8 +1367,8 @@ void CBaseEntity::FireBullets( ULONG cShots, Vector vecSrc, Vector vecDirShootin // get circular gaussian spread float x, y, z; do { - x = RANDOM_FLOAT( -0.5, 0.5 ) + RANDOM_FLOAT( -0.5, 0.5 ); - y = RANDOM_FLOAT( -0.5, 0.5 ) + RANDOM_FLOAT( -0.5, 0.5 ); + x = RANDOM_FLOAT( -0.5f, 0.5f ) + RANDOM_FLOAT( -0.5f, 0.5f ); + y = RANDOM_FLOAT( -0.5f, 0.5f ) + RANDOM_FLOAT( -0.5f, 0.5f ); z = x * x + y * y; } while (z > 1); @@ -1388,7 +1388,7 @@ void CBaseEntity::FireBullets( ULONG cShots, Vector vecSrc, Vector vecDirShootin if( IsPlayer() ) { // adjust tracer position for player - vecTracerSrc = vecSrc + Vector( 0, 0, -4 ) + gpGlobals->v_right * 2 + gpGlobals->v_forward * 16; + vecTracerSrc = vecSrc + Vector( 0.0f, 0.0f, -4.0f ) + gpGlobals->v_right * 2.0f + gpGlobals->v_forward * 16.0f; } else { @@ -1416,7 +1416,7 @@ void CBaseEntity::FireBullets( ULONG cShots, Vector vecSrc, Vector vecDirShootin } } // do damage, paint decals - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { CBaseEntity *pEntity = CBaseEntity::Instance( tr.pHit ); @@ -1463,7 +1463,7 @@ void CBaseEntity::FireBullets( ULONG cShots, Vector vecSrc, Vector vecDirShootin } } // make bullet trails - UTIL_BubbleTrail( vecSrc, tr.vecEndPos, (int)( ( flDistance * tr.flFraction ) / 64.0 ) ); + UTIL_BubbleTrail( vecSrc, tr.vecEndPos, (int)( ( flDistance * tr.flFraction ) / 64.0f ) ); } ApplyMultiDamage( pev, pevAttacker ); } @@ -1496,8 +1496,8 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi { //Use player's random seed. // get circular gaussian spread - x = UTIL_SharedRandomFloat( shared_rand + iShot, -0.5, 0.5 ) + UTIL_SharedRandomFloat( shared_rand + ( 1 + iShot ) , -0.5, 0.5 ); - y = UTIL_SharedRandomFloat( shared_rand + ( 2 + iShot ), -0.5, 0.5 ) + UTIL_SharedRandomFloat( shared_rand + ( 3 + iShot ), -0.5, 0.5 ); + x = UTIL_SharedRandomFloat( shared_rand + iShot, -0.5f, 0.5f ) + UTIL_SharedRandomFloat( shared_rand + ( 1 + iShot ) , -0.5f, 0.5f ); + y = UTIL_SharedRandomFloat( shared_rand + ( 2 + iShot ), -0.5f, 0.5f ) + UTIL_SharedRandomFloat( shared_rand + ( 3 + iShot ), -0.5f, 0.5f ); //z = x * x + y * y; Vector vecDir = vecDirShooting + @@ -1509,7 +1509,7 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( pev )/*pentIgnore*/, &tr ); // do damage, paint decals - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { CBaseEntity *pEntity = CBaseEntity::Instance( tr.pHit ); @@ -1549,7 +1549,7 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi } } // make bullet trails - UTIL_BubbleTrail( vecSrc, tr.vecEndPos, (int)( ( flDistance * tr.flFraction ) / 64.0 ) ); + UTIL_BubbleTrail( vecSrc, tr.vecEndPos, (int)( ( flDistance * tr.flFraction ) / 64.0f ) ); } ApplyMultiDamage( pev, pevAttacker ); @@ -1589,33 +1589,33 @@ void CBaseEntity::TraceBleed( float flDamage, Vector vecDir, TraceResult *ptr, i } } */ - if( flDamage < 10 ) + if( flDamage < 10.0f ) { - flNoise = 0.1; + flNoise = 0.1f; cCount = 1; } - else if( flDamage < 25 ) + else if( flDamage < 25.0f ) { - flNoise = 0.2; + flNoise = 0.2f; cCount = 2; } else { - flNoise = 0.3; + flNoise = 0.3f; cCount = 4; } for( i = 0; i < cCount; i++ ) { - vecTraceDir = vecDir * -1;// trace in the opposite direction the shot came from (the direction the shot is going) + vecTraceDir = vecDir * -1.0f;// trace in the opposite direction the shot came from (the direction the shot is going) vecTraceDir.x += RANDOM_FLOAT( -flNoise, flNoise ); vecTraceDir.y += RANDOM_FLOAT( -flNoise, flNoise ); vecTraceDir.z += RANDOM_FLOAT( -flNoise, flNoise ); - UTIL_TraceLine( ptr->vecEndPos, ptr->vecEndPos + vecTraceDir * -172, ignore_monsters, ENT( pev ), &Bloodtr ); + UTIL_TraceLine( ptr->vecEndPos, ptr->vecEndPos + vecTraceDir * -172.0f, ignore_monsters, ENT( pev ), &Bloodtr ); - if( Bloodtr.flFraction != 1.0 ) + if( Bloodtr.flFraction != 1.0f ) { UTIL_BloodDecalTrace( &Bloodtr, BloodColor() ); } @@ -1653,7 +1653,7 @@ void CBaseMonster::MakeDamageBloodDecal( int cCount, float flNoise, TraceResult vecTraceDir.y += RANDOM_FLOAT( -flNoise, flNoise ); vecTraceDir.z += RANDOM_FLOAT( -flNoise, flNoise ); - UTIL_TraceLine( ptr->vecEndPos, ptr->vecEndPos + vecTraceDir * 172, ignore_monsters, ENT( pev ), &Bloodtr ); + UTIL_TraceLine( ptr->vecEndPos, ptr->vecEndPos + vecTraceDir * 172.0f, ignore_monsters, ENT( pev ), &Bloodtr ); /* MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY ); @@ -1668,7 +1668,7 @@ void CBaseMonster::MakeDamageBloodDecal( int cCount, float flNoise, TraceResult MESSAGE_END(); */ - if( Bloodtr.flFraction != 1.0 ) + if( Bloodtr.flFraction != 1.0f ) { UTIL_BloodDecalTrace( &Bloodtr, BloodColor() ); } diff --git a/dlls/crowbar.cpp b/dlls/crowbar.cpp index 3f39b99..072d82a 100644 --- a/dlls/crowbar.cpp +++ b/dlls/crowbar.cpp @@ -105,7 +105,7 @@ BOOL CCrowbar::Deploy() void CCrowbar::Holster( int skiplocal /* = 0 */ ) { - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; SendWeaponAnim( CROWBAR_HOLSTER ); } @@ -120,9 +120,9 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f distance = 1e6f; - vecHullEnd = vecSrc + ( ( vecHullEnd - vecSrc ) * 2 ); + vecHullEnd = vecSrc + ( ( vecHullEnd - vecSrc ) * 2.0f ); UTIL_TraceLine( vecSrc, vecHullEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if( tmpTrace.flFraction < 1.0 ) + if( tmpTrace.flFraction < 1.0f ) { tr = tmpTrace; return; @@ -139,7 +139,7 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f vecEnd.z = vecHullEnd.z + minmaxs[k][2]; UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if( tmpTrace.flFraction < 1.0 ) + if( tmpTrace.flFraction < 1.0f ) { float thisDistance = ( tmpTrace.vecEndPos - vecSrc ).Length(); if( thisDistance < distance ) @@ -159,7 +159,7 @@ void CCrowbar::PrimaryAttack() { #ifndef CLIENT_DLL SetThink( &CCrowbar::SwingAgain ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; #endif } } @@ -182,15 +182,15 @@ int CCrowbar::Swing( int fFirst ) UTIL_MakeVectors( m_pPlayer->pev->v_angle ); Vector vecSrc = m_pPlayer->GetGunPosition(); - Vector vecEnd = vecSrc + gpGlobals->v_forward * 32; + Vector vecEnd = vecSrc + gpGlobals->v_forward * 32.0f; UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); #ifndef CLIENT_DLL - if( tr.flFraction >= 1.0 ) + if( tr.flFraction >= 1.0f ) { UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); - if( tr.flFraction < 1.0 ) + if( tr.flFraction < 1.0f ) { // Calculate the point of intersection of the line (or hull) and the object we hit // This is and approximation of the "best" intersection @@ -204,11 +204,11 @@ int CCrowbar::Swing( int fFirst ) if( fFirst ) { PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usCrowbar, - 0.0, g_vecZero, g_vecZero, 0, 0, 0, + 0.0f, g_vecZero, g_vecZero, 0, 0, 0, 0, 0, 0 ); } - if( tr.flFraction >= 1.0 ) + if( tr.flFraction >= 1.0f ) { if( fFirst ) { @@ -245,7 +245,7 @@ int CCrowbar::Swing( int fFirst ) CBaseEntity *pEntity = CBaseEntity::Instance( tr.pHit ); // play thwack, smack, or dong sound - float flVol = 1.0; + float flVol = 1.0f; int fHitWorld = TRUE; if( pEntity ) @@ -255,9 +255,9 @@ int CCrowbar::Swing( int fFirst ) // UTIL_WeaponTimeBase() is always 0 and m_flNextPrimaryAttack is >= -1.0f, thus making // m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() always evaluate to false. #ifdef CLIENT_WEAPONS - if( ( m_flNextPrimaryAttack + 1 == UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) + if( ( m_flNextPrimaryAttack + 1.0f == UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) #else - if( ( m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) + if( ( m_flNextPrimaryAttack + 1.0f < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) #endif { // first swing does full damage @@ -266,7 +266,7 @@ int CCrowbar::Swing( int fFirst ) else { // subsequent swings do half - pEntity->TraceAttack( m_pPlayer->pev, gSkillData.plrDmgCrowbar / 2, gpGlobals->v_forward, &tr, DMG_CLUB ); + pEntity->TraceAttack( m_pPlayer->pev, gSkillData.plrDmgCrowbar * 0.5f, gpGlobals->v_forward, &tr, DMG_CLUB ); } ApplyMultiDamage( m_pPlayer->pev, m_pPlayer->pev ); @@ -276,20 +276,27 @@ int CCrowbar::Swing( int fFirst ) switch( RANDOM_LONG( 0, 2 ) ) { case 0: - EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cbar_hitbod1.wav", 1, ATTN_NORM ); + EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cbar_hitbod1.wav", 1.0f, ATTN_NORM ); break; case 1: - EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cbar_hitbod2.wav", 1, ATTN_NORM ); + EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cbar_hitbod2.wav", 1.0f, ATTN_NORM ); break; case 2: - EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cbar_hitbod3.wav", 1, ATTN_NORM ); + EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cbar_hitbod3.wav", 1.0f, ATTN_NORM ); break; } + m_pPlayer->m_iWeaponVolume = CROWBAR_BODYHIT_VOLUME; + if( !pEntity->IsAlive() ) + { +#ifdef CROWBAR_FIX_RAPID_CROWBAR + m_flNextPrimaryAttack = GetNextAttackDelay(0.25); +#endif return TRUE; + } else - flVol = 0.1; + flVol = 0.1f; fHitWorld = FALSE; } @@ -300,14 +307,14 @@ int CCrowbar::Swing( int fFirst ) if( fHitWorld ) { - float fvolbar = TEXTURETYPE_PlaySound( &tr, vecSrc, vecSrc + ( vecEnd - vecSrc ) * 2, BULLET_PLAYER_CROWBAR ); + float fvolbar = TEXTURETYPE_PlaySound( &tr, vecSrc, vecSrc + ( vecEnd - vecSrc ) * 2.0f, BULLET_PLAYER_CROWBAR ); if( g_pGameRules->IsMultiplayer() ) { // override the volume here, cause we don't play texture sounds in multiplayer, // and fvolbar is going to be 0 from the above call. - fvolbar = 1; + fvolbar = 1.0f; } // also play crowbar strike @@ -328,9 +335,13 @@ int CCrowbar::Swing( int fFirst ) m_pPlayer->m_iWeaponVolume = (int)( flVol * CROWBAR_WALLHIT_VOLUME ); SetThink( &CCrowbar::Smack ); - pev->nextthink = UTIL_WeaponTimeBase() + 0.2; + pev->nextthink = UTIL_WeaponTimeBase() + 0.2f; +#endif +#if CROWBAR_DELAY_FIX + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.25f; +#else + m_flNextPrimaryAttack = GetNextAttackDelay( 0.25f ); #endif - m_flNextPrimaryAttack = GetNextAttackDelay( 0.25 ); } #ifdef CROWBAR_IDLE_ANIM m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); @@ -345,22 +356,22 @@ void CCrowbar::WeaponIdle( void ) { int iAnim; float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 ); - if( flRand > 0.9 ) + if( flRand > 0.9f ) { iAnim = CROWBAR_IDLE2; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0 / 30.0; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0f / 30.0f; } else { - if( flRand > 0.5 ) + if( flRand > 0.5f ) { iAnim = CROWBAR_IDLE; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 70.0 / 30.0; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 70.0f / 30.0f; } else { iAnim = CROWBAR_IDLE3; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0 / 30.0; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0f / 30.0f; } } SendWeaponAnim( iAnim ); diff --git a/dlls/doors.cpp b/dlls/doors.cpp index f6d55c6..a8b35bc 100644 --- a/dlls/doors.cpp +++ b/dlls/doors.cpp @@ -100,9 +100,9 @@ TYPEDESCRIPTION CBaseDoor::m_SaveData[] = IMPLEMENT_SAVERESTORE( CBaseDoor, CBaseToggle ) -#define DOOR_SENTENCEWAIT 6 -#define DOOR_SOUNDWAIT 3 -#define BUTTON_SOUNDWAIT 0.5 +#define DOOR_SENTENCEWAIT 6.0f +#define DOOR_SOUNDWAIT 3.0f +#define BUTTON_SOUNDWAIT 0.5f // play door or button locked or unlocked sounds. // pass in pointer to valid locksound struct. @@ -130,9 +130,9 @@ void PlayLockSounds( entvars_t *pev, locksound_t *pls, int flocked, int fbutton float fvol; if( fplaysound && fplaysentence ) - fvol = 0.25; + fvol = 0.25f; else - fvol = 1.0; + fvol = 1.0f; // if there is a locked sound, and we've debounced, play sound if( fplaysound ) @@ -149,7 +149,7 @@ void PlayLockSounds( entvars_t *pev, locksound_t *pls, int flocked, int fbutton int iprev = pls->iLockedSentence; pls->iLockedSentence = SENTENCEG_PlaySequentialSz( ENT( pev ), STRING( pls->sLockedSentence ), - 0.85, ATTN_NORM, 0, 100, pls->iLockedSentence, FALSE ); + 0.85f, ATTN_NORM, 0, 100, pls->iLockedSentence, FALSE ); pls->iUnlockedSentence = 0; // make sure we don't keep calling last sentence in list @@ -168,9 +168,9 @@ void PlayLockSounds( entvars_t *pev, locksound_t *pls, int flocked, int fbutton // if playing both sentence and sound, lower sound volume so we hear sentence if( fplaysound && fplaysentence ) - fvol = 0.25; + fvol = 0.25f; else - fvol = 1.0; + fvol = 1.0f; // play 'door unlocked' sound if set if( fplaysound ) @@ -185,7 +185,7 @@ void PlayLockSounds( entvars_t *pev, locksound_t *pls, int flocked, int fbutton int iprev = pls->iUnlockedSentence; pls->iUnlockedSentence = SENTENCEG_PlaySequentialSz( ENT( pev ), STRING( pls->sUnlockedSentence ), - 0.85, ATTN_NORM, 0, 100, pls->iUnlockedSentence, FALSE ); + 0.85f, ATTN_NORM, 0, 100, pls->iUnlockedSentence, FALSE ); pls->iLockedSentence = 0; // make sure we don't keep calling last sentence in list @@ -242,7 +242,7 @@ void CBaseDoor::KeyValue( KeyValueData *pkvd ) } else if( FStrEq( pkvd->szKeyName, "WaveHeight" ) ) { - pev->scale = atof( pkvd->szValue ) * ( 1.0 / 8.0 ); + pev->scale = atof( pkvd->szValue ) * ( 1.0f / 8.0f ); pkvd->fHandled = TRUE; } else @@ -304,13 +304,13 @@ void CBaseDoor::Spawn() UTIL_SetOrigin( pev, pev->origin ); SET_MODEL( ENT( pev ), STRING( pev->model ) ); - if( pev->speed == 0 ) - pev->speed = 100; + if( pev->speed == 0.0f ) + pev->speed = 100.0f; m_vecPosition1 = pev->origin; // Subtract 2 from size because the engine expands bboxes by 1 in all directions making the size too big - m_vecPosition2 = m_vecPosition1 + ( pev->movedir * ( fabs( pev->movedir.x * ( pev->size.x - 2 ) ) + fabs( pev->movedir.y * ( pev->size.y - 2 ) ) + fabs( pev->movedir.z * ( pev->size.z - 2 ) ) - m_flLip ) ); + m_vecPosition2 = m_vecPosition1 + ( pev->movedir * ( fabs( pev->movedir.x * ( pev->size.x - 2.0f ) ) + fabs( pev->movedir.y * ( pev->size.y - 2.0f ) ) + fabs( pev->movedir.z * ( pev->size.z - 2.0f ) ) - m_flLip ) ); ASSERTSZ( m_vecPosition1 != m_vecPosition2, "door start/end positions are equal" ); if( FBitSet( pev->spawnflags, SF_DOOR_START_OPEN ) ) { @@ -637,7 +637,7 @@ void CBaseDoor::DoorGoUp( void ) SetMoveDone( &CBaseDoor::DoorHitTop ); if( FClassnameIs( pev, "func_door_rotating" ) ) // !!! BUGBUG Triggered doors don't work with this yet { - float sign = 1.0; + float sign = 1.0f; if( m_hActivator != 0 ) { @@ -647,14 +647,14 @@ void CBaseDoor::DoorGoUp( void ) { Vector vec = pevActivator->origin - pev->origin; Vector angles = pevActivator->angles; - angles.x = 0; - angles.z = 0; + angles.x = 0.0f; + angles.z = 0.0f; UTIL_MakeVectors( angles ); - //Vector vnext = ( pevToucher->origin + ( pevToucher->velocity * 10 ) ) - pev->origin; + //Vector vnext = ( pevToucher->origin + ( pevToucher->velocity * 10.f ) ) - pev->origin; UTIL_MakeVectors( pevActivator->angles ); - Vector vnext = ( pevActivator->origin + ( gpGlobals->v_forward * 10 ) ) - pev->origin; - if( ( vec.x * vnext.y - vec.y * vnext.x ) < 0 ) - sign = -1.0; + Vector vnext = ( pevActivator->origin + ( gpGlobals->v_forward * 10.f ) ) - pev->origin; + if( ( vec.x * vnext.y - vec.y * vnext.x ) < 0.0f ) + sign = -1.0f; } } AngularMove( m_vecAngle2*sign, pev->speed ); @@ -695,9 +695,9 @@ void CBaseDoor::DoorHitTop( void ) pev->nextthink = pev->ltime + m_flWait; SetThink( &CBaseDoor::DoorGoDown ); - if( m_flWait == -1 ) + if( m_flWait == -1.0f ) { - pev->nextthink = -1; + pev->nextthink = -1.0f; } } @@ -777,7 +777,7 @@ void CBaseDoor::Blocked( CBaseEntity *pOther ) // if a door has a negative wait, it would never come back if blocked, // so let it just squash the object to death real fast - if( m_flWait >= 0 ) + if( m_flWait >= 0.0f ) { // BMod Start - Door sound fix. if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) ) @@ -817,7 +817,7 @@ void CBaseDoor::Blocked( CBaseEntity *pOther ) { pDoor = GetClassPtr( (CBaseDoor *)VARS( pentTarget ) ); - if( pDoor->m_flWait >= 0 ) + if( pDoor->m_flWait >= 0.0f ) { if( pDoor->pev->velocity == pev->velocity && pDoor->pev->avelocity == pev->velocity ) { @@ -905,8 +905,8 @@ void CRotDoor::Spawn( void ) // check for clockwise rotation if( FBitSet( pev->spawnflags, SF_DOOR_ROTATE_BACKWARDS ) ) - pev->movedir = pev->movedir * -1; - + pev->movedir = pev->movedir * -1.0f; + //m_flWait = 2; who the hell did this? (sjb) m_vecAngle1 = pev->angles; m_vecAngle2 = pev->angles + pev->movedir * m_flMoveDistance; @@ -922,8 +922,8 @@ void CRotDoor::Spawn( void ) UTIL_SetOrigin( pev, pev->origin ); SET_MODEL( ENT( pev ), STRING( pev->model ) ); - if( pev->speed == 0 ) - pev->speed = 100; + if( pev->speed == 0.0f ) + pev->speed = 100.0f; // DOOR_START_OPEN is to allow an entity to be lighted in the closed position // but spawn in the open position @@ -934,7 +934,7 @@ void CRotDoor::Spawn( void ) Vector vecSav = m_vecAngle1; m_vecAngle2 = m_vecAngle1; m_vecAngle1 = vecSav; - pev->movedir = pev->movedir * -1; + pev->movedir = pev->movedir * -1.0f; } m_toggle_state = TS_AT_BOTTOM; @@ -997,14 +997,14 @@ void CMomentaryDoor::Spawn( void ) UTIL_SetOrigin( pev, pev->origin ); SET_MODEL( ENT( pev ), STRING( pev->model ) ); - if( pev->speed == 0 ) - pev->speed = 100; - if( pev->dmg == 0 ) - pev->dmg = 2; + if( pev->speed == 0.0f ) + pev->speed = 100.0f; + if( pev->dmg == 0.0f ) + pev->dmg = 2.0f; m_vecPosition1 = pev->origin; // Subtract 2 from size because the engine expands bboxes by 1 in all directions making the size too big - m_vecPosition2 = m_vecPosition1 + ( pev->movedir * ( fabs( pev->movedir.x * ( pev->size.x - 2 ) ) + fabs( pev->movedir.y * ( pev->size.y - 2 ) ) + fabs( pev->movedir.z * ( pev->size.z - 2 ) ) - m_flLip ) ); + m_vecPosition2 = m_vecPosition1 + ( pev->movedir * ( fabs( pev->movedir.x * ( pev->size.x - 2.0f ) ) + fabs( pev->movedir.y * ( pev->size.y - 2.0f ) ) + fabs( pev->movedir.z * ( pev->size.z - 2.0f ) ) - m_flLip ) ); ASSERTSZ( m_vecPosition1 != m_vecPosition2, "door start/end positions are equal" ); if( FBitSet( pev->spawnflags, SF_DOOR_START_OPEN ) ) @@ -1128,23 +1128,23 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP if( useType != USE_SET ) // Momentary buttons will pass down a float in here return; - if( value > 1.0 ) - value = 1.0; - if( value < 0.0 ) - value = 0.0; + if( value > 1.0f ) + value = 1.0f; + if( value < 0.0f ) + value = 0.0f; Vector move = m_vecPosition1 + ( value * ( m_vecPosition2 - m_vecPosition1 ) ); Vector delta = move - pev->origin; - //float speed = delta.Length() * 10; - float speed = delta.Length() / 0.1; // move there in 0.1 sec + //float speed = delta.Length() * 10.0f; + float speed = delta.Length() / 0.1f; // move there in 0.1 sec if( speed != 0 ) { // This entity only thinks when it moves, so if it's thinking, it's in the process of moving // play the sound when it starts moving(not yet thinking) - if( pev->nextthink < pev->ltime || pev->nextthink == 0 ) - EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ), 1, ATTN_NORM ); + if( pev->nextthink < pev->ltime || pev->nextthink == 0.0f ) + EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ), 1.0f, ATTN_NORM ); // If we already moving to designated point, return else if( move == m_vecFinalDest ) return; @@ -1157,13 +1157,13 @@ void CMomentaryDoor::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP void CMomentaryDoor::MomentaryMoveDone( void ) { SetThink(&CMomentaryDoor::StopMoveSound); - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; } void CMomentaryDoor::StopMoveSound() { STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ) ); - EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseArrived ), 1, ATTN_NORM ); - pev->nextthink = -1; + EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseArrived ), 1.0f, ATTN_NORM ); + pev->nextthink = -1.0f; ResetThink(); } diff --git a/dlls/effects.cpp b/dlls/effects.cpp index bd12f8a..e6ad257 100644 --- a/dlls/effects.cpp +++ b/dlls/effects.cpp @@ -85,7 +85,7 @@ void CBubbling::Spawn( void ) if( !( pev->spawnflags & SF_BUBBLES_STARTOFF ) ) { SetThink( &CBubbling::FizzThink ); - pev->nextthink = gpGlobals->time + 2.0; + pev->nextthink = gpGlobals->time + 2.0f; m_state = 1; } else @@ -105,7 +105,7 @@ void CBubbling::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use if( m_state ) { SetThink( &CBubbling::FizzThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } else { @@ -145,9 +145,9 @@ void CBubbling::FizzThink( void ) MESSAGE_END(); if( m_frequency > 19 ) - pev->nextthink = gpGlobals->time + 0.5; + pev->nextthink = gpGlobals->time + 0.5f; else - pev->nextthink = gpGlobals->time + 2.5 - ( 0.1 * m_frequency ); + pev->nextthink = gpGlobals->time + 2.5f - ( 0.1f * m_frequency ); } // -------------------------------------------------- @@ -453,7 +453,7 @@ void CLightning::Spawn( void ) if( pev->dmg > 0 ) { SetThink( &CLightning::DamageThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } if( pev->targetname ) { @@ -479,7 +479,7 @@ void CLightning::Spawn( void ) if( FStringNull( pev->targetname ) || FBitSet( pev->spawnflags, SF_BEAM_STARTON ) ) { SetThink( &CLightning::StrikeThink ); - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; } } } @@ -593,7 +593,7 @@ void CLightning::StrikeUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T else { SetThink( &CLightning::StrikeThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } if( !FBitSet( pev->spawnflags, SF_BEAM_TOGGLE ) ) @@ -615,7 +615,7 @@ void CLightning::StrikeThink( void ) if( m_life != 0 ) { if( pev->spawnflags & SF_BEAM_RANDOM ) - pev->nextthink = gpGlobals->time + m_life + RANDOM_FLOAT( 0, m_restrike ); + pev->nextthink = gpGlobals->time + m_life + RANDOM_FLOAT( 0.0f, m_restrike ); else pev->nextthink = gpGlobals->time + m_life + m_restrike; } @@ -695,7 +695,7 @@ void CLightning::StrikeThink( void ) WRITE_SHORT( m_spriteTexture ); WRITE_BYTE( m_frameStart ); // framestart WRITE_BYTE( (int)pev->framerate ); // framerate - WRITE_BYTE( (int)( m_life * 10.0 ) ); // life + WRITE_BYTE( (int)( m_life * 10.0f ) ); // life WRITE_BYTE( m_boltWidth ); // width WRITE_BYTE( m_noiseAmplitude ); // noise WRITE_BYTE( (int)pev->rendercolor.x ); // r, g, b @@ -717,7 +717,7 @@ void CLightning::StrikeThink( void ) void CBeam::BeamDamage( TraceResult *ptr ) { RelinkBeam(); - if( ptr->flFraction != 1.0 && ptr->pHit != NULL ) + if( ptr->flFraction != 1.0f && ptr->pHit != NULL ) { CBaseEntity *pHit = CBaseEntity::Instance( ptr->pHit ); if( pHit ) @@ -737,7 +737,7 @@ void CBeam::BeamDamage( TraceResult *ptr ) void CLightning::DamageThink( void ) { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; TraceResult tr; UTIL_TraceLine( GetStartPos(), GetEndPos(), dont_ignore_monsters, NULL, &tr ); BeamDamage( &tr ); @@ -757,7 +757,7 @@ void CLightning::Zap( const Vector &vecSrc, const Vector &vecDest ) WRITE_SHORT( m_spriteTexture ); WRITE_BYTE( m_frameStart ); // framestart WRITE_BYTE( (int)pev->framerate ); // framerate - WRITE_BYTE( (int)( m_life * 10.0) ); // life + WRITE_BYTE( (int)( m_life * 10.0f ) ); // life WRITE_BYTE( m_boltWidth ); // width WRITE_BYTE( m_noiseAmplitude ); // noise WRITE_BYTE( (int)pev->rendercolor.x ); // r, g, b @@ -792,32 +792,32 @@ void CLightning::RandomArea( void ) { Vector vecSrc = pev->origin; - Vector vecDir1 = Vector( RANDOM_FLOAT( -1.0, 1.0 ), RANDOM_FLOAT( -1.0, 1.0 ),RANDOM_FLOAT( -1.0, 1.0 ) ); + Vector vecDir1 = Vector( RANDOM_FLOAT( -1.0f, 1.0f ), RANDOM_FLOAT( -1.0f, 1.0f ),RANDOM_FLOAT( -1.0f, 1.0f ) ); vecDir1 = vecDir1.Normalize(); TraceResult tr1; UTIL_TraceLine( vecSrc, vecSrc + vecDir1 * m_radius, ignore_monsters, ENT( pev ), &tr1 ); - if( tr1.flFraction == 1.0 ) + if( tr1.flFraction == 1.0f ) continue; Vector vecDir2; do { - vecDir2 = Vector( RANDOM_FLOAT( -1.0, 1.0 ), RANDOM_FLOAT( -1.0, 1.0 ),RANDOM_FLOAT( -1.0, 1.0 ) ); - } while( DotProduct( vecDir1, vecDir2 ) > 0 ); + vecDir2 = Vector( RANDOM_FLOAT( -1.0f, 1.0f ), RANDOM_FLOAT( -1.0f, 1.0f ),RANDOM_FLOAT( -1.0f, 1.0f ) ); + } while( DotProduct( vecDir1, vecDir2 ) > 0.0f ); vecDir2 = vecDir2.Normalize(); TraceResult tr2; UTIL_TraceLine( vecSrc, vecSrc + vecDir2 * m_radius, ignore_monsters, ENT( pev ), &tr2 ); - if( tr2.flFraction == 1.0 ) + if( tr2.flFraction == 1.0f ) continue; - if( ( tr1.vecEndPos - tr2.vecEndPos ).Length() < m_radius * 0.1 ) + if( ( tr1.vecEndPos - tr2.vecEndPos ).Length() < m_radius * 0.1f ) continue; UTIL_TraceLine( tr1.vecEndPos, tr2.vecEndPos, ignore_monsters, ENT( pev ), &tr2 ); - if( tr2.flFraction != 1.0 ) + if( tr2.flFraction != 1.0f ) continue; Zap( tr1.vecEndPos, tr2.vecEndPos ); @@ -832,15 +832,15 @@ void CLightning::RandomPoint( Vector &vecSrc ) for( iLoops = 0; iLoops < 10; iLoops++ ) { - Vector vecDir1 = Vector( RANDOM_FLOAT( -1.0, 1.0 ), RANDOM_FLOAT( -1.0, 1.0 ),RANDOM_FLOAT( -1.0, 1.0 ) ); + Vector vecDir1 = Vector( RANDOM_FLOAT( -1.0f, 1.0f ), RANDOM_FLOAT( -1.0f, 1.0f ), RANDOM_FLOAT( -1.0f, 1.0f ) ); vecDir1 = vecDir1.Normalize(); TraceResult tr1; UTIL_TraceLine( vecSrc, vecSrc + vecDir1 * m_radius, ignore_monsters, ENT( pev ), &tr1 ); - if( ( tr1.vecEndPos - vecSrc ).Length() < m_radius * 0.1 ) + if( ( tr1.vecEndPos - vecSrc ).Length() < m_radius * 0.1f ) continue; - if( tr1.flFraction == 1.0 ) + if( tr1.flFraction == 1.0f ) continue; Zap( vecSrc, tr1.vecEndPos ); @@ -1066,7 +1066,7 @@ void CLaser::StrikeThink( void ) UTIL_TraceLine( pev->origin, m_firePosition, dont_ignore_monsters, NULL, &tr ); FireAtPoint( tr ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } class CGlow : public CPointEntity @@ -1104,8 +1104,8 @@ void CGlow::Spawn( void ) SET_MODEL( ENT( pev ), STRING( pev->model ) ); m_maxFrame = (float) MODEL_FRAMES( pev->modelindex ) - 1; - if( m_maxFrame > 1.0 && pev->framerate != 0 ) - pev->nextthink = gpGlobals->time + 0.1; + if( m_maxFrame > 1.0f && pev->framerate != 0 ) + pev->nextthink = gpGlobals->time + 0.1f; m_lastTime = gpGlobals->time; } @@ -1114,7 +1114,7 @@ void CGlow::Think( void ) { Animate( pev->framerate * ( gpGlobals->time - m_lastTime ) ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; m_lastTime = gpGlobals->time; } @@ -1197,7 +1197,7 @@ void CSprite::AnimateThink( void ) { Animate( pev->framerate * ( gpGlobals->time - m_lastTime ) ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; m_lastTime = gpGlobals->time; } @@ -1234,7 +1234,7 @@ void CSprite::ExpandThink( void ) } else { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; m_lastTime = gpGlobals->time; } } @@ -1265,7 +1265,7 @@ void CSprite::TurnOff( void ) void CSprite::TurnOn( void ) { pev->effects = 0; - if( ( pev->framerate && m_maxFrame > 1.0 ) || ( pev->spawnflags & SF_SPRITE_ONCE ) ) + if( ( pev->framerate && m_maxFrame > 1.0f ) || ( pev->spawnflags & SF_SPRITE_ONCE ) ) { SetThink( &CSprite::AnimateThink ); pev->nextthink = gpGlobals->time; @@ -1422,9 +1422,9 @@ void CGibShooter::ShootThink( void ) vecShootDir = pev->movedir; - vecShootDir = vecShootDir + gpGlobals->v_right * RANDOM_FLOAT( -1, 1 ) * m_flVariance;; - vecShootDir = vecShootDir + gpGlobals->v_forward * RANDOM_FLOAT( -1, 1 ) * m_flVariance;; - vecShootDir = vecShootDir + gpGlobals->v_up * RANDOM_FLOAT( -1, 1 ) * m_flVariance;; + vecShootDir = vecShootDir + gpGlobals->v_right * RANDOM_FLOAT( -1.0f, 1.0f ) * m_flVariance;; + vecShootDir = vecShootDir + gpGlobals->v_forward * RANDOM_FLOAT( -1.0f, 1.0f ) * m_flVariance;; + vecShootDir = vecShootDir + gpGlobals->v_up * RANDOM_FLOAT( -1.0f, 1.0f ) * m_flVariance;; vecShootDir = vecShootDir.Normalize(); CGib *pGib = CreateGib(); @@ -1434,12 +1434,12 @@ void CGibShooter::ShootThink( void ) pGib->pev->origin = pev->origin; pGib->pev->velocity = vecShootDir * m_flGibVelocity; - pGib->pev->avelocity.x = RANDOM_FLOAT( 100, 200 ); - pGib->pev->avelocity.y = RANDOM_FLOAT( 100, 300 ); + pGib->pev->avelocity.x = RANDOM_FLOAT( 100.0f, 200.0f ); + pGib->pev->avelocity.y = RANDOM_FLOAT( 100.0f, 300.0f ); float thinkTime = pGib->pev->nextthink - gpGlobals->time; - pGib->m_lifeTime = ( m_flGibLife * RANDOM_FLOAT( 0.95, 1.05 ) ); // +/- 5% + pGib->m_lifeTime = ( m_flGibLife * RANDOM_FLOAT( 0.95f, 1.05f ) ); // +/- 5% if( pGib->m_lifeTime < thinkTime ) { pGib->pev->nextthink = gpGlobals->time + pGib->m_lifeTime; @@ -1584,7 +1584,7 @@ void CTestEffect::TestThink( void ) TraceResult tr; Vector vecSrc = pev->origin; - Vector vecDir = Vector( RANDOM_FLOAT( -1.0, 1.0 ), RANDOM_FLOAT( -1.0, 1.0 ),RANDOM_FLOAT( -1.0, 1.0 ) ); + Vector vecDir = Vector( RANDOM_FLOAT( -1.0f, 1.0f ), RANDOM_FLOAT( -1.0f, 1.0f ),RANDOM_FLOAT( -1.0f, 1.0f ) ); vecDir = vecDir.Normalize(); UTIL_TraceLine( vecSrc, vecSrc + vecDir * 128, ignore_monsters, ENT( pev ), &tr ); @@ -1598,7 +1598,7 @@ void CTestEffect::TestThink( void ) m_pBeam[m_iBeam] = pbeam; m_iBeam++; #if 0 - Vector vecMid = ( vecSrc + tr.vecEndPos ) * 0.5; + Vector vecMid = ( vecSrc + tr.vecEndPos ) * 0.5f; MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY ); WRITE_BYTE( TE_DLIGHT ); WRITE_COORD( vecMid.x ); // X @@ -1614,15 +1614,15 @@ void CTestEffect::TestThink( void ) #endif } - if( t < 3.0 ) + if( t < 3.0f ) { for( i = 0; i < m_iBeam; i++ ) { - t = ( gpGlobals->time - m_flBeamTime[i] ) / ( 3 + m_flStartTime - m_flBeamTime[i] ); - m_pBeam[i]->SetBrightness( (int)( 255 * t ) ); + t = ( gpGlobals->time - m_flBeamTime[i] ) / ( 3.0f + m_flStartTime - m_flBeamTime[i] ); + m_pBeam[i]->SetBrightness( (int)( 255.0f * t ) ); // m_pBeam[i]->SetScrollRate( 20 * t ); } - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } else { @@ -1640,7 +1640,7 @@ void CTestEffect::TestThink( void ) void CTestEffect::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { SetThink( &CTestEffect::TestThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; m_flStartTime = gpGlobals->time; } @@ -1740,7 +1740,7 @@ Vector CBlood::BloodPosition( CBaseEntity *pActivator ) else pPlayer = g_engfuncs.pfnPEntityOfEntIndex( 1 ); if( pPlayer ) - return( pPlayer->v.origin + pPlayer->v.view_ofs ) + Vector( RANDOM_FLOAT( -10, 10 ), RANDOM_FLOAT( -10, 10 ), RANDOM_FLOAT( -10, 10 ) ); + return( pPlayer->v.origin + pPlayer->v.view_ofs ) + Vector( RANDOM_FLOAT( -10.0f, 10.0f ), RANDOM_FLOAT( -10.0f, 10.0f ), RANDOM_FLOAT( -10.0f, 10.0f ) ); } return pev->origin; @@ -1760,7 +1760,7 @@ void CBlood::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useTyp TraceResult tr; UTIL_TraceLine( start, start + forward * BloodAmount() * 2, ignore_monsters, NULL, &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) UTIL_BloodDecalTrace( &tr, Color() ); } } @@ -1998,8 +1998,8 @@ void CMessage::Spawn( void ) pev->impulse = 0; // No volume, use normal - if( pev->scale <= 0 ) - pev->scale = 1.0; + if( pev->scale <= 0.0f ) + pev->scale = 1.0f; } void CMessage::Precache( void ) @@ -2197,7 +2197,7 @@ void CItemSoda::Spawn( void ) UTIL_SetSize( pev, Vector( 0, 0, 0 ), Vector( 0, 0, 0 ) ); SetThink( &CItemSoda::CanThink ); - pev->nextthink = gpGlobals->time + 0.5; + pev->nextthink = gpGlobals->time + 0.5f; } void CItemSoda::CanThink( void ) diff --git a/dlls/explode.cpp b/dlls/explode.cpp index f605dc0..a5815dd 100644 --- a/dlls/explode.cpp +++ b/dlls/explode.cpp @@ -38,21 +38,21 @@ LINK_ENTITY_TO_CLASS( spark_shower, CShower ) void CShower::Spawn( void ) { - pev->velocity = RANDOM_FLOAT( 200, 300 ) * pev->angles; - pev->velocity.x += RANDOM_FLOAT( -100.f, 100.f ); - pev->velocity.y += RANDOM_FLOAT( -100.f, 100.f ); + pev->velocity = RANDOM_FLOAT( 200.0f, 300.0f ) * pev->angles; + pev->velocity.x += RANDOM_FLOAT( -100.0f, 100.0f ); + pev->velocity.y += RANDOM_FLOAT( -100.0f, 100.0f ); if( pev->velocity.z >= 0 ) - pev->velocity.z += 200; + pev->velocity.z += 200.0f; else - pev->velocity.z -= 200; + pev->velocity.z -= 200.0f; pev->movetype = MOVETYPE_BOUNCE; pev->gravity = 0.5; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; pev->solid = SOLID_NOT; SET_MODEL( edict(), "models/grenade.mdl" ); // Need a model, just use the grenade, we don't draw it anyway UTIL_SetSize( pev, g_vecZero, g_vecZero ); pev->effects |= EF_NODRAW; - pev->speed = RANDOM_FLOAT( 0.5, 1.5 ); + pev->speed = RANDOM_FLOAT( 0.5f, 1.5f ); pev->angles = g_vecZero; } @@ -61,9 +61,9 @@ void CShower::Think( void ) { UTIL_Sparks( pev->origin ); - pev->speed -= 0.1; - if( pev->speed > 0 ) - pev->nextthink = gpGlobals->time + 0.1; + pev->speed -= 0.1f; + if( pev->speed > 0.0f ) + pev->nextthink = gpGlobals->time + 0.1f; else UTIL_Remove( this ); pev->flags &= ~FL_ONGROUND; @@ -72,12 +72,12 @@ void CShower::Think( void ) void CShower::Touch( CBaseEntity *pOther ) { if( pev->flags & FL_ONGROUND ) - pev->velocity = pev->velocity * 0.1; + pev->velocity = pev->velocity * 0.1f; else - pev->velocity = pev->velocity * 0.6; + pev->velocity = pev->velocity * 0.6f; - if( ( pev->velocity.x * pev->velocity.x + pev->velocity.y * pev->velocity.y ) < 10.0 ) - pev->speed = 0; + if( ( pev->velocity.x * pev->velocity.x + pev->velocity.y * pev->velocity.y ) < 10.0f ) + pev->speed = 0.0f; } class CEnvExplosion : public CBaseMonster @@ -130,17 +130,17 @@ void CEnvExplosion::Spawn( void ) */ float flSpriteScale; - flSpriteScale = ( m_iMagnitude - 50 ) * 0.6; + flSpriteScale = ( m_iMagnitude - 50 ) * 0.6f; /* - if( flSpriteScale > 50 ) + if( flSpriteScale > 50.0f ) { - flSpriteScale = 50; + flSpriteScale = 50.0f; } */ - if( flSpriteScale < 10 ) + if( flSpriteScale < 10.0f ) { - flSpriteScale = 10; + flSpriteScale = 10.0f; } m_spriteScale = (int)flSpriteScale; @@ -155,14 +155,14 @@ void CEnvExplosion::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE Vector vecSpot;// trace starts here! - vecSpot = pev->origin + Vector( 0, 0, 8 ); + vecSpot = pev->origin + Vector( 0.0f, 0.0f, 8.0f ); - UTIL_TraceLine( vecSpot, vecSpot + Vector( 0, 0, -40 ), ignore_monsters, ENT( pev ), &tr ); + UTIL_TraceLine( vecSpot, vecSpot + Vector( 0.0f, 0.0f, -40.0f ), ignore_monsters, ENT( pev ), &tr ); // Pull out of the wall a bit - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { - pev->origin = tr.vecEndPos + ( tr.vecPlaneNormal * ( m_iMagnitude - 24 ) * 0.6 ); + pev->origin = tr.vecEndPos + ( tr.vecPlaneNormal * ( m_iMagnitude - 24 ) * 0.6f ); } else { @@ -172,7 +172,7 @@ void CEnvExplosion::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE // draw decal if( !( pev->spawnflags & SF_ENVEXPLOSION_NODECAL ) ) { - if( RANDOM_FLOAT( 0, 1 ) < 0.5 ) + if( RANDOM_FLOAT( 0.0f, 1.0f ) < 0.5f ) { UTIL_DecalTrace( &tr, DECAL_SCORCH1 ); } @@ -217,7 +217,7 @@ void CEnvExplosion::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE } SetThink( &CEnvExplosion::Smoke ); - pev->nextthink = gpGlobals->time + 0.3; + pev->nextthink = gpGlobals->time + 0.3f; // draw sparks if( !( pev->spawnflags & SF_ENVEXPLOSION_NOSPARKS ) ) diff --git a/dlls/extdll.h b/dlls/extdll.h index 4610db5..eb8c37e 100644 --- a/dlls/extdll.h +++ b/dlls/extdll.h @@ -51,19 +51,26 @@ #ifndef TRUE #define TRUE (!FALSE) #endif +#include +#include typedef unsigned int ULONG; typedef unsigned char BYTE; typedef int BOOL; #define MAX_PATH PATH_MAX -#include -#include +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif #endif //_WIN32 // Misc C-runtime library headers -#include "stdio.h" -#include "stdlib.h" -#include "stddef.h" -#include "math.h" +#include +#include +#include +#include + +#ifndef M_PI_F +#define M_PI_F (float)M_PI +#endif #if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) #define XASH_64BIT diff --git a/dlls/func_break.cpp b/dlls/func_break.cpp index 0cc3675..98432d0 100644 --- a/dlls/func_break.cpp +++ b/dlls/func_break.cpp @@ -271,7 +271,7 @@ void CBreakable::MaterialSoundRandom( edict_t *pEdict, Materials soundMaterial, pSoundList = MaterialSoundList( soundMaterial, soundCount ); if( soundCount ) - EMIT_SOUND( pEdict, CHAN_BODY, pSoundList[RANDOM_LONG( 0, soundCount - 1 )], volume, 1.0 ); + EMIT_SOUND( pEdict, CHAN_BODY, pSoundList[RANDOM_LONG( 0, soundCount - 1 )], volume, 1.0f ); } void CBreakable::Precache( void ) @@ -432,7 +432,7 @@ void CBreakable::BreakTouch( CBaseEntity *pOther ) if( FBitSet( pev->spawnflags, SF_BREAK_TOUCH ) ) { // can be broken when run into - flDamage = pevToucher->velocity.Length() * 0.01; + flDamage = pevToucher->velocity.Length() * 0.01f; if( flDamage >= pev->health ) { @@ -453,10 +453,10 @@ void CBreakable::BreakTouch( CBaseEntity *pOther ) SetThink( &CBreakable::Die ); SetTouch( NULL ); - if( m_flDelay == 0 ) + if( m_flDelay == 0.0f ) { // !!!BUGBUG - why doesn't zero delay work? - m_flDelay = 0.1; + m_flDelay = 0.1f; } pev->nextthink = pev->ltime + m_flDelay; @@ -491,7 +491,7 @@ void CBreakable::TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vec { UTIL_Sparks( ptr->vecEndPos ); - float flVolume = RANDOM_FLOAT( 0.7 , 1.0 );//random volume range + float flVolume = RANDOM_FLOAT( 0.7f, 1.0f );//random volume range switch( RANDOM_LONG( 0, 1 ) ) { case 0: @@ -504,7 +504,7 @@ void CBreakable::TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vec } break; case matUnbreakableGlass: - UTIL_Ricochet( ptr->vecEndPos, RANDOM_FLOAT( 0.5, 1.5 ) ); + UTIL_Ricochet( ptr->vecEndPos, RANDOM_FLOAT( 0.5f, 1.5f ) ); break; default: break; @@ -527,7 +527,7 @@ int CBreakable::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, flo // (that is, no actual entity projectile was involved in the attack so use the shooter's origin). if( pevAttacker == pevInflictor ) { - vecTemp = pevInflictor->origin - ( pev->absmin + ( pev->size * 0.5 ) ); + vecTemp = pevInflictor->origin - ( pev->absmin + ( pev->size * 0.5f ) ); // if a client hit the breakable with a crowbar, and breakable is crowbar-sensitive, break it now. if( FBitSet ( pevAttacker->flags, FL_CLIENT ) && @@ -537,7 +537,7 @@ int CBreakable::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, flo else // an actual missile was involved. { - vecTemp = pevInflictor->origin - ( pev->absmin + ( pev->size * 0.5 ) ); + vecTemp = pevInflictor->origin - ( pev->absmin + ( pev->size * 0.5f ) ); } if( !IsBreakable() ) @@ -545,11 +545,11 @@ int CBreakable::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, flo // Breakables take double damage from the crowbar if( bitsDamageType & DMG_CLUB ) - flDamage *= 2; + flDamage *= 2.0f; // Boxes / glass / etc. don't take much poison damage, just the impact of the dart - consider that 10% if( bitsDamageType & DMG_POISON ) - flDamage *= 0.1; + flDamage *= 0.1f; // this global is still used for glass and other non-monster killables, along with decals. g_vecAttackDir = vecTemp.Normalize(); @@ -586,10 +586,10 @@ void CBreakable::Die( void ) // The more negative pev->health, the louder // the sound should be. - fvol = RANDOM_FLOAT( 0.85, 1.0 ) + ( fabs( pev->health ) / 100.0 ); + fvol = RANDOM_FLOAT( 0.85f, 1.0 ) + ( fabs( pev->health ) / 100.0f ); - if( fvol > 1.0 ) - fvol = 1.0; + if( fvol > 1.0f ) + fvol = 1.0f; switch( m_Material ) { @@ -667,7 +667,7 @@ void CBreakable::Die( void ) } if( m_Explosion == expDirected ) - vecVelocity = g_vecAttackDir * 200; + vecVelocity = g_vecAttackDir * 200.0f; else { vecVelocity.x = 0; @@ -675,7 +675,7 @@ void CBreakable::Die( void ) vecVelocity.z = 0; } - vecSpot = pev->origin + ( pev->mins + pev->maxs ) * 0.5; + vecSpot = pev->origin + ( pev->mins + pev->maxs ) * 0.5f; MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, vecSpot ); WRITE_BYTE( TE_BREAKMODEL ); @@ -710,11 +710,11 @@ void CBreakable::Die( void ) WRITE_BYTE( cFlag ); MESSAGE_END(); - float size = pev->size.x; + /*float size = pev->size.x; if( size < pev->size.y ) size = pev->size.y; if( size < pev->size.z ) - size = pev->size.z; + size = pev->size.z;*/ // !!! HACK This should work! // Build a box above the entity that looks like an 8 pixel high sheet @@ -744,7 +744,7 @@ void CBreakable::Die( void ) SUB_UseTargets( NULL, USE_TOGGLE, 0 ); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; if( m_iszSpawnObject ) CBaseEntity::Create( STRING( m_iszSpawnObject ), VecBModelOrigin( pev ), pev->angles, edict() ); @@ -838,7 +838,7 @@ void CPushable::Spawn( void ) UTIL_SetOrigin( pev, pev->origin ); // Multiply by area of the box's cross-section (assume 1000 units^3 standard volume) - pev->skin = (int)( ( pev->skin * ( pev->maxs.x - pev->mins.x ) * ( pev->maxs.y - pev->mins.y ) ) * 0.0005 ); + pev->skin = (int)( ( pev->skin * ( pev->maxs.x - pev->mins.x ) * ( pev->maxs.y - pev->mins.y ) ) * 0.0005f ); m_soundTime = 0; } @@ -862,11 +862,11 @@ void CPushable::KeyValue( KeyValueData *pkvd ) { case 0: // Point - UTIL_SetSize( pev, Vector( -8, -8, -8 ), Vector( 8, 8, 8 ) ); + UTIL_SetSize( pev, Vector( -8.0f, -8.0f, -8.0f ), Vector( 8.0f, 8.0f, 8.0f ) ); break; case 2: // Big Hull!?!? !!!BUGBUG Figure out what this hull really is - UTIL_SetSize( pev, VEC_DUCK_HULL_MIN*2, VEC_DUCK_HULL_MAX * 2 ); + UTIL_SetSize( pev, VEC_DUCK_HULL_MIN * 2.0f, VEC_DUCK_HULL_MAX * 2.0f ); break; case 3: // Player duck @@ -920,7 +920,7 @@ void CPushable::Move( CBaseEntity *pOther, int push ) { // Only push if floating if( pev->waterlevel > 0 ) - pev->velocity.z += pevToucher->velocity.z * 0.1; + pev->velocity.z += pevToucher->velocity.z * 0.1f; return; } @@ -943,13 +943,13 @@ void CPushable::Move( CBaseEntity *pOther, int push ) if( pev->waterlevel < 1 ) return; else - factor = 0.1; + factor = 0.1f; } else - factor = 1; + factor = 1.0f; } else - factor = 0.25; + factor = 0.25f; pev->velocity.x += pevToucher->velocity.x * factor; pev->velocity.y += pevToucher->velocity.y * factor; @@ -964,15 +964,15 @@ void CPushable::Move( CBaseEntity *pOther, int push ) { pevToucher->velocity.x = pev->velocity.x; pevToucher->velocity.y = pev->velocity.y; - if( ( gpGlobals->time - m_soundTime ) > 0.7 ) + if( ( gpGlobals->time - m_soundTime ) > 0.7f ) { m_soundTime = gpGlobals->time; if( length > 0 && FBitSet( pev->flags,FL_ONGROUND ) ) { m_lastSound = RANDOM_LONG( 0, 2 ); - EMIT_SOUND( ENT( pev ), CHAN_WEAPON, m_soundNames[m_lastSound], 0.5, ATTN_NORM ); + EMIT_SOUND( ENT( pev ), CHAN_WEAPON, m_soundNames[m_lastSound], 0.5f, ATTN_NORM ); //SetThink( &StopSound ); - //pev->nextthink = pev->ltime + 0.1; + //pev->nextthink = pev->ltime + 0.1f; } else STOP_SOUND( ENT( pev ), CHAN_WEAPON, m_soundNames[m_lastSound] ); diff --git a/dlls/func_tank.cpp b/dlls/func_tank.cpp index a3dba84..fd6ff1e 100644 --- a/dlls/func_tank.cpp +++ b/dlls/func_tank.cpp @@ -66,7 +66,7 @@ class CFuncTank : public CBaseEntity virtual int ObjectCaps( void ) { return CBaseEntity :: ObjectCaps() & ~FCAP_ACROSS_TRANSITION; } inline BOOL IsActive( void ) { return (pev->spawnflags & SF_TANK_ACTIVE)?TRUE:FALSE; } - inline void TankActivate( void ) { pev->spawnflags |= SF_TANK_ACTIVE; pev->nextthink = pev->ltime + 0.1; m_fireLast = 0; } + inline void TankActivate( void ) { pev->spawnflags |= SF_TANK_ACTIVE; pev->nextthink = pev->ltime + 0.1f; m_fireLast = 0; } inline void TankDeactivate( void ) { pev->spawnflags &= ~SF_TANK_ACTIVE; m_fireLast = 0; StopRotSound(); } inline BOOL CanFire( void ) { return (gpGlobals->time - m_lastSightTime) < m_persist; } BOOL InRange( float range ); @@ -185,7 +185,7 @@ void CFuncTank::Spawn( void ) m_pitchCenter = pev->angles.x; if( IsActive() ) - pev->nextthink = pev->ltime + 1.0; + pev->nextthink = pev->ltime + 1.0f; m_sightOrigin = BarrelPosition(); // Point at the end of the barrel @@ -363,7 +363,7 @@ BOOL CFuncTank::StartControl( CBasePlayer *pController ) m_pController->m_iHideHUD |= HIDEHUD_WEAPONS; m_vecControllerUsePos = m_pController->pev->origin; - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; return TRUE; } @@ -389,7 +389,7 @@ void CFuncTank::StopControl() m_pController = NULL; if( IsActive() ) - pev->nextthink = pev->ltime + 1.0; + pev->nextthink = pev->ltime + 1.0f; } // Called each frame by the player's ItemPostFrame @@ -405,7 +405,7 @@ void CFuncTank::ControllerPostFrame( void ) Vector vecForward; UTIL_MakeVectorsPrivate( pev->angles, vecForward, NULL, NULL ); - m_fireLast = gpGlobals->time - ( 1 / m_fireRate ) - 0.01; // to make sure the gun doesn't fire too many bullets + m_fireLast = gpGlobals->time - ( 1.0f / m_fireRate ) - 0.01f; // to make sure the gun doesn't fire too many bullets Fire( BarrelPosition(), vecForward, m_pController->pev ); @@ -413,7 +413,7 @@ void CFuncTank::ControllerPostFrame( void ) if( m_pController && m_pController->IsPlayer() ) ( (CBasePlayer *)m_pController )->m_iWeaponVolume = LOUD_GUN_VOLUME; - m_flNextAttack = gpGlobals->time + ( 1 / m_fireRate ); + m_flNextAttack = gpGlobals->time + ( 1.0f / m_fireRate ); } } ////////////// END NEW STUFF ////////////// @@ -491,19 +491,19 @@ void CFuncTank::TrackTarget( void ) // Tanks attempt to mirror the player's angles angles = m_pController->pev->v_angle; angles[0] = 0 - angles[0]; - pev->nextthink = pev->ltime + 0.05; + pev->nextthink = pev->ltime + 0.05f; } else { if( IsActive() ) - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; else return; if( FNullEnt( pPlayer ) ) { if( IsActive() ) - pev->nextthink = pev->ltime + 2; // Wait 2 secs + pev->nextthink = pev->ltime + 2.0f; // Wait 2 secs return; } pTarget = FindTarget( pPlayer ); @@ -520,7 +520,7 @@ void CFuncTank::TrackTarget( void ) UTIL_TraceLine( barrelEnd, targetPosition, dont_ignore_monsters, edict(), &tr ); - if( tr.flFraction == 1.0 || tr.pHit == pTarget ) + if( tr.flFraction == 1.0f || tr.pHit == pTarget ) { CBaseEntity *pInstance = CBaseEntity::Instance(pTarget); if( InRange( range ) && pInstance && pInstance->IsAlive() ) @@ -626,12 +626,12 @@ void CFuncTank::AdjustAnglesForBarrel( Vector &angles, float distance ) if( m_barrelPos.y ) { r2 = m_barrelPos.y * m_barrelPos.y; - angles.y += ( 180.0 / M_PI ) * atan2( m_barrelPos.y, sqrt( d2 - r2 ) ); + angles.y += ( 180.0f / M_PI_F ) * atan2( m_barrelPos.y, sqrt( d2 - r2 ) ); } if( m_barrelPos.z ) { r2 = m_barrelPos.z * m_barrelPos.z; - angles.x += ( 180.0 / M_PI ) * atan2( -m_barrelPos.z, sqrt( d2 - r2 ) ); + angles.x += ( 180.0f / M_PI_F ) * atan2( -m_barrelPos.z, sqrt( d2 - r2 ) ); } } } @@ -644,9 +644,9 @@ void CFuncTank::Fire( const Vector &barrelEnd, const Vector &forward, entvars_t if( m_iszSpriteSmoke ) { CSprite *pSprite = CSprite::SpriteCreate( STRING( m_iszSpriteSmoke ), barrelEnd, TRUE ); - pSprite->AnimateAndDie( RANDOM_FLOAT( 15.0, 20.0 ) ); + pSprite->AnimateAndDie( RANDOM_FLOAT( 15.0f, 20.0f ) ); pSprite->SetTransparency( kRenderTransAlpha, (int)pev->rendercolor.x, (int)pev->rendercolor.y, (int)pev->rendercolor.z, 255, kRenderFxNone ); - pSprite->pev->velocity.z = RANDOM_FLOAT( 40, 80 ); + pSprite->pev->velocity.z = RANDOM_FLOAT( 40.0f, 80.0f ); pSprite->SetScale( m_spriteScale ); } if( m_iszSpriteFlash ) @@ -657,7 +657,7 @@ void CFuncTank::Fire( const Vector &barrelEnd, const Vector &forward, entvars_t pSprite->SetScale( m_spriteScale ); // Hack Hack, make it stick around for at least 100 ms. - pSprite->pev->nextthink += 0.1; + pSprite->pev->nextthink += 0.1f; } SUB_UseTargets( this, USE_TOGGLE, 0 ); } @@ -670,8 +670,8 @@ void CFuncTank::TankTrace( const Vector &vecStart, const Vector &vecForward, con float x, y, z; do { - x = RANDOM_FLOAT( -0.5, 0.5 ) + RANDOM_FLOAT( -0.5, 0.5 ); - y = RANDOM_FLOAT( -0.5, 0.5 ) + RANDOM_FLOAT( -0.5, 0.5 ); + x = RANDOM_FLOAT( -0.5f, 0.5f ) + RANDOM_FLOAT( -0.5f, 0.5f ); + y = RANDOM_FLOAT( -0.5f, 0.5f ) + RANDOM_FLOAT( -0.5f, 0.5f ); z = x * x + y * y; } while( z > 1 ); Vector vecDir = vecForward + @@ -847,7 +847,7 @@ void CFuncTankLaser::Fire( const Vector &barrelEnd, const Vector &forward, entva m_laserTime = gpGlobals->time; m_pLaser->TurnOn(); - m_pLaser->pev->dmgtime = gpGlobals->time - 1.0; + m_pLaser->pev->dmgtime = gpGlobals->time - 1.0f; m_pLaser->FireAtPoint( tr ); m_pLaser->pev->nextthink = 0; } @@ -1014,7 +1014,7 @@ void CFuncTankControls::Spawn( void ) UTIL_SetSize( pev, pev->mins, pev->maxs ); UTIL_SetOrigin( pev, pev->origin ); - pev->nextthink = gpGlobals->time + 0.3; // After all the func_tank's have spawned + pev->nextthink = gpGlobals->time + 0.3f; // After all the func_tank's have spawned CBaseEntity::Spawn(); } diff --git a/dlls/gamerules.cpp b/dlls/gamerules.cpp index a41267d..5f6d4ed 100644 --- a/dlls/gamerules.cpp +++ b/dlls/gamerules.cpp @@ -189,6 +189,11 @@ void CGameRules::RefreshSkillData ( void ) gSkillData.plrArm = 1.0f; } +void CGameRules::ClientUserInfoChanged( CBasePlayer *pPlayer, char *infobuffer ) +{ + pPlayer->SetPrefsFromUserinfo( infobuffer ); +} + //========================================================= // instantiate the proper game rules object //========================================================= diff --git a/dlls/gamerules.h b/dlls/gamerules.h index 04c6eea..22c73a4 100644 --- a/dlls/gamerules.h +++ b/dlls/gamerules.h @@ -98,7 +98,7 @@ class CGameRules virtual BOOL AllowAutoTargetCrosshair( void ) { return TRUE; }; virtual BOOL ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) { return FALSE; }; // handles the user commands; returns TRUE if command handled properly - virtual void ClientUserInfoChanged( CBasePlayer *pPlayer, char *infobuffer ) {} // the player has changed userinfo; can change it now + virtual void ClientUserInfoChanged( CBasePlayer *pPlayer, char *infobuffer ); // the player has changed userinfo; can change it now // Client kills/scoring virtual int IPointsForKill( CBasePlayer *pAttacker, CBasePlayer *pKilled ) = 0;// how many points do I award whoever kills this player? diff --git a/dlls/ggrenade.cpp b/dlls/ggrenade.cpp index 0ca516c..60b658b 100644 --- a/dlls/ggrenade.cpp +++ b/dlls/ggrenade.cpp @@ -57,9 +57,9 @@ void CGrenade::Explode( TraceResult *pTrace, int bitsDamageType ) pev->takedamage = DAMAGE_NO; // Pull out of the wall a bit - if( pTrace->flFraction != 1.0 ) + if( pTrace->flFraction != 1.0f ) { - pev->origin = pTrace->vecEndPos + ( pTrace->vecPlaneNormal * ( pev->dmg - 24 ) * 0.6 ); + pev->origin = pTrace->vecEndPos + ( pTrace->vecPlaneNormal * ( pev->dmg - 24 ) * 0.6f ); } int iContents = UTIL_PointContents( pev->origin ); @@ -77,7 +77,7 @@ void CGrenade::Explode( TraceResult *pTrace, int bitsDamageType ) { WRITE_SHORT( g_sModelIndexWExplosion ); } - WRITE_BYTE( ( pev->dmg - 50 ) * .60 ); // scale * 10 + WRITE_BYTE( ( pev->dmg - 50 ) * 0.6f ); // scale * 10 WRITE_BYTE( 15 ); // framerate WRITE_BYTE( TE_EXPLFLAG_NONE ); MESSAGE_END(); @@ -93,7 +93,7 @@ void CGrenade::Explode( TraceResult *pTrace, int bitsDamageType ) RadiusDamage( pev, pevOwner, pev->dmg, CLASS_NONE, bitsDamageType ); - if( RANDOM_FLOAT( 0, 1 ) < 0.5 ) + if( RANDOM_FLOAT( 0, 1 ) < 0.5f ) { UTIL_DecalTrace( pTrace, DECAL_SCORCH1 ); } @@ -120,7 +120,7 @@ void CGrenade::Explode( TraceResult *pTrace, int bitsDamageType ) pev->effects |= EF_NODRAW; SetThink( &CGrenade::Smoke ); pev->velocity = g_vecZero; - pev->nextthink = gpGlobals->time + 0.3; + pev->nextthink = gpGlobals->time + 0.3f; if( iContents != CONTENTS_WATER ) { @@ -144,7 +144,7 @@ void CGrenade::Smoke( void ) WRITE_COORD( pev->origin.y ); WRITE_COORD( pev->origin.z ); WRITE_SHORT( g_sModelIndexSmoke ); - WRITE_BYTE( (int)( ( pev->dmg - 50 ) * 0.80 ) ); // scale * 10 + WRITE_BYTE( (int)( ( pev->dmg - 50 ) * 0.8f ) ); // scale * 10 WRITE_BYTE( 12 ); // framerate MESSAGE_END(); } @@ -207,12 +207,12 @@ void CGrenade::DangerSoundThink( void ) return; } - CSoundEnt::InsertSound( bits_SOUND_DANGER, pev->origin + pev->velocity * 0.5, (int)pev->velocity.Length(), 0.2 ); - pev->nextthink = gpGlobals->time + 0.2; + CSoundEnt::InsertSound( bits_SOUND_DANGER, pev->origin + pev->velocity * 0.5f, (int)pev->velocity.Length(), 0.2 ); + pev->nextthink = gpGlobals->time + 0.2f; if( pev->waterlevel != 0 ) { - pev->velocity = pev->velocity * 0.5; + pev->velocity = pev->velocity * 0.5f; } } @@ -233,7 +233,7 @@ void CGrenade::BounceTouch( CBaseEntity *pOther ) pOther->TraceAttack( pevOwner, 1, gpGlobals->v_forward, &tr, DMG_CLUB ); ApplyMultiDamage( pev, pevOwner ); } - m_flNextAttack = gpGlobals->time + 1.0; // debounce + m_flNextAttack = gpGlobals->time + 1.0f; // debounce } Vector vecTestVelocity; @@ -243,7 +243,7 @@ void CGrenade::BounceTouch( CBaseEntity *pOther ) // or thrown very far tend to slow down too quickly for me to always catch just by testing velocity. // trimming the Z velocity a bit seems to help quite a bit. vecTestVelocity = pev->velocity; - vecTestVelocity.z *= 0.45; + vecTestVelocity.z *= 0.45f; if( !m_fRegisteredSound && vecTestVelocity.Length() <= 60 ) { @@ -253,14 +253,14 @@ void CGrenade::BounceTouch( CBaseEntity *pOther ) // go ahead and emit the danger sound. // register a radius louder than the explosion, so we make sure everyone gets out of the way - CSoundEnt::InsertSound( bits_SOUND_DANGER, pev->origin, (int)( pev->dmg / 0.4 ), 0.3 ); + CSoundEnt::InsertSound( bits_SOUND_DANGER, pev->origin, (int)( pev->dmg / 0.4f ), 0.3f ); m_fRegisteredSound = TRUE; } if( pev->flags & FL_ONGROUND ) { // add a bit of static friction - pev->velocity = pev->velocity * 0.8; + pev->velocity = pev->velocity * 0.8f; pev->sequence = RANDOM_LONG( 1, 1 ); } @@ -269,11 +269,11 @@ void CGrenade::BounceTouch( CBaseEntity *pOther ) // play bounce sound BounceSound(); } - pev->framerate = pev->velocity.Length() / 200.0; - if( pev->framerate > 1.0 ) - pev->framerate = 1; - else if( pev->framerate < 0.5 ) - pev->framerate = 0; + pev->framerate = pev->velocity.Length() / 200.0f; + if( pev->framerate > 1.0f ) + pev->framerate = 1.0f; + else if( pev->framerate < 0.5f ) + pev->framerate = 0.0f; } void CGrenade::SlideTouch( CBaseEntity *pOther ) @@ -286,7 +286,7 @@ void CGrenade::SlideTouch( CBaseEntity *pOther ) if( pev->flags & FL_ONGROUND ) { // add a bit of static friction - pev->velocity = pev->velocity * 0.95; + pev->velocity = pev->velocity * 0.95f; if( pev->velocity.x != 0 || pev->velocity.y != 0 ) { @@ -324,7 +324,7 @@ void CGrenade::TumbleThink( void ) } StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( pev->dmgtime - 1 < gpGlobals->time ) { @@ -337,8 +337,8 @@ void CGrenade::TumbleThink( void ) } if( pev->waterlevel != 0 ) { - pev->velocity = pev->velocity * 0.5; - pev->framerate = 0.2; + pev->velocity = pev->velocity * 0.5f; + pev->framerate = 0.2f; } } @@ -399,21 +399,21 @@ CGrenade *CGrenade::ShootTimed( entvars_t *pevOwner, Vector vecStart, Vector vec pGrenade->pev->dmgtime = gpGlobals->time + time; pGrenade->SetThink( &CGrenade::TumbleThink ); - pGrenade->pev->nextthink = gpGlobals->time + 0.1; - if( time < 0.1 ) + pGrenade->pev->nextthink = gpGlobals->time + 0.1f; + if( time < 0.1f ) { pGrenade->pev->nextthink = gpGlobals->time; pGrenade->pev->velocity = Vector( 0, 0, 0 ); } pGrenade->pev->sequence = RANDOM_LONG( 3, 6 ); - pGrenade->pev->framerate = 1.0; + pGrenade->pev->framerate = 1.0f; // Tumble through the air // pGrenade->pev->avelocity.x = -400; - pGrenade->pev->gravity = 0.5; - pGrenade->pev->friction = 0.8; + pGrenade->pev->gravity = 0.5f; + pGrenade->pev->friction = 0.8f; SET_MODEL( ENT( pGrenade->pev ), "models/w_grenade.mdl" ); pGrenade->pev->dmg = 100; @@ -445,7 +445,7 @@ CGrenade *CGrenade::ShootSatchelCharge( entvars_t *pevOwner, Vector vecStart, Ve pGrenade->SetTouch( &CGrenade::SlideTouch ); pGrenade->pev->spawnflags = SF_DETONATE; - pGrenade->pev->friction = 0.9; + pGrenade->pev->friction = 0.9f; return pGrenade; } diff --git a/dlls/h_ai.cpp b/dlls/h_ai.cpp index d8a3554..0cc5d30 100644 --- a/dlls/h_ai.cpp +++ b/dlls/h_ai.cpp @@ -62,7 +62,7 @@ BOOL FBoxVisible( entvars_t *pevLooker, entvars_t *pevTarget, Vector &vecTargetO UTIL_TraceLine( vecLookerOrigin, vecTarget, ignore_monsters, ignore_glass, ENT( pevLooker )/*pentIgnore*/, &tr ); - if( tr.flFraction == 1.0 ) + if( tr.flFraction == 1.0f ) { vecTargetOrigin = vecTarget; return TRUE;// line of sight is valid. @@ -120,10 +120,10 @@ Vector VecCheckToss( entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, fl float distance2 = vecMidPoint.z - vecSpot2.z; // How long will it take for the grenade to travel this distance - float time1 = sqrt( distance1 / ( 0.5 * flGravity ) ); - float time2 = sqrt( distance2 / ( 0.5 * flGravity ) ); + float time1 = sqrt( distance1 / ( 0.5f * flGravity ) ); + float time2 = sqrt( distance2 / ( 0.5f * flGravity ) ); - if( time1 < 0.1 ) + if( time1 < 0.1f ) { // too close return g_vecZero; @@ -139,7 +139,7 @@ Vector VecCheckToss( entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, fl vecApex.z = vecMidPoint.z; UTIL_TraceLine( vecSpot1, vecApex, dont_ignore_monsters, ENT( pev ), &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { // fail! return g_vecZero; @@ -147,7 +147,7 @@ Vector VecCheckToss( entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, fl // UNDONE: either ignore monsters or change it to not care if we hit our enemy UTIL_TraceLine( vecSpot2, vecApex, ignore_monsters, ENT( pev ), &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { // fail! return g_vecZero; @@ -168,24 +168,24 @@ Vector VecCheckThrow( entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, f // throw at a constant time float time = vecGrenadeVel.Length() / flSpeed; - vecGrenadeVel = vecGrenadeVel * ( 1.0 / time ); + vecGrenadeVel = vecGrenadeVel * ( 1.0f / time ); // adjust upward toss to compensate for gravity loss - vecGrenadeVel.z += flGravity * time * 0.5; + vecGrenadeVel.z += flGravity * time * 0.5f; - Vector vecApex = vecSpot1 + ( vecSpot2 - vecSpot1 ) * 0.5; - vecApex.z += 0.5 * flGravity * ( time * 0.5 ) * ( time * 0.5 ); + Vector vecApex = vecSpot1 + ( vecSpot2 - vecSpot1 ) * 0.5f; + vecApex.z += 0.5f * flGravity * ( time * 0.5f ) * ( time * 0.5f ); TraceResult tr; UTIL_TraceLine( vecSpot1, vecApex, dont_ignore_monsters, ENT( pev ), &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { // fail! return g_vecZero; } UTIL_TraceLine( vecSpot2, vecApex, ignore_monsters, ENT( pev ), &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { // fail! return g_vecZero; diff --git a/dlls/h_battery.cpp b/dlls/h_battery.cpp index 750469e..bc07610 100644 --- a/dlls/h_battery.cpp +++ b/dlls/h_battery.cpp @@ -126,13 +126,13 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use { if( m_flSoundTime <= gpGlobals->time ) { - m_flSoundTime = gpGlobals->time + 0.62; + m_flSoundTime = gpGlobals->time + 0.62f; EMIT_SOUND( ENT( pev ), CHAN_ITEM, "items/suitchargeno1.wav", 0.85, ATTN_NORM ); } return; } - pev->nextthink = pev->ltime + 0.25; + pev->nextthink = pev->ltime + 0.25f; SetThink( &CRecharge::Off ); // Time to recharge yet? @@ -146,7 +146,7 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use { m_iOn++; EMIT_SOUND( ENT( pev ), CHAN_ITEM, "items/suitchargeok1.wav", 0.85, ATTN_NORM ); - m_flSoundTime = 0.56 + gpGlobals->time; + m_flSoundTime = 0.56f + gpGlobals->time; } if( ( m_iOn == 1 ) && ( m_flSoundTime <= gpGlobals->time ) ) @@ -166,7 +166,7 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use } // govern the rate of charge - m_flNextCharge = gpGlobals->time + 0.1; + m_flNextCharge = gpGlobals->time + 0.1f; } void CRecharge::Recharge( void ) diff --git a/dlls/h_cine.cpp b/dlls/h_cine.cpp index bb07e02..55e7a63 100644 --- a/dlls/h_cine.cpp +++ b/dlls/h_cine.cpp @@ -126,7 +126,7 @@ void CLegacyCineMonster :: CineSpawn( const char *szModel ) if ( FStringNull(pev->targetname) ) { SetThink( &CLegacyCineMonster::CineThink ); - pev->nextthink += 1.0; + pev->nextthink += 1.0f; } } @@ -167,7 +167,7 @@ void CLegacyCineMonster :: CineThink( void ) if (!pev->animtime) ResetSequenceInfo( ); - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; if (pev->spawnflags != 0 && m_fSequenceFinished) { @@ -196,14 +196,14 @@ void CCineBlood :: BloodGush ( void ) { Vector vecSplatDir; TraceResult tr; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; - UTIL_MakeVectors(pev->angles); - if ( pev->health-- < 0 ) - REMOVE_ENTITY(ENT(pev)); + UTIL_MakeVectors( pev->angles ); + if( pev->health-- < 0 ) + REMOVE_ENTITY( ENT( pev ) ); // CHANGE_METHOD ( ENT(pev), em_think, SUB_Remove ); - if ( RANDOM_FLOAT ( 0 , 1 ) < 0.7 )// larger chance of globs + if ( RANDOM_FLOAT ( 0.0f, 1.0f ) < 0.7f )// larger chance of globs { UTIL_BloodDrips( pev->origin, UTIL_RandomBloodVector(), BLOOD_COLOR_RED, 10 ); } @@ -212,13 +212,13 @@ void CCineBlood :: BloodGush ( void ) UTIL_BloodStream( pev->origin, UTIL_RandomBloodVector(), BLOOD_COLOR_RED, RANDOM_LONG(50, 150) ); } - if ( RANDOM_FLOAT ( 0, 1 ) < 0.75 ) + if ( RANDOM_FLOAT ( 0, 1 ) < 0.75f ) { // decals the floor with blood. vecSplatDir = Vector ( 0 , 0 , -1 ); - vecSplatDir = vecSplatDir + (RANDOM_FLOAT(-1,1) * 0.6 * gpGlobals->v_right) + (RANDOM_FLOAT(-1,1) * 0.6 * gpGlobals->v_forward);// randomize a bit + vecSplatDir = vecSplatDir + (RANDOM_FLOAT(-1,1) * 0.6f * gpGlobals->v_right) + (RANDOM_FLOAT(-1,1) * 0.6f * gpGlobals->v_forward);// randomize a bit UTIL_TraceLine( pev->origin + Vector ( 0, 0 , 64) , pev->origin + vecSplatDir * 256, ignore_monsters, ENT(pev), &tr); - if ( tr.flFraction != 1.0 ) + if ( tr.flFraction != 1.0f ) { // Decal with a bloodsplat UTIL_BloodDecalTrace( &tr, BLOOD_COLOR_RED ); diff --git a/dlls/h_cycler.cpp b/dlls/h_cycler.cpp index 5daad4a..1c5a915 100644 --- a/dlls/h_cycler.cpp +++ b/dlls/h_cycler.cpp @@ -96,7 +96,7 @@ void CCycler::GenericCyclerSpawn( const char *szModel, Vector vecMin, Vector vec { if( !szModel || !*szModel ) { - ALERT( at_error, "cycler at %.0f %.0f %0.f missing modelname", pev->origin.x, pev->origin.y, pev->origin.z ); + ALERT( at_error, "cycler at %.0f %.0f %0.f missing modelname", (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z ); REMOVE_ENTITY( ENT( pev ) ); return; } @@ -125,7 +125,7 @@ void CCycler::Spawn() m_flFrameRate = 75; m_flGroundSpeed = 0; - pev->nextthink += 1.0; + pev->nextthink += 1.0f; ResetSequenceInfo(); @@ -145,7 +145,7 @@ void CCycler::Spawn() // void CCycler::Think( void ) { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( m_animate ) { @@ -161,7 +161,7 @@ void CCycler::Think( void ) m_flLastEventCheck = gpGlobals->time; pev->frame = 0; if( !m_animate ) - pev->framerate = 0.0; // FIX: don't reset framerate + pev->framerate = 0.0f; // FIX: don't reset framerate } } @@ -172,9 +172,9 @@ void CCycler::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useTy { m_animate = !m_animate; if( m_animate ) - pev->framerate = 1.0; + pev->framerate = 1.0f; else - pev->framerate = 0.0; + pev->framerate = 0.0f; } // @@ -189,7 +189,7 @@ int CCycler::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float ResetSequenceInfo(); - if( m_flFrameRate == 0.0 ) + if( m_flFrameRate == 0.0f ) { pev->sequence = 0; ResetSequenceInfo(); @@ -198,10 +198,10 @@ int CCycler::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float } else { - pev->framerate = 1.0; - StudioFrameAdvance( 0.1 ); + pev->framerate = 1.0f; + StudioFrameAdvance( 0.1f ); pev->framerate = 0; - ALERT( at_console, "sequence: %d, frame %.0f\n", pev->sequence, pev->frame ); + ALERT( at_console, "sequence: %d, frame %.0f\n", pev->sequence, (double)pev->frame ); } return 0; @@ -224,7 +224,7 @@ class CCyclerSprite : public CBaseEntity inline int ShouldAnimate( void ) { - return m_animate && m_maxFrame > 1.0; + return m_animate && m_maxFrame > 1.0f; } int m_animate; @@ -251,7 +251,7 @@ void CCyclerSprite::Spawn( void ) pev->effects = 0; pev->frame = 0; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; m_animate = 1; m_lastTime = gpGlobals->time; @@ -266,7 +266,7 @@ void CCyclerSprite::Think( void ) if( ShouldAnimate() ) Animate( pev->framerate * ( gpGlobals->time - m_lastTime ) ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; m_lastTime = gpGlobals->time; } @@ -278,9 +278,9 @@ void CCyclerSprite::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE int CCyclerSprite::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ) { - if( m_maxFrame > 1.0 ) + if( m_maxFrame > 1.0f ) { - Animate( 1.0 ); + Animate( 1.0f ); } return 1; } @@ -327,7 +327,7 @@ void CWeaponCycler::Spawn() BOOL CWeaponCycler::Deploy() { m_pPlayer->pev->viewmodel = m_iszModel; - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.0; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.0f; SendWeaponAnim( 0 ); m_iClip = 0; return TRUE; @@ -335,14 +335,14 @@ BOOL CWeaponCycler::Deploy() void CWeaponCycler::Holster( int skiplocal /* = 0 */ ) { - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; } void CWeaponCycler::PrimaryAttack() { SendWeaponAnim( pev->sequence ); - m_flNextPrimaryAttack = gpGlobals->time + 0.3; + m_flNextPrimaryAttack = gpGlobals->time + 0.3f; } void CWeaponCycler::SecondaryAttack( void ) @@ -356,14 +356,14 @@ void CWeaponCycler::SecondaryAttack( void ) GetSequenceInfo( pmodel, pev, &flFrameRate, &flGroundSpeed ); pev->modelindex = 0; - if( flFrameRate == 0.0 ) + if( flFrameRate == 0.0f ) { pev->sequence = 0; } SendWeaponAnim( pev->sequence ); - m_flNextSecondaryAttack = gpGlobals->time + 0.3; + m_flNextSecondaryAttack = gpGlobals->time + 0.3f; } // Flaming Wreakage @@ -397,7 +397,7 @@ void CWreckage::Spawn( void ) pev->effects = 0; pev->frame = 0; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( pev->model ) { @@ -418,7 +418,7 @@ void CWreckage::Precache() void CWreckage::Think( void ) { StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.2; + pev->nextthink = gpGlobals->time + 0.2f; if( pev->dmgtime ) { diff --git a/dlls/handgrenade.cpp b/dlls/handgrenade.cpp index c2bbd7f..4d86670 100644 --- a/dlls/handgrenade.cpp +++ b/dlls/handgrenade.cpp @@ -89,7 +89,7 @@ BOOL CHandGrenade::CanHolster( void ) void CHandGrenade::Holster( int skiplocal /* = 0 */ ) { - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; if( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] ) { @@ -104,11 +104,11 @@ void CHandGrenade::Holster( int skiplocal /* = 0 */ ) if( m_flStartThrow ) { - m_flStartThrow = 0; - m_flReleaseThrow = 0; + m_flStartThrow = 0.0f; + m_flReleaseThrow = 0.0f; } - EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_WEAPON, "common/null.wav", 1.0, ATTN_NORM ); + EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_WEAPON, "common/null.wav", 1.0f, ATTN_NORM ); } void CHandGrenade::PrimaryAttack() @@ -116,16 +116,16 @@ void CHandGrenade::PrimaryAttack() if( !m_flStartThrow && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] > 0 ) { m_flStartThrow = gpGlobals->time; - m_flReleaseThrow = 0; + m_flReleaseThrow = 0.0f; SendWeaponAnim( HANDGRENADE_PINPULL ); - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5f; } } void CHandGrenade::WeaponIdle( void ) { - if( m_flReleaseThrow == 0 && m_flStartThrow ) + if( m_flReleaseThrow == 0.0f && m_flStartThrow ) m_flReleaseThrow = gpGlobals->time; if( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() ) @@ -135,33 +135,33 @@ void CHandGrenade::WeaponIdle( void ) { Vector angThrow = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle; - if( angThrow.x < 0 ) - angThrow.x = -10 + angThrow.x * ( ( 90 - 10 ) / 90.0 ); + if( angThrow.x < 0.0f ) + angThrow.x = -10.0f + angThrow.x * ( ( 90.0f - 10.0f ) / 90.0f ); else - angThrow.x = -10 + angThrow.x * ( ( 90 + 10 ) / 90.0 ); + angThrow.x = -10.0f + angThrow.x * ( ( 90.0f + 10.0f ) / 90.0f ); - float flVel = ( 90 - angThrow.x ) * 4; - if( flVel > 500 ) - flVel = 500; + float flVel = ( 90.0f - angThrow.x ) * 4.0f; + if( flVel > 500.0f ) + flVel = 500.0f; UTIL_MakeVectors( angThrow ); - Vector vecSrc = m_pPlayer->pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_forward * 16; + Vector vecSrc = m_pPlayer->pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_forward * 16.0f; Vector vecThrow = gpGlobals->v_forward * flVel + m_pPlayer->pev->velocity; // alway explode 3 seconds after the pin was pulled - float time = m_flStartThrow - gpGlobals->time + 3.0; - if( time < 0 ) - time = 0; + float time = m_flStartThrow - gpGlobals->time + 3.0f; + if( time < 0.0f ) + time = 0.0f; CGrenade::ShootTimed( m_pPlayer->pev, vecSrc, vecThrow, time ); - if( flVel < 500 ) + if( flVel < 500.0f ) { SendWeaponAnim( HANDGRENADE_THROW1 ); } - else if( flVel < 1000 ) + else if( flVel < 1000.0f ) { SendWeaponAnim( HANDGRENADE_THROW2 ); } @@ -173,10 +173,10 @@ void CHandGrenade::WeaponIdle( void ) // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); - m_flReleaseThrow = 0; - m_flStartThrow = 0; - m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 ); - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5; + m_flReleaseThrow = 0.0f; + m_flStartThrow = 0.0f; + m_flNextPrimaryAttack = GetNextAttackDelay( 0.5f ); + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5f; m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--; @@ -185,14 +185,14 @@ void CHandGrenade::WeaponIdle( void ) // just threw last grenade // set attack times in the future, and weapon idle in the future so we can see the whole throw // animation, weapon idle will automatically retire the weapon for us. - m_flTimeWeaponIdle = m_flNextSecondaryAttack = m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 );// ensure that the animation can finish playing + m_flTimeWeaponIdle = m_flNextSecondaryAttack = m_flNextPrimaryAttack = GetNextAttackDelay( 0.5f );// ensure that the animation can finish playing } return; } - else if( m_flReleaseThrow > 0 ) + else if( m_flReleaseThrow > 0.0f ) { // we've finished the throw, restart. - m_flStartThrow = 0; + m_flStartThrow = 0.0f; if( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] ) { @@ -204,24 +204,24 @@ void CHandGrenade::WeaponIdle( void ) return; } - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); - m_flReleaseThrow = -1; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10.0f, 15.0f ); + m_flReleaseThrow = -1.0f; return; } if( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] ) { int iAnim; - float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 ); - if( flRand <= 0.75 ) + float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0.0f, 1.0f ); + if( flRand <= 0.75f ) { iAnim = HANDGRENADE_IDLE; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );// how long till we do this again. + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10.0f, 15.0f );// how long till we do this again. } else { iAnim = HANDGRENADE_FIDGET; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 75.0 / 30.0; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 75.0f / 30.0f; } SendWeaponAnim( iAnim ); diff --git a/dlls/healthkit.cpp b/dlls/healthkit.cpp index 9465be7..acbd2c1 100644 --- a/dlls/healthkit.cpp +++ b/dlls/healthkit.cpp @@ -192,13 +192,13 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u { if( m_flSoundTime <= gpGlobals->time ) { - m_flSoundTime = gpGlobals->time + 0.62; + m_flSoundTime = gpGlobals->time + 0.62f; EMIT_SOUND( ENT( pev ), CHAN_ITEM, "items/medshotno1.wav", 1.0, ATTN_NORM ); } return; } - pev->nextthink = pev->ltime + 0.25; + pev->nextthink = pev->ltime + 0.25f; SetThink( &CWallHealth::Off ); // Time to recharge yet? @@ -210,7 +210,7 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u { m_iOn++; EMIT_SOUND( ENT( pev ), CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM ); - m_flSoundTime = 0.56 + gpGlobals->time; + m_flSoundTime = 0.56f + gpGlobals->time; } if( ( m_iOn == 1 ) && ( m_flSoundTime <= gpGlobals->time ) ) { @@ -225,7 +225,7 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u } // govern the rate of charge - m_flNextCharge = gpGlobals->time + 0.1; + m_flNextCharge = gpGlobals->time + 0.1f; } void CWallHealth::Recharge( void ) diff --git a/dlls/items.cpp b/dlls/items.cpp index 151daf2..260ba79 100644 --- a/dlls/items.cpp +++ b/dlls/items.cpp @@ -99,7 +99,7 @@ void CItem::Spawn( void ) if( DROP_TO_FLOOR(ENT( pev ) ) == 0 ) { - ALERT(at_error, "Item %s fell out of level at %f,%f,%f\n", STRING( pev->classname ), pev->origin.x, pev->origin.y, pev->origin.z); + ALERT(at_error, "Item %s fell out of level at %f,%f,%f\n", STRING( pev->classname ), (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z); UTIL_Remove( this ); return; } @@ -258,7 +258,7 @@ class CItemBattery : public CItem // Suit reports new power level // For some reason this wasn't working in release build -- round it. - pct = (int)( (float)( pPlayer->pev->armorvalue * 100.0 ) * ( 1.0 / MAX_NORMAL_BATTERY ) + 0.5 ); + pct = (int)( (float)( pPlayer->pev->armorvalue * 100.0f ) * ( 1.0f / MAX_NORMAL_BATTERY ) + 0.5f ); pct = ( pct / 5 ); if( pct > 0 ) pct--; diff --git a/dlls/lights.cpp b/dlls/lights.cpp index 13e6d3a..9ff839c 100644 --- a/dlls/lights.cpp +++ b/dlls/lights.cpp @@ -162,9 +162,9 @@ void CEnvLight::KeyValue( KeyValueData* pkvd ) } // simulate qrad direct, ambient,and gamma adjustments, as well as engine scaling - r = (int)( pow( r / 114.0, 0.6 ) * 264.0 ); - g = (int)( pow( g / 114.0, 0.6 ) * 264.0 ); - b = (int)( pow( b / 114.0, 0.6 ) * 264.0 ); + r = (int)( pow( r / 114.0f, 0.6f ) * 264.0f ); + g = (int)( pow( g / 114.0f, 0.6f ) * 264.0f ); + b = (int)( pow( b / 114.0f, 0.6f ) * 264.0f ); pkvd->fHandled = TRUE; sprintf( szColor, "%d", r ); @@ -185,11 +185,11 @@ void CEnvLight::Spawn( void ) char szVector[64]; UTIL_MakeAimVectors( pev->angles ); - sprintf( szVector, "%f", gpGlobals->v_forward.x ); + sprintf( szVector, "%f", (double)gpGlobals->v_forward.x ); CVAR_SET_STRING( "sv_skyvec_x", szVector ); - sprintf( szVector, "%f", gpGlobals->v_forward.y ); + sprintf( szVector, "%f", (double)gpGlobals->v_forward.y ); CVAR_SET_STRING( "sv_skyvec_y", szVector ); - sprintf( szVector, "%f", gpGlobals->v_forward.z ); + sprintf( szVector, "%f", (double)gpGlobals->v_forward.z ); CVAR_SET_STRING( "sv_skyvec_z", szVector ); CLight::Spawn(); diff --git a/dlls/monsters.cpp b/dlls/monsters.cpp index 3ff235e..e14dbac 100644 --- a/dlls/monsters.cpp +++ b/dlls/monsters.cpp @@ -262,7 +262,8 @@ void CBaseMonster::Listen( void ) } //iSound = g_pSoundEnt->m_SoundPool[iSound].m_iNext; - iSound = pCurrentSound->m_iNext; + if( pCurrentSound ) + iSound = pCurrentSound->m_iNext; } } @@ -431,18 +432,21 @@ CSound *CBaseMonster::PBestSound( void ) { pSound = CSoundEnt::SoundPointerForIndex( iThisSound ); - if( pSound && pSound->FIsSound() ) + if( pSound ) { - flDist = ( pSound->m_vecOrigin - EarPosition() ).Length(); - - if( flDist < flBestDist ) + if( pSound->FIsSound() ) { - iBestSound = iThisSound; - flBestDist = flDist; + flDist = ( pSound->m_vecOrigin - EarPosition() ).Length(); + + if( flDist < flBestDist ) + { + iBestSound = iThisSound; + flBestDist = flDist; + } } - } - iThisSound = pSound->m_iNextAudible; + iThisSound = pSound->m_iNextAudible; + } } if( iBestSound >= 0 ) { @@ -513,7 +517,7 @@ CSound *CBaseMonster::PBestScent( void ) //========================================================= void CBaseMonster::MonsterThink( void ) { - pev->nextthink = gpGlobals->time + 0.1;// keep monster thinking. + pev->nextthink = gpGlobals->time + 0.1f;// keep monster thinking. RunAI(); @@ -850,10 +854,10 @@ void CBaseMonster::RouteSimplify( CBaseEntity *pTargetEnt ) Vector vecTest, vecSplit; // Halfway between this and next - vecTest = ( m_Route[m_iRouteIndex + i + 1].vecLocation + m_Route[m_iRouteIndex + i].vecLocation ) * 0.5; + vecTest = ( m_Route[m_iRouteIndex + i + 1].vecLocation + m_Route[m_iRouteIndex + i].vecLocation ) * 0.5f; // Halfway between this and previous - vecSplit = ( m_Route[m_iRouteIndex + i].vecLocation + vecStart ) * 0.5; + vecSplit = ( m_Route[m_iRouteIndex + i].vecLocation + vecStart ) * 0.5f; int iType = ( m_Route[m_iRouteIndex + i].iType | bits_MF_TO_DETOUR ) & ~bits_MF_NOT_TO_MASK; if( CheckLocalMove( vecStart, vecTest, pTargetEnt, NULL ) == LOCALMOVE_VALID ) @@ -927,7 +931,7 @@ BOOL CBaseMonster::FBecomeProne( void ) //========================================================= BOOL CBaseMonster::CheckRangeAttack1( float flDot, float flDist ) { - if( flDist > 64 && flDist <= 784 && flDot >= 0.5 ) + if( flDist > 64.0f && flDist <= 784.0f && flDot >= 0.5f ) { return TRUE; } @@ -939,7 +943,7 @@ BOOL CBaseMonster::CheckRangeAttack1( float flDot, float flDist ) //========================================================= BOOL CBaseMonster::CheckRangeAttack2( float flDot, float flDist ) { - if( flDist > 64 && flDist <= 512 && flDot >= 0.5 ) + if( flDist > 64.0f && flDist <= 512.0f && flDot >= 0.5f ) { return TRUE; } @@ -952,7 +956,7 @@ BOOL CBaseMonster::CheckRangeAttack2( float flDot, float flDist ) BOOL CBaseMonster::CheckMeleeAttack1( float flDot, float flDist ) { // Decent fix to keep folks from kicking/punching hornets and snarks is to check the onground flag(sjb) - if( flDist <= 64 && flDot >= 0.7 && m_hEnemy != 0 && FBitSet( m_hEnemy->pev->flags, FL_ONGROUND ) ) + if( flDist <= 64.0f && flDot >= 0.7f && m_hEnemy != 0 && FBitSet( m_hEnemy->pev->flags, FL_ONGROUND ) ) { return TRUE; } @@ -964,7 +968,7 @@ BOOL CBaseMonster::CheckMeleeAttack1( float flDot, float flDist ) //========================================================= BOOL CBaseMonster::CheckMeleeAttack2( float flDot, float flDist ) { - if( flDist <= 64 && flDot >= 0.7 ) + if( flDist <= 64.0f && flDot >= 0.7f ) { return TRUE; } @@ -1062,7 +1066,7 @@ int CBaseMonster::CheckEnemy( CBaseEntity *pEnemy ) // distance to enemy's origin flDistToEnemy = ( vecEnemyPos - pev->origin ).Length(); - vecEnemyPos.z += pEnemy->pev->size.z * 0.5; + vecEnemyPos.z += pEnemy->pev->size.z * 0.5f; // distance to enemy's head float flDistToEnemy2 = ( vecEnemyPos - pev->origin ).Length(); @@ -1099,7 +1103,7 @@ int CBaseMonster::CheckEnemy( CBaseEntity *pEnemy ) if( pEnemy->pev->velocity != Vector( 0, 0, 0 ) ) { // trail the enemy a bit - m_vecEnemyLKP = m_vecEnemyLKP - pEnemy->pev->velocity * RANDOM_FLOAT( -0.05, 0 ); + m_vecEnemyLKP = m_vecEnemyLKP - pEnemy->pev->velocity * RANDOM_FLOAT( -0.05f, 0.0f ); } else { @@ -1135,7 +1139,7 @@ int CBaseMonster::CheckEnemy( CBaseEntity *pEnemy ) if( m_Route[i].iType == ( bits_MF_IS_GOAL | bits_MF_TO_ENEMY ) ) { // UNDONE: Should we allow monsters to override this distance (80?) - if( ( m_Route[i].vecLocation - m_vecEnemyLKP ).Length() > 80 ) + if( ( m_Route[i].vecLocation - m_vecEnemyLKP ).Length() > 80.0f ) { // Refresh FRefreshRoute(); @@ -1357,7 +1361,7 @@ int CBaseMonster::CheckLocalMove( const Vector &vecStart, const Vector &vecEnd, { // The monster can move to a spot UNDER the target, but not to it. Don't try to triangulate, go directly to the node graph. // UNDONE: Magic # 64 -- this used to be pev->size.z but that won't work for small creatures like the headcrab - if( fabs( vecEnd.z - pev->origin.z ) > 64 ) + if( fabs( vecEnd.z - pev->origin.z ) > 64.0f ) { iReturn = LOCALMOVE_INVALID_DONT_TRIANGULATE; } @@ -1478,7 +1482,7 @@ void CBaseMonster::AdvanceRoute( float distance ) } else // At goal!!! { - if( distance < m_flGroundSpeed * 0.2 /* FIX */ ) + if( distance < m_flGroundSpeed * 0.2f /* FIX */ ) { MovementComplete(); } @@ -1612,13 +1616,13 @@ BOOL CBaseMonster::FTriangulate( const Vector &vecStart, const Vector &vecEnd, f // If the hull width is less than 24, use 24 because CheckLocalMove uses a min of // 24. sizeX = pev->size.x; - if( sizeX < 24.0 ) - sizeX = 24.0; - else if( sizeX > 48.0 ) - sizeX = 48.0; + if( sizeX < 24.0f ) + sizeX = 24.0f; + else if( sizeX > 48.0f ) + sizeX = 48.0f; sizeZ = pev->size.z; - //if( sizeZ < 24.0 ) - // sizeZ = 24.0; + //if( sizeZ < 24.0f ) + // sizeZ = 24.0f; vecForward = ( vecEnd - vecStart ).Normalize(); @@ -1856,7 +1860,7 @@ void CBaseMonster::Move( float flInterval ) DispatchBlocked( edict(), pBlocker->edict() ); } - if( pBlocker && m_moveWaitTime > 0 && pBlocker->IsMoving() && !pBlocker->IsPlayer() && ( gpGlobals->time-m_flMoveWaitFinished ) > 3.0 ) + if( pBlocker && m_moveWaitTime > 0 && pBlocker->IsMoving() && !pBlocker->IsPlayer() && ( gpGlobals->time-m_flMoveWaitFinished ) > 3.0f ) { // Can we still move toward our target? if( flDist < m_flGroundSpeed ) @@ -1891,10 +1895,10 @@ void CBaseMonster::Move( float flInterval ) else { // Don't get stuck - if( ( gpGlobals->time - m_flMoveWaitFinished ) < 0.2 ) + if( ( gpGlobals->time - m_flMoveWaitFinished ) < 0.2f ) Remember( bits_MEMORY_MOVE_FAILED ); - m_flMoveWaitFinished = gpGlobals->time + 0.1; + m_flMoveWaitFinished = gpGlobals->time + 0.1f; } } else @@ -1957,10 +1961,10 @@ void CBaseMonster::MoveExecute( CBaseEntity *pTargetEnt, const Vector &vecDir, f float flTotal = m_flGroundSpeed * pev->framerate * flInterval; float flStep; - while( flTotal > 0.001 ) + while( flTotal > 0.001f ) { // don't walk more than 16 units or stairs stop working - flStep = Q_min( 16.0, flTotal ); + flStep = Q_min( 16.0f, flTotal ); UTIL_MoveToOrigin( ENT( pev ), m_Route[m_iRouteIndex].vecLocation, flStep, MOVE_NORMAL ); flTotal -= flStep; } @@ -2008,14 +2012,14 @@ void CBaseMonster::MonsterInit( void ) m_hEnemy = NULL; - m_flDistTooFar = 1024.0; - m_flDistLook = 2048.0; + m_flDistTooFar = 1024.0f; + m_flDistLook = 2048.0f; // set eye position SetEyePosition(); SetThink( &CBaseMonster::MonsterInitThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; SetUse( &CBaseMonster::MonsterUse ); } @@ -2117,7 +2121,7 @@ void CBaseMonster::StartMonster( void ) // Delay drop to floor to make sure each door in the level has had its chance to spawn // Spread think times so that they don't all happen at the same time (Carmack) SetThink( &CBaseMonster::CallMonsterThink ); - pev->nextthink += RANDOM_FLOAT( 0.1, 0.4 ); // spread think times. + pev->nextthink += RANDOM_FLOAT( 0.1f, 0.4f ); // spread think times. // Vit_amiN: fixed -- now it doesn't touch any scripted_sequence target if( !FStringNull( pev->targetname ) && !m_pCine )// wait until triggered @@ -2214,12 +2218,12 @@ BOOL CBaseMonster::FindCover( Vector vecThreat, Vector vecViewOffset, float flMi flMaxDist = 784; } - if( flMinDist > 0.5 * flMaxDist ) + if( flMinDist > 0.5f * flMaxDist ) { #if _DEBUG ALERT( at_console, "FindCover MinDist (%.0f) too close to MaxDist (%.0f)\n", flMinDist, flMaxDist ); #endif - flMinDist = 0.5 * flMaxDist; + flMinDist = 0.5f * flMaxDist; } if( !WorldGraph.m_fGraphPresent || !WorldGraph.m_fGraphPointersSet ) @@ -2264,7 +2268,7 @@ BOOL CBaseMonster::FindCover( Vector vecThreat, Vector vecViewOffset, float flMi UTIL_TraceLine( node.m_vecOrigin + vecViewOffset, vecLookersOffset, ignore_monsters, ignore_glass, ENT( pev ), &tr ); // if this node will block the threat's line of sight to me... - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { // ..and is also closer to me than the threat, or the same distance from myself and the threat the node is good. if( ( iMyNode == iThreatNode ) || WorldGraph.PathLength( iMyNode, nodeNumber, iMyHullIndex, m_afCapability ) <= WorldGraph.PathLength( iThreatNode, nodeNumber, iMyHullIndex, m_afCapability ) ) @@ -2318,12 +2322,12 @@ BOOL CBaseMonster::BuildNearestRoute( Vector vecThreat, Vector vecViewOffset, fl flMaxDist = 784; } - if( flMinDist > 0.5 * flMaxDist ) + if( flMinDist > 0.5f * flMaxDist ) { #if _DEBUG ALERT( at_console, "FindCover MinDist (%.0f) too close to MaxDist (%.0f)\n", flMinDist, flMaxDist ); #endif - flMinDist = 0.5 * flMaxDist; + flMinDist = 0.5f * flMaxDist; } if( !WorldGraph.m_fGraphPresent || !WorldGraph.m_fGraphPointersSet ) @@ -2362,12 +2366,12 @@ BOOL CBaseMonster::BuildNearestRoute( Vector vecThreat, Vector vecViewOffset, fl // can I see where I want to be from there? UTIL_TraceLine( node.m_vecOrigin + pev->view_ofs, vecLookersOffset, ignore_monsters, edict(), &tr ); - if( tr.flFraction == 1.0 ) + if( tr.flFraction == 1.0f ) { // try to actually get there if( BuildRoute( node.m_vecOrigin, bits_MF_TO_LOCATION, NULL ) ) { - flMaxDist = flDist; + // flMaxDist = flDist; m_vecMoveGoal = node.m_vecOrigin; return TRUE; // UNDONE: keep looking for something closer! } @@ -2814,7 +2818,7 @@ int CBaseMonster::FindHintNode( void ) { UTIL_TraceLine( pev->origin + pev->view_ofs, node.m_vecOrigin + pev->view_ofs, ignore_monsters, ENT( pev ), &tr ); - if( tr.flFraction == 1.0 ) + if( tr.flFraction == 1.0f ) { WorldGraph.m_iLastActiveIdleSearch = nodeNumber + 1; // next monster that searches for hint nodes will start where we left off. return nodeNumber;// take it! @@ -2872,7 +2876,7 @@ void CBaseMonster::ReportAIState( void ) { ALERT( level, " Moving " ); if( m_flMoveWaitFinished > gpGlobals->time ) - ALERT( level, ": Stopped for %.2f. ", m_flMoveWaitFinished - gpGlobals->time ); + ALERT( level, ": Stopped for %.2f. ", (double)(m_flMoveWaitFinished - gpGlobals->time) ); else if( m_IdealActivity == GetStoppedActivity() ) ALERT( level, ": In stopped anim. " ); } @@ -2897,7 +2901,7 @@ void CBaseMonster::ReportAIState( void ) } ALERT( level, "\n" ); - ALERT( level, "Yaw speed:%3.1f,Health: %3.1f\n", pev->yaw_speed, pev->health ); + ALERT( level, "Yaw speed:%3.1f,Health: %3.1f\n", (double)pev->yaw_speed, (double)pev->health ); if( pev->spawnflags & SF_MONSTER_PRISONER ) ALERT( level, " PRISONER! " ); if( pev->spawnflags & SF_MONSTER_PREDISASTER ) @@ -3095,7 +3099,7 @@ BOOL CBaseMonster::FindLateralCover( const Vector &vecThreat, const Vector &vecV // it's faster to check the SightEnt's visibility to the potential spot than to check the local move, so we do that first. UTIL_TraceLine( vecThreat + vecViewOffset, vecLeftTest + pev->view_ofs, ignore_monsters, ignore_glass, ENT( pev )/*pentIgnore*/, &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { if( FValidateCover( vecLeftTest ) && CheckLocalMove( pev->origin, vecLeftTest, NULL, NULL ) == LOCALMOVE_VALID ) { @@ -3109,7 +3113,7 @@ BOOL CBaseMonster::FindLateralCover( const Vector &vecThreat, const Vector &vecV // it's faster to check the SightEnt's visibility to the potential spot than to check the local move, so we do that first. UTIL_TraceLine( vecThreat + vecViewOffset, vecRightTest + pev->view_ofs, ignore_monsters, ignore_glass, ENT(pev)/*pentIgnore*/, &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { if( FValidateCover( vecRightTest ) && CheckLocalMove( pev->origin, vecRightTest, NULL, NULL ) == LOCALMOVE_VALID ) { @@ -3145,7 +3149,7 @@ Vector CBaseMonster::ShootAtEnemy( const Vector &shootOrigin ) //========================================================= BOOL CBaseMonster::FacingIdeal( void ) { - if( fabs( FlYawDiff() ) <= 0.006 )//!!!BUGBUG - no magic numbers!!! + if( fabs( FlYawDiff() ) <= 0.006f )//!!!BUGBUG - no magic numbers!!! { return TRUE; } @@ -3198,7 +3202,7 @@ void CBaseMonster::CorpseFallThink( void ) UTIL_SetOrigin( pev, pev->origin );// link into world. } else - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } // Call after animation/pose is set up @@ -3223,7 +3227,7 @@ void CBaseMonster::MonsterInitDead( void ) // Setup health counters, etc. BecomeDead(); SetThink( &CBaseMonster::CorpseFallThink ); - pev->nextthink = gpGlobals->time + 0.5; + pev->nextthink = gpGlobals->time + 0.5f; } //========================================================= @@ -3278,7 +3282,7 @@ BOOL CBaseMonster::BBoxFlat( void ) { return FALSE; } - flLength = flLength2; + // flLength = flLength2; return TRUE; } diff --git a/dlls/multiplay_gamerules.cpp b/dlls/multiplay_gamerules.cpp index 3431905..3f8ebf0 100644 --- a/dlls/multiplay_gamerules.cpp +++ b/dlls/multiplay_gamerules.cpp @@ -319,6 +319,11 @@ BOOL CHalfLifeMultiplay::FShouldSwitchWeapon( CBasePlayer *pPlayer, CBasePlayerI return TRUE; } + if( !pPlayer->m_iAutoWepSwitch ) + { + return FALSE; + } + if( !pPlayer->m_pActiveItem->CanHolster() ) { // can't put away the active item. diff --git a/dlls/nodes.cpp b/dlls/nodes.cpp index 6babe01..c8e5649 100644 --- a/dlls/nodes.cpp +++ b/dlls/nodes.cpp @@ -667,7 +667,7 @@ int CGraph::FindShortestPath( int *piPath, int iStart, int iDest, int iHull, int // for ( i = 0; i < m_cNodes; i++) { - m_pNodes[i].m_flClosestSoFar = -1.0; + m_pNodes[i].m_flClosestSoFar = -1.0f; } m_pNodes[iStart].m_flClosestSoFar = 0.0; @@ -709,8 +709,8 @@ int CGraph::FindShortestPath( int *piPath, int iStart, int iDest, int iHull, int } } float flOurDistance = flCurrentDistance + m_pLinkPool[m_pNodes[iCurrentNode].m_iFirstLink + i].m_flWeight; - if( m_pNodes[iVisitNode].m_flClosestSoFar < -0.5 - || flOurDistance < m_pNodes[iVisitNode].m_flClosestSoFar - 0.001 ) + if( m_pNodes[iVisitNode].m_flClosestSoFar < -0.5f + || flOurDistance < m_pNodes[iVisitNode].m_flClosestSoFar - 0.001f ) { m_pNodes[iVisitNode].m_flClosestSoFar = flOurDistance; m_pNodes[iVisitNode].m_iPreviousNode = iCurrentNode; @@ -719,7 +719,7 @@ int CGraph::FindShortestPath( int *piPath, int iStart, int iDest, int iHull, int } } } - if( m_pNodes[iDest].m_flClosestSoFar < -0.5 ) + if( m_pNodes[iDest].m_flClosestSoFar < -0.5f ) { // Destination is unreachable, no path found. return 0; @@ -837,7 +837,7 @@ void CGraph::CheckNode( Vector vecOrigin, int iNode ) // make sure that vecOrigin can trace to this node! UTIL_TraceLine( vecOrigin, m_pNodes[iNode].m_vecOriginPeek, ignore_monsters, 0, &tr ); - if( tr.flFraction == 1.0 ) + if( tr.flFraction == 1.0f ) { m_iNearest = iNode; m_flShortest = flDist; @@ -907,7 +907,7 @@ int CGraph::FindNearestNode( const Vector &vecOrigin, int afNodeTypes ) } m_iNearest = -1; - m_flShortest = 999999.0; // just a big number. + m_flShortest = 999999.0f; // just a big number. // If we can find a visible point, then let CalcBounds set the limits, but if // we have no visible point at all to start with, then don't restrict the limits. @@ -1276,7 +1276,7 @@ int CGraph::LinkVisibleNodes( CLink *pLinkPool, FILE *file, int *piBadNode ) if( tr.fStartSolid ) continue; - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { // trace hit a brush ent, trace backwards to make sure that this ent is the only thing in the way. pTraceEnt = tr.pHit;// store the ent that the trace hit, for comparison @@ -1442,14 +1442,14 @@ int CGraph::RejectInlineLinks( CLink *pLinkPool, FILE *file ) flDistToTestNode = vec2DirToTestNode.Length(); vec2DirToTestNode = vec2DirToTestNode.Normalize(); - if( DotProduct( vec2DirToCheckNode, vec2DirToTestNode ) >= 0.998 ) + if( DotProduct( vec2DirToCheckNode, vec2DirToTestNode ) >= 0.998f ) { // there's a chance that TestNode intersects the line to CheckNode. If so, we should disconnect the link to CheckNode. if( flDistToTestNode < flDistToCheckNode ) { if( file ) { - fprintf( file, "REJECTED NODE %3d through Node %3d, Dot = %8f\n", pLinkPool[pSrcNode->m_iFirstLink + j].m_iDestNode, pLinkPool[pSrcNode->m_iFirstLink + k].m_iDestNode, DotProduct( vec2DirToCheckNode, vec2DirToTestNode ) ); + fprintf( file, "REJECTED NODE %3d through Node %3d, Dot = %8f\n", pLinkPool[pSrcNode->m_iFirstLink + j].m_iDestNode, pLinkPool[pSrcNode->m_iFirstLink + k].m_iDestNode, (double)DotProduct( vec2DirToCheckNode, vec2DirToTestNode ) ); } pLinkPool[pSrcNode->m_iFirstLink + j] = pLinkPool[pSrcNode->m_iFirstLink + ( pSrcNode->m_cNumLinks - 1 )]; @@ -1516,7 +1516,7 @@ void CTestHull::Spawn( entvars_t *pevMasterNode ) else { SetThink( &CTestHull::DropDelay ); - pev->nextthink = gpGlobals->time + 1; + pev->nextthink = gpGlobals->time + 1.0f; } // Make this invisible @@ -1537,7 +1537,7 @@ void CTestHull::DropDelay( void ) SetThink( &CTestHull::CallBuildNodeGraph ); - pev->nextthink = gpGlobals->time + 1; + pev->nextthink = gpGlobals->time + 1.0f; } //========================================================= @@ -1623,7 +1623,7 @@ void CTestHull::ShowBadNode( void ) UTIL_ParticleEffect( pev->origin + gpGlobals->v_right * 64, g_vecZero, 255, 25 ); UTIL_ParticleEffect( pev->origin - gpGlobals->v_right * 64, g_vecZero, 255, 25 ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } extern BOOL gTouchDisabled; @@ -1737,7 +1737,7 @@ void CTestHull::BuildNodeGraph( void ) fprintf( file, "Location %4d,%4d,%4d\n",(int)WorldGraph.m_pNodes[i].m_vecOrigin.x, (int)WorldGraph.m_pNodes[i].m_vecOrigin.y, (int)WorldGraph.m_pNodes[i].m_vecOrigin.z ); fprintf( file, "HintType: %4d\n", WorldGraph.m_pNodes[i].m_sHintType ); fprintf( file, "HintActivity: %4d\n", WorldGraph.m_pNodes[i].m_sHintActivity ); - fprintf( file, "HintYaw: %4f\n", WorldGraph.m_pNodes[i].m_flHintYaw ); + fprintf( file, "HintYaw: %4f\n", (double)WorldGraph.m_pNodes[i].m_flHintYaw ); fprintf( file, "-------------------------------------------------------------------------------\n" ); } fprintf( file, "\n\n" ); @@ -1959,7 +1959,7 @@ void CTestHull::BuildNodeGraph( void ) TraceResult tr; UTIL_TraceHull( pSrcNode->m_vecOrigin + Vector( 0, 0, 32 ), pDestNode->m_vecOriginPeek + Vector( 0, 0, 32 ), ignore_monsters, large_hull, ENT( pev ), &tr ); - if( tr.fStartSolid || tr.flFraction < 1.0 ) + if( tr.fStartSolid || tr.flFraction < 1.0f ) { pTempPool[pSrcNode->m_iFirstLink + j].m_afLinkInfo &= ~bits_LINK_FLY_HULL; } @@ -2533,7 +2533,7 @@ int CGraph::FLoadGraph( const char *szMapName ) if( length < 0 ) goto ShortFile; memcpy( m_pHashLinks, pMemFile, sizeof(short) * m_nHashLinks ); - pMemFile += sizeof(short) * m_nHashLinks; + // pMemFile += sizeof(short) * m_nHashLinks; // Set the graph present flag, clear the pointers set flag // @@ -3517,7 +3517,7 @@ void CGraph::TestRoutingTables( void ) ALERT( at_aiconsole, "No link.\n" ); } } - if( fabs( flDistance1 - flDistance2 ) > 0.10 ) + if( fabs( flDistance1 - flDistance2 ) > 0.1f ) { #else if( cPathSize1 != cPathSize2 || memcmp( pMyPath, pMyPath2, sizeof(int) * cPathSize1 ) != 0 ) @@ -3641,7 +3641,7 @@ void CNodeViewer::Spawn() int start = 0; int end; do{ - end = m_nVisited; + // end = m_nVisited; // ALERT( at_console, "%d :", m_nVisited ); for( end = m_nVisited; start < end; start++ ) { diff --git a/dlls/observer.cpp b/dlls/observer.cpp index 22fa381..79e1c9c 100644 --- a/dlls/observer.cpp +++ b/dlls/observer.cpp @@ -103,7 +103,7 @@ void CBasePlayer::Observer_HandleButtons() else Observer_SetMode( OBS_CHASE_FREE ); // don't use OBS_CHASE_LOCKED anymore - m_flNextObserverInput = gpGlobals->time + 0.2; + m_flNextObserverInput = gpGlobals->time + 0.2f; } // Attack moves to the next player @@ -111,7 +111,7 @@ void CBasePlayer::Observer_HandleButtons() { Observer_FindNextPlayer( false ); - m_flNextObserverInput = gpGlobals->time + 0.2; + m_flNextObserverInput = gpGlobals->time + 0.2f; } // Attack2 moves to the prev player @@ -119,7 +119,7 @@ void CBasePlayer::Observer_HandleButtons() { Observer_FindNextPlayer( true ); - m_flNextObserverInput = gpGlobals->time + 0.2; + m_flNextObserverInput = gpGlobals->time + 0.2f; } } diff --git a/dlls/plats.cpp b/dlls/plats.cpp index 8356d55..0f2dbe7 100644 --- a/dlls/plats.cpp +++ b/dlls/plats.cpp @@ -585,7 +585,7 @@ void CFuncPlatRot::RotMove( Vector &destAngle, float time ) Vector vecDestDelta = destAngle - pev->angles; // Travel time is so short, we're practically there already; so make it so. - if( time >= 0.1 ) + if( time >= 0.1f ) pev->avelocity = vecDestDelta / time; else { @@ -647,7 +647,7 @@ void CFuncTrain::Blocked( CBaseEntity *pOther ) if( gpGlobals->time < m_flActivateFinished ) return; - m_flActivateFinished = gpGlobals->time + 0.5; + m_flActivateFinished = gpGlobals->time + 0.5f; pOther->TakeDamage( pev, pev, pev->dmg, DMG_CRUSH ); } @@ -744,7 +744,7 @@ void CFuncTrain::Next( void ) { // don't copy speed from target if it is 0 (uninitialized) pev->speed = m_pevCurrentTarget->speed; - ALERT( at_aiconsole, "Train %s speed to %4.2f\n", STRING( pev->targetname ), pev->speed ); + ALERT( at_aiconsole, "Train %s speed to %4.2f\n", STRING( pev->targetname ), (double)pev->speed ); } m_pevCurrentTarget = pTarg->pev;// keep track of this since path corners change our target for us. @@ -754,7 +754,7 @@ void CFuncTrain::Next( void ) { // Path corner has indicated a teleport to the next corner. SetBits( pev->effects, EF_NOINTERP ); - UTIL_SetOrigin( pev, pTarg->pev->origin - ( pev->mins + pev->maxs ) * 0.5 ); + UTIL_SetOrigin( pev, pTarg->pev->origin - ( pev->mins + pev->maxs ) * 0.5f ); Wait(); // Get on with doing the next path corner. } else @@ -772,7 +772,7 @@ void CFuncTrain::Next( void ) ClearBits( pev->effects, EF_NOINTERP ); SetMoveDone( &CFuncTrain::Wait ); - LinearMove( pTarg->pev->origin - ( pev->mins + pev->maxs )* 0.5, pev->speed ); + LinearMove( pTarg->pev->origin - ( pev->mins + pev->maxs ) * 0.5f, pev->speed ); } } @@ -791,7 +791,7 @@ void CFuncTrain::Activate( void ) if( FStringNull( pev->targetname ) ) { // not triggered, so start immediately - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; SetThink( &CFuncTrain::Next ); } else @@ -835,7 +835,7 @@ void CFuncTrain::Spawn( void ) m_activated = FALSE; if( m_volume == 0 ) - m_volume = 0.85; + m_volume = 0.85f; } void CFuncTrain::Precache( void ) @@ -883,7 +883,7 @@ void CFuncTrain::OverrideReset( void ) else // Keep moving for 0.1 secs, then find path_corner again and restart { SetThink( &CFuncTrain::Next ); - pev->nextthink = pev->ltime + 0.1; + pev->nextthink = pev->ltime + 0.1f; } } } @@ -938,7 +938,7 @@ void CFuncTrackTrain::KeyValue( KeyValueData *pkvd ) else if( FStrEq( pkvd->szKeyName, "volume" ) ) { m_flVolume = (float)atoi( pkvd->szValue ); - m_flVolume *= 0.1; + m_flVolume *= 0.1f; pkvd->fHandled = TRUE; } else if( FStrEq( pkvd->szKeyName, "bank" ) ) @@ -977,7 +977,7 @@ void CFuncTrackTrain::Blocked( CBaseEntity *pOther ) else pevOther->velocity = ( pevOther->origin - pev->origin ).Normalize() * pev->dmg; - ALERT( at_aiconsole, "TRAIN(%s): Blocked by %s (dmg:%.2f)\n", STRING( pev->targetname ), STRING( pOther->pev->classname ), pev->dmg ); + ALERT( at_aiconsole, "TRAIN(%s): Blocked by %s (dmg:%.2f)\n", STRING( pev->targetname ), STRING( pOther->pev->classname ), (double)pev->dmg ); if( pev->dmg <= 0 ) return; // we can't hurt this thing, so we're not concerned with it @@ -1010,7 +1010,7 @@ void CFuncTrackTrain::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TY { float delta = value; - delta = ( (int)( pev->speed * 4 ) / (int)m_speed )*0.25 + 0.25 * delta; + delta = ( (int)( pev->speed * 4 ) / (int)m_speed ) * 0.25f + 0.25f * delta; if( delta > 1 ) delta = 1; else if ( delta < -1 ) @@ -1022,7 +1022,7 @@ void CFuncTrackTrain::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TY } pev->speed = m_speed * delta; Next(); - ALERT( at_aiconsole, "TRAIN(%s), speed to %.2f\n", STRING( pev->targetname ), pev->speed ); + ALERT( at_aiconsole, "TRAIN(%s), speed to %.2f\n", STRING( pev->targetname ), (double)pev->speed ); } } @@ -1100,13 +1100,13 @@ void CFuncTrackTrain::UpdateSound( void ) unsigned short us_encode; unsigned short us_sound = ( ( unsigned short )( m_sounds ) & 0x0007 ) << 12; - unsigned short us_pitch = ( ( unsigned short )( flpitch / 10.0 ) & 0x003f ) << 6; - unsigned short us_volume = ( ( unsigned short )( m_flVolume * 40.0 ) & 0x003f ); + unsigned short us_pitch = ( ( unsigned short )( flpitch / 10.0f ) & 0x003f ) << 6; + unsigned short us_volume = ( ( unsigned short )( m_flVolume * 40.0f ) & 0x003f ); us_encode = us_sound | us_pitch | us_volume; - PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_UPDATE, edict(), m_usAdjustPitch, 0.0, - g_vecZero, g_vecZero, 0.0, 0.0, us_encode, 0, 0, 0 ); + PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_UPDATE, edict(), m_usAdjustPitch, 0.0f, + g_vecZero, g_vecZero, 0.0f, 0.0f, us_encode, 0, 0, 0 ); } } @@ -1135,7 +1135,7 @@ void CFuncTrackTrain::Next( void ) Vector nextPos = pev->origin; nextPos.z -= m_height; - CPathTrack *pnext = m_ppath->LookAhead( &nextPos, pev->speed * 0.1, 1 ); + CPathTrack *pnext = m_ppath->LookAhead( &nextPos, pev->speed * 0.1f, 1 ); nextPos.z += m_height; pev->velocity = ( nextPos - pev->origin ) * 10; @@ -1209,7 +1209,7 @@ void CFuncTrackTrain::Next( void ) { // don't copy speed from target if it is 0 (uninitialized) pev->speed = pFire->pev->speed; - ALERT( at_aiconsole, "TrackTrain %s speed to %4.2f\n", STRING( pev->targetname ), pev->speed ); + ALERT( at_aiconsole, "TrackTrain %s speed to %4.2f\n", STRING( pev->targetname ), (double)pev->speed ); } } @@ -1348,7 +1348,7 @@ void CFuncTrackTrain::Find( void ) if( pev->spawnflags & SF_TRACKTRAIN_NOPITCH ) pev->angles.x = 0; UTIL_SetOrigin( pev, nextPos ); - NextThink( pev->ltime + 0.1, FALSE ); + NextThink( pev->ltime + 0.1f, FALSE ); SetThink( &CFuncTrackTrain::Next ); pev->speed = m_startSpeed; @@ -1397,14 +1397,14 @@ void CFuncTrackTrain::NearestPath( void ) if( pev->speed != 0 ) { - NextThink( pev->ltime + 0.1, FALSE ); + NextThink( pev->ltime + 0.1f, FALSE ); SetThink( &CFuncTrackTrain::Next ); } } void CFuncTrackTrain::OverrideReset( void ) { - NextThink( pev->ltime + 0.1, FALSE ); + NextThink( pev->ltime + 0.1f, FALSE ); SetThink( &CFuncTrackTrain::NearestPath ); } @@ -1463,7 +1463,7 @@ void CFuncTrackTrain::Spawn( void ) // start trains on the next frame, to make sure their targets have had // a chance to spawn/activate - NextThink( pev->ltime + 0.1, FALSE ); + NextThink( pev->ltime + 0.1f, FALSE ); SetThink( &CFuncTrackTrain::Find ); Precache(); } @@ -1472,8 +1472,8 @@ void CFuncTrackTrain::Precache( void ) { const char *pszSound; - if( m_flVolume == 0.0 ) - m_flVolume = 1.0; + if( m_flVolume == 0.0f ) + m_flVolume = 1.0f; switch( m_sounds ) { @@ -1667,7 +1667,7 @@ void CFuncTrackChange::Spawn( void ) } EnableUse(); - pev->nextthink = pev->ltime + 2.0; + pev->nextthink = pev->ltime + 2.0f; SetThink( &CFuncTrackChange::Find ); Precache(); } @@ -1714,7 +1714,7 @@ void CFuncTrackChange::KeyValue( KeyValueData *pkvd ) void CFuncTrackChange::OverrideReset( void ) { - pev->nextthink = pev->ltime + 1.0; + pev->nextthink = pev->ltime + 1.0f; SetThink( &CFuncTrackChange::Find ); } @@ -1740,7 +1740,7 @@ void CFuncTrackChange::Find( void ) ALERT( at_error, "Can't find train for track change! %s\n", STRING( m_trainName ) ); return; } - Vector center = ( pev->absmin + pev->absmax ) * 0.5; + Vector center = ( pev->absmin + pev->absmax ) * 0.5f; m_trackBottom = m_trackBottom->Nearest( center ); m_trackTop = m_trackTop->Nearest( center ); UpdateAutoTargets( m_toggle_state ); @@ -1750,7 +1750,7 @@ void CFuncTrackChange::Find( void ) else { ALERT( at_error, "Can't find train for track change! %s\n", STRING( m_trainName ) ); - target = FIND_ENTITY_BY_TARGETNAME( NULL, STRING( m_trainName ) ); + // target = FIND_ENTITY_BY_TARGETNAME( NULL, STRING( m_trainName ) ); } } else @@ -1807,7 +1807,7 @@ void CFuncTrackChange::UpdateTrain( Vector &dest ) local.z = DotProduct( offset, gpGlobals->v_up ); local = local - offset; - m_train->pev->velocity = pev->velocity + ( local * ( 1.0 / time ) ); + m_train->pev->velocity = pev->velocity + ( local * ( 1.0f / time ) ); } void CFuncTrackChange::GoDown( void ) @@ -2108,7 +2108,7 @@ void CGunTarget::Spawn( void ) if( pev->spawnflags & FGUNTARGET_START_ON ) { SetThink( &CGunTarget::Start ); - pev->nextthink = pev->ltime + 0.3; + pev->nextthink = pev->ltime + 0.3f; } } @@ -2121,7 +2121,7 @@ void CGunTarget::Activate( void ) if( pTarg ) { m_hTargetEnt = pTarg; - UTIL_SetOrigin( pev, pTarg->pev->origin - ( pev->mins + pev->maxs ) * 0.5 ); + UTIL_SetOrigin( pev, pTarg->pev->origin - ( pev->mins + pev->maxs ) * 0.5f ); } } @@ -2143,7 +2143,7 @@ void CGunTarget::Next( void ) return; } SetMoveDone( &CGunTarget::Wait ); - LinearMove( pTarget->pev->origin - ( pev->mins + pev->maxs ) * 0.5, pev->speed ); + LinearMove( pTarget->pev->origin - ( pev->mins + pev->maxs ) * 0.5f, pev->speed ); } void CGunTarget::Wait( void ) diff --git a/dlls/player.cpp b/dlls/player.cpp index a514df3..52f71f9 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -66,8 +66,8 @@ extern CGraph WorldGraph; #define TRAIN_FAST 0x04 #define TRAIN_BACK 0x05 -#define FLASH_DRAIN_TIME 1.2 //100 units/3 minutes -#define FLASH_CHARGE_TIME 0.2 // 100 units/20 seconds (seconds per unit) +#define FLASH_DRAIN_TIME 1.2f //100 units/3 minutes +#define FLASH_CHARGE_TIME 0.2f // 100 units/20 seconds (seconds per unit) // Global Savedata for player TYPEDESCRIPTION CBasePlayer::m_playerSaveData[] = @@ -275,11 +275,11 @@ void CBasePlayer::Pain( void ) { float flRndSound;//sound randomizer - flRndSound = RANDOM_FLOAT( 0, 1 ); + flRndSound = RANDOM_FLOAT( 0.0f, 1.0f ); - if( flRndSound <= 0.33 ) + if( flRndSound <= 0.33f ) EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/pl_pain5.wav", 1, ATTN_NORM ); - else if( flRndSound <= 0.66 ) + else if( flRndSound <= 0.66f ) EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/pl_pain6.wav", 1, ATTN_NORM ); else EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/pl_pain7.wav", 1, ATTN_NORM ); @@ -290,7 +290,7 @@ Vector VecVelocityForDamage( float flDamage ) Vector vec( RANDOM_FLOAT( -100, 100 ), RANDOM_FLOAT( -100, 100 ), RANDOM_FLOAT( 200, 300 ) ); if( flDamage > -50 ) - vec = vec * 0.7; + vec = vec * 0.7f; else if( flDamage > -200 ) vec = vec * 2; else @@ -347,15 +347,15 @@ int TrainSpeed( int iSpeed, int iMax ) fMax = (float)iMax; fSpeed = iSpeed; - fSpeed = fSpeed/fMax; + fSpeed = fSpeed / fMax; if( iSpeed < 0 ) iRet = TRAIN_BACK; - else if( iSpeed == 0 ) + else if( iSpeed == 0.0f ) iRet = TRAIN_NEUTRAL; - else if( fSpeed < 0.33 ) + else if( fSpeed < 0.33f ) iRet = TRAIN_SLOW; - else if( fSpeed < 0.66 ) + else if( fSpeed < 0.66f ) iRet = TRAIN_MEDIUM; else iRet = TRAIN_FAST; @@ -951,7 +951,7 @@ void CBasePlayer::Killed( entvars_t *pevAttacker, int iGib ) pev->angles.z = 0; SetThink( &CBasePlayer::PlayerDeathThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } // Set the activity based on an event or current state @@ -1733,7 +1733,7 @@ void CBasePlayer::UpdateStatusBar() Vector vecEnd = vecSrc + ( gpGlobals->v_forward * MAX_ID_RANGE ); UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, edict(), &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { if( !FNullEnt( tr.pHit ) ) { @@ -1751,7 +1751,7 @@ void CBasePlayer::UpdateStatusBar() newSBarState[SBAR_ID_TARGETARMOR] = (int)pEntity->pev->armorvalue; //No need to get it % based since 100 it's the max. } - m_flStatusBarDisappearDelay = gpGlobals->time + 1.0; + m_flStatusBarDisappearDelay = gpGlobals->time + 1.0f; } } else if( m_flStatusBarDisappearDelay > gpGlobals->time ) @@ -1880,7 +1880,7 @@ void CBasePlayer::PreThink( void ) UTIL_TraceLine( pev->origin, pev->origin + Vector( 0, 0, -38 ), ignore_monsters, ENT( pev ), &trainTrace ); // HACKHACK - Just look for the func_tracktrain classname - if( trainTrace.flFraction != 1.0 && trainTrace.pHit ) + if( trainTrace.flFraction != 1.0f && trainTrace.pHit ) pTrain = CBaseEntity::Instance( trainTrace.pHit ); if( !pTrain || !( pTrain->ObjectCaps() & FCAP_DIRECTIONAL_USE ) || !pTrain->OnControls( pev ) ) @@ -2033,7 +2033,7 @@ void CBasePlayer::CheckTimeBasedDamage() return; // only check for time based damage approx. every 2 seconds - if( fabs( gpGlobals->time - m_tbdPrev ) < 2.0 ) + if( fabs( gpGlobals->time - m_tbdPrev ) < 2.0f ) return; m_tbdPrev = gpGlobals->time; @@ -2187,7 +2187,7 @@ Things powered by the battery // if in range of radiation source, ping geiger counter -#define GEIGERDELAY 0.25 +#define GEIGERDELAY 0.25f void CBasePlayer::UpdateGeigerCounter( void ) { @@ -2224,8 +2224,8 @@ Play suit update if it's time ================ */ -#define SUITUPDATETIME 3.5 -#define SUITFIRSTUPDATETIME 0.1 +#define SUITUPDATETIME 3.5f +#define SUITFIRSTUPDATETIME 0.1f void CBasePlayer::CheckSuitUpdate() { @@ -2628,23 +2628,23 @@ void CBasePlayer::PostThink() if( gun && gun->UseDecrement() ) { - gun->m_flNextPrimaryAttack = Q_max( gun->m_flNextPrimaryAttack - gpGlobals->frametime, -1.0 ); - gun->m_flNextSecondaryAttack = Q_max( gun->m_flNextSecondaryAttack - gpGlobals->frametime, -0.001 ); + gun->m_flNextPrimaryAttack = Q_max( gun->m_flNextPrimaryAttack - gpGlobals->frametime, -1.0f ); + gun->m_flNextSecondaryAttack = Q_max( gun->m_flNextSecondaryAttack - gpGlobals->frametime, -0.001f ); - if( gun->m_flTimeWeaponIdle != 1000 ) + if( gun->m_flTimeWeaponIdle != 1000.0f ) { - gun->m_flTimeWeaponIdle = Q_max( gun->m_flTimeWeaponIdle - gpGlobals->frametime, -0.001 ); + gun->m_flTimeWeaponIdle = Q_max( gun->m_flTimeWeaponIdle - gpGlobals->frametime, -0.001f ); } - if( gun->pev->fuser1 != 1000 ) + if( gun->pev->fuser1 != 1000.0f ) { - gun->pev->fuser1 = Q_max( gun->pev->fuser1 - gpGlobals->frametime, -0.001 ); + gun->pev->fuser1 = Q_max( gun->pev->fuser1 - gpGlobals->frametime, -0.001f ); } // Only decrement if not flagged as NO_DECREMENT - /*if( gun->m_flPumpTime != 1000 ) + /*if( gun->m_flPumpTime != 1000.0f ) { - gun->m_flPumpTime = Q_max( gun->m_flPumpTime - gpGlobals->frametime, -0.001 ); + gun->m_flPumpTime = Q_max( gun->m_flPumpTime - gpGlobals->frametime, -0.001f ); }*/ } @@ -2654,23 +2654,23 @@ void CBasePlayer::PostThink() } m_flNextAttack -= gpGlobals->frametime; - if( m_flNextAttack < -0.001 ) - m_flNextAttack = -0.001; + if( m_flNextAttack < -0.001f ) + m_flNextAttack = -0.001f; - if( m_flNextAmmoBurn != 1000 ) + if( m_flNextAmmoBurn != 1000.0f ) { m_flNextAmmoBurn -= gpGlobals->frametime; - if( m_flNextAmmoBurn < -0.001 ) - m_flNextAmmoBurn = -0.001; + if( m_flNextAmmoBurn < -0.001f ) + m_flNextAmmoBurn = -0.001f; } - if( m_flAmmoStartCharge != 1000 ) + if( m_flAmmoStartCharge != 1000.0f ) { m_flAmmoStartCharge -= gpGlobals->frametime; - if( m_flAmmoStartCharge < -0.001 ) - m_flAmmoStartCharge = -0.001; + if( m_flAmmoStartCharge < -0.001f ) + m_flAmmoStartCharge = -0.001f; } #else return; @@ -2814,8 +2814,8 @@ void CBasePlayer::Spawn( void ) pev->deadflag = DEAD_NO; pev->dmg_take = 0; pev->dmg_save = 0; - pev->friction = 1.0; - pev->gravity = 1.0; + pev->friction = 1.0f; + pev->gravity = 1.0f; m_bitsHUDDamage = -1; m_bitsDamageType = 0; m_afPhysicsFlags = 0; @@ -2829,12 +2829,12 @@ void CBasePlayer::Spawn( void ) m_flNextDecalTime = 0;// let this player decal as soon as he spawns. - m_flgeigerDelay = gpGlobals->time + 2.0; // wait a few seconds until user-defined message registrations + m_flgeigerDelay = gpGlobals->time + 2.0f; // wait a few seconds until user-defined message registrations // are recieved by all clients m_flTimeStepSound = 0; m_iStepLeft = 0; - m_flFieldOfView = 0.5;// some monsters use this to determine whether or not the player is looking at them. + m_flFieldOfView = 0.5f;// some monsters use this to determine whether or not the player is looking at them. m_bloodColor = BLOOD_COLOR_RED; m_flNextAttack = UTIL_WeaponTimeBase(); @@ -2887,6 +2887,8 @@ void CBasePlayer::Spawn( void ) m_flNextChatTime = gpGlobals->time; + m_iAutoWepSwitch = 1; + g_pGameRules->PlayerSpawn( this ); } @@ -3184,7 +3186,7 @@ void CSprayCan::Spawn( entvars_t *pevOwner ) pev->owner = ENT( pevOwner ); pev->frame = 0; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; EMIT_SOUND( ENT( pev ), CHAN_VOICE, "player/sprayer.wav", 1, ATTN_NORM ); } @@ -3223,7 +3225,7 @@ void CSprayCan::Think( void ) UTIL_Remove( this ); } - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } class CBloodSplat : public CBaseEntity @@ -3240,7 +3242,7 @@ void CBloodSplat::Spawn( entvars_t *pevOwner ) pev->owner = ENT( pevOwner ); SetThink( &CBloodSplat::Spray ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } void CBloodSplat::Spray( void ) @@ -3255,7 +3257,7 @@ void CBloodSplat::Spray( void ) UTIL_BloodDecalTrace( &tr, BLOOD_COLOR_RED ); } SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } //============================================== @@ -3284,7 +3286,7 @@ CBaseEntity *FindEntityForward( CBaseEntity *pMe ) UTIL_MakeVectors( pMe->pev->v_angle ); UTIL_TraceLine( pMe->pev->origin + pMe->pev->view_ofs,pMe->pev->origin + pMe->pev->view_ofs + gpGlobals->v_forward * 8192,dont_ignore_monsters, pMe->edict(), &tr ); - if( tr.flFraction != 1.0 && !FNullEnt( tr.pHit ) ) + if( tr.flFraction != 1.0f && !FNullEnt( tr.pHit ) ) { CBaseEntity *pHit = CBaseEntity::Instance( tr.pHit ); return pHit; @@ -3420,7 +3422,7 @@ void CBasePlayer::ImpulseCommands() UTIL_MakeVectors( pev->v_angle ); UTIL_TraceLine( pev->origin + pev->view_ofs, pev->origin + pev->view_ofs + gpGlobals->v_forward * 128, ignore_monsters, ENT( pev ), &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { // line hit something, so paint a decal m_flNextDecalTime = gpGlobals->time + decalfrequency.value; @@ -3442,7 +3444,7 @@ void CBasePlayer::ImpulseCommands() void CBasePlayer::CheatImpulseCommands( int iImpulse ) { #if !defined( HLDEMO_BUILD ) - if( g_flWeaponCheat == 0.0 ) + if( g_flWeaponCheat == 0.0f ) { return; } @@ -3591,7 +3593,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) UTIL_MakeVectors( pev->v_angle ); UTIL_TraceLine( pev->origin + pev->view_ofs, pev->origin + pev->view_ofs + gpGlobals->v_forward * 128, ignore_monsters, ENT( pev ), &tr ); - if( tr.flFraction != 1.0 ) + if( tr.flFraction != 1.0f ) { // line hit something, so paint a decal CBloodSplat *pBlood = GetClassPtr( (CBloodSplat *)NULL ); @@ -4111,7 +4113,7 @@ void CBasePlayer::UpdateClientData( void ) if( m_flNextSBarUpdateTime < gpGlobals->time ) { UpdateStatusBar(); - m_flNextSBarUpdateTime = gpGlobals->time + 0.2; + m_flNextSBarUpdateTime = gpGlobals->time + 0.2f; } // Send the current bhopcap state. @@ -4167,6 +4169,18 @@ int CBasePlayer::Illumination( void ) return iIllum; } +void CBasePlayer::SetPrefsFromUserinfo( char *infobuffer ) +{ + const char *pszKeyVal; + + pszKeyVal = g_engfuncs.pfnInfoKeyValue( infobuffer, "cl_autowepswitch" ); + + if( pszKeyVal[0] != '\0' ) + m_iAutoWepSwitch = atoi( pszKeyVal ); + else + m_iAutoWepSwitch = 1; +} + void CBasePlayer::EnableControl( BOOL fControl ) { if( !fControl ) @@ -4622,7 +4636,7 @@ void CInfoIntermission::Spawn( void ) pev->effects = EF_NODRAW; pev->v_angle = g_vecZero; - pev->nextthink = gpGlobals->time + 2;// let targets spawn! + pev->nextthink = gpGlobals->time + 2.0f;// let targets spawn! } void CInfoIntermission::Think( void ) diff --git a/dlls/player.h b/dlls/player.h index 2ef0283..5f7678f 100644 --- a/dlls/player.h +++ b/dlls/player.h @@ -312,7 +312,7 @@ class CBasePlayer : public CBaseMonster float m_flPlayAftershock; float m_flNextAmmoBurn;// while charging, when to absorb another unit of player's ammo? - //Player ID + // Player ID void InitStatusBar( void ); void UpdateStatusBar( void ); int m_izSBarState[SBAR_END]; @@ -321,8 +321,12 @@ class CBasePlayer : public CBaseMonster char m_SbarString0[SBAR_STRING_SIZE]; char m_SbarString1[SBAR_STRING_SIZE]; + void SetPrefsFromUserinfo( char *infobuffer ); + float m_flNextChatTime; + int m_iAutoWepSwitch; + Vector m_vecLastViewAngles; bool m_bSentBhopcap; // If false, the player just joined and needs a bhopcap message. diff --git a/dlls/rpg.cpp b/dlls/rpg.cpp index fe1fd8a..0b5b5f7 100644 --- a/dlls/rpg.cpp +++ b/dlls/rpg.cpp @@ -134,14 +134,14 @@ void CRpgRocket::Spawn( void ) SetThink( &CRpgRocket::IgniteThink ); SetTouch( &CGrenade::ExplodeTouch ); - pev->angles.x -= 30; + pev->angles.x -= 30.0f; UTIL_MakeVectors( pev->angles ); - pev->angles.x = -( pev->angles.x + 30 ); + pev->angles.x = -( pev->angles.x + 30.0f ); - pev->velocity = gpGlobals->v_forward * 250; - pev->gravity = 0.5; + pev->velocity = gpGlobals->v_forward * 250.0f; + pev->gravity = 0.5f; - pev->nextthink = gpGlobals->time + 0.4; + pev->nextthink = gpGlobals->time + 0.4f; pev->dmg = gSkillData.plrDmgRPG; } @@ -177,7 +177,7 @@ void CRpgRocket::IgniteThink( void ) pev->effects |= EF_LIGHT; // make rocket sound - EMIT_SOUND( ENT( pev ), CHAN_VOICE, "weapons/rocket1.wav", 1, 0.5 ); + EMIT_SOUND( ENT( pev ), CHAN_VOICE, "weapons/rocket1.wav", 1, 0.5f ); // rocket trail MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY ); @@ -196,7 +196,7 @@ void CRpgRocket::IgniteThink( void ) // set to follow laser spot SetThink( &CRpgRocket::FollowThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } void CRpgRocket::FollowThink( void ) @@ -217,7 +217,7 @@ void CRpgRocket::FollowThink( void ) { UTIL_TraceLine( pev->origin, pOther->pev->origin, dont_ignore_monsters, ENT( pev ), &tr ); // ALERT( at_console, "%f\n", tr.flFraction ); - if( tr.flFraction >= 0.90 ) + if( tr.flFraction >= 0.9f ) { vecDir = pOther->pev->origin - pev->origin; flDist = vecDir.Length(); @@ -235,23 +235,23 @@ void CRpgRocket::FollowThink( void ) // this acceleration and turning math is totally wrong, but it seems to respond well so don't change it. float flSpeed = pev->velocity.Length(); - if( gpGlobals->time - m_flIgniteTime < 1.0 ) + if( gpGlobals->time - m_flIgniteTime < 1.0f ) { - pev->velocity = pev->velocity * 0.2 + vecTarget * ( flSpeed * 0.8 + 400 ); + pev->velocity = pev->velocity * 0.2f + vecTarget * ( flSpeed * 0.8f + 400.0f ); if( pev->waterlevel == 3 ) { // go slow underwater - if( pev->velocity.Length() > 300 ) + if( pev->velocity.Length() > 300.0f ) { - pev->velocity = pev->velocity.Normalize() * 300; + pev->velocity = pev->velocity.Normalize() * 300.0f; } - UTIL_BubbleTrail( pev->origin - pev->velocity * 0.1, pev->origin, 4 ); + UTIL_BubbleTrail( pev->origin - pev->velocity * 0.1f, pev->origin, 4 ); } else { - if( pev->velocity.Length() > 2000 ) + if( pev->velocity.Length() > 2000.0f ) { - pev->velocity = pev->velocity.Normalize() * 2000; + pev->velocity = pev->velocity.Normalize() * 2000.0f; } } } @@ -262,8 +262,8 @@ void CRpgRocket::FollowThink( void ) pev->effects = 0; STOP_SOUND( ENT( pev ), CHAN_VOICE, "weapons/rocket1.wav" ); } - pev->velocity = pev->velocity * 0.2 + vecTarget * flSpeed * 0.798; - if( pev->waterlevel == 0 && pev->velocity.Length() < 1500 ) + pev->velocity = pev->velocity * 0.2f + vecTarget * flSpeed * 0.798f; + if( pev->waterlevel == 0 && pev->velocity.Length() < 1500.0f ) { if( CRpg *pLauncher = (CRpg*)( (CBaseEntity*)( m_hLauncher ) ) ) { @@ -275,7 +275,7 @@ void CRpgRocket::FollowThink( void ) } // ALERT( at_console, "%.0f\n", flSpeed ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } #endif @@ -297,7 +297,7 @@ void CRpg::Reload( void ) // Set the next attack time into the future so that WeaponIdle will get called more often // than reload, allowing the RPG LTD to be updated - m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 ); + m_flNextPrimaryAttack = GetNextAttackDelay( 0.5f ); if( m_cActiveRockets && m_fSpotActive ) { @@ -309,8 +309,8 @@ void CRpg::Reload( void ) #ifndef CLIENT_DLL if( m_pSpot && m_fSpotActive ) { - m_pSpot->Suspend( 2.1 ); - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 2.1; + m_pSpot->Suspend( 2.1f ); + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 2.1f; } #endif @@ -417,7 +417,7 @@ void CRpg::Holster( int skiplocal /* = 0 */ ) { m_fInReload = FALSE;// cancel any reload in progress. - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; SendWeaponAnim( RPG_HOLSTER1 ); @@ -442,7 +442,7 @@ void CRpg::PrimaryAttack() m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); UTIL_MakeVectors( m_pPlayer->pev->v_angle ); - Vector vecSrc = m_pPlayer->GetGunPosition() + gpGlobals->v_forward * 16 + gpGlobals->v_right * 8 + gpGlobals->v_up * -8; + Vector vecSrc = m_pPlayer->GetGunPosition() + gpGlobals->v_forward * 16.0f + gpGlobals->v_right * 8.0f + gpGlobals->v_up * -8.0f; CRpgRocket *pRocket = CRpgRocket::CreateRpgRocket( vecSrc, m_pPlayer->pev->v_angle, m_pPlayer, this ); @@ -463,15 +463,15 @@ void CRpg::PrimaryAttack() m_iClip--; - m_flNextPrimaryAttack = GetNextAttackDelay( 1.5 ); - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5; + m_flNextPrimaryAttack = GetNextAttackDelay( 1.5f ); + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5f; ResetEmptySound(); } else { PlayEmptySound(); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.2; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.2f; } UpdateSpot(); } @@ -487,7 +487,7 @@ void CRpg::SecondaryAttack() m_pSpot = NULL; } #endif - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.2; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.2f; } void CRpg::WeaponIdle( void ) @@ -502,15 +502,15 @@ void CRpg::WeaponIdle( void ) ResetEmptySound(); int iAnim; - float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 ); - if( flRand <= 0.75 || m_fSpotActive ) + float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0.0f, 1.0f ); + if( flRand <= 0.75f || m_fSpotActive ) { if( m_iClip == 0 ) iAnim = RPG_IDLE_UL; else iAnim = RPG_IDLE; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 90.0 / 15.0; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 90.0f / 15.0f; } else { @@ -519,14 +519,14 @@ void CRpg::WeaponIdle( void ) else iAnim = RPG_FIDGET; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0f; } SendWeaponAnim( iAnim ); } else { - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.0f; } } @@ -535,6 +535,9 @@ void CRpg::UpdateSpot( void ) #ifndef CLIENT_DLL if( m_fSpotActive ) { + if (m_pPlayer->pev->viewmodel == 0) + return; + if( !m_pSpot ) { m_pSpot = CLaserSpot::CreateSpot(); @@ -545,7 +548,7 @@ void CRpg::UpdateSpot( void ) Vector vecAiming = gpGlobals->v_forward; TraceResult tr; - UTIL_TraceLine( vecSrc, vecSrc + vecAiming * 8192, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); + UTIL_TraceLine( vecSrc, vecSrc + vecAiming * 8192.0f, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); UTIL_SetOrigin( m_pSpot->pev, tr.vecEndPos ); } diff --git a/dlls/schedule.cpp b/dlls/schedule.cpp index 4a5cefc..2a4cc31 100644 --- a/dlls/schedule.cpp +++ b/dlls/schedule.cpp @@ -414,7 +414,7 @@ void CBaseMonster::RunTask( Task_t *pTask ) distance = ( m_vecMoveGoal - pev->origin ).Length2D(); // Re-evaluate when you think your finished, or the target has moved too far - if( ( distance < pTask->flData ) || ( m_vecMoveGoal - m_hTargetEnt->pev->origin ).Length() > pTask->flData * 0.5 ) + if( ( distance < pTask->flData ) || ( m_vecMoveGoal - m_hTargetEnt->pev->origin ).Length() > pTask->flData * 0.5f ) { m_vecMoveGoal = m_hTargetEnt->pev->origin; distance = ( m_vecMoveGoal - pev->origin ).Length2D(); @@ -1378,7 +1378,7 @@ Schedule_t *CBaseMonster::GetSchedule( void ) if( HasConditions( bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE ) ) { - if( fabs( FlYawDiff() ) < ( 1.0 - m_flFieldOfView ) * 60 ) // roughly in the correct direction + if( fabs( FlYawDiff() ) < ( 1.0f - m_flFieldOfView ) * 60.0f ) // roughly in the correct direction { return GetScheduleOfType( SCHED_TAKE_COVER_FROM_ORIGIN ); } diff --git a/dlls/scripted.cpp b/dlls/scripted.cpp index 8e3a88a..4c04a9f 100644 --- a/dlls/scripted.cpp +++ b/dlls/scripted.cpp @@ -136,10 +136,10 @@ void CCineMonster::Spawn( void ) if( FStringNull( pev->targetname ) || !FStringNull( m_iszIdle ) ) { SetThink( &CCineMonster::CineThink ); - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; // Wait to be used? if( pev->targetname ) - m_startTime = gpGlobals->time + 1E6; + m_startTime = gpGlobals->time + (float)1E6; } if( pev->spawnflags & SF_SCRIPT_NOINTERRUPT ) m_interruptable = FALSE; @@ -185,7 +185,7 @@ void CCineMonster::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE if( pTarget->m_scriptState == SCRIPT_PLAYING ) return; - m_startTime = gpGlobals->time + 0.05; + m_startTime = gpGlobals->time + 0.05f; } else { @@ -356,7 +356,7 @@ void CCineMonster::PossessEntity( void ) pTarget->pev->effects |= EF_NOINTERP; pTarget->pev->angles.y = pev->angles.y; pTarget->m_scriptState = SCRIPT_WAIT; - m_startTime = gpGlobals->time + 1E6; + m_startTime = gpGlobals->time + (float)1E6; // UNDONE: Add a flag to do this so people can fixup physics after teleporting monsters // pTarget->pev->flags &= ~FL_ONGROUND; break; @@ -424,7 +424,7 @@ void CCineAI::PossessEntity( void ) pTarget->pev->effects |= EF_NOINTERP; pTarget->pev->angles.y = pev->angles.y; pTarget->m_scriptState = SCRIPT_WAIT; - m_startTime = gpGlobals->time + 1E6; + m_startTime = gpGlobals->time + (float)1E6; // UNDONE: Add a flag to do this so people can fixup physics after teleporting monsters pTarget->pev->flags &= ~FL_ONGROUND; break; @@ -466,7 +466,7 @@ void CCineMonster::CineThink( void ) { CancelScript(); ALERT( at_aiconsole, "script \"%s\" can't find monster \"%s\"\n", STRING( pev->targetname ), STRING( m_iszEntity ) ); - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; } } @@ -544,7 +544,7 @@ void CCineMonster::SequenceDone( CBaseMonster *pMonster ) if( !( pev->spawnflags & SF_SCRIPT_REPEATABLE ) ) { SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } // This is done so that another sequence can take over the monster when triggered by the first @@ -713,7 +713,7 @@ void CCineMonster::DelayStart( int state ) { pTarget->m_iDelay--; if( pTarget->m_iDelay <= 0 ) - pTarget->m_startTime = gpGlobals->time + 0.05; + pTarget->m_startTime = gpGlobals->time + 0.05f; } } pentCine = FIND_ENTITY_BY_TARGETNAME( pentCine, STRING( pev->targetname ) ); @@ -836,7 +836,7 @@ BOOL CBaseMonster::CineCleanup() // UNDONE: ugly hack. Don't move monster if they don't "seem" to move // this really needs to be done with the AX,AY,etc. flags, but that aren't consistantly // being set, so animations that really do move won't be caught. - if( ( oldOrigin - new_origin).Length2D() < 8.0 ) + if( ( oldOrigin - new_origin).Length2D() < 8.0f ) new_origin = oldOrigin; pev->origin.x = new_origin.x; @@ -974,7 +974,7 @@ void CScriptedSentence::KeyValue( KeyValueData *pkvd ) } else if( FStrEq( pkvd->szKeyName, "volume" ) ) { - m_flVolume = atof( pkvd->szValue ) * 0.1; + m_flVolume = atof( pkvd->szValue ) * 0.1f; pkvd->fHandled = TRUE; } else if( FStrEq( pkvd->szKeyName, "listener" ) ) @@ -1004,7 +1004,7 @@ void CScriptedSentence::Spawn( void ) if( !pev->targetname ) { SetThink( &CScriptedSentence::FindThink ); - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; } switch( pev->impulse ) @@ -1030,8 +1030,8 @@ void CScriptedSentence::Spawn( void ) pev->impulse = 0; // No volume, use normal - if( m_flVolume <= 0 ) - m_flVolume = 1.0; + if( m_flVolume <= 0.0f ) + m_flVolume = 1.0f; } void CScriptedSentence::FindThink( void ) @@ -1050,7 +1050,7 @@ void CScriptedSentence::FindThink( void ) else { //ALERT( at_console, "%s: can't find monster %s\n", STRING( m_iszSentence ), STRING( m_iszEntity ) ); - pev->nextthink = gpGlobals->time + m_flRepeat + 0.5; + pev->nextthink = gpGlobals->time + m_flRepeat + 0.5f; } } @@ -1058,7 +1058,7 @@ void CScriptedSentence::DelayThink( void ) { m_active = TRUE; if( !pev->targetname ) - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; SetThink( &CScriptedSentence::FindThink ); } @@ -1146,7 +1146,7 @@ BOOL CScriptedSentence::StartSentence( CBaseMonster *pTarget ) } pTarget->PlayScriptedSentence( STRING( m_iszSentence ), m_flDuration, m_flVolume, m_flAttenuation, bConcurrent, pListener ); - ALERT( at_aiconsole, "Playing sentence %s (%.1f)\n", STRING( m_iszSentence ), m_flDuration ); + ALERT( at_aiconsole, "Playing sentence %s (%.1f)\n", STRING( m_iszSentence ), (double)m_flDuration ); SUB_UseTargets( NULL, USE_TOGGLE, 0 ); return TRUE; } @@ -1192,7 +1192,7 @@ void CFurniture::Spawn() pev->sequence = 0; pev->frame = 0; - //pev->nextthink += 1.0; + //pev->nextthink += 1.0f; //SetThink( &WalkMonsterDelay ); ResetSequenceInfo(); diff --git a/dlls/singleplay_gamerules.cpp b/dlls/singleplay_gamerules.cpp new file mode 100644 index 0000000..7f722e3 --- /dev/null +++ b/dlls/singleplay_gamerules.cpp @@ -0,0 +1,331 @@ +/*** +* +* Copyright (c) 1996-2002, Valve LLC. All rights reserved. +* +* This product contains software technology licensed from Id +* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. +* All Rights Reserved. +* +* Use, distribution, and modification of this source code and/or resulting +* object code is restricted to non-commercial enhancements to products from +* Valve LLC. All other use, distribution, or modification is prohibited +* without written permission from Valve LLC. +* +****/ +// +// teamplay_gamerules.cpp +// + +#include "extdll.h" +#include "util.h" +#include "cbase.h" +#include "player.h" +#include "weapons.h" +#include "gamerules.h" +#include "skill.h" +#include "items.h" + +extern DLL_GLOBAL CGameRules *g_pGameRules; +extern DLL_GLOBAL BOOL g_fGameOver; +extern int gmsgDeathMsg; // client dll messages +extern int gmsgScoreInfo; +extern int gmsgMOTD; + +//========================================================= +//========================================================= +CHalfLifeRules::CHalfLifeRules( void ) +{ + RefreshSkillData(); +} + +//========================================================= +//========================================================= +void CHalfLifeRules::Think( void ) +{ +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::IsMultiplayer( void ) +{ + return FALSE; +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::IsDeathmatch( void ) +{ + return FALSE; +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::IsCoOp( void ) +{ + return FALSE; +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::FShouldSwitchWeapon( CBasePlayer *pPlayer, CBasePlayerItem *pWeapon ) +{ + if( !pPlayer->m_pActiveItem ) + { + // player doesn't have an active item! + return TRUE; + } + + if( !pPlayer->m_iAutoWepSwitch ) + { + return FALSE; + } + + if( !pPlayer->m_pActiveItem->CanHolster() ) + { + return FALSE; + } + + return TRUE; +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::GetNextBestWeapon( CBasePlayer *pPlayer, CBasePlayerItem *pCurrentWeapon ) +{ + return FALSE; +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::ClientConnected( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128] ) +{ + return TRUE; +} + +void CHalfLifeRules::InitHUD( CBasePlayer *pl ) +{ +} + +//========================================================= +//========================================================= +void CHalfLifeRules::ClientDisconnected( edict_t *pClient ) +{ +} + +//========================================================= +//========================================================= +float CHalfLifeRules::FlPlayerFallDamage( CBasePlayer *pPlayer ) +{ + // subtract off the speed at which a player is allowed to fall without being hurt, + // so damage will be based on speed beyond that, not the entire fall + pPlayer->m_flFallVelocity -= PLAYER_MAX_SAFE_FALL_SPEED; + return pPlayer->m_flFallVelocity * DAMAGE_FOR_FALL_SPEED; +} + +//========================================================= +//========================================================= +void CHalfLifeRules::PlayerSpawn( CBasePlayer *pPlayer ) +{ +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::AllowAutoTargetCrosshair( void ) +{ + return ( g_iSkillLevel == SKILL_EASY ); +} + +//========================================================= +//========================================================= +void CHalfLifeRules::PlayerThink( CBasePlayer *pPlayer ) +{ +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::FPlayerCanRespawn( CBasePlayer *pPlayer ) +{ + return TRUE; +} + +//========================================================= +//========================================================= +float CHalfLifeRules::FlPlayerSpawnTime( CBasePlayer *pPlayer ) +{ + return gpGlobals->time;//now! +} + +//========================================================= +// IPointsForKill - how many points awarded to anyone +// that kills this player? +//========================================================= +int CHalfLifeRules::IPointsForKill( CBasePlayer *pAttacker, CBasePlayer *pKilled ) +{ + return 1; +} + +//========================================================= +// PlayerKilled - someone/something killed this player +//========================================================= +void CHalfLifeRules::PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor ) +{ +} + +//========================================================= +// Deathnotice +//========================================================= +void CHalfLifeRules::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor ) +{ +} + +//========================================================= +// PlayerGotWeapon - player has grabbed a weapon that was +// sitting in the world +//========================================================= +void CHalfLifeRules::PlayerGotWeapon( CBasePlayer *pPlayer, CBasePlayerItem *pWeapon ) +{ +} + +//========================================================= +// FlWeaponRespawnTime - what is the time in the future +// at which this weapon may spawn? +//========================================================= +float CHalfLifeRules::FlWeaponRespawnTime( CBasePlayerItem *pWeapon ) +{ + return -1; +} + +//========================================================= +// FlWeaponRespawnTime - Returns 0 if the weapon can respawn +// now, otherwise it returns the time at which it can try +// to spawn again. +//========================================================= +float CHalfLifeRules::FlWeaponTryRespawn( CBasePlayerItem *pWeapon ) +{ + return 0; +} + +//========================================================= +// VecWeaponRespawnSpot - where should this weapon spawn? +// Some game variations may choose to randomize spawn locations +//========================================================= +Vector CHalfLifeRules::VecWeaponRespawnSpot( CBasePlayerItem *pWeapon ) +{ + return pWeapon->pev->origin; +} + +//========================================================= +// WeaponShouldRespawn - any conditions inhibiting the +// respawning of this weapon? +//========================================================= +int CHalfLifeRules::WeaponShouldRespawn( CBasePlayerItem *pWeapon ) +{ + return GR_WEAPON_RESPAWN_NO; +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::CanHaveItem( CBasePlayer *pPlayer, CItem *pItem ) +{ + return TRUE; +} + +//========================================================= +//========================================================= +void CHalfLifeRules::PlayerGotItem( CBasePlayer *pPlayer, CItem *pItem ) +{ +} + +//========================================================= +//========================================================= +int CHalfLifeRules::ItemShouldRespawn( CItem *pItem ) +{ + return GR_ITEM_RESPAWN_NO; +} + +//========================================================= +// At what time in the future may this Item respawn? +//========================================================= +float CHalfLifeRules::FlItemRespawnTime( CItem *pItem ) +{ + return -1; +} + +//========================================================= +// Where should this item respawn? +// Some game variations may choose to randomize spawn locations +//========================================================= +Vector CHalfLifeRules::VecItemRespawnSpot( CItem *pItem ) +{ + return pItem->pev->origin; +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::IsAllowedToSpawn( CBaseEntity *pEntity ) +{ + return TRUE; +} + +//========================================================= +//========================================================= +void CHalfLifeRules::PlayerGotAmmo( CBasePlayer *pPlayer, char *szName, int iCount ) +{ +} + +//========================================================= +//========================================================= +int CHalfLifeRules::AmmoShouldRespawn( CBasePlayerAmmo *pAmmo ) +{ + return GR_AMMO_RESPAWN_NO; +} + +//========================================================= +//========================================================= +float CHalfLifeRules::FlAmmoRespawnTime( CBasePlayerAmmo *pAmmo ) +{ + return -1; +} + +//========================================================= +//========================================================= +Vector CHalfLifeRules::VecAmmoRespawnSpot( CBasePlayerAmmo *pAmmo ) +{ + return pAmmo->pev->origin; +} + +//========================================================= +//========================================================= +float CHalfLifeRules::FlHealthChargerRechargeTime( void ) +{ + return 0;// don't recharge +} + +//========================================================= +//========================================================= +int CHalfLifeRules::DeadPlayerWeapons( CBasePlayer *pPlayer ) +{ + return GR_PLR_DROP_GUN_NO; +} + +//========================================================= +//========================================================= +int CHalfLifeRules::DeadPlayerAmmo( CBasePlayer *pPlayer ) +{ + return GR_PLR_DROP_AMMO_NO; +} + +//========================================================= +//========================================================= +int CHalfLifeRules::PlayerRelationship( CBaseEntity *pPlayer, CBaseEntity *pTarget ) +{ + // why would a single player in half life need this? + return GR_NOTTEAMMATE; +} + +//========================================================= +//========================================================= +BOOL CHalfLifeRules::FAllowMonsters( void ) +{ + return TRUE; +} diff --git a/dlls/sound.cpp b/dlls/sound.cpp index 8fc5cb8..688b401 100644 --- a/dlls/sound.cpp +++ b/dlls/sound.cpp @@ -186,8 +186,8 @@ void CAmbientGeneric::Spawn( void ) if( FStringNull( pev->message ) || szSoundFile[0] == '\0' ) { - ALERT( at_error, "EMPTY AMBIENT AT: %f, %f, %f\n", pev->origin.x, pev->origin.y, pev->origin.z ); - pev->nextthink = gpGlobals->time + 0.1; + ALERT( at_error, "EMPTY AMBIENT AT: %f, %f, %f\n", (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z ); + pev->nextthink = gpGlobals->time + 0.1f; SetThink( &CBaseEntity::SUB_Remove ); return; } @@ -199,7 +199,7 @@ void CAmbientGeneric::Spawn( void ) // start thinking yet. SetThink( &CAmbientGeneric::RampThink ); - pev->nextthink = 0; + pev->nextthink = 0.0f; // allow on/off switching via 'use' function. @@ -236,9 +236,9 @@ void CAmbientGeneric::Precache( void ) if( m_fActive ) { UTIL_EmitAmbientSound( ENT( pev ), pev->origin, szSoundFile, - ( m_dpv.vol * 0.01 ), m_flAttenuation, SND_SPAWNING, m_dpv.pitch ); + ( m_dpv.vol * 0.01f ), m_flAttenuation, SND_SPAWNING, m_dpv.pitch ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } } @@ -280,7 +280,7 @@ void CAmbientGeneric::RampThink( void ) if( pitch < m_dpv.pitchstart ) { - pitch = m_dpv.pitchstart; + // pitch = m_dpv.pitchstart; m_dpv.spindown = 0; // done with ramp down // shut sound off @@ -324,7 +324,7 @@ void CAmbientGeneric::RampThink( void ) if( vol < m_dpv.volstart ) { - vol = m_dpv.volstart; + // vol = m_dpv.volstart; m_dpv.fadeout = 0; // done with ramp down // shut sound off @@ -433,11 +433,11 @@ void CAmbientGeneric::RampThink( void ) pitch = PITCH_NORM + 1; // don't send 'no pitch' ! UTIL_EmitAmbientSound( ENT( pev ), pev->origin, szSoundFile, - ( vol * 0.01 ), m_flAttenuation, flags, pitch ); + ( vol * 0.01f ), m_flAttenuation, flags, pitch ); } // update ramps at 5hz - pev->nextthink = gpGlobals->time + 0.2; + pev->nextthink = gpGlobals->time + 0.2f; return; } @@ -548,12 +548,12 @@ void CAmbientGeneric::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, fraction = value; - if( fraction > 1.0 ) - fraction = 1.0; - if( fraction < 0.0 ) - fraction = 0.01; + if( fraction > 1.0f ) + fraction = 1.0f; + if( fraction < 0.0f ) + fraction = 0.01f; - m_dpv.pitch = (int)( fraction * 255 ); + m_dpv.pitch = (int)( fraction * 255.0f ); UTIL_EmitAmbientSound( ENT( pev ), pev->origin, szSoundFile, 0, 0, SND_CHANGE_PITCH, m_dpv.pitch ); return; @@ -584,7 +584,7 @@ void CAmbientGeneric::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, if( m_dpv.pitchrun > 255 ) m_dpv.pitchrun = 255; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } } else @@ -602,7 +602,7 @@ void CAmbientGeneric::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, m_dpv.fadeout = m_dpv.fadeoutsav; m_dpv.fadein = 0; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } else UTIL_EmitAmbientSound( ENT( pev ), pev->origin, szSoundFile, 0, 0, SND_STOP, 0 ); @@ -625,9 +625,9 @@ void CAmbientGeneric::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, // init all ramp params for startup InitModulationParms(); - UTIL_EmitAmbientSound( ENT( pev ), pev->origin, szSoundFile, ( m_dpv.vol * 0.01 ), m_flAttenuation, 0, m_dpv.pitch ); + UTIL_EmitAmbientSound( ENT( pev ), pev->origin, szSoundFile, ( m_dpv.vol * 0.01f ), m_flAttenuation, 0, m_dpv.pitch ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } } @@ -962,10 +962,10 @@ void CEnvSound::Think( void ) // not in range. do nothing, fall through to think_fast... env_sound_Think_fast: - pev->nextthink = gpGlobals->time + 0.25; + pev->nextthink = gpGlobals->time + 0.25f; return; env_sound_Think_slow: - pev->nextthink = gpGlobals->time + 0.75; + pev->nextthink = gpGlobals->time + 0.75f; return; } @@ -977,7 +977,7 @@ void CEnvSound::Think( void ) void CEnvSound::Spawn() { // spread think times - pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.0, 0.5 ); + pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.0f, 0.5f ); } // ==================== SENTENCE GROUPS, UTILITY FUNCTIONS ====================================== @@ -1400,7 +1400,7 @@ void EMIT_SOUND_SUIT( edict_t *entity, const char *sample ) if( RANDOM_LONG( 0, 1 ) ) pitch = RANDOM_LONG( 0, 6 ) + 98; - if( fvol > 0.05 ) + if( fvol > 0.05f ) EMIT_SOUND_DYN( entity, CHAN_STATIC, sample, fvol, ATTN_NORM, 0, pitch ); } @@ -1415,7 +1415,7 @@ void EMIT_GROUPID_SUIT( edict_t *entity, int isentenceg ) if( RANDOM_LONG( 0, 1 ) ) pitch = RANDOM_LONG( 0, 6 ) + 98; - if( fvol > 0.05 ) + if( fvol > 0.05f ) SENTENCEG_PlayRndI( entity, isentenceg, fvol, ATTN_NORM, 0, pitch ); } @@ -1430,7 +1430,7 @@ void EMIT_GROUPNAME_SUIT( edict_t *entity, const char *groupname ) if( RANDOM_LONG( 0, 1 ) ) pitch = RANDOM_LONG( 0, 6 ) + 98; - if( fvol > 0.05 ) + if( fvol > 0.05f ) SENTENCEG_PlayRndSz( entity, groupname, fvol, ATTN_NORM, 0, pitch ); } @@ -1523,7 +1523,7 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in float fattn = ATTN_NORM; if( !g_pGameRules->PlayTextureSounds() ) - return 0.0; + return 0.0f; CBaseEntity *pEntity = CBaseEntity::Instance( ptr->pHit ); @@ -1572,44 +1572,44 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in { default: case CHAR_TEX_CONCRETE: - fvol = 0.9; - fvolbar = 0.6; + fvol = 0.9f; + fvolbar = 0.6f; rgsz[0] = "player/pl_step1.wav"; rgsz[1] = "player/pl_step2.wav"; cnt = 2; break; case CHAR_TEX_METAL: - fvol = 0.9; - fvolbar = 0.3; + fvol = 0.9f; + fvolbar = 0.3f; rgsz[0] = "player/pl_metal1.wav"; rgsz[1] = "player/pl_metal2.wav"; cnt = 2; break; case CHAR_TEX_DIRT: - fvol = 0.9; - fvolbar = 0.1; + fvol = 0.9f; + fvolbar = 0.1f; rgsz[0] = "player/pl_dirt1.wav"; rgsz[1] = "player/pl_dirt2.wav"; rgsz[2] = "player/pl_dirt3.wav"; cnt = 3; break; case CHAR_TEX_VENT: - fvol = 0.5; - fvolbar = 0.3; + fvol = 0.5f; + fvolbar = 0.3f; rgsz[0] = "player/pl_duct1.wav"; rgsz[1] = "player/pl_duct1.wav"; cnt = 2; break; case CHAR_TEX_GRATE: - fvol = 0.9; - fvolbar = 0.5; + fvol = 0.9f; + fvolbar = 0.5f; rgsz[0] = "player/pl_grate1.wav"; rgsz[1] = "player/pl_grate4.wav"; cnt = 2; break; case CHAR_TEX_TILE: - fvol = 0.8; - fvolbar = 0.2; + fvol = 0.8f; + fvolbar = 0.2f; rgsz[0] = "player/pl_tile1.wav"; rgsz[1] = "player/pl_tile3.wav"; rgsz[2] = "player/pl_tile2.wav"; @@ -1617,8 +1617,8 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in cnt = 4; break; case CHAR_TEX_SLOSH: - fvol = 0.9; - fvolbar = 0.0; + fvol = 0.9f; + fvolbar = 0.0f; rgsz[0] = "player/pl_slosh1.wav"; rgsz[1] = "player/pl_slosh3.wav"; rgsz[2] = "player/pl_slosh2.wav"; @@ -1626,8 +1626,8 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in cnt = 4; break; case CHAR_TEX_WOOD: - fvol = 0.9; - fvolbar = 0.2; + fvol = 0.9f; + fvolbar = 0.2f; rgsz[0] = "debris/wood1.wav"; rgsz[1] = "debris/wood2.wav"; rgsz[2] = "debris/wood3.wav"; @@ -1635,8 +1635,8 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in break; case CHAR_TEX_GLASS: case CHAR_TEX_COMPUTER: - fvol = 0.8; - fvolbar = 0.2; + fvol = 0.8f; + fvolbar = 0.2f; rgsz[0] = "debris/glass1.wav"; rgsz[1] = "debris/glass2.wav"; rgsz[2] = "debris/glass3.wav"; @@ -1644,12 +1644,12 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in break; case CHAR_TEX_FLESH: if( iBulletType == BULLET_PLAYER_CROWBAR ) - return 0.0; // crowbar already makes this sound - fvol = 1.0; - fvolbar = 0.2; + return 0.0f; // crowbar already makes this sound + fvol = 1.0f; + fvolbar = 0.2f; rgsz[0] = "weapons/bullet_hit1.wav"; rgsz[1] = "weapons/bullet_hit2.wav"; - fattn = 1.0; + fattn = 1.0f; cnt = 2; break; } @@ -1658,17 +1658,17 @@ float TEXTURETYPE_PlaySound( TraceResult *ptr, Vector vecSrc, Vector vecEnd, in if( pEntity && FClassnameIs( pEntity->pev, "func_breakable" ) ) { // drop volumes, the object will already play a damaged sound - fvol /= 1.5; - fvolbar /= 2.0; + fvol /= 1.5f; + fvolbar /= 2.0f; } else if( chTextureType == CHAR_TEX_COMPUTER ) { // play random spark if computer - if( ptr->flFraction != 1.0 && RANDOM_LONG( 0, 1 ) ) + if( ptr->flFraction != 1.0f && RANDOM_LONG( 0, 1 ) ) { UTIL_Sparks( ptr->vecEndPos ); - float flVolume = RANDOM_FLOAT( 0.7, 1.0 );//random volume range + float flVolume = RANDOM_FLOAT( 0.7f, 1.0f );//random volume range switch( RANDOM_LONG( 0, 1 ) ) { case 0: @@ -1734,8 +1734,8 @@ void CSpeaker::Spawn( void ) if( !m_preset && ( FStringNull( pev->message ) || szSoundFile[0] == '\0' ) ) { - ALERT( at_error, "SPEAKER with no Level/Sentence! at: %f, %f, %f\n", pev->origin.x, pev->origin.y, pev->origin.z ); - pev->nextthink = gpGlobals->time + 0.1; + ALERT( at_error, "SPEAKER with no Level/Sentence! at: %f, %f, %f\n", (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z ); + pev->nextthink = gpGlobals->time + 0.1f; SetThink( &CBaseEntity::SUB_Remove ); return; } @@ -1743,7 +1743,7 @@ void CSpeaker::Spawn( void ) pev->movetype = MOVETYPE_NONE; SetThink( &CSpeaker::SpeakerThink ); - pev->nextthink = 0.0; + pev->nextthink = 0.0f; // allow on/off switching via 'use' function. SetUse( &CSpeaker::ToggleUse ); @@ -1751,27 +1751,27 @@ void CSpeaker::Spawn( void ) Precache(); } -#define ANNOUNCE_MINUTES_MIN 0.25 -#define ANNOUNCE_MINUTES_MAX 2.25 +#define ANNOUNCE_MINUTES_MIN 0.25f +#define ANNOUNCE_MINUTES_MAX 2.25f void CSpeaker::Precache( void ) { if( !FBitSet( pev->spawnflags, SPEAKER_START_SILENT ) ) // set first announcement time for random n second - pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 5.0, 15.0 ); + pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 5.0f, 15.0f ); } void CSpeaker::SpeakerThink( void ) { - const char* szSoundFile = NULL; - float flvolume = pev->health * 0.1; - float flattenuation = 0.3; + const char* szSoundFile = ""; + float flvolume = pev->health * 0.1f; + float flattenuation = 0.3f; int flags = 0; int pitch = 100; // Wait for the talkmonster to finish first. if( gpGlobals->time <= CTalkMonster::g_talkWaitTime ) { - pev->nextthink = CTalkMonster::g_talkWaitTime + RANDOM_FLOAT( 5, 10 ); + pev->nextthink = CTalkMonster::g_talkWaitTime + RANDOM_FLOAT( 5.0f, 10.0f ); return; } @@ -1828,7 +1828,7 @@ void CSpeaker::SpeakerThink( void ) flvolume, flattenuation, flags, pitch ); // shut off and reset - pev->nextthink = 0.0; + pev->nextthink = 0.0f; } else { @@ -1837,9 +1837,9 @@ void CSpeaker::SpeakerThink( void ) ALERT( at_console, "Level Design Error!\nSPEAKER has bad sentence group name: %s\n",szSoundFile ); // set next announcement time for random 5 to 10 minute delay - pev->nextthink = gpGlobals->time + RANDOM_FLOAT( ANNOUNCE_MINUTES_MIN * 60.0, ANNOUNCE_MINUTES_MAX * 60.0 ); + pev->nextthink = gpGlobals->time + RANDOM_FLOAT( ANNOUNCE_MINUTES_MIN * 60.0f, ANNOUNCE_MINUTES_MAX * 60.0f ); - CTalkMonster::g_talkWaitTime = gpGlobals->time + 5; // time delay until it's ok to speak: used so that two NPCs don't talk at once + CTalkMonster::g_talkWaitTime = gpGlobals->time + 5.0f; // time delay until it's ok to speak: used so that two NPCs don't talk at once } return; @@ -1850,7 +1850,7 @@ void CSpeaker::SpeakerThink( void ) // void CSpeaker::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { - int fActive = ( pev->nextthink > 0.0 ); + int fActive = ( pev->nextthink > 0.0f ); // fActive is TRUE only if an announcement is pending @@ -1865,14 +1865,14 @@ void CSpeaker::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP if( useType == USE_ON ) { // turn on announcements - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; return; } if( useType == USE_OFF ) { // turn off announcements - pev->nextthink = 0.0; + pev->nextthink = 0.0f; return; } @@ -1880,12 +1880,12 @@ void CSpeaker::ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP if( fActive ) { // turn off announcements - pev->nextthink = 0.0; + pev->nextthink = 0.0f; } else { // turn on announcements - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } } diff --git a/dlls/soundent.cpp b/dlls/soundent.cpp index 08000f2..7d9583f 100644 --- a/dlls/soundent.cpp +++ b/dlls/soundent.cpp @@ -82,7 +82,7 @@ void CSoundEnt::Spawn( void ) pev->solid = SOLID_NOT; Initialize(); - pev->nextthink = gpGlobals->time + 1; + pev->nextthink = gpGlobals->time + 1.0f; } //========================================================= @@ -95,7 +95,7 @@ void CSoundEnt::Think( void ) int iSound; int iPreviousSound; - pev->nextthink = gpGlobals->time + 0.3;// how often to check the sound list. + pev->nextthink = gpGlobals->time + 0.3f;// how often to check the sound list. iPreviousSound = SOUNDLIST_EMPTY; iSound = m_iActiveSound; diff --git a/dlls/squadmonster.cpp b/dlls/squadmonster.cpp index 3d476b5..cbf3f19 100644 --- a/dlls/squadmonster.cpp +++ b/dlls/squadmonster.cpp @@ -355,7 +355,7 @@ int CSquadMonster::SquadRecruit( int searchRadius, int maxMembers ) { TraceResult tr; UTIL_TraceLine( pev->origin + pev->view_ofs, pRecruit->pev->origin + pev->view_ofs, ignore_monsters, pRecruit->edict(), &tr );// try to hit recruit with a traceline. - if( tr.flFraction == 1.0 ) + if( tr.flFraction == 1.0f ) { if( !SquadAdd( pRecruit ) ) break; @@ -457,6 +457,7 @@ BOOL CSquadMonster::NoFriendlyFire( void ) Vector vecLeftSide; Vector vecRightSide; Vector v_left; + Vector v_dir; //!!!BUGBUG - to fix this, the planes must be aligned to where the monster will be firing its gun, not the direction it is facing!!! if( m_hEnemy != 0 ) @@ -471,9 +472,13 @@ BOOL CSquadMonster::NoFriendlyFire( void ) //UTIL_MakeVectors( pev->angles ); - vecLeftSide = pev->origin - ( gpGlobals->v_right * ( pev->size.x * 1.5 ) ); - vecRightSide = pev->origin + ( gpGlobals->v_right * ( pev->size.x * 1.5 ) ); - v_left = gpGlobals->v_right * -1; + // vecLeftSide = pev->origin - ( gpGlobals->v_right * ( pev->size.x * 1.5f ) ); + // vecRightSide = pev->origin + ( gpGlobals->v_right * ( pev->size.x * 1.5f ) ); + v_dir = gpGlobals->v_right * ( pev->size.x * 1.5f ); + vecLeftSide = pev->origin - v_dir; + vecRightSide = pev->origin + v_dir; + + v_left = gpGlobals->v_right * -1.0f; leftPlane.InitializePlane( gpGlobals->v_right, vecLeftSide ); rightPlane.InitializePlane( v_left, vecRightSide ); diff --git a/dlls/subs.cpp b/dlls/subs.cpp index 9550837..3a33a9c 100644 --- a/dlls/subs.cpp +++ b/dlls/subs.cpp @@ -230,7 +230,7 @@ void CBaseDelay::SUB_UseTargets( CBaseEntity *pActivator, USE_TYPE useType, floa // Save the useType pTemp->pev->button = (int)useType; pTemp->m_iszKillTarget = m_iszKillTarget; - pTemp->m_flDelay = 0; // prevent "recursion" + pTemp->m_flDelay = 0.0f; // prevent "recursion" pTemp->pev->target = pev->target; // HACKHACK @@ -400,7 +400,7 @@ void CBaseToggle::LinearMove( Vector vecDest, float flSpeed ) // divide vector length by speed to get time to reach dest float flTravelTime = vecDestDelta.Length() / flSpeed; - if( flTravelTime < 0.05 ) + if( flTravelTime < 0.05f ) { UTIL_SetOrigin( pev, m_vecFinalDest ); LinearMoveDone(); @@ -424,7 +424,7 @@ void CBaseToggle::LinearMoveDone( void ) { Vector delta = m_vecFinalDest - pev->origin; float error = delta.Length(); - if( error > 0.03125 ) + if( error > 0.03125f ) { LinearMove( m_vecFinalDest, 100 ); return; diff --git a/dlls/talkmonster.cpp b/dlls/talkmonster.cpp index 9180f03..581d87a 100644 --- a/dlls/talkmonster.cpp +++ b/dlls/talkmonster.cpp @@ -64,13 +64,13 @@ const char *CTalkMonster::m_szFriends[TLK_CFRIENDS] = Task_t tlIdleResponse[] = { { TASK_SET_ACTIVITY, (float)ACT_IDLE }, // Stop and listen - { TASK_WAIT, (float)0.5 }, // Wait until sure it's me they are talking to - { TASK_TLK_EYECONTACT, (float)0 }, // Wait until speaker is done - { TASK_TLK_RESPOND, (float)0 }, // Wait and then say my response - { TASK_TLK_IDEALYAW, (float)0 }, // look at who I'm talking to - { TASK_FACE_IDEAL, (float)0 }, + { TASK_WAIT, 0.5f }, // Wait until sure it's me they are talking to + { TASK_TLK_EYECONTACT, 0.0f }, // Wait until speaker is done + { TASK_TLK_RESPOND, 0.0f }, // Wait and then say my response + { TASK_TLK_IDEALYAW, 0.0f }, // look at who I'm talking to + { TASK_FACE_IDEAL, 0.0f }, { TASK_SET_ACTIVITY, (float)ACT_SIGNAL3 }, - { TASK_TLK_EYECONTACT, (float)0 }, // Wait until speaker is done + { TASK_TLK_EYECONTACT, 0.0f }, // Wait until speaker is done }; Schedule_t slIdleResponse[] = @@ -88,12 +88,12 @@ Schedule_t slIdleResponse[] = Task_t tlIdleSpeak[] = { - { TASK_TLK_SPEAK, (float)0 },// question or remark - { TASK_TLK_IDEALYAW, (float)0 },// look at who I'm talking to - { TASK_FACE_IDEAL, (float)0 }, + { TASK_TLK_SPEAK, 0.0f },// question or remark + { TASK_TLK_IDEALYAW, 0.0f },// look at who I'm talking to + { TASK_FACE_IDEAL, 0.0f }, { TASK_SET_ACTIVITY, (float)ACT_SIGNAL3 }, - { TASK_TLK_EYECONTACT, (float)0 }, - { TASK_WAIT_RANDOM, (float)0.5 }, + { TASK_TLK_EYECONTACT, 0.0f }, + { TASK_WAIT_RANDOM, 0.5f }, }; Schedule_t slIdleSpeak[] = @@ -113,9 +113,9 @@ Schedule_t slIdleSpeak[] = Task_t tlIdleSpeakWait[] = { { TASK_SET_ACTIVITY, (float)ACT_SIGNAL3 },// Stop and talk - { TASK_TLK_SPEAK, (float)0 },// question or remark - { TASK_TLK_EYECONTACT, (float)0 },// - { TASK_WAIT, (float)2 },// wait - used when sci is in 'use' mode to keep head turned + { TASK_TLK_SPEAK, 0.0f },// question or remark + { TASK_TLK_EYECONTACT, 0.0f },// + { TASK_WAIT, 2.0f },// wait - used when sci is in 'use' mode to keep head turned }; Schedule_t slIdleSpeakWait[] = @@ -135,18 +135,18 @@ Schedule_t slIdleSpeakWait[] = Task_t tlIdleHello[] = { { TASK_SET_ACTIVITY, (float)ACT_SIGNAL3 },// Stop and talk - { TASK_TLK_HELLO, (float)0 },// Try to say hello to player - { TASK_TLK_EYECONTACT, (float)0 }, - { TASK_WAIT, (float)0.5 },// wait a bit - { TASK_TLK_HELLO, (float)0 },// Try to say hello to player - { TASK_TLK_EYECONTACT, (float)0 }, - { TASK_WAIT, (float)0.5 },// wait a bit - { TASK_TLK_HELLO, (float)0 },// Try to say hello to player - { TASK_TLK_EYECONTACT, (float)0 }, - { TASK_WAIT, (float)0.5 },// wait a bit - { TASK_TLK_HELLO, (float)0 },// Try to say hello to player - { TASK_TLK_EYECONTACT, (float)0 }, - { TASK_WAIT, (float)0.5 },// wait a bit + { TASK_TLK_HELLO, 0.0f },// Try to say hello to player + { TASK_TLK_EYECONTACT, 0.0f }, + { TASK_WAIT, 0.5f },// wait a bit + { TASK_TLK_HELLO, 0.0f },// Try to say hello to player + { TASK_TLK_EYECONTACT, 0.0f }, + { TASK_WAIT, 0.5f },// wait a bit + { TASK_TLK_HELLO, 0.0f },// Try to say hello to player + { TASK_TLK_EYECONTACT, 0.0f }, + { TASK_WAIT, 0.5f },// wait a bit + { TASK_TLK_HELLO, 0.0f },// Try to say hello to player + { TASK_TLK_EYECONTACT, 0.0f }, + { TASK_WAIT, 0.5f },// wait a bit }; Schedule_t slIdleHello[] = @@ -167,8 +167,8 @@ Schedule_t slIdleHello[] = Task_t tlIdleStopShooting[] = { - { TASK_TLK_STOPSHOOTING, (float)0 },// tell player to stop shooting friend - // { TASK_TLK_EYECONTACT, (float)0 },// look at the player + { TASK_TLK_STOPSHOOTING, 0.0f },// tell player to stop shooting friend + // { TASK_TLK_EYECONTACT, 0.0f },// look at the player }; Schedule_t slIdleStopShooting[] = @@ -188,11 +188,11 @@ Schedule_t slIdleStopShooting[] = Task_t tlMoveAway[] = { { TASK_SET_FAIL_SCHEDULE, (float)SCHED_MOVE_AWAY_FAIL }, - { TASK_STORE_LASTPOSITION, (float)0 }, - { TASK_MOVE_AWAY_PATH, (float)100 }, - { TASK_WALK_PATH_FOR_UNITS, (float)100 }, - { TASK_STOP_MOVING, (float)0 }, - { TASK_FACE_PLAYER, (float)0.5 }, + { TASK_STORE_LASTPOSITION, 0.0f }, + { TASK_MOVE_AWAY_PATH, 100.0f }, + { TASK_WALK_PATH_FOR_UNITS, 100.0f }, + { TASK_STOP_MOVING, 0.0f }, + { TASK_FACE_PLAYER, 0.5f }, }; Schedule_t slMoveAway[] = @@ -208,8 +208,8 @@ Schedule_t slMoveAway[] = Task_t tlMoveAwayFail[] = { - { TASK_STOP_MOVING, (float)0 }, - { TASK_FACE_PLAYER, (float)0.5 }, + { TASK_STOP_MOVING, 0.0f }, + { TASK_FACE_PLAYER, 0.5f }, }; Schedule_t slMoveAwayFail[] = @@ -248,19 +248,19 @@ Task_t tlTlkIdleWatchClient[] = { { TASK_STOP_MOVING, 0 }, { TASK_SET_ACTIVITY, (float)ACT_IDLE }, - { TASK_TLK_LOOK_AT_CLIENT, (float)6 }, + { TASK_TLK_LOOK_AT_CLIENT, 6.0f }, }; Task_t tlTlkIdleWatchClientStare[] = { { TASK_STOP_MOVING, 0 }, { TASK_SET_ACTIVITY, (float)ACT_IDLE }, - { TASK_TLK_CLIENT_STARE, (float)6 }, - { TASK_TLK_STARE, (float)0 }, - { TASK_TLK_IDEALYAW, (float)0 },// look at who I'm talking to - { TASK_FACE_IDEAL, (float)0 }, + { TASK_TLK_CLIENT_STARE, 6.0f }, + { TASK_TLK_STARE, 0.0f }, + { TASK_TLK_IDEALYAW, 0.0f },// look at who I'm talking to + { TASK_FACE_IDEAL, 0.0f }, { TASK_SET_ACTIVITY, (float)ACT_SIGNAL3 }, - { TASK_TLK_EYECONTACT, (float)0 }, + { TASK_TLK_EYECONTACT, 0.0f }, }; Schedule_t slTlkIdleWatchClient[] = @@ -310,10 +310,10 @@ Schedule_t slTlkIdleWatchClient[] = Task_t tlTlkIdleEyecontact[] = { - { TASK_TLK_IDEALYAW, (float)0 },// look at who I'm talking to - { TASK_FACE_IDEAL, (float)0 }, + { TASK_TLK_IDEALYAW, 0.0f },// look at who I'm talking to + { TASK_FACE_IDEAL, 0.0f }, { TASK_SET_ACTIVITY, (float)ACT_SIGNAL3 }, - { TASK_TLK_EYECONTACT, (float)0 },// Wait until speaker is done + { TASK_TLK_EYECONTACT, 0.0f },// Wait until speaker is done }; Schedule_t slTlkIdleEyecontact[] = @@ -445,7 +445,7 @@ void CTalkMonster::StartTask( Task_t *pTask ) else if( FindCover( pev->origin, pev->view_ofs, 0, CoverRadius() ) ) { // then try for plain ole cover - m_flMoveWaitFinished = gpGlobals->time + 2; + m_flMoveWaitFinished = gpGlobals->time + 2.0f; TaskComplete(); } else @@ -494,18 +494,21 @@ void CTalkMonster::RunTask( Task_t *pTask ) if( pTask->iTask == TASK_TLK_CLIENT_STARE ) { - // fail out if the player looks away or moves away. - if( ( pPlayer->v.origin - pev->origin ).Length2D() > TLK_STARE_DIST ) + if( pPlayer ) { - // player moved away. - TaskFail(); - } + // fail out if the player looks away or moves away. + if( ( pPlayer->v.origin - pev->origin ).Length2D() > TLK_STARE_DIST ) + { + // player moved away. + TaskFail(); + } - UTIL_MakeVectors( pPlayer->v.angles ); - if( UTIL_DotPoints( pPlayer->v.origin, pev->origin, gpGlobals->v_forward ) < m_flFieldOfView ) - { - // player looked away - TaskFail(); + UTIL_MakeVectors( pPlayer->v.angles ); + if( UTIL_DotPoints( pPlayer->v.origin, pev->origin, gpGlobals->v_forward ) < m_flFieldOfView ) + { + // player looked away + TaskFail(); + } } } @@ -631,9 +634,9 @@ CBaseEntity *CTalkMonster::EnumFriends( CBaseEntity *pPrevious, int listNumber, UTIL_TraceLine( pev->origin, vecCheck, ignore_monsters, ENT( pev ), &tr ); } else - tr.flFraction = 1.0; + tr.flFraction = 1.0f; - if( tr.flFraction == 1.0 ) + if( tr.flFraction == 1.0f ) { return pFriend; } @@ -732,7 +735,7 @@ void CTalkMonster::HandleAnimEvent( MonsterEvent_t *pEvent ) // fall through... case SCRIPT_EVENT_SENTENCE: // Play a named sentence group ShutUpFriends(); - PlaySentence( pEvent->options, RANDOM_FLOAT( 2.8, 3.4 ), VOL_NORM, ATTN_IDLE ); + PlaySentence( pEvent->options, RANDOM_FLOAT( 2.8f, 3.4f ), VOL_NORM, ATTN_IDLE ); //ALERT( at_console, "script event speak\n" ); break; default: @@ -806,7 +809,7 @@ CBaseEntity *CTalkMonster::FindNearestFriend( BOOL fPlayer ) { UTIL_TraceLine( vecStart, vecCheck, ignore_monsters, ENT( pev ), &tr ); - if( tr.flFraction == 1.0 ) + if( tr.flFraction == 1.0f ) { // visible and in range, this is the new nearest scientist if( ( vecStart - vecCheck ).Length() < TALKRANGE_MIN ) @@ -841,7 +844,7 @@ void CTalkMonster::Touch( CBaseEntity *pOther ) // Heuristic for determining if the player is pushing me away float speed = fabs( pOther->pev->velocity.x ) + fabs( pOther->pev->velocity.y ); - if( speed > 50 ) + if( speed > 50.0f ) { SetConditions( bits_COND_CLIENT_PUSH ); MakeIdealYaw( pOther->pev->origin ); @@ -858,7 +861,7 @@ void CTalkMonster::IdleRespond( void ) //int pitch = GetVoicePitch(); // play response - PlaySentence( m_szGrp[TLK_ANSWER], RANDOM_FLOAT( 2.8, 3.2 ), VOL_NORM, ATTN_IDLE ); + PlaySentence( m_szGrp[TLK_ANSWER], RANDOM_FLOAT( 2.8f, 3.2f ), VOL_NORM, ATTN_IDLE ); } int CTalkMonster::FOkToSpeak( void ) @@ -939,9 +942,9 @@ int CTalkMonster::FIdleHello( void ) m_hTalkTarget = pPlayer; if( FBitSet(pev->spawnflags, SF_MONSTER_PREDISASTER ) ) - PlaySentence( m_szGrp[TLK_PHELLO], RANDOM_FLOAT( 3, 3.5 ), VOL_NORM, ATTN_IDLE ); + PlaySentence( m_szGrp[TLK_PHELLO], RANDOM_FLOAT( 3.0f, 3.5f ), VOL_NORM, ATTN_IDLE ); else - PlaySentence( m_szGrp[TLK_HELLO], RANDOM_FLOAT( 3, 3.5 ), VOL_NORM, ATTN_IDLE ); + PlaySentence( m_szGrp[TLK_HELLO], RANDOM_FLOAT( 3.0f, 3.5f ), VOL_NORM, ATTN_IDLE ); SetBits( m_bitsSaid, bit_saidHelloPlayer ); @@ -991,14 +994,14 @@ int CTalkMonster::FIdleSpeak( void ) szIdleGroup = m_szGrp[TLK_PIDLE]; szQuestionGroup = m_szGrp[TLK_PQUESTION]; // set global min delay for next conversation - duration = RANDOM_FLOAT( 4.8, 5.2 ); + duration = RANDOM_FLOAT( 4.8f, 5.2f ); } else { szIdleGroup = m_szGrp[TLK_IDLE]; szQuestionGroup = m_szGrp[TLK_QUESTION]; // set global min delay for next conversation - duration = RANDOM_FLOAT( 2.8, 3.2 ); + duration = RANDOM_FLOAT( 2.8f, 3.2f ); } //pitch = GetVoicePitch(); @@ -1105,7 +1108,7 @@ void CTalkMonster::PlaySentence( const char *pszSentence, float duration, float Talk( duration ); - CTalkMonster::g_talkWaitTime = gpGlobals->time + duration + 2.0; + CTalkMonster::g_talkWaitTime = gpGlobals->time + duration + 2.0f; if( pszSentence[0] == '!' ) EMIT_SOUND_DYN( edict(), CHAN_VOICE, pszSentence, volume, attenuation, 0, GetVoicePitch() ); else @@ -1124,7 +1127,7 @@ void CTalkMonster::Talk( float flDuration ) if( flDuration <= 0 ) { // no duration :( - m_flStopTalkTime = gpGlobals->time + 3; + m_flStopTalkTime = gpGlobals->time + 3.0f; } else { @@ -1186,20 +1189,20 @@ Schedule_t *CTalkMonster::GetScheduleOfType( int Type ) } // sustained light wounds? - if( !FBitSet( m_bitsSaid, bit_saidWoundLight ) && ( pev->health <= ( pev->max_health * 0.75 ) ) ) + if( !FBitSet( m_bitsSaid, bit_saidWoundLight ) && ( pev->health <= ( pev->max_health * 0.75f ) ) ) { //SENTENCEG_PlayRndSz( ENT( pev ), m_szGrp[TLK_WOUND], 1.0, ATTN_IDLE, 0, GetVoicePitch() ); - //CTalkMonster::g_talkWaitTime = gpGlobals->time + RANDOM_FLOAT( 2.8, 3.2 ); - PlaySentence( m_szGrp[TLK_WOUND], RANDOM_FLOAT( 2.8, 3.2 ), VOL_NORM, ATTN_IDLE ); + //CTalkMonster::g_talkWaitTime = gpGlobals->time + RANDOM_FLOAT( 2.8f, 3.2f ); + PlaySentence( m_szGrp[TLK_WOUND], RANDOM_FLOAT( 2.8f, 3.2f ), VOL_NORM, ATTN_IDLE ); SetBits( m_bitsSaid, bit_saidWoundLight ); return slIdleStand; } // sustained heavy wounds? - else if( !FBitSet( m_bitsSaid, bit_saidWoundHeavy ) && ( pev->health <= ( pev->max_health * 0.5 ) ) ) + else if( !FBitSet( m_bitsSaid, bit_saidWoundHeavy ) && ( pev->health <= ( pev->max_health * 0.5f ) ) ) { //SENTENCEG_PlayRndSz( ENT( pev ), m_szGrp[TLK_MORTAL], 1.0, ATTN_IDLE, 0, GetVoicePitch() ); - //CTalkMonster::g_talkWaitTime = gpGlobals->time + RANDOM_FLOAT( 2.8, 3.2 ); - PlaySentence( m_szGrp[TLK_MORTAL], RANDOM_FLOAT( 2.8, 3.2 ), VOL_NORM, ATTN_IDLE ); + //CTalkMonster::g_talkWaitTime = gpGlobals->time + RANDOM_FLOAT( 2.8f, 3.2f ); + PlaySentence( m_szGrp[TLK_MORTAL], RANDOM_FLOAT( 2.8f, 3.2f ), VOL_NORM, ATTN_IDLE ); SetBits( m_bitsSaid, bit_saidWoundHeavy ); return slIdleStand; } @@ -1289,8 +1292,8 @@ void CTalkMonster::TrySmellTalk( void ) // smelled something? if( !FBitSet( m_bitsSaid, bit_saidSmelled ) && HasConditions( bits_COND_SMELL ) ) { - PlaySentence( m_szGrp[TLK_SMELL], RANDOM_FLOAT( 2.8, 3.2 ), VOL_NORM, ATTN_IDLE ); - m_flLastSaidSmelled = gpGlobals->time + 60;// don't talk about the stinky for a while. + PlaySentence( m_szGrp[TLK_SMELL], RANDOM_FLOAT( 2.8f, 3.2f ), VOL_NORM, ATTN_IDLE ); + m_flLastSaidSmelled = gpGlobals->time + 60.0f;// don't talk about the stinky for a while. SetBits( m_bitsSaid, bit_saidSmelled ); } } @@ -1309,7 +1312,7 @@ void CTalkMonster::StopFollowing( BOOL clearSchedule ) { if( !( m_afMemory & bits_MEMORY_PROVOKED ) ) { - PlaySentence( m_szGrp[TLK_UNUSE], RANDOM_FLOAT( 2.8, 3.2 ), VOL_NORM, ATTN_IDLE ); + PlaySentence( m_szGrp[TLK_UNUSE], RANDOM_FLOAT( 2.8f, 3.2f ), VOL_NORM, ATTN_IDLE ); m_hTalkTarget = m_hTargetEnt; } @@ -1332,7 +1335,7 @@ void CTalkMonster::StartFollowing( CBaseEntity *pLeader ) m_IdealMonsterState = MONSTERSTATE_ALERT; m_hTargetEnt = pLeader; - PlaySentence( m_szGrp[TLK_USE], RANDOM_FLOAT( 2.8, 3.2 ), VOL_NORM, ATTN_IDLE ); + PlaySentence( m_szGrp[TLK_USE], RANDOM_FLOAT( 2.8f, 3.2f ), VOL_NORM, ATTN_IDLE ); m_hTalkTarget = m_hTargetEnt; ClearConditions( bits_COND_CLIENT_PUSH ); ClearSchedule(); diff --git a/dlls/talkmonster.h b/dlls/talkmonster.h index 36ac21a..befa4e4 100644 --- a/dlls/talkmonster.h +++ b/dlls/talkmonster.h @@ -25,7 +25,7 @@ // Used for scientists and barneys //========================================================= -#define TALKRANGE_MIN 500.0 // don't talk to anyone farther away than this +#define TALKRANGE_MIN 500.0f // don't talk to anyone farther away than this #define TLK_STARE_DIST 128 // anyone closer than this and looking at me is probably staring at me. diff --git a/dlls/teamplay_gamerules.cpp b/dlls/teamplay_gamerules.cpp index 1c27f87..ec9078b 100644 --- a/dlls/teamplay_gamerules.cpp +++ b/dlls/teamplay_gamerules.cpp @@ -327,6 +327,8 @@ void CHalfLifeTeamplay::ClientUserInfoChanged( CBasePlayer *pPlayer, char *infob // recound stuff RecountTeams( TRUE ); + + pPlayer->SetPrefsFromUserinfo( infobuffer ); } extern int gmsgDeathMsg; diff --git a/dlls/triggers.cpp b/dlls/triggers.cpp index b763349..2c0888c 100644 --- a/dlls/triggers.cpp +++ b/dlls/triggers.cpp @@ -163,7 +163,7 @@ void CAutoTrigger::Spawn( void ) void CAutoTrigger::Precache( void ) { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } void CAutoTrigger::Think( void ) @@ -614,7 +614,7 @@ void CTriggerMonsterJump::Touch( CBaseEntity *pOther ) return; } - pevOther->origin.z += 1; + pevOther->origin.z += 1.0f; if( FBitSet( pevOther->flags, FL_ONGROUND ) ) { @@ -739,7 +739,7 @@ void CTargetCDAudio::Spawn( void ) pev->movetype = MOVETYPE_NONE; if( pev->scale > 0 ) - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; } void CTargetCDAudio::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) @@ -759,7 +759,7 @@ void CTargetCDAudio::Think( void ) if( !pClient ) return; - pev->nextthink = gpGlobals->time + 0.5; + pev->nextthink = gpGlobals->time + 0.5f; if( ( pClient->v.origin - pev->origin ).Length() <= pev->scale ) Play(); @@ -825,8 +825,8 @@ void CTriggerHurt::RadiationThink( void ) origin = pev->origin; view_ofs = pev->view_ofs; - pev->origin = ( pev->absmin + pev->absmax ) * 0.5; - pev->view_ofs = pev->view_ofs * 0.0; + pev->origin = ( pev->absmin + pev->absmax ) * 0.5f; + pev->view_ofs = pev->view_ofs * 0.0f; pentPlayer = FIND_CLIENT_IN_PVS( edict() ); @@ -841,8 +841,8 @@ void CTriggerHurt::RadiationThink( void ) pevTarget = VARS( pentPlayer ); // get range to player; - vecSpot1 = ( pev->absmin + pev->absmax ) * 0.5; - vecSpot2 = ( pevTarget->absmin + pevTarget->absmax ) * 0.5; + vecSpot1 = ( pev->absmin + pev->absmax ) * 0.5f; + vecSpot2 = ( pevTarget->absmin + pevTarget->absmax ) * 0.5f; vecRange = vecSpot1 - vecSpot2; flRange = vecRange.Length(); @@ -855,7 +855,7 @@ void CTriggerHurt::RadiationThink( void ) pPlayer->m_flgeigerRange = flRange; } - pev->nextthink = gpGlobals->time + 0.25; + pev->nextthink = gpGlobals->time + 0.25f; } // @@ -952,7 +952,7 @@ void CBaseTrigger::HurtTouch( CBaseEntity *pOther ) // while touching the trigger. Player continues taking damage for a while after // leaving the trigger - fldmg = pev->dmg * 0.5; // 0.5 seconds worth of damage, pev->dmg is damage/second + fldmg = pev->dmg * 0.5f; // 0.5 seconds worth of damage, pev->dmg is damage/second // JAY: Cut this because it wasn't fully realized. Damage is simpler now. #if 0 @@ -992,7 +992,7 @@ void CBaseTrigger::HurtTouch( CBaseEntity *pOther ) pev->pain_finished = gpGlobals->time; // Apply damage every half second - pev->dmgtime = gpGlobals->time + 0.5;// half second delay until this trigger can hurt toucher again + pev->dmgtime = gpGlobals->time + 0.5f;// half second delay until this trigger can hurt toucher again if( pev->target ) { @@ -1038,7 +1038,7 @@ LINK_ENTITY_TO_CLASS( trigger_multiple, CTriggerMultiple ) void CTriggerMultiple::Spawn( void ) { if( m_flWait == 0 ) - m_flWait = 0.2; + m_flWait = 0.2f; InitTrigger(); @@ -1159,7 +1159,7 @@ void CBaseTrigger::ActivateMultiTrigger( CBaseEntity *pActivator ) // we can't just remove (self) here, because this is a touch function // called while C code is looping through area links... SetTouch( NULL ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; SetThink( &CBaseEntity::SUB_Remove ); } } @@ -1702,7 +1702,7 @@ void NextLevel( void ) if( pChange->pev->nextthink < gpGlobals->time ) { pChange->SetThink( &CChangeLevel::ExecuteChangeLevel ); - pChange->pev->nextthink = gpGlobals->time + 0.1; + pChange->pev->nextthink = gpGlobals->time + 0.1f; } } @@ -2323,8 +2323,8 @@ void CTriggerCamera::FollowTarget() if( !( FBitSet( pev->spawnflags, SF_CAMERA_PLAYER_TAKECONTROL ) ) ) { - pev->velocity = pev->velocity * 0.8; - if( pev->velocity.Length() < 10.0 ) + pev->velocity = pev->velocity * 0.8f; + if( pev->velocity.Length() < 10.0f ) pev->velocity = g_vecZero; } diff --git a/dlls/turret.cpp b/dlls/turret.cpp index 093b203..a5aa6d2 100644 --- a/dlls/turret.cpp +++ b/dlls/turret.cpp @@ -316,7 +316,7 @@ void CTurret::Spawn() m_pEyeGlow->SetAttachment( edict(), 2 ); m_eyeBrightness = 0; - pev->nextthink = gpGlobals->time + 0.3; + pev->nextthink = gpGlobals->time + 0.3f; } void CTurret::Precache() @@ -331,9 +331,9 @@ void CMiniTurret::Spawn() Precache(); SET_MODEL( ENT( pev ), "models/miniturret.mdl" ); pev->health = gSkillData.miniturretHealth; - m_HackedGunPos = Vector( 0, 0, 12.75 ); + m_HackedGunPos = Vector( 0.0f, 0.0f, 12.75f ); m_flMaxSpin = 0; - pev->view_ofs.z = 12.75; + pev->view_ofs.z = 12.75f; CBaseTurret::Spawn(); m_iRetractHeight = 16; @@ -342,7 +342,7 @@ void CMiniTurret::Spawn() UTIL_SetSize( pev, Vector( -16, -16, -m_iRetractHeight ), Vector( 16, 16, m_iRetractHeight ) ); SetThink( &CBaseTurret::Initialize ); - pev->nextthink = gpGlobals->time + 0.3; + pev->nextthink = gpGlobals->time + 0.3f; } void CMiniTurret::Precache() @@ -385,7 +385,7 @@ void CBaseTurret::Initialize( void ) { m_flLastSight = gpGlobals->time + m_flMaxWait; SetThink( &CBaseTurret::AutoSearchThink ); - pev->nextthink = gpGlobals->time + .1; + pev->nextthink = gpGlobals->time + 0.1f; } else SetThink( &CBaseEntity::SUB_DoNothing ); @@ -399,7 +399,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ if( m_iOn ) { m_hEnemy = NULL; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; m_iAutoStart = FALSE;// switching off a turret disables autostart //!!!! this should spin down first!!BUGBUG @@ -407,7 +407,7 @@ void CBaseTurret::TurretUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ } else { - pev->nextthink = gpGlobals->time + 0.1; // turn on delay + pev->nextthink = gpGlobals->time + 0.1f; // turn on delay // if the turret is flagged as an autoactivate turret, re-enable it's ability open self. if( pev->spawnflags & SF_MONSTER_TURRET_AUTOACTIVATE ) @@ -465,7 +465,7 @@ void CBaseTurret::ActiveThink( void ) int fAttack = 0; Vector vecDirToEnemy; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; StudioFrameAdvance(); if( ( !m_iOn ) || ( m_hEnemy == 0 ) ) @@ -481,7 +481,7 @@ void CBaseTurret::ActiveThink( void ) { if( !m_flLastSight ) { - m_flLastSight = gpGlobals->time + 0.5; // continue-shooting timeout + m_flLastSight = gpGlobals->time + 0.5f; // continue-shooting timeout } else { @@ -510,7 +510,7 @@ void CBaseTurret::ActiveThink( void ) if( !fEnemyVisible || ( flDistToEnemy > TURRET_RANGE ) ) { if( !m_flLastSight ) - m_flLastSight = gpGlobals->time + 0.5; + m_flLastSight = gpGlobals->time + 0.5f; else { // Should we look for a new target? @@ -529,7 +529,7 @@ void CBaseTurret::ActiveThink( void ) m_vecLastSight = vecMidEnemy; } - UTIL_MakeAimVectors(m_vecCurAngles); + UTIL_MakeAimVectors( m_vecCurAngles ); /* ALERT( at_console, "%.0f %.0f : %.2f %.2f %.2f\n", @@ -541,7 +541,7 @@ void CBaseTurret::ActiveThink( void ) vecLOS = vecLOS.Normalize(); // Is the Gun looking at the target - if( DotProduct( vecLOS, gpGlobals->v_forward ) <= 0.866 ) // 30 degree slop + if( DotProduct( vecLOS, gpGlobals->v_forward ) <= 0.866f ) // 30 degree slop fAttack = FALSE; else fAttack = TRUE; @@ -642,7 +642,7 @@ void CMiniTurret::Shoot( Vector &vecSrc, Vector &vecDirToEnemy ) void CBaseTurret::Deploy( void ) { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; StudioFrameAdvance(); if( pev->sequence != TURRET_ANIM_DEPLOY ) @@ -684,7 +684,7 @@ void CBaseTurret::Retire( void ) m_vecGoalAngles.x = 0; m_vecGoalAngles.y = m_flStartYaw; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; StudioFrameAdvance(); @@ -713,7 +713,7 @@ void CBaseTurret::Retire( void ) if( m_iAutoStart ) { SetThink( &CBaseTurret::AutoSearchThink ); - pev->nextthink = gpGlobals->time + .1; + pev->nextthink = gpGlobals->time + 0.1f; } else SetThink( &CBaseEntity::SUB_DoNothing ); @@ -728,7 +728,7 @@ void CBaseTurret::Retire( void ) void CTurret::SpinUpCall( void ) { StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; // Are we already spun up? If not start the two stage process. if( !m_iSpin ) @@ -738,15 +738,15 @@ void CTurret::SpinUpCall( void ) // for the first pass, spin up the the barrel if( !m_iStartSpin ) { - pev->nextthink = gpGlobals->time + 1.0; // spinup delay + pev->nextthink = gpGlobals->time + 1.0f; // spinup delay EMIT_SOUND( ENT( pev ), CHAN_BODY, "turret/tu_spinup.wav", TURRET_MACHINE_VOLUME, ATTN_NORM ); m_iStartSpin = 1; - pev->framerate = 0.1; + pev->framerate = 0.1f; } // after the barrel is spun up, turn on the hum - else if( pev->framerate >= 1.0 ) + else if( pev->framerate >= 1.0f ) { - pev->nextthink = gpGlobals->time + 0.1; // retarget delay + pev->nextthink = gpGlobals->time + 0.1f; // retarget delay EMIT_SOUND( ENT( pev ), CHAN_STATIC, "turret/tu_active2.wav", TURRET_MACHINE_VOLUME, ATTN_NORM ); SetThink( &CBaseTurret::ActiveThink ); m_iStartSpin = 0; @@ -754,7 +754,7 @@ void CTurret::SpinUpCall( void ) } else { - pev->framerate += 0.075; + pev->framerate += 0.075f; } } @@ -769,12 +769,12 @@ void CTurret::SpinDownCall( void ) if( m_iSpin ) { SetTurretAnim( TURRET_ANIM_SPIN ); - if( pev->framerate == 1.0 ) + if( pev->framerate == 1.0f ) { EMIT_SOUND_DYN( ENT( pev ), CHAN_STATIC, "turret/tu_active2.wav", 0, 0, SND_STOP, 100 ); EMIT_SOUND( ENT( pev ), CHAN_ITEM, "turret/tu_spindown.wav", TURRET_MACHINE_VOLUME, ATTN_NORM ); } - pev->framerate -= 0.02; + pev->framerate -= 0.02f; if( pev->framerate <= 0 ) { pev->framerate = 0; @@ -830,7 +830,7 @@ void CBaseTurret::SearchThink( void ) // ensure rethink SetTurretAnim( TURRET_ANIM_SPIN ); StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( m_flSpinUpTime == 0 && m_flMaxSpin ) m_flSpinUpTime = gpGlobals->time + m_flMaxSpin; @@ -875,7 +875,7 @@ void CBaseTurret::SearchThink( void ) } // generic hunt for new victims - m_vecGoalAngles.y = ( m_vecGoalAngles.y + 0.1 * m_fTurnRate ); + m_vecGoalAngles.y = ( m_vecGoalAngles.y + 0.1f * m_fTurnRate ); if( m_vecGoalAngles.y >= 360 ) m_vecGoalAngles.y -= 360; MoveTurret(); @@ -890,7 +890,7 @@ void CBaseTurret::AutoSearchThink( void ) { // ensure rethink StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.3; + pev->nextthink = gpGlobals->time + 0.3f; // If we have a target and we're still healthy if( m_hEnemy != 0 ) @@ -918,7 +918,7 @@ void CBaseTurret::TurretDeath( void ) //BOOL iActive = FALSE; StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( pev->deadflag != DEAD_DEAD ) { @@ -926,9 +926,9 @@ void CBaseTurret::TurretDeath( void ) float flRndSound = RANDOM_FLOAT( 0, 1 ); - if( flRndSound <= 0.33 ) + if( flRndSound <= 0.33f ) EMIT_SOUND( ENT( pev ), CHAN_BODY, "turret/tu_die.wav", 1.0, ATTN_NORM ); - else if( flRndSound <= 0.66 ) + else if( flRndSound <= 0.66f ) EMIT_SOUND( ENT( pev ), CHAN_BODY, "turret/tu_die2.wav", 1.0, ATTN_NORM ); else EMIT_SOUND( ENT( pev ), CHAN_BODY, "turret/tu_die3.wav", 1.0, ATTN_NORM ); @@ -1006,7 +1006,7 @@ int CBaseTurret::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, fl return 0; if( !m_iOn ) - flDamage /= 10.0; + flDamage *= 0.1f; pev->health -= flDamage; if( pev->health <= 0 ) @@ -1020,7 +1020,7 @@ int CBaseTurret::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, fl SetUse( NULL ); SetThink( &CBaseTurret::TurretDeath ); SUB_UseTargets( this, USE_ON, 0 ); // wake up others - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; return 0; } @@ -1046,7 +1046,7 @@ int CBaseTurret::MoveTurret( void ) { float flDir = m_vecGoalAngles.x > m_vecCurAngles.x ? 1 : -1 ; - m_vecCurAngles.x += 0.1 * m_fTurnRate * flDir; + m_vecCurAngles.x += 0.1f * m_fTurnRate * flDir; // if we started below the goal, and now we're past, peg to goal if( flDir == 1 ) @@ -1093,14 +1093,14 @@ int CBaseTurret::MoveTurret( void ) m_fTurnRate += m_iBaseTurnRate; } - m_vecCurAngles.y += 0.1 * m_fTurnRate * flDir; + m_vecCurAngles.y += 0.1f * m_fTurnRate * flDir; if( m_vecCurAngles.y < 0 ) m_vecCurAngles.y += 360; else if( m_vecCurAngles.y >= 360 ) m_vecCurAngles.y -= 360; - if( flDist < ( 0.05 * m_iBaseTurnRate ) ) + if( flDist < ( 0.05f * m_iBaseTurnRate ) ) m_vecCurAngles.y = m_vecGoalAngles.y; //ALERT( at_console, "%.2f -> %.2f\n", m_vecCurAngles.y, y ); @@ -1170,7 +1170,7 @@ void CSentry::Spawn() SetTouch( &CSentry::SentryTouch ); SetThink( &CBaseTurret::Initialize ); - pev->nextthink = gpGlobals->time + 0.3; + pev->nextthink = gpGlobals->time + 0.3f; } void CSentry::Shoot( Vector &vecSrc, Vector &vecDirToEnemy ) @@ -1201,7 +1201,7 @@ int CSentry::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float { SetThink( &CBaseTurret::Deploy ); SetUse( NULL ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } pev->health -= flDamage; @@ -1216,7 +1216,7 @@ int CSentry::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float SetUse( NULL ); SetThink( &CSentry::SentryDeath ); SUB_UseTargets( this, USE_ON, 0 ); // wake up others - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; return 0; } @@ -1237,7 +1237,7 @@ void CSentry::SentryDeath( void ) //BOOL iActive = FALSE; StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( pev->deadflag != DEAD_DEAD ) { @@ -1245,9 +1245,9 @@ void CSentry::SentryDeath( void ) float flRndSound = RANDOM_FLOAT( 0, 1 ); - if( flRndSound <= 0.33 ) + if( flRndSound <= 0.33f ) EMIT_SOUND( ENT( pev ), CHAN_BODY, "turret/tu_die.wav", 1.0, ATTN_NORM ); - else if( flRndSound <= 0.66 ) + else if( flRndSound <= 0.66f ) EMIT_SOUND( ENT( pev ), CHAN_BODY, "turret/tu_die2.wav", 1.0, ATTN_NORM ); else EMIT_SOUND( ENT( pev ), CHAN_BODY, "turret/tu_die3.wav", 1.0, ATTN_NORM ); diff --git a/dlls/util.cpp b/dlls/util.cpp index a66b5fb..018a2f8 100644 --- a/dlls/util.cpp +++ b/dlls/util.cpp @@ -34,7 +34,7 @@ float UTIL_WeaponTimeBase( void ) { #if defined( CLIENT_WEAPONS ) - return 0.0; + return 0.0f; #else return gpGlobals->time; #endif @@ -130,7 +130,7 @@ float UTIL_SharedRandomFloat( unsigned int seed, float low, float high ) tensixrand = U_Random() & 65535; - offset = (float)tensixrand / 65536.0; + offset = (float)tensixrand / 65536.0f; return ( low + offset * range ); } @@ -147,8 +147,8 @@ void UTIL_ParametricRocket( entvars_t *pev, Vector vecOrigin, Vector vecAngles, // Now compute how long it will take based on current velocity Vector vecTravel = pev->endpos - pev->startpos; - float travelTime = 0.0; - if( pev->velocity.Length() > 0 ) + float travelTime = 0.0f; + if( pev->velocity.Length() > 0.0f ) { travelTime = vecTravel.Length() / pev->velocity.Length(); } @@ -458,7 +458,7 @@ int UTIL_MonstersInSphere( CBaseEntity **pList, int listMax, const Vector ¢e // Use origin for X & Y since they are centered for all monsters // Now X - delta = center.x - pEdict->v.origin.x;//( pEdict->v.absmin.x + pEdict->v.absmax.x ) * 0.5; + delta = center.x - pEdict->v.origin.x;//( pEdict->v.absmin.x + pEdict->v.absmax.x ) * 0.5f; delta *= delta; if( delta > radiusSquared ) @@ -466,7 +466,7 @@ int UTIL_MonstersInSphere( CBaseEntity **pList, int listMax, const Vector ¢e distance = delta; // Now Y - delta = center.y - pEdict->v.origin.y;//( pEdict->v.absmin.y + pEdict->v.absmax.y )*0.5; + delta = center.y - pEdict->v.origin.y;//( pEdict->v.absmin.y + pEdict->v.absmax.y ) * 0.5f; delta *= delta; distance += delta; @@ -474,7 +474,7 @@ int UTIL_MonstersInSphere( CBaseEntity **pList, int listMax, const Vector ¢e continue; // Now Z - delta = center.z - ( pEdict->v.absmin.z + pEdict->v.absmax.z ) * 0.5; + delta = center.z - ( pEdict->v.absmin.z + pEdict->v.absmax.z ) * 0.5f; delta *= delta; distance += delta; @@ -1184,7 +1184,7 @@ void UTIL_DecalTrace( TraceResult *pTrace, int decalNumber ) if( index < 0 ) return; - if( pTrace->flFraction == 1.0 ) + if( pTrace->flFraction == 1.0f ) return; // Only decal BSP models @@ -1253,7 +1253,7 @@ void UTIL_PlayerDecalTrace( TraceResult *pTrace, int playernum, int decalNumber, else index = decalNumber; - if( pTrace->flFraction == 1.0 ) + if( pTrace->flFraction == 1.0f ) return; MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY ); @@ -1276,7 +1276,7 @@ void UTIL_GunshotDecalTrace( TraceResult *pTrace, int decalNumber ) if( index < 0 ) return; - if( pTrace->flFraction == 1.0 ) + if( pTrace->flFraction == 1.0f ) return; MESSAGE_BEGIN( MSG_PAS, SVC_TEMPENTITY, pTrace->vecEndPos ); @@ -1306,7 +1306,7 @@ void UTIL_Ricochet( const Vector &position, float scale ) WRITE_COORD( position.x ); WRITE_COORD( position.y ); WRITE_COORD( position.z ); - WRITE_BYTE( (int)( scale * 10 ) ); + WRITE_BYTE( (int)( scale * 10.0f ) ); MESSAGE_END(); } @@ -1423,9 +1423,9 @@ float UTIL_WaterLevel( const Vector &position, float minz, float maxz ) return maxz; float diff = maxz - minz; - while( diff > 1.0 ) + while( diff > 1.0f ) { - midUp.z = minz + diff / 2.0; + midUp.z = minz + diff / 2.0f; if( UTIL_PointContents( midUp ) == CONTENTS_WATER ) { minz = midUp.z; @@ -1444,7 +1444,7 @@ extern DLL_GLOBAL short g_sModelIndexBubbles;// holds the index for the bubbles void UTIL_Bubbles( Vector mins, Vector maxs, int count ) { - Vector mid = ( mins + maxs ) * 0.5; + Vector mid = ( mins + maxs ) * 0.5f; float flHeight = UTIL_WaterLevel( mid, mid.z, mid.z + 1024 ); flHeight = flHeight - mins.z; diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index b76f469..e3933a8 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -441,7 +441,7 @@ void CBasePlayerItem::FallInit( void ) SetTouch( &CBasePlayerItem::DefaultTouch ); SetThink( &CBasePlayerItem::FallThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } //========================================================= @@ -453,7 +453,7 @@ void CBasePlayerItem::FallInit( void ) //========================================================= void CBasePlayerItem::FallThink( void ) { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( pev->flags & FL_ONGROUND ) { @@ -596,7 +596,7 @@ BOOL CanAttack( float attack_time, float curtime, BOOL isPredicted ) } else { - return ( attack_time <= 0.0 ) ? TRUE : FALSE; + return ( attack_time <= 0.0f ) ? TRUE : FALSE; } } @@ -650,19 +650,19 @@ void CBasePlayerWeapon::ItemPostFrame( void ) // no fire buttons down m_fFireOnEmpty = FALSE; - if( !IsUseable() && m_flNextPrimaryAttack < ( UseDecrement() ? 0.0 : gpGlobals->time ) ) + if( !IsUseable() && m_flNextPrimaryAttack < ( UseDecrement() ? 0.0f : gpGlobals->time ) ) { // weapon isn't useable, switch. if( !( iFlags() & ITEM_FLAG_NOAUTOSWITCHEMPTY ) && g_pGameRules->GetNextBestWeapon( m_pPlayer, this ) ) { - m_flNextPrimaryAttack = ( UseDecrement() ? 0.0 : gpGlobals->time ) + 0.3; + m_flNextPrimaryAttack = ( UseDecrement() ? 0.0f : gpGlobals->time ) + 0.3f; return; } } else { // weapon is useable. Reload if empty and weapon has waited as long as it has to after firing - if( m_iClip == 0 && !(iFlags() & ITEM_FLAG_NOAUTORELOAD ) && m_flNextPrimaryAttack < ( UseDecrement() ? 0.0 : gpGlobals->time ) ) + if( m_iClip == 0 && !(iFlags() & ITEM_FLAG_NOAUTORELOAD ) && m_flNextPrimaryAttack < ( UseDecrement() ? 0.0f : gpGlobals->time ) ) { Reload(); return; @@ -702,14 +702,14 @@ void CBasePlayerItem::Drop( void ) { SetTouch( NULL ); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + .1; + pev->nextthink = gpGlobals->time + 0.1f; } void CBasePlayerItem::Kill( void ) { SetTouch( NULL ); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + .1; + pev->nextthink = gpGlobals->time + 0.1f; } void CBasePlayerItem::Holster( int skiplocal /* = 0 */ ) @@ -947,8 +947,8 @@ BOOL CBasePlayerWeapon::DefaultDeploy( const char *szViewModel, const char *szWe strcpy( m_pPlayer->m_szAnimExtention, szAnimExt ); SendWeaponAnim( iAnim, skiplocal, body ); - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.0; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.0f; m_flLastFireTime = 0.0f; return TRUE; @@ -971,7 +971,7 @@ BOOL CBasePlayerWeapon::DefaultReload( int iClipSize, int iAnim, float fDelay, i m_fInReload = TRUE; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0f; return TRUE; } @@ -1066,7 +1066,7 @@ void CBasePlayerAmmo::DefaultTouch( CBaseEntity *pOther ) { SetTouch( NULL ); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + .1; + pev->nextthink = gpGlobals->time + 0.1f; } } else if( gEvilImpulse101 ) @@ -1074,7 +1074,7 @@ void CBasePlayerAmmo::DefaultTouch( CBaseEntity *pOther ) // evil impulse 101 hack, kill always SetTouch( NULL ); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + .1; + pev->nextthink = gpGlobals->time + 0.1f; } } @@ -1153,7 +1153,7 @@ void CBasePlayerWeapon::RetireWeapon( void ) //========================================================================= float CBasePlayerWeapon::GetNextAttackDelay( float delay ) { - if( m_flLastFireTime == 0 || m_flNextPrimaryAttack == -1 ) + if( m_flLastFireTime == 0 || m_flNextPrimaryAttack == -1.0f ) { // At this point, we are assuming that the client has stopped firing // and we are going to reset our book keeping variables. @@ -1251,7 +1251,7 @@ void CWeaponBox::Kill( void ) while( pWeapon ) { pWeapon->SetThink( &CBaseEntity::SUB_Remove ); - pWeapon->pev->nextthink = gpGlobals->time + 0.1; + pWeapon->pev->nextthink = gpGlobals->time + 0.1f; pWeapon = pWeapon->m_pNext; } } @@ -1545,8 +1545,8 @@ void CWeaponBox::SetObjectCollisionBox( void ) void CBasePlayerWeapon::PrintState( void ) { - ALERT( at_console, "primary: %f\n", m_flNextPrimaryAttack ); - ALERT( at_console, "idle : %f\n", m_flTimeWeaponIdle ); + ALERT( at_console, "primary: %f\n", (double)m_flNextPrimaryAttack ); + ALERT( at_console, "idle : %f\n", (double)m_flTimeWeaponIdle ); //ALERT( at_console, "nextrl : %f\n", m_flNextReload ); //ALERT( at_console, "nextpum: %f\n", m_flPumpTime ); diff --git a/dlls/world.cpp b/dlls/world.cpp index 1ded062..9f76bd8 100644 --- a/dlls/world.cpp +++ b/dlls/world.cpp @@ -159,7 +159,7 @@ void CDecal::TriggerDecal( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TY MESSAGE_END(); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } void CDecal::StaticDecal( void ) @@ -626,15 +626,15 @@ void CWorld::Precache( void ) pEntity->SetThink( &CBaseEntity::SUB_CallUseToggle ); pEntity->pev->message = pev->netname; pev->netname = 0; - pEntity->pev->nextthink = gpGlobals->time + 0.3; + pEntity->pev->nextthink = gpGlobals->time + 0.3f; pEntity->pev->spawnflags = SF_MESSAGE_ONCE; } } if( pev->spawnflags & SF_WORLD_DARK ) - CVAR_SET_FLOAT( "v_dark", 1.0 ); + CVAR_SET_FLOAT( "v_dark", 1.0f ); else - CVAR_SET_FLOAT( "v_dark", 0.0 ); + CVAR_SET_FLOAT( "v_dark", 0.0f ); pev->spawnflags &= ~SF_WORLD_DARK; // g-cont. don't apply fade after save\restore @@ -668,7 +668,7 @@ void CWorld::KeyValue( KeyValueData *pkvd ) else if( FStrEq(pkvd->szKeyName, "WaveHeight" ) ) { // Sent over net now. - pev->scale = atof( pkvd->szValue ) * ( 1.0 / 8.0 ); + pev->scale = atof( pkvd->szValue ) * ( 1.0f / 8.0f ); pkvd->fHandled = TRUE; } else if( FStrEq( pkvd->szKeyName, "MaxRange" ) ) diff --git a/dlls/wscript b/dlls/wscript index b1c8cff..24e93e7 100644 --- a/dlls/wscript +++ b/dlls/wscript @@ -4,21 +4,28 @@ from waflib import Utils import os - + def options(opt): # stub return def configure(conf): - # stub - return + if conf.env.COMPILER_CC == 'msvc': + # hl.def removes MSVC function name decoration from GiveFnptrsToDll on Windows. + # Without this, the lookup for this function fails. + hlDefNode = conf.path.find_resource("./hl.def") + + if hlDefNode is not None: + conf.env.append_unique('LINKFLAGS', '/def:%s' % hlDefNode.abspath()) + else: + conf.fatal("Could not find hl.def") def build(bld): defines = [] source = bld.path.parent.ant_glob([ 'pm_shared/*.c', ]) - + source += [ 'agrunt.cpp', 'airtank.cpp', 'aflock.cpp', 'animating.cpp', 'animation.cpp', 'apache.cpp', 'barnacle.cpp', 'barney.cpp', 'bigmomma.cpp', 'bloater.cpp', 'bmodels.cpp', 'bullsquid.cpp', 'buttons.cpp', @@ -42,7 +49,7 @@ def build(bld): 'triggers.cpp', 'tripmine.cpp', 'turret.cpp', 'util.cpp', 'weapons.cpp', 'world.cpp', 'xen.cpp', 'zombie.cpp'] - + if bld.env.VOICEMGR: source += bld.path.parent.ant_glob([ 'game_shared/voice_gamemgr.cpp', @@ -61,12 +68,12 @@ def build(bld): bld.shlib( source = source, - target = 'server', + target = bld.env.SERVER_NAME + bld.env.POSTFIX, features = 'c cxx', includes = includes, defines = defines, use = libs, install_path = install_path, subsystem = bld.env.MSVC_SUBSYSTEM, - idx = 2 + idx = bld.get_taskgen_count() ) diff --git a/dlls/xen.cpp b/dlls/xen.cpp index 1d86beb..847f26f 100644 --- a/dlls/xen.cpp +++ b/dlls/xen.cpp @@ -94,10 +94,10 @@ void CXenPLight::Spawn( void ) UTIL_SetSize( pev, Vector( -80, -80, 0 ), Vector( 80, 80, 32 ) ); SetActivity( ACT_IDLE ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; pev->frame = RANDOM_FLOAT( 0, 255 ); - m_pGlow = CSprite::SpriteCreate( XEN_PLANT_GLOW_SPRITE, pev->origin + Vector(0,0,(pev->mins.z+pev->maxs.z)*0.5), FALSE ); + m_pGlow = CSprite::SpriteCreate( XEN_PLANT_GLOW_SPRITE, pev->origin + Vector( 0, 0, ( pev->mins.z + pev->maxs.z ) * 0.5f ), FALSE ); m_pGlow->SetTransparency( kRenderGlow, (int)pev->rendercolor.x, (int)pev->rendercolor.y, (int)pev->rendercolor.z, (int)pev->renderamt, (int)pev->renderfx ); m_pGlow->SetAttachment( edict(), 1 ); } @@ -111,7 +111,7 @@ void CXenPLight::Precache( void ) void CXenPLight::Think( void ) { StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; switch( GetActivity() ) { @@ -187,19 +187,19 @@ void CXenHair::Spawn( void ) if( !( pev->spawnflags & SF_HAIR_SYNC ) ) { pev->frame = RANDOM_FLOAT( 0, 255 ); - pev->framerate = RANDOM_FLOAT( 0.7, 1.4 ); + pev->framerate = RANDOM_FLOAT( 0.7f, 1.4f ); } ResetSequenceInfo(); pev->solid = SOLID_NOT; pev->movetype = MOVETYPE_NONE; - pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.1, 0.4 ); // Load balance these a bit + pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.1f, 0.4f ); // Load balance these a bit } void CXenHair::Think( void ) { StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.5; + pev->nextthink = gpGlobals->time + 0.5f; } void CXenHair::Precache( void ) @@ -283,9 +283,9 @@ void CXenTree::Spawn( void ) UTIL_SetSize( pev, Vector( -30, -30, 0 ), Vector( 30, 30, 188 ) ); SetActivity( ACT_IDLE ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; pev->frame = RANDOM_FLOAT( 0, 255 ); - pev->framerate = RANDOM_FLOAT( 0.7, 1.4 ); + pev->framerate = RANDOM_FLOAT( 0.7f, 1.4f ); Vector triggerPosition; UTIL_MakeVectorsPrivate( pev->angles, triggerPosition, NULL, NULL ); @@ -329,7 +329,7 @@ void CXenTree::Attack( void ) if( GetActivity() == ACT_IDLE ) { SetActivity( ACT_MELEE_ATTACK1 ); - pev->framerate = RANDOM_FLOAT( 1.0, 1.4 ); + pev->framerate = RANDOM_FLOAT( 1.0f, 1.4f ); EMIT_SOUND_ARRAY_DYN( CHAN_WEAPON, pAttackMissSounds ); } } @@ -375,7 +375,7 @@ void CXenTree::HandleAnimEvent( MonsterEvent_t *pEvent ) void CXenTree::Think( void ) { float flInterval = StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; DispatchAnimEvents( flInterval ); switch( GetActivity() ) @@ -384,7 +384,7 @@ void CXenTree::Think( void ) if( m_fSequenceFinished ) { SetActivity( ACT_IDLE ); - pev->framerate = RANDOM_FLOAT( 0.6, 1.4 ); + pev->framerate = RANDOM_FLOAT( 0.6f, 1.4f ); } break; default: @@ -513,9 +513,9 @@ void CXenSpore :: Spawn( void ) //SetActivity( ACT_IDLE ); pev->sequence = 0; pev->frame = RANDOM_FLOAT( 0, 255 ); - pev->framerate = RANDOM_FLOAT( 0.7, 1.4 ); + pev->framerate = RANDOM_FLOAT( 0.7f, 1.4f ); ResetSequenceInfo(); - pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.1, 0.4 ); // Load balance these a bit + pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.1f, 0.4f ); // Load balance these a bit } const char *CXenSpore::pModelNames[] = @@ -537,7 +537,7 @@ void CXenSpore::Touch( CBaseEntity *pOther ) void CXenSpore::Think( void ) { StudioFrameAdvance(); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; #if 0 DispatchAnimEvents( flInterval ); diff --git a/engine/menu_int.h b/engine/menu_int.h index d907bd8..effe42b 100644 --- a/engine/menu_int.h +++ b/engine/menu_int.h @@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ -#pragma once + #ifndef MENU_INT_H #define MENU_INT_H @@ -24,9 +24,8 @@ typedef int HIMAGE; // handle to a graphic // flags for PIC_Load #define PIC_NEAREST (1<<0) // disable texfilter -#define PIC_KEEP_RGBDATA (1<<1) // some images keep source +#define PIC_KEEP_SOURCE (1<<1) // some images keep source #define PIC_NOFLIP_TGA (1<<2) // Steam background completely ignore tga attribute 0x20 -#define PIC_KEEP_8BIT (1<<3) // keep original 8-bit image (if present) typedef struct ui_globalvars_s { @@ -37,17 +36,19 @@ typedef struct ui_globalvars_s int scrHeight; int maxClients; - int developer; + int developer; // boolean, changed from allow_console to make mainui_cpp compile for both engines int demoplayback; int demorecording; char demoname[64]; // name of currently playing demo char maptitle[64]; // title of active map } ui_globalvars_t; +struct ref_viewpass_s; + typedef struct ui_enginefuncs_s { // image handlers - HIMAGE (*pfnPIC_Load)( const char *szPicName, const byte *ucRawImage, long ulRawImageSize, long flags ); + HIMAGE (*pfnPIC_Load)( const char *szPicName, const byte *ucRawImage, int ulRawImageSize, int flags ); void (*pfnPIC_Free)( const char *szPicName ); int (*pfnPIC_Width)( HIMAGE hPic ); int (*pfnPIC_Height)( HIMAGE hPic ); @@ -73,15 +74,15 @@ typedef struct ui_enginefuncs_s int (*pfnAddCommand)( const char *cmd_name, void (*function)(void) ); void (*pfnClientCmd)( int execute_now, const char *szCmdString ); void (*pfnDelCommand)( const char *cmd_name ); - int (*pfnCmdArgc)( void ); + int (*pfnCmdArgc)( void ); char* (*pfnCmdArgv)( int argc ); char* (*pfnCmd_Args)( void ); // debug messages (in-menu shows only notify) - void (*Con_Printf)( char *fmt, ... ); - void (*Con_DPrintf)( char *fmt, ... ); - void (*Con_NPrintf)( int pos, char *fmt, ... ); - void (*Con_NXPrintf)( struct con_nprint_s *info, char *fmt, ... ); + void (*Con_Printf)( const char *fmt, ... ); + void (*Con_DPrintf)( const char *fmt, ... ); + void (*Con_NPrintf)( int pos, const char *fmt, ... ); + void (*Con_NXPrintf)( struct con_nprint_s *info, const char *fmt, ... ); // sound handlers void (*pfnPlayLocalSound)( const char *szSound ); @@ -103,7 +104,7 @@ typedef struct ui_enginefuncs_s struct cl_entity_s* (*pfnGetPlayerModel)( void ); // for drawing playermodel previews void (*pfnSetModel)( struct cl_entity_s *ed, const char *path ); void (*pfnClearScene)( void ); - void (*pfnRenderScene)( const struct ref_params_s *fd ); + void (*pfnRenderScene)( const struct ref_viewpass_s *rvp ); int (*CL_CreateVisibleEntity)( int type, struct cl_entity_s *ent ); // misc handlers @@ -140,7 +141,7 @@ typedef struct ui_enginefuncs_s int (*pfnGetGameInfo)( GAMEINFO *pgameinfo ); GAMEINFO **(*pfnGetGamesList)( int *numGames ); // collect info about all mods char **(*pfnGetFilesList)( const char *pattern, int *numFiles, int gamedironly ); // find in files - int (*pfnGetSaveComment)( const char *savename, char *comment ); + int (*pfnGetSaveComment)( const char *savename, char *comment ); int (*pfnGetDemoComment)( const char *demoname, char *comment ); int (*pfnCheckGameDll)( void ); // returns false if hl.dll is missed or invalid char *(*pfnGetClipboardData)( void ); @@ -155,12 +156,16 @@ typedef struct ui_enginefuncs_s // menu interface is freezed at version 0.75 // new functions starts here float (*pfnRandomFloat)( float flLow, float flHigh ); - int (*pfnRandomLong)( int lLow, int lHigh ); + int (*pfnRandomLong)( int lLow, int lHigh ); void (*pfnSetCursor)( void *hCursor ); // change cursor int (*pfnIsMapValid)( char *filename ); void (*pfnProcessImage)( int texnum, float gamma, int topColor, int bottomColor ); - int (*pfnCompareFileTime)( char *filename1, char *filename2, int *iCompare ); + int (*pfnCompareFileTime)( const char *filename1, char *filename2, int *iCompare ); + + char *(*pfnGetModeString)( int vid_mode ); + int (*COM_SaveFile)( const char *filename, const void *data, int len ); + int (*COM_RemoveFile)( const char *filepath ); } ui_enginefuncs_t; typedef struct @@ -183,6 +188,47 @@ typedef struct void (*pfnFinalCredits)( void ); // show credits + game end } UI_FUNCTIONS; +#define MENU_EXTENDED_API_VERSION 1 + +typedef struct ui_extendedfuncs_s { + // text functions, frozen + void (*pfnEnableTextInput)( int enable ); + int (*pfnUtfProcessChar) ( int ch ); + int (*pfnUtfMoveLeft) ( char *str, int pos ); + int (*pfnUtfMoveRight) ( char *str, int pos, int length ); + + // new engine extended api start here + // returns 1 if there are more in list, otherwise 0 + int (*pfnGetRenderers)( unsigned int num, char *shortName, size_t size1, char *readableName, size_t size2 ); +} ui_extendedfuncs_t; + +// deprecated export from old engine +typedef void (*ADDTOUCHBUTTONTOLIST)( const char *name, const char *texture, const char *command, unsigned char *color, int flags ); + +typedef struct +{ + ADDTOUCHBUTTONTOLIST pfnAddTouchButtonToList; + void (*pfnResetPing)( void ); + void (*pfnShowConnectionWarning)( void ); + void (*pfnShowUpdateDialog)( int preferStore ); + void (*pfnShowMessageBox)( const char *text ); + void (*pfnConnectionProgress_Disconnect)( void ); + void (*pfnConnectionProgress_Download)( const char *pszFileName, const char *pszServerName, int iCurrent, int iTotal, const char *comment ); + void (*pfnConnectionProgress_DownloadEnd)( void ); + void (*pfnConnectionProgress_Precache)( void ); + void (*pfnConnectionProgress_Connect)( const char *server ); // NULL for local server + void (*pfnConnectionProgress_ChangeLevel)( void ); + void (*pfnConnectionProgress_ParseServerInfo)( const char *server ); +} UI_EXTENDED_FUNCTIONS; + typedef int (*MENUAPI)( UI_FUNCTIONS *pFunctionTable, ui_enginefuncs_t* engfuncs, ui_globalvars_t *pGlobals ); -#endif//MENU_INT_H +typedef int (*UIEXTENEDEDAPI)( int version, UI_EXTENDED_FUNCTIONS *pFunctionTable, ui_extendedfuncs_t *engfuncs ); + +// deprecated interface from old engine +typedef int (*UITEXTAPI)( ui_extendedfuncs_t* engfuncs ); + +#define PLATFORM_UPDATE_PAGE "PlatformUpdatePage" +#define GENERIC_UPDATE_PAGE "GenericUpdatePage" + +#endif //MENU_INT_H diff --git a/pm_shared/pm_debug.c b/pm_shared/pm_debug.c index 3b0879c..a11e051 100644 --- a/pm_shared/pm_debug.c +++ b/pm_shared/pm_debug.c @@ -12,8 +12,12 @@ * without written permission from Valve LLC. * ****/ - +#include #include "mathlib.h" +#ifdef HAVE_TGMATH_H +#include +#endif + #include "const.h" #include "usercmd.h" #include "pm_defs.h" @@ -76,7 +80,7 @@ void PM_ShowClipBox( void ) // Show our BBOX in particles. PM_DrawBBox( pmove->player_mins[pmove->usehull], pmove->player_maxs[pmove->usehull], org, pmove->server ? 132 : 0, 0.1 ); - PM_ParticleLine( org, org, pmove->server ? 132 : 0, 0.1, 5.0 ); + PM_ParticleLine( org, org, pmove->server ? 132 : 0, 0.1f, 5.0f ); /* { int i; @@ -179,13 +183,13 @@ void PM_DrawPhysEntBBox(int num, int pcolor, float life) { vec3_t forward, right, up; - AngleVectorsTranspose(pe->angles, forward, right, up); - for (j = 0; j < 8; j++) + AngleVectorsTranspose( pe->angles, forward, right, up); + for( j = 0; j < 8; j++ ) { VectorCopy(p[j], tmp); - p[j][0] = DotProduct ( tmp, forward ); - p[j][1] = DotProduct ( tmp, right ); - p[j][2] = DotProduct ( tmp, up ); + p[j][0] = DotProduct( tmp, forward ); + p[j][1] = DotProduct( tmp, right ); + p[j][2] = DotProduct( tmp, up ); } } @@ -285,7 +289,7 @@ void PM_ViewEntity( void ) int i; pmtrace_t trace; int pcolor = 77; - float fup; + // float fup; #if 0 if ( !pm_showclip.value ) @@ -296,9 +300,9 @@ void PM_ViewEntity( void ) VectorCopy( pmove->origin, origin); - fup = 0.5*( pmove->player_mins[pmove->usehull][2] + pmove->player_maxs[pmove->usehull][2] ); + /*fup = 0.5f * ( pmove->player_mins[pmove->usehull][2] + pmove->player_maxs[pmove->usehull][2] ); fup += pmove->view_ofs[2]; - fup -= 4; + fup -= 4;*/ for (i = 0; i < 3; i++) { diff --git a/pm_shared/pm_math.c b/pm_shared/pm_math.c index 4bb4b93..87c65d9 100644 --- a/pm_shared/pm_math.c +++ b/pm_shared/pm_math.c @@ -13,10 +13,12 @@ * ****/ // pm_math.c -- math primitives - +#include #include "mathlib.h" +#ifdef HAVE_TGMATH_H +#include +#endif #include "const.h" -#include // up / down #define PITCH 0 @@ -29,12 +31,12 @@ #pragma warning(disable : 4244) #endif -vec3_t vec3_origin = { 0,0,0 }; +vec3_t vec3_origin = { 0, 0, 0 }; int nanmask = 255 << 23; float anglemod( float a ) { - a = ( 360.0 / 65536 ) * ( (int)( a * ( 65536 / 360.0 ) ) & 65535 ); + a = ( 360.0f / 65536.0f ) * ( (int)( a * ( 65536.0f / 360.0f ) ) & 65535 ); return a; } @@ -43,13 +45,13 @@ void AngleVectors( const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up float angle; float sr, sp, sy, cr, cp, cy; - angle = angles[YAW] * ( M_PI * 2 / 360 ); + angle = angles[YAW] * ( M_PI_F * 2.0f / 360.0f ); sy = sin( angle ); cy = cos( angle ); - angle = angles[PITCH] * ( M_PI*2 / 360 ); + angle = angles[PITCH] * ( M_PI_F * 2.0f / 360.0f ); sp = sin( angle ); cp = cos( angle ); - angle = angles[ROLL] * ( M_PI*2 / 360 ); + angle = angles[ROLL] * ( M_PI_F * 2.0f / 360.0f ); sr = sin( angle ); cr = cos( angle ); @@ -78,13 +80,13 @@ void AngleVectorsTranspose( const vec3_t angles, vec3_t forward, vec3_t right, v float angle; float sr, sp, sy, cr, cp, cy; - angle = angles[YAW] * ( M_PI * 2 / 360 ); + angle = angles[YAW] * ( M_PI_F * 2.0f / 360.0f ); sy = sin( angle ); cy = cos( angle ); - angle = angles[PITCH] * ( M_PI * 2 / 360 ); + angle = angles[PITCH] * ( M_PI_F * 2.0f / 360.0f ); sp = sin( angle ); cp = cos( angle ); - angle = angles[ROLL] * ( M_PI * 2 / 360 ); + angle = angles[ROLL] * ( M_PI_F * 2.0f / 360.0f ); sr = sin( angle ); cr = cos( angle ); @@ -113,13 +115,13 @@ void AngleMatrix( const vec3_t angles, float (*matrix)[4] ) float angle; float sr, sp, sy, cr, cp, cy; - angle = angles[YAW] * ( M_PI * 2 / 360 ); + angle = angles[YAW] * ( M_PI_F * 2.0f / 360.0f ); sy = sin( angle ); cy = cos( angle ); - angle = angles[PITCH] * ( M_PI * 2 / 360 ); + angle = angles[PITCH] * ( M_PI_F * 2.0f / 360.0f ); sp = sin( angle ); cp = cos( angle ); - angle = angles[ROLL] * ( M_PI * 2 / 360 ); + angle = angles[ROLL] * ( M_PI_F * 2.0f / 360.0f ); sr = sin( angle ); cr = cos( angle ); @@ -133,9 +135,9 @@ void AngleMatrix( const vec3_t angles, float (*matrix)[4] ) matrix[0][2] = ( cr * sp * cy + -sr * -sy ); matrix[1][2] = ( cr * sp * sy + -sr * cy ); matrix[2][2] = cr * cp; - matrix[0][3] = 0.0; - matrix[1][3] = 0.0; - matrix[2][3] = 0.0; + matrix[0][3] = 0.0f; + matrix[1][3] = 0.0f; + matrix[2][3] = 0.0f; } void AngleIMatrix( const vec3_t angles, float matrix[3][4] ) @@ -143,13 +145,13 @@ void AngleIMatrix( const vec3_t angles, float matrix[3][4] ) float angle; float sr, sp, sy, cr, cp, cy; - angle = angles[YAW] * ( M_PI * 2 / 360 ); + angle = angles[YAW] * ( M_PI_F * 2.0f / 360.0f ); sy = sin( angle ); cy = cos( angle ); - angle = angles[PITCH] * ( M_PI * 2 / 360 ); + angle = angles[PITCH] * ( M_PI_F * 2.0f / 360.0f ); sp = sin( angle ); cp = cos( angle ); - angle = angles[ROLL] * ( M_PI * 2 / 360 ); + angle = angles[ROLL] * ( M_PI_F * 2.0f / 360.0f ); sr = sin( angle ); cr = cos( angle ); @@ -174,13 +176,13 @@ void NormalizeAngles( float *angles ) // Normalize angles for( i = 0; i < 3; i++ ) { - if( angles[i] > 180.0 ) + if( angles[i] > 180.0f ) { - angles[i] -= 360.0; + angles[i] -= 360.0f; } - else if( angles[i] < -180.0 ) + else if( angles[i] < -180.0f ) { - angles[i] += 360.0; + angles[i] += 360.0f; } } } @@ -209,13 +211,13 @@ void InterpolateAngles( float *start, float *end, float *output, float frac ) ang2 = end[i]; d = ang2 - ang1; - if( d > 180 ) + if( d > 180.0f ) { - d -= 360; + d -= 360.0f; } - else if( d < -180 ) + else if( d < -180.0f ) { - d += 360; + d += 360.0f; } output[i] = ang1 + d * frac; @@ -240,7 +242,7 @@ float AngleBetweenVectors( const vec3_t v1, const vec3_t v2 ) return 0.0f; angle = acos( DotProduct( v1, v2 ) / ( l1 * l2 ) ); - angle = ( angle * 180.0f ) / M_PI; + angle = ( angle * 180.0f ) / M_PI_F; return angle; } @@ -303,8 +305,6 @@ void CrossProduct( const vec3_t v1, const vec3_t v2, vec3_t cross ) cross[2] = v1[0] * v2[1] - v1[1] * v2[0]; } -double sqrt( double x ); - float Length( const vec3_t v ) { int i; @@ -333,7 +333,7 @@ float VectorNormalize( vec3_t v ) if( length ) { - ilength = 1 / length; + ilength = 1.0f / length; v[0] *= ilength; v[1] *= ilength; v[2] *= ilength; @@ -368,18 +368,18 @@ void VectorMatrix( vec3_t forward, vec3_t right, vec3_t up ) { vec3_t tmp; - if( forward[0] == 0 && forward[1] == 0 ) + if( forward[0] == 0.0f && forward[1] == 0.0f ) { - right[0] = 1; - right[1] = 0; - right[2] = 0; + right[0] = 1.0f; + right[1] = 0.0f; + right[2] = 0.0f; up[0] = -forward[2]; - up[1] = 0; - up[2] = 0; + up[1] = 0.0f; + up[2] = 0.0f; return; } - tmp[0] = 0; tmp[1] = 0; tmp[2] = 1.0; + tmp[0] = 0.0f; tmp[1] = 0.0f; tmp[2] = 1.0f; CrossProduct( forward, tmp, right ); VectorNormalize( right ); CrossProduct( right, forward, up ); @@ -390,27 +390,27 @@ void VectorAngles( const vec3_t forward, vec3_t angles ) { float tmp, yaw, pitch; - if( forward[1] == 0 && forward[0] == 0 ) + if( forward[1] == 0.0f && forward[0] == 0.0f ) { - yaw = 0; - if( forward[2] > 0 ) - pitch = 90; + yaw = 0.0f; + if( forward[2] > 0.0f ) + pitch = 90.0f; else - pitch = 270; + pitch = 270.0f; } else { - yaw = ( atan2( forward[1], forward[0] ) * 180 / M_PI ); - if( yaw < 0 ) - yaw += 360; + yaw = ( atan2( forward[1], forward[0] ) * 180.0f / M_PI_F ); + if( yaw < 0.0f ) + yaw += 360.0f; tmp = sqrt( forward[0] * forward[0] + forward[1] * forward[1] ); - pitch = ( atan2( forward[2], tmp ) * 180 / M_PI ); - if( pitch < 0 ) - pitch += 360; + pitch = ( atan2( forward[2], tmp ) * 180.0f / M_PI_F ); + if( pitch < 0.0f ) + pitch += 360.0f; } angles[0] = pitch; angles[1] = yaw; - angles[2] = 0; + angles[2] = 0.0f; } diff --git a/pm_shared/pm_shared.c b/pm_shared/pm_shared.c index 8f18f0c..172f513 100644 --- a/pm_shared/pm_shared.c +++ b/pm_shared/pm_shared.c @@ -14,18 +14,22 @@ ****/ #include +//#include // NULL +#include // sqrt +#include // strcpy +#include // atoi +#include // isspace #include "mathlib.h" +#ifdef HAVE_TGMATH_H +#include +#endif + #include "const.h" #include "usercmd.h" #include "pm_defs.h" #include "pm_shared.h" #include "pm_movevars.h" #include "pm_debug.h" -//#include // NULL -#include // sqrt -#include // strcpy -#include // atoi -#include // isspace int g_bhopcap = 1; @@ -45,7 +49,7 @@ static int pm_shared_initialized = 0; playermove_t *pmove = NULL; // Ducking time -#define TIME_TO_DUCK 0.4 +#define TIME_TO_DUCK 0.4f #define VEC_DUCK_HULL_MIN -18 #define VEC_DUCK_HULL_MAX 18 #define VEC_DUCK_VIEW 12 @@ -56,7 +60,7 @@ playermove_t *pmove = NULL; #define VEC_HULL_MIN -36 #define VEC_HULL_MAX 36 #define VEC_VIEW 28 -#define STOP_EPSILON 0.1 +#define STOP_EPSILON 0.1f #define CTEXTURESMAX 512 // max number of textures loaded #define CBTEXTURENAMEMAX 13 // only load first n chars of name @@ -91,7 +95,7 @@ playermove_t *pmove = NULL; #define PLAYER_LONGJUMP_SPEED 350 // how fast we longjump -#define PLAYER_DUCKING_MULTIPLIER 0.333 +#define PLAYER_DUCKING_MULTIPLIER 0.333f // double to float warning #ifdef _MSC_VER @@ -284,7 +288,7 @@ void PM_PlayStepSound( int step, float fvol ) return; VectorCopy( pmove->velocity, hvel ); - hvel[2] = 0.0; + hvel[2] = 0.0f; if( pmove->multiplayer && ( !g_onladder && Length( hvel ) <= 220 ) ) return; @@ -594,7 +598,7 @@ void PM_UpdateStepSound( void ) // If we're on a ladder or on the ground, and we're moving fast enough, // play step sound. Also, if pmove->flTimeStepSound is zero, get the new // sound right away - we just started moving in new level. - if( ( fLadder || ( pmove->onground != -1 ) ) && ( Length( pmove->velocity ) > 0.0 ) && ( speed >= velwalk || !pmove->flTimeStepSound ) ) + if( ( fLadder || ( pmove->onground != -1 ) ) && ( Length( pmove->velocity ) > 0.0f ) && ( speed >= velwalk || !pmove->flTimeStepSound ) ) { fWalking = speed < velrun; @@ -604,26 +608,26 @@ void PM_UpdateStepSound( void ) height = pmove->player_maxs[pmove->usehull][2] - pmove->player_mins[pmove->usehull][2]; - knee[2] = pmove->origin[2] - 0.3 * height; - feet[2] = pmove->origin[2] - 0.5 * height; + knee[2] = pmove->origin[2] - 0.3f * height; + feet[2] = pmove->origin[2] - 0.5f * height; // find out what we're stepping in or on... if( fLadder ) { step = STEP_LADDER; - fvol = 0.35; + fvol = 0.35f; pmove->flTimeStepSound = 350; } else if( pmove->PM_PointContents( knee, NULL ) == CONTENTS_WATER ) { step = STEP_WADE; - fvol = 0.65; + fvol = 0.65f; pmove->flTimeStepSound = 600; } else if( pmove->PM_PointContents( feet, NULL ) == CONTENTS_WATER ) { step = STEP_SLOSH; - fvol = fWalking ? 0.2 : 0.5; + fvol = fWalking ? 0.2f : 0.5f; pmove->flTimeStepSound = fWalking ? 400 : 300; } else @@ -636,31 +640,31 @@ void PM_UpdateStepSound( void ) { default: case CHAR_TEX_CONCRETE: - fvol = fWalking ? 0.2 : 0.5; + fvol = fWalking ? 0.2f : 0.5f; pmove->flTimeStepSound = fWalking ? 400 : 300; break; case CHAR_TEX_METAL: - fvol = fWalking ? 0.2 : 0.5; + fvol = fWalking ? 0.2f : 0.5f; pmove->flTimeStepSound = fWalking ? 400 : 300; break; case CHAR_TEX_DIRT: - fvol = fWalking ? 0.25 : 0.55; + fvol = fWalking ? 0.25f : 0.55f; pmove->flTimeStepSound = fWalking ? 400 : 300; break; case CHAR_TEX_VENT: - fvol = fWalking ? 0.4 : 0.7; + fvol = fWalking ? 0.4f : 0.7f; pmove->flTimeStepSound = fWalking ? 400 : 300; break; case CHAR_TEX_GRATE: - fvol = fWalking ? 0.2 : 0.5; + fvol = fWalking ? 0.2f : 0.5f; pmove->flTimeStepSound = fWalking ? 400 : 300; break; case CHAR_TEX_TILE: - fvol = fWalking ? 0.2 : 0.5; + fvol = fWalking ? 0.2f : 0.5f; pmove->flTimeStepSound = fWalking ? 400 : 300; break; case CHAR_TEX_SLOSH: - fvol = fWalking ? 0.2 : 0.5; + fvol = fWalking ? 0.2f : 0.5f; pmove->flTimeStepSound = fWalking ? 400 : 300; break; } @@ -672,7 +676,7 @@ void PM_UpdateStepSound( void ) // 35% volume if ducking if( pmove->flags & FL_DUCKING ) { - fvol *= 0.35; + fvol *= 0.35f; } PM_PlayStepSound( step, fvol ); @@ -801,11 +805,11 @@ void PM_AddCorrectGravity() if( pmove->gravity ) ent_gravity = pmove->gravity; else - ent_gravity = 1.0; + ent_gravity = 1.0f; // Add gravity so they'll be in the correct position during movement // yes, this 0.5 looks wrong, but it's not. - pmove->velocity[2] -= ( ent_gravity * pmove->movevars->gravity * 0.5 * pmove->frametime ); + pmove->velocity[2] -= ( ent_gravity * pmove->movevars->gravity * 0.5f * pmove->frametime ); pmove->velocity[2] += pmove->basevelocity[2] * pmove->frametime; pmove->basevelocity[2] = 0; @@ -822,10 +826,10 @@ void PM_FixupGravityVelocity() if( pmove->gravity ) ent_gravity = pmove->gravity; else - ent_gravity = 1.0; + ent_gravity = 1.0f; // Get the correct velocity for the end of the dt - pmove->velocity[2] -= ( ent_gravity * pmove->movevars->gravity * pmove->frametime * 0.5 ); + pmove->velocity[2] -= ( ent_gravity * pmove->movevars->gravity * pmove->frametime * 0.5f ); PM_CheckVelocity(); } @@ -911,7 +915,7 @@ int PM_FlyMove( void ) // If the plane we hit has a high z component in the normal, then // it's probably a floor - if( trace.plane.normal[2] > 0.7 ) + if( trace.plane.normal[2] > 0.7f ) { blocked |= 1; // floor } @@ -946,14 +950,14 @@ int PM_FlyMove( void ) { for( i = 0; i < numplanes; i++ ) { - if( planes[i][2] > 0.7 ) + if( planes[i][2] > 0.7f ) { // floor or slope PM_ClipVelocity( original_velocity, planes[i], new_velocity, 1 ); VectorCopy( new_velocity, original_velocity ); } else - PM_ClipVelocity( original_velocity, planes[i], new_velocity, 1.0 + pmove->movevars->bounce * ( 1 - pmove->friction ) ); + PM_ClipVelocity( original_velocity, planes[i], new_velocity, 1.0f + pmove->movevars->bounce * ( 1 - pmove->friction ) ); } VectorCopy( new_velocity, pmove->velocity ); @@ -1202,8 +1206,9 @@ void PM_WalkMove() // If we are not on the ground any more then // use the original movement attempt - if( trace.plane.normal[2] < 0.7 ) + if( trace.plane.normal[2] < 0.7f ) goto usedown; + // If the trace ended up in empty space, copy the end // over to the origin. if( !trace.startsolid && !trace.allsolid ) @@ -1274,7 +1279,7 @@ void PM_Friction( void ) trace = pmove->PM_PlayerTrace( start, stop, PM_NORMAL, -1 ); - if( trace.fraction == 1.0 ) + if( trace.fraction == 1.0f ) friction = pmove->movevars->friction*pmove->movevars->edgefriction; else friction = pmove->movevars->friction; @@ -1388,7 +1393,7 @@ void PM_WaterMove( void ) wishspeed = pmove->maxspeed; } // Slow us down a bit. - wishspeed *= 0.8; + wishspeed *= 0.8f; VectorAdd( pmove->velocity, pmove->basevelocity, pmove->velocity ); @@ -1515,8 +1520,8 @@ qboolean PM_CheckWater() float heightover2; // Pick a spot just above the players feet. - point[0] = pmove->origin[0] + ( pmove->player_mins[pmove->usehull][0] + pmove->player_maxs[pmove->usehull][0] ) * 0.5; - point[1] = pmove->origin[1] + ( pmove->player_mins[pmove->usehull][1] + pmove->player_maxs[pmove->usehull][1] ) * 0.5; + point[0] = pmove->origin[0] + ( pmove->player_mins[pmove->usehull][0] + pmove->player_maxs[pmove->usehull][0] ) * 0.5f; + point[1] = pmove->origin[1] + ( pmove->player_mins[pmove->usehull][1] + pmove->player_maxs[pmove->usehull][1] ) * 0.5f; point[2] = pmove->origin[2] + pmove->player_mins[pmove->usehull][2] + 1; // Assume that we are not in water at all. @@ -1535,7 +1540,7 @@ qboolean PM_CheckWater() pmove->waterlevel = 1; height = ( pmove->player_mins[pmove->usehull][2] + pmove->player_maxs[pmove->usehull][2] ); - heightover2 = height * 0.5; + heightover2 = height * 0.5f; // Now check a point that is at the player hull midpoint. point[2] = pmove->origin[2] + heightover2; @@ -1610,7 +1615,7 @@ void PM_CatagorizePosition( void ) // Try and move down. tr = pmove->PM_PlayerTrace( pmove->origin, point, PM_NORMAL, -1 ); // If we hit a steep plane, we are not on ground - if( tr.plane.normal[2] < 0.7 ) + if( tr.plane.normal[2] < 0.7f ) pmove->onground = -1; // too steep else pmove->onground = tr.ent; // Otherwise, point to index of ent under us. @@ -1666,7 +1671,7 @@ try nudging slightly on all axis to allow for the cut precision of the net coordinates ================= */ -#define PM_CHECKSTUCK_MINTIME 0.05 // Don't check again too quickly. +#define PM_CHECKSTUCK_MINTIME 0.05f // Don't check again too quickly. int PM_CheckStuck( void ) { @@ -1752,8 +1757,8 @@ int PM_CheckStuck( void ) if( pmove->cmd.buttons & ( IN_JUMP | IN_DUCK | IN_ATTACK ) && ( pmove->physents[hitent].player != 0 ) ) { float x, y, z; - float xystep = 8.0; - float zstep = 18.0; + float xystep = 8.0f; + float zstep = 18.0f; float xyminmax = xystep; float zminmax = 4 * zstep; @@ -1826,7 +1831,7 @@ void PM_SpectatorMove( void ) { drop = 0; - friction = pmove->movevars->friction * 1.5; // extra friction + friction = pmove->movevars->friction * 1.5f; // extra friction control = speed < pmove->movevars->stopspeed ? pmove->movevars->stopspeed : speed; drop += control * friction*pmove->frametime; @@ -2043,12 +2048,12 @@ void PM_Duck( void ) pmove->bInDuck = true; } - time = max( 0.0, ( 1.0 - (float)pmove->flDuckTime / 1000.0 ) ); + time = max( 0.0f, ( 1.0f - (float)pmove->flDuckTime / 1000.0f ) ); if( pmove->bInDuck ) { // Finish ducking immediately if duck time is over or not on ground - if( ( (float)pmove->flDuckTime / 1000.0 <= ( 1.0 - TIME_TO_DUCK ) ) || ( pmove->onground == -1 ) ) + if( ( (float)pmove->flDuckTime / 1000.0f <= ( 1.0f - TIME_TO_DUCK ) ) || ( pmove->onground == -1 ) ) { pmove->usehull = 1; pmove->view_ofs[2] = VEC_DUCK_VIEW; @@ -2074,7 +2079,7 @@ void PM_Duck( void ) float fMore = VEC_DUCK_HULL_MIN - VEC_HULL_MIN; // Calc parametric time - duckFraction = PM_SplineFraction( time, (1.0/TIME_TO_DUCK) ); + duckFraction = PM_SplineFraction( time, ( 1.0f / TIME_TO_DUCK ) ); pmove->view_ofs[2] = ( ( VEC_DUCK_VIEW - fMore ) * duckFraction ) + ( VEC_VIEW * ( 1 - duckFraction ) ); } } @@ -2119,7 +2124,7 @@ void PM_LadderMove( physent_t *pLadder ) pmove->gravity = 0; pmove->PM_TraceModel( pLadder, pmove->origin, ladderCenter, &trace ); - if( trace.fraction != 1.0 ) + if( trace.fraction != 1.0f ) { float forward = 0, right = 0; vec3_t vpn, v_right; @@ -2264,7 +2269,7 @@ void PM_AddGravity() if( pmove->gravity ) ent_gravity = pmove->gravity; else - ent_gravity = 1.0; + ent_gravity = 1.0f; // Add gravity incorrectly pmove->velocity[2] -= ( ent_gravity * pmove->movevars->gravity * pmove->frametime ); @@ -2292,7 +2297,7 @@ pmtrace_t PM_PushEntity( vec3_t push ) VectorCopy( trace.endpos, pmove->origin ); // So we can run impact function afterwards. - if( trace.fraction < 1.0 && !trace.allsolid ) + if( trace.fraction < 1.0f && !trace.allsolid ) { PM_AddToTouched( trace, pmove->velocity ); } @@ -2359,16 +2364,16 @@ void PM_Physics_Toss() } if( pmove->movetype == MOVETYPE_BOUNCE ) - backoff = 2.0 - pmove->friction; + backoff = 2.0f - pmove->friction; else if( pmove->movetype == MOVETYPE_BOUNCEMISSILE ) - backoff = 2.0; + backoff = 2.0f; else - backoff = 1; + backoff = 1.0f; PM_ClipVelocity( pmove->velocity, trace.plane.normal, pmove->velocity, backoff ); // stop if on ground - if( trace.plane.normal[2] > 0.7 ) + if( trace.plane.normal[2] > 0.7f ) { float vel; vec3_t base; @@ -2392,7 +2397,7 @@ void PM_Physics_Toss() } else { - VectorScale( pmove->velocity, ( 1.0 - trace.fraction) * pmove->frametime * 0.9, move ); + VectorScale( pmove->velocity, ( 1.0f - trace.fraction) * pmove->frametime * 0.9f, move ); trace = PM_PushEntity( move ); } VectorSubtract( pmove->velocity, base, pmove->velocity ) @@ -2464,7 +2469,7 @@ void PM_PreventMegaBunnyJumping( void ) if( spd <= maxscaledspeed ) return; - fraction = ( maxscaledspeed / spd ) * 0.65; //Returns the modifier for the velocity + fraction = ( maxscaledspeed / spd ) * 0.65f; //Returns the modifier for the velocity VectorScale( pmove->velocity, fraction, pmove->velocity ); //Crop it down!. } @@ -2569,7 +2574,7 @@ void PM_Jump( void ) } else { - PM_PlayStepSound( PM_MapTextureTypeStepType( pmove->chtexturetype ), 1.0 ); + PM_PlayStepSound( PM_MapTextureTypeStepType( pmove->chtexturetype ), 1.0f ); } // See if user can super long jump? @@ -2588,19 +2593,19 @@ void PM_Jump( void ) for( i = 0; i < 2; i++ ) { - pmove->velocity[i] = pmove->forward[i] * PLAYER_LONGJUMP_SPEED * 1.6; + pmove->velocity[i] = pmove->forward[i] * PLAYER_LONGJUMP_SPEED * 1.6f; } - pmove->velocity[2] = sqrt( 2 * 800 * 56.0 ); + pmove->velocity[2] = sqrt( 2.0f * 800.0f * 56.0f ); } else { - pmove->velocity[2] = sqrt( 2 * 800 * 45.0 ); + pmove->velocity[2] = sqrt( 2.0f * 800.0f * 45.0f ); } } else { - pmove->velocity[2] = sqrt( 2 * 800 * 45.0 ); + pmove->velocity[2] = sqrt( 2.0f * 800.0f * 45.0f ); } // Decay it for simulation @@ -2648,7 +2653,7 @@ void PM_CheckWaterJump( void ) VectorNormalize( flatforward ); // Are we backing into water from steps or something? If so, don't pop forward - if( curspeed != 0.0 && ( DotProduct( flatvelocity, flatforward ) < 0.0 ) ) + if( curspeed != 0.0f && ( DotProduct( flatvelocity, flatforward ) < 0.0f ) ) return; VectorCopy( pmove->origin, vecStart ); @@ -2660,14 +2665,14 @@ void PM_CheckWaterJump( void ) savehull = pmove->usehull; pmove->usehull = 2; tr = pmove->PM_PlayerTrace( vecStart, vecEnd, PM_NORMAL, -1 ); - if( tr.fraction < 1.0 && fabs( tr.plane.normal[2] ) < 0.1f ) // Facing a near vertical wall? + if( tr.fraction < 1.0f && fabs( tr.plane.normal[2] ) < 0.1f ) // Facing a near vertical wall? { vecStart[2] += pmove->player_maxs[savehull][2] - WJ_HEIGHT; VectorMA( vecStart, 24, flatforward, vecEnd ); VectorMA( vec3_origin, -50, tr.plane.normal, pmove->movedir ); tr = pmove->PM_PlayerTrace( vecStart, vecEnd, PM_NORMAL, -1 ); - if( tr.fraction == 1.0 ) + if( tr.fraction == 1.0f ) { pmove->waterjumptime = 2000; pmove->velocity[2] = 225; @@ -2684,7 +2689,7 @@ void PM_CheckFalling( void ) { if( pmove->onground != -1 && !pmove->dead && pmove->flFallVelocity >= PLAYER_FALL_PUNCH_THRESHHOLD ) { - float fvol = 0.5; + float fvol = 0.5f; if( pmove->waterlevel > 0 ) { @@ -2702,7 +2707,7 @@ void PM_CheckFalling( void ) pmove->PM_PlaySound( CHAN_VOICE, "player/pl_fallpain3.wav", 1, ATTN_NORM, 0, PITCH_NORM ); // break; //} - fvol = 1.0; + fvol = 1.0f; } else if( pmove->flFallVelocity > PLAYER_MAX_SAFE_FALL_SPEED / 2 ) { @@ -2721,7 +2726,7 @@ void PM_CheckFalling( void ) fvol = 0; } - if( fvol > 0.0 ) + if( fvol > 0.0f ) { // Play landing step right away pmove->flTimeStepSound = 0; @@ -2732,7 +2737,7 @@ void PM_CheckFalling( void ) PM_PlayStepSound( PM_MapTextureTypeStepType( pmove->chtexturetype ), fvol ); // Knock the screen around a little bit, temporary effect - pmove->punchangle[2] = pmove->flFallVelocity * 0.013; // punch z axis + pmove->punchangle[2] = pmove->flFallVelocity * 0.013f; // punch z axis if( pmove->punchangle[0] > 8 ) { @@ -2822,8 +2827,8 @@ void PM_DropPunchAngle( vec3_t punchangle ) float len; len = VectorNormalize( punchangle ); - len -= ( 10.0 + len * 0.5 ) * pmove->frametime; - len = max( len, 0.0 ); + len -= ( 10.0f + len * 0.5f ) * pmove->frametime; + len = max( len, 0.0f ); VectorScale( punchangle, len, punchangle ); } @@ -2844,12 +2849,12 @@ void PM_CheckParamters( void ) spd = sqrt( spd ); maxspeed = pmove->clientmaxspeed; //atof( pmove->PM_Info_ValueForKey( pmove->physinfo, "maxspd" ) ); - if( maxspeed != 0.0 ) + if( maxspeed != 0.0f ) { pmove->maxspeed = min( maxspeed, pmove->maxspeed ); } - if( ( spd != 0.0 ) && ( spd > pmove->maxspeed ) ) + if( ( spd != 0.0f ) && ( spd > pmove->maxspeed ) ) { float fRatio = pmove->maxspeed / spd; pmove->cmd.forwardmove *= fRatio; @@ -2947,7 +2952,7 @@ void PM_PlayerMove( qboolean server ) pmove->numtouch = 0; // # of msec to apply movement - pmove->frametime = pmove->cmd.msec * 0.001; + pmove->frametime = pmove->cmd.msec * 0.001f; PM_ReduceTimers(); @@ -3123,7 +3128,7 @@ void PM_PlayerMove( qboolean server ) // we don't slow when standing still, relative to the conveyor. if( pmove->onground != -1 ) { - pmove->velocity[2] = 0.0; + pmove->velocity[2] = 0.0f; PM_Friction(); } @@ -3187,7 +3192,7 @@ void PM_CreateStuckTable( void ) // Little Moves. x = y = 0; // Z moves - for( z = -0.125; z <= 0.125; z += 0.125 ) + for( z = -0.125f; z <= 0.125f; z += 0.125f ) { rgv3tStuckTable[idx][0] = x; rgv3tStuckTable[idx][1] = y; @@ -3196,7 +3201,7 @@ void PM_CreateStuckTable( void ) } x = z = 0; // Y moves - for( y = -0.125; y <= 0.125; y += 0.125 ) + for( y = -0.125f; y <= 0.125f; y += 0.125f ) { rgv3tStuckTable[idx][0] = x; rgv3tStuckTable[idx][1] = y; @@ -3205,7 +3210,7 @@ void PM_CreateStuckTable( void ) } y = z = 0; // X moves - for( x = -0.125; x <= 0.125; x += 0.125 ) + for( x = -0.125f; x <= 0.125f; x += 0.125f ) { rgv3tStuckTable[idx][0] = x; rgv3tStuckTable[idx][1] = y; @@ -3214,11 +3219,11 @@ void PM_CreateStuckTable( void ) } // Remaining multi axis nudges. - for( x = - 0.125; x <= 0.125; x += 0.250 ) + for( x = - 0.125f; x <= 0.125f; x += 0.250f ) { - for( y = - 0.125; y <= 0.125; y += 0.250 ) + for( y = - 0.125f; y <= 0.125f; y += 0.250f ) { - for( z = - 0.125; z <= 0.125; z += 0.250 ) + for( z = - 0.125f; z <= 0.125f; z += 0.250f ) { rgv3tStuckTable[idx][0] = x; rgv3tStuckTable[idx][1] = y; @@ -3247,7 +3252,7 @@ void PM_CreateStuckTable( void ) x = z = 0; // Y moves - for( y = -2.0f ; y <= 2.0f ; y += 2.0 ) + for( y = -2.0f; y <= 2.0f; y += 2.0f ) { rgv3tStuckTable[idx][0] = x; rgv3tStuckTable[idx][1] = y; @@ -3256,7 +3261,7 @@ void PM_CreateStuckTable( void ) } y = z = 0; // X moves - for( x = -2.0f ; x <= 2.0f ; x += 2.0f ) + for( x = -2.0f; x <= 2.0f; x += 2.0f ) { rgv3tStuckTable[idx][0] = x; rgv3tStuckTable[idx][1] = y; @@ -3271,7 +3276,7 @@ void PM_CreateStuckTable( void ) for( x = -2.0f; x <= 2.0f; x += 2.0f ) { - for( y = -2.0f; y <= 2.0f; y += 2.0 ) + for( y = -2.0f; y <= 2.0f; y += 2.0f ) { rgv3tStuckTable[idx][0] = x; rgv3tStuckTable[idx][1] = y; diff --git a/public/build.h b/public/build.h new file mode 100644 index 0000000..9cb7e25 --- /dev/null +++ b/public/build.h @@ -0,0 +1,219 @@ +/* +build.h - compile-time build information + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to +*/ +#pragma once +#ifndef BUILD_H +#define BUILD_H + +// All XASH_* macros set by this header are guaranteed to have positive value otherwise not defined + +// Any new define must be undefined at first +// You can generate #undef list below with this oneliner: +// $ cat build.h | sed 's/\t//g' | grep '^#define XASH' | awk '{ print $2 }' | sort | uniq | awk '{ print "#undef " $1 }' +// +// So in various buildscripts you can grep for ^#undef XASH and select only second word +// or in another oneliner: +// $ cat build.h | grep '^#undef XASH' | awk '{ print $2 }' + +#undef XASH_64BIT +#undef XASH_AMD64 +#undef XASH_ANDROID +#undef XASH_APPLE +#undef XASH_ARM +#undef XASH_ARM64 +#undef XASH_ARM_HARDFP +#undef XASH_ARM_SOFTFP +#undef XASH_ARMv4 +#undef XASH_ARMv5 +#undef XASH_ARMv6 +#undef XASH_ARMv7 +#undef XASH_BIG_ENDIAN +#undef XASH_BSD +#undef XASH_E2K +#undef XASH_EMSCRIPTEN +#undef XASH_FREEBSD +#undef XASH_IOS +#undef XASH_JS +#undef XASH_LINUX +#undef XASH_LITTLE_ENDIAN +#undef XASH_MINGW +#undef XASH_MIPS +#undef XASH_MOBILE_PLATFORM +#undef XASH_MSVC +#undef XASH_NETBSD +#undef XASH_OPENBSD +#undef XASH_WIN32 +#undef XASH_WIN64 +#undef XASH_X86 + +//================================================================ +// +// OPERATING SYSTEM DEFINES +// +//================================================================ +#if defined(_WIN32) + #define XASH_WIN32 1 + #if defined(__MINGW32__) + #define XASH_MINGW 1 + #elif defined(_MSC_VER) + #define XASH_MSVC 1 + #endif + + #if defined(_WIN64) + #define XASH_WIN64 1 + #endif +#elif defined(__linux__) + #define XASH_LINUX 1 + #if defined(__ANDROID__) + #define XASH_ANDROID 1 + #endif // defined(__ANDROID__) +#elif defined(__APPLE__) + #include + #define XASH_APPLE 1 + #if TARGET_OS_IOS + #define XASH_IOS 1 + #endif // TARGET_OS_IOS +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + #define XASH_BSD 1 + #if defined(__FreeBSD__) + #define XASH_FREEBSD 1 + #elif defined(__NetBSD__) + #define XASH_NETBSD 1 + #elif defined(__OpenBSD__) + #define XASH_OPENBSD 1 + #endif +#elif defined __EMSCRIPTEN__ + #define XASH_EMSCRIPTEN 1 +#else +#error "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug" +#endif + +#if defined XASH_ANDROID || defined XASH_IOS + #define XASH_MOBILE_PLATFORM 1 +#endif + +//================================================================ +// +// ENDIANNESS DEFINES +// +//================================================================ + +#if defined(XASH_LITTLE_ENDIAN) && defined(XASH_BIG_ENDIAN) + #error "Both XASH_LITTLE_ENDIAN and XASH_BIG_ENDIAN are defined" +#endif + +#if !defined(XASH_LITTLE_ENDIAN) || !defined(XASH_BIG_ENDIAN) + #if defined XASH_MSVC || __LITTLE_ENDIAN__ + //!!! Probably all WinNT installations runs in little endian + #define XASH_LITTLE_ENDIAN 1 + #elif __BIG_ENDIAN__ + #define XASH_BIG_ENDIAN 1 + #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && defined(__ORDER_LITTLE_ENDIAN__) // some compilers define this + #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + #define XASH_BIG_ENDIAN 1 + #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + #define XASH_LITTLE_ENDIAN 1 + #else + #error "Unknown endianness!" + #endif + #else + #include + #if __BYTE_ORDER == __BIG_ENDIAN + #define XASH_BIG_ENDIAN 1 + #elif __BYTE_ORDER == __LITTLE_ENDIAN + #define XASH_LITTLE_ENDIAN 1 + #else + #error "Unknown endianness!" + #endif + #endif // !XASH_WIN32 +#endif + +//================================================================ +// +// CPU ARCHITECTURE DEFINES +// +//================================================================ +#if defined(__x86_64__) || defined(_M_X64) + #define XASH_64BIT 1 + #define XASH_AMD64 1 +#elif defined(__i386__) || defined(_X86_) || defined(_M_IX86) + #define XASH_X86 1 +#elif defined __aarch64__ + #define XASH_64BIT 1 + #define XASH_ARM64 1 +#elif defined __arm__ || defined _M_ARM + #if defined _M_ARM + // msvc can only armv7 ? + #define XASH_ARM 7 + #elif __ARM_ARCH == 7 || __ARM_ARCH_7__ + #define XASH_ARM 7 + #elif __ARM_ARCH == 6 || __ARM_ARCH_6__ || __ARM_ARCH_6J__ + #define XASH_ARM 6 + #elif __ARM_ARCH == 5 || __ARM_ARCH_5__ + #define XASH_ARM 5 + #elif __ARM_ARCH == 4 || __ARM_ARCH_4__ + #define XASH_ARM 4 + #else + #error "Unknown ARM" + #endif + + #if defined _M_ARM + #error "No WinMobile port yet! Need to determine which ARM float ABI msvc uses if applicable" + #endif + + #if defined __SOFTFP__ || __ARM_PCS_VFP == 0 + #define XASH_ARM_SOFTFP 1 + #else // __SOFTFP__ + #define XASH_ARM_HARDFP 1 + #endif // __SOFTFP__ +#elif defined __mips__ + #define XASH_MIPS 1 +#elif defined __EMSCRIPTEN__ + #define XASH_JS 1 +#elif defined __e2k__ + #define XASH_64BIT 1 + #define XASH_E2K 1 +#else + #error "Place your architecture name here! If this is a mistake, try to fix conditions above and report a bug" +#endif + +#if defined(XASH_WAF_DETECTED_64BIT) && !defined(XASH_64BIT) + #define XASH_64BIT 1 +#endif + +#if XASH_ARM == 7 + #define XASH_ARMv7 1 +#elif XASH_ARM == 6 + #define XASH_ARMv6 1 +#elif XASH_ARM == 5 + #define XASH_ARMv5 1 +#elif XASH_ARM == 4 + #define XASH_ARMv4 1 +#endif + +#endif // BUILD_H diff --git a/scripts/waifulib/library_naming.py b/scripts/waifulib/library_naming.py new file mode 100644 index 0000000..77dfa6d --- /dev/null +++ b/scripts/waifulib/library_naming.py @@ -0,0 +1,127 @@ +#! /usr/bin/env python +# Copyright 2019 (C) a1batross + +from waflib import Configure, Errors, Utils + +# TODO: make generic +CHECK_SYMBOL_EXISTS_FRAGMENT = ''' +#include "build.h" + +int main(int argc, char** argv) +{ + (void)argv; +#ifndef %s + return ((int*)(&%s))[argc]; +#else + (void)argc; + return 0; +#endif +} +''' + +DEFINES = [ +'XASH_64BIT', +'XASH_AMD64', +'XASH_ANDROID', +'XASH_APPLE', +'XASH_ARM', +'XASH_ARM64', +'XASH_ARM_HARDFP', +'XASH_ARM_SOFTFP', +'XASH_ARMv4', +'XASH_ARMv5', +'XASH_ARMv6', +'XASH_ARMv7', +'XASH_BIG_ENDIAN', +'XASH_BSD', +'XASH_E2K', +'XASH_EMSCRIPTEN', +'XASH_FREEBSD', +'XASH_IOS', +'XASH_JS', +'XASH_LINUX', +'XASH_LITTLE_ENDIAN', +'XASH_MINGW', +'XASH_MIPS', +'XASH_MOBILE_PLATFORM', +'XASH_MSVC', +'XASH_NETBSD', +'XASH_OPENBSD', +'XASH_WIN32', +'XASH_WIN64', +'XASH_X86' +] + +def configure(conf): + conf.env.stash() + conf.start_msg('Determining library postfix') + tests = map(lambda x: { + 'fragment': CHECK_SYMBOL_EXISTS_FRAGMENT % (x, x), + 'includes': [conf.path.find_node('public/').abspath()], + 'define_name': x }, DEFINES ) + + conf.multicheck(*tests, msg = '', mandatory = False, quiet = True) + + # engine/common/build.c + if conf.env.XASH_ANDROID: + buildos = "android" + elif conf.env.XASH_WIN32 or conf.env.XASH_LINUX or conf.env.XASH_APPLE: + buildos = "" # no prefix for default OS + elif conf.env.XASH_FREEBSD: + buildos = "freebsd" + elif conf.env.XASH_NETBSD: + buildos = "netbsd" + elif conf.env.XASH_OPENBSD: + buildos = "openbsd" + elif conf.env.XASH_EMSCRIPTEN: + buildos = "emscripten" + else: + conf.fatal("Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug") + + if conf.env.XASH_AMD64: + buildarch = "amd64" + elif conf.env.XASH_X86: + buildarch = "" + elif conf.env.XASH_ARM64: + buildarch = "arm64" + elif conf.env.XASH_ARM: + buildarch = "armv" + if conf.env.XASH_ARMv7: + buildarch += "7" + elif conf.env.XASH_ARMv6: + buildarch += "6" + elif conf.env.XASH_ARMv5: + buildarch += "5" + elif conf.env.XASH_ARMv4: + buildarch += "4" + else: + raise conf.fatal('Unknown ARM') + + if conf.env.XASH_ARM_HARDFP: + buildarch += "hf" + else: + buildarch += "l" + elif conf.env.XASH_MIPS and conf.env.XASH_BIG_ENDIAN: + buildarch = "mips" + elif conf.env.XASH_MIPS and conf.env.XASH_LITTLE_ENDIAN: + buildarch = "mipsel" + elif conf.env.XASH_JS: + buildarch = "javascript" + elif conf.env.XASH_E2K: + buildarch = "e2k" + else: + raise conf.fatal("Place your architecture name here! If this is a mistake, try to fix conditions above and report a bug") + + conf.env.revert() + + if buildos == 'android': + # force disable for Android, as Android ports aren't distributed in normal way and doesn't follow library naming + conf.env.POSTFIX = '' + elif buildos != '' and buildarch != '': + conf.env.POSTFIX = '_%s_%s' % (buildos,buildarch) + elif buildarch != '': + conf.env.POSTFIX = '_%s' % buildarch + else: + conf.env.POSTFIX = '' + + conf.end_msg(conf.env.POSTFIX) diff --git a/scripts/waifulib/xcompile.py b/scripts/waifulib/xcompile.py index fd6dd59..2872306 100644 --- a/scripts/waifulib/xcompile.py +++ b/scripts/waifulib/xcompile.py @@ -19,13 +19,21 @@ import os import sys +ANDROID_NDK_ENVVARS = ['ANDROID_NDK_HOME', 'ANDROID_NDK'] +ANDROID_NDK_SUPPORTED = [10, 19, 20] +ANDROID_NDK_HARDFP_MAX = 11 # latest version that supports hardfp +ANDROID_NDK_GCC_MAX = 17 # latest NDK that ships with GCC +ANDROID_NDK_UNIFIED_SYSROOT_MIN = 15 +ANDROID_NDK_SYSROOT_FLAG_MAX = 19 # latest NDK that need --sysroot flag +ANDROID_NDK_API_MIN = { 10: 3, 19: 16, 20: 16 } # minimal API level ndk revision supports +ANDROID_64BIT_API_MIN = 21 # minimal API level that supports 64-bit targets + # This class does support ONLY r10e and r19c/r20 NDK class Android: ctx = None # waf context arch = None toolchain = None api = None - toolchain_path = None ndk_home = None ndk_rev = 0 is_hardfloat = False @@ -37,13 +45,13 @@ def __init__(self, ctx, arch, toolchain, api): self.toolchain = toolchain self.arch = arch - for i in ['ANDROID_NDK_HOME', 'ANDROID_NDK']: + for i in ANDROID_NDK_ENVVARS: self.ndk_home = os.getenv(i) if self.ndk_home != None: break - - if not self.ndk_home: - ctx.fatal('Set ANDROID_NDK_HOME environment variable pointing to the root of Android NDK!') + else: + ctx.fatal('Set %s environment variable pointing to the root of Android NDK!' % + ' or '.join(ANDROID_NDK_ENVVARS)) # TODO: this were added at some point of NDK development # but I don't know at which version @@ -57,32 +65,29 @@ def __init__(self, ctx, arch, toolchain, api): if 'Pkg.Revision' in trimed_tokens: self.ndk_rev = int(trimed_tokens[1].split('.')[0]) - else: - self.ndk_rev = 10 - if self.ndk_rev not in [10, 19, 20]: - ctx.fatal('Unknown NDK revision: %d' % (self.ndk_rev)) - - if self.is_host() and self.ndk_rev < 20: - ctx.fatal('Using host toolchain with this NDK revision is untested. You can comment this check, but you\'re on your own!') + if self.ndk_rev not in ANDROID_NDK_SUPPORTED: + ctx.fatal('Unknown NDK revision: %d' % (self.ndk_rev)) + else: + self.ndk_rev = ANDROID_NDK_SUPPORTED[0] - if self.ndk_rev >= 19 or 'clang' in self.toolchain: + if 'clang' in self.toolchain or self.ndk_rev > ANDROID_NDK_GCC_MAX: self.clang = True if self.arch == 'armeabi-v7a-hard': - if self.ndk_rev <= 10: + if self.ndk_rev <= ANDROID_NDK_HARDFP_MAX: self.arch = 'armeabi-v7a' # Only armeabi-v7a have hard float ABI self.is_hardfloat = True else: ctx.fatal('NDK does not support hardfloat ABI') - if self.is_arm64() or self.is_amd64() and self.api < 21: - Logs.warn('API level for 64-bit target automatically was set to 21') - self.api = 21 - elif self.ndk_rev >= 19 and self.api < 16: - Logs.warn('API level automatically was set to 16 due to NDK support') - self.api = 16 - self.toolchain_path = self.gen_toolchain_path() + if self.api < ANDROID_NDK_API_MIN[self.ndk_rev]: + self.api = ANDROID_NDK_API_MIN[self.ndk_rev] + Logs.warn('API level automatically was set to %d due to NDK support' % self.api) + + if self.is_arm64() or self.is_amd64() and self.api < ANDROID_64BIT_API_MIN: + self.api = ANDROID_64BIT_API_MIN + Logs.warn('API level for 64-bit target automatically was set to %d' % self.api) def is_host(self): ''' @@ -139,29 +144,37 @@ def ndk_triplet(self, llvm_toolchain = False, toolchain_folder = False): else: return self.arch + '-linux-android' - def gen_gcc_toolchain_path(self): - path = 'toolchains' + def apk_arch(self): + if self.is_arm64(): + return 'arm64-v8a' + return self.arch + + def gen_host_toolchain(self): + # With host toolchain we don't care about OS + # so just download NDK for Linux x86_64 + if self.is_host(): + return 'linux-x86_64' if sys.platform.startswith('win32') or sys.platform.startswith('cygwin'): - toolchain_host = 'windows' + osname = 'windows' elif sys.platform.startswith('darwin'): - toolchain_host = 'darwin' - elif sys.platform.startswith('linux') or self.is_host(): - toolchain_host = 'linux' + osname = 'darwin' + elif sys.platform.startswith('linux'): + osname = 'linux' else: self.ctx.fatal('Unsupported by NDK host platform') - toolchain_host += '-' - - # Assuming we are building on x86 if sys.maxsize > 2**32: - toolchain_host += 'x86_64' - else: toolchain_host += 'x86' + arch = 'x86_64' + else: arch = 'x86' - if self.is_clang(): - if self.ndk_rev < 19: - raise self.ctx.fatal('Clang is not supported for this NDK') + return '%s-%s' % (osname, arch) + + def gen_gcc_toolchain_path(self): + path = 'toolchains' + toolchain_host = self.gen_host_toolchain() + if self.is_clang(): toolchain_folder = 'llvm' else: if self.is_host(): @@ -186,12 +199,12 @@ def gen_binutils_path(self): def cc(self): if self.is_host(): return 'clang --target=%s%d' % (self.ndk_triplet(), self.api) - return self.toolchain_path + ('clang' if self.is_clang() else 'gcc') + return self.gen_toolchain_path() + ('clang' if self.is_clang() else 'gcc') def cxx(self): if self.is_host(): return 'clang++ --target=%s%d' % (self.ndk_triplet(), self.api) - return self.toolchain_path + ('clang++' if self.is_clang() else 'g++') + return self.gen_toolchain_path() + ('clang++' if self.is_clang() else 'g++') def strip(self): if self.is_host(): @@ -213,24 +226,41 @@ def libsysroot(self): return os.path.abspath(os.path.join(self.ndk_home, path)) def sysroot(self): - if self.ndk_rev >= 19: + if self.ndk_rev >= ANDROID_NDK_UNIFIED_SYSROOT_MIN: return os.path.abspath(os.path.join(self.ndk_home, 'sysroot')) else: return self.libsysroot() - def cflags(self): + def cflags(self, cxx = False): cflags = [] - if self.is_host(): - if self.ndk_rev >= 19: + + if self.ndk_rev <= ANDROID_NDK_SYSROOT_FLAG_MAX: + cflags += ['--sysroot=%s' % (self.sysroot())] + else: + if self.is_host(): cflags += [ '--sysroot=%s/sysroot' % (self.gen_gcc_toolchain_path()), - '-I%s/usr/include/' % (self.sysroot()) + '-isystem', '%s/usr/include/' % (self.sysroot()) ] - else: cflags += ['--sysroot=%s' % (self.sysroot())] - elif self.ndk_rev < 20: - cflags += ['--sysroot=%s' % (self.sysroot())] cflags += ['-I%s' % (self.system_stl()), '-DANDROID', '-D__ANDROID__'] + + if cxx and not self.is_clang() and self.toolchain not in ['4.8','4.9']: + cflags += ['-fno-sized-deallocation'] + + def fixup_host_clang_with_old_ndk(): + cflags = [] + # Clang builtin redefine w/ different calling convention bug + # NOTE: I did not added complex.h functions here, despite + # that NDK devs forgot to put __NDK_FPABI_MATH__ for complex + # math functions + # I personally don't need complex numbers support, but if you want it + # just run sed to patch header + for f in ['strtod', 'strtof', 'strtold']: + cflags += ['-fno-builtin-%s' % f] + return cflags + + if self.is_arm(): if self.arch == 'armeabi-v7a': # ARMv7 support @@ -239,11 +269,17 @@ def cflags(self): if not self.is_clang() and not self.is_host(): cflags += [ '-mvectorize-with-neon-quad' ] - if self.is_hardfloat: - cflags += ['-D_NDK_MATH_NO_SOFTFP=1', '-mhard-float', '-mfloat-abi=hard', '-DLOAD_HARDFP', '-DSOFTFP_LINK'] + if self.is_host() and self.ndk_rev <= ANDROID_NDK_HARDFP_MAX: + cflags += fixup_host_clang_with_old_ndk() + + if self.is_hardfp(): + cflags += ['-D_NDK_MATH_NO_SOFTFP=1', '-mfloat-abi=hard', '-DLOAD_HARDFP', '-DSOFTFP_LINK'] else: cflags += ['-mfloat-abi=softfp'] else: + if self.is_host() and self.ndk_rev <= ANDROID_NDK_HARDFP_MAX: + cflags += fixup_host_clang_with_old_ndk() + # ARMv5 support cflags += ['-march=armv5te', '-mtune=xscale', '-msoft-float'] elif self.is_x86(): @@ -256,7 +292,7 @@ def linkflags(self): if self.is_host(): linkflags += ['--gcc-toolchain=%s' % self.gen_gcc_toolchain_path()] - if self.ndk_rev < 20: + if self.ndk_rev <= ANDROID_NDK_SYSROOT_FLAG_MAX: linkflags += ['--sysroot=%s' % (self.sysroot())] elif self.is_host(): linkflags += ['--sysroot=%s/sysroot' % (self.gen_gcc_toolchain_path())] @@ -264,17 +300,21 @@ def linkflags(self): if self.is_clang() or self.is_host(): linkflags += ['-fuse-ld=lld'] - linkflags += ['-Wl,--hash-style=both'] + linkflags += ['-Wl,--hash-style=both','-Wl,--no-undefined'] return linkflags def ldflags(self): - ldflags = ['-stdlib=libstdc++', '-lgcc', '-no-canonical-prefixes'] + ldflags = ['-lgcc', '-no-canonical-prefixes'] + if self.is_clang() or self.is_host(): + ldflags += ['-stdlib=libstdc++'] if self.is_arm(): if self.arch == 'armeabi-v7a': ldflags += ['-march=armv7-a', '-mthumb'] + if not self.is_clang() and not self.is_host(): # lld only ldflags += ['-Wl,--fix-cortex-a8'] - if self.is_hardfloat: + + if self.is_hardfp(): ldflags += ['-Wl,--no-warn-mismatch', '-lm_hard'] else: ldflags += ['-march=armv5te'] @@ -301,7 +341,7 @@ def configure(conf): conf.environ['CXX'] = android.cxx() conf.environ['STRIP'] = android.strip() conf.env.CFLAGS += android.cflags() - conf.env.CXXFLAGS += android.cflags() + conf.env.CXXFLAGS += android.cflags(True) conf.env.LINKFLAGS += android.linkflags() conf.env.LDFLAGS += android.ldflags() @@ -310,13 +350,13 @@ def configure(conf): conf.env.LIB_M = ['m_hard'] else: conf.env.LIB_M = ['m'] - conf.env.PREFIX = '/lib/%s' % (android.arch) + conf.env.PREFIX = '/lib/%s' % android.apk_arch() conf.msg('Selected Android NDK', '%s, version: %d' % (android.ndk_home, android.ndk_rev)) # no need to print C/C++ compiler, as it would be printed by compiler_c/cxx - conf.msg('... C/C++ flags', ' '.join(android.cflags()).replace(android.ndk_home, '$NDK')) - conf.msg('... link flags', ' '.join(android.linkflags()).replace(android.ndk_home, '$NDK')) - conf.msg('... ld flags', ' '.join(android.ldflags()).replace(android.ndk_home, '$NDK')) + conf.msg('... C/C++ flags', ' '.join(android.cflags()).replace(android.ndk_home, '$NDK/')) + conf.msg('... link flags', ' '.join(android.linkflags()).replace(android.ndk_home, '$NDK/')) + conf.msg('... ld flags', ' '.join(android.ldflags()).replace(android.ndk_home, '$NDK/')) # conf.env.ANDROID_OPTS = android conf.env.DEST_OS2 = 'android' diff --git a/waf b/waf index 3bd5c70..ee4820e 100755 --- a/waf +++ b/waf @@ -33,12 +33,12 @@ POSSIBILITY OF SUCH DAMAGE. import os, sys, inspect VERSION="2.0.18" -REVISION="51fff4c95844a6b013877286b96a55d0" -GIT="68bf3867df33c04c944e8905820fc4cca4b663d1" +REVISION="b10d031bad536f1fd766be4ad9ee5a86" +GIT="00501901eb8ea3051ac023e804f9d572ddb61d89" INSTALL='' -C1='#/' -C2='#-' -C3='#%' +C1='#h' +C2='#_' +C3='#/' cwd = os.getcwd() join = os.path.join @@ -163,10 +163,13 @@ wafdir = find_lib() sys.path.insert(0, wafdir) if __name__ == '__main__': + from waflib import Context + Context.WAFNAME='waifu' + Context.WAIFUVERSION='1.1.0' sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'scripts', 'waifulib')) from waflib import Scripting Scripting.waf_entry_point(cwd, VERSION, wafdir) #==> -#BZh91AY&SY:1P},Ƭ#%80ebT\{j#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%>۱]m#Xl.εmk*T(:zzfRw5/;{^'{;2n6YV|.ٛnܩAGBDub(;$ʽաD^m55wn7}=]뽯ڣyr;=ڎ{#%#%#%#%#%J :>_|#%딇mOv#%#-;==]QfTT z#%9kE^#/HITU(JK"P @Q@( Eo}je{Ҭ(T;dT-j{;.M46/}v7ݳ}{׾=_b۝o}/;=|m{y7rZ_Mmo`0#/֭[E:ֵ]\nsvDv#-"JI{#%Q@P"D#%SG(VXXO\u{5;yJ{[[{ﺆ=45UuΓq^믾s@7on޼.ݶ{j/ίy{#%)qS寭un.ᄑ=YOv>=7uM;M۳}}ww^;v4k_=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}aj&׭k-DYQtKQg_-&<_gv/^׃o'!eDJ`!fDK~m!ӦUP[d; |9g0` 4 D#/_Ei2KgTr#_'xka/|s0H>H#/*g93i?U^#_JWԁ޽ϛ=UQOe0xy+R@_#hTF aB#_=#BhJWd!@XDfA& 3i~$=xB:?#h)EL5DQ#_!Q!CQ!_*4PDMlߗ֧}~i90"L@}|OgFҒel{ab:n@. ^BTPjۇc{x#_#_ÿsL?؂/Gufҏe)swTb+؁? s#R1;z/C~`t;@ݑ‚cǷGn󬽐(6ulN;Q.9B=O'B=,|L/m9xT; G9PtDc齥΋'F<|6Խ%p#h1i)[= FJ7&׳ݓgu*IU֕.$ڏRZJqTE3or9SCnttg;h%c(# 6Zv 䈙7J#X1Þ9:7 6@"1 b>T@(Ix4;>謹lɵ^^#_rØSPKJ?`ޝ-J#_#_ >/G*`: wܪlR3OR\>(@?~/473OdɑB`I``݇ǧ_솠Z#_ "(H? #<== diff --git a/wscript b/wscript index aea6bba..276afb8 100644 --- a/wscript +++ b/wscript @@ -3,15 +3,22 @@ # a1batross, mittorn, 2018 from __future__ import print_function -from waflib import Logs +from waflib import Logs, Context, Configure import sys import os -sys.path.append(os.path.realpath('scripts/waflib')) VERSION = '2.4' APPNAME = 'hlsdk-xash3d' top = '.' +Context.Context.line_just = 55 # should fit for everything on 80x26 + +@Configure.conf +def get_taskgen_count(self): + try: idx = self.tg_idx_count + except: idx = 0 # don't set tg_idx_count to not increase counter + return idx + def options(opt): grp = opt.add_option_group('Common options') @@ -19,22 +26,30 @@ def options(opt): help = 'build type: debug, release or none(custom flags)') grp.add_option('-8', '--64bits', action = 'store_true', dest = 'ALLOW64', default = False, - help = 'allow targetting 64-bit game dlls') + help = 'allow targetting 64-bit engine(Linux/Windows/OSX x86 only) [default: %default]') grp.add_option('--enable-voicemgr', action = 'store_true', dest = 'VOICEMGR', default = False, - help = 'enable voice manager') + help = 'enable voice manager [default: %default]') grp.add_option('--enable-goldsrc-support', action = 'store_true', dest = 'GOLDSRC', default = False, - help = 'enable GoldSource engine support') + help = 'enable GoldSource engine support [default: %default]') + + grp.add_option('--enable-lto', action = 'store_true', dest = 'LTO', default = False, + help = 'enable Link Time Optimization [default: %default]') - #opt.recurse('cl_dll dlls') - opt.recurse('cl_dll') + grp.add_option('--enable-poly-opt', action = 'store_true', dest = 'POLLY', default = False, + help = 'enable polyhedral optimization if possible [default: %default]') + + grp.add_option('--enable-magx', action = 'store_true', dest = 'MAGX', default = False, + help = 'enable targetting for MotoMAGX phones [default: %default]') opt.load('xcompile compiler_cxx compiler_c clang_compilation_database strip_on_install') + if sys.platform == 'win32': - opt.load('msdev') - opt.load('reconfigure') + opt.load('msvc msdev msvs') + opt.load('reconfigure subproject') + opt.add_subproject(["cl_dll", "dlls"]) def configure(conf): # Configuration @@ -44,20 +59,23 @@ def configure(conf): conf.env.SERVER_NAME = 'tfc' conf.env.PREFIX = '' - conf.load('reconfigure') + conf.load('fwgslib reconfigure') + enforce_pic = True # modern defaults + valid_build_types = ['fastnative', 'fast', 'release', 'debug', 'nooptimize', 'sanitize', 'none'] + conf.load('fwgslib reconfigure') conf.start_msg('Build type') if conf.options.BUILD_TYPE == None: conf.end_msg('not set', color='RED') conf.fatal('Please set a build type, for example "-T release"') - elif not conf.options.BUILD_TYPE in ['fast', 'release', 'debug', 'nooptimize', 'sanitize', 'none']: + elif not conf.options.BUILD_TYPE in valid_build_types: conf.end_msg(conf.options.BUILD_TYPE, color='RED') - conf.fatal('Invalid build type. Valid are "debug", "release" or "none"') + conf.fatal('Invalid build type. Valid are: %s' % valid_build_types.join(', ')) conf.end_msg(conf.options.BUILD_TYPE) # -march=native should not be used if conf.options.BUILD_TYPE == 'fast': - Logs.warn('WARNING: \'fast\' build type should not be used in release builds') + Logs.warn('WARNING: \'fast\' build type should not be used in release builds') conf.env.VOICEMGR = conf.options.VOICEMGR conf.env.GOLDSRC = conf.options.GOLDSRC @@ -71,77 +89,170 @@ def configure(conf): conf.load('msdev') conf.load('xcompile compiler_c compiler_cxx strip_on_install') + try: + conf.env.CC_VERSION[0] + except IndexError: + conf.env.CC_VERSION = (0, ) + if conf.env.DEST_OS == 'android': - conf.options.ALLOW64 = True conf.options.GOLDSRC = False conf.env.SERVER_NAME = 'server' # can't be any other name, until specified + + conf.env.MAGX = conf.options.MAGX + if conf.options.MAGX: + enforce_pic = False + + if enforce_pic: + # Every static library must have fPIC + if conf.env.DEST_OS != 'win32' and '-fPIC' in conf.env.CFLAGS_cshlib: + conf.env.append_unique('CFLAGS_cstlib', '-fPIC') + conf.env.append_unique('CXXFLAGS_cxxstlib', '-fPIC') + else: + conf.env.CFLAGS_cshlib.remove('-fPIC') + conf.env.CXXFLAGS_cxxshlib.remove('-fPIC') + conf.env.CFLAGS_MACBUNDLE.remove('-fPIC') + conf.env.CXXFLAGS_MACBUNDLE.remove('-fPIC') - # print(conf.options.ALLOW64) - - conf.env.BIT32_MANDATORY = not conf.options.ALLOW64 - conf.env.BIT32_ALLOW64 = conf.options.ALLOW64 - conf.load('force_32bit') - - if conf.env.DEST_SIZEOF_VOID_P == 4: - Logs.info('NOTE: will build game dlls for 32-bit target') + # We restrict 64-bit builds ONLY for Win/Linux/OSX running on Intel architecture + # Because compatibility with original GoldSrc + if conf.env.DEST_OS in ['win32', 'linux', 'darwin'] and conf.env.DEST_CPU in ['x86_64']: + conf.env.BIT32_ALLOW64 = conf.options.ALLOW64 + if not conf.env.BIT32_ALLOW64: + Logs.info('WARNING: will build engine for 32-bit target') else: - Logs.warn('WARNING: 64-bit game dlls may be unstable') + conf.env.BIT32_ALLOW64 = True + conf.env.BIT32_MANDATORY = not conf.env.BIT32_ALLOW64 + conf.load('force_32bit library_naming') linker_flags = { 'common': { - 'msvc': ['/DEBUG'], # always create PDB, doesn't affect result binaries - 'gcc': ['-Wl,--no-undefined'] + 'msvc': ['/DEBUG'], # always create PDB, doesn't affect result binaries + 'gcc': ['-Wl,--no-undefined'] }, 'sanitize': { - 'gcc': ['-fsanitize=undefined', '-fsanitize=address'], + 'clang': ['-fsanitize=undefined', '-fsanitize=address'], + 'gcc': ['-fsanitize=undefined', '-fsanitize=address'], } } compiler_c_cxx_flags = { 'common': { - 'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS'], - 'clang': ['-g', '-gdwarf-2'], - 'gcc': ['-g', '-Werror=implicit-function-declaration', '-fdiagnostics-color=always'] + # disable thread-safe local static initialization for C++11 code, as it cause crashes on Windows XP + 'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS', '/Zc:threadSafeInit-', '/MT'], + 'clang': ['-g', '-gdwarf-2', '-fvisibility=hidden'], + 'gcc': ['-g'] }, 'fast': { - 'msvc': ['/O2', '/Oy'], #todo: check /GL /LTCG - 'gcc': ['-Ofast', '-march=native', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'], + 'msvc': ['/O2', '/Oy'], + 'gcc': { + '3': ['-O3', '-Os', '-funsafe-math-optimizations', '-fomit-frame-pointer'], + 'default': ['-Ofast', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'] + }, + 'clang': ['-Ofast'], + 'default': ['-O3'] + }, + 'fastnative': { + 'msvc': ['/O2', '/Oy'], + 'gcc': ['-Ofast', '-march=native', '-funsafe-math-optimizations', '-funsafe-loop-optimizations', '-fomit-frame-pointer'], + 'clang': ['-Ofast', '-march=native'], 'default': ['-O3'] }, 'release': { - 'msvc': ['/O2'], + 'msvc': ['/O2'], 'default': ['-O3'] }, 'debug': { - 'msvc': ['/O1'], - 'gcc': ['-Og'], + 'msvc': ['/O1'], + 'gcc': ['-Og'], 'default': ['-O1'] }, 'sanitize': { - 'msvc': ['/Od', '/RTC1'], - 'gcc': ['-Og', '-fsanitize=undefined', '-fsanitize=address'], - 'default': ['-O1'] + 'msvc': ['/Od', '/RTC1'], + 'gcc': ['-Og', '-fsanitize=undefined', '-fsanitize=address'], + 'clang': ['-O0', '-fsanitize=undefined', '-fsanitize=address'], + 'default': ['-O0'] }, 'nooptimize': { - 'msvc': ['/Od'], + 'msvc': ['/Od'], 'default': ['-O0'] } } - conf.env.append_unique('CFLAGS', conf.get_flags_by_type( - compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) - conf.env.append_unique('CXXFLAGS', conf.get_flags_by_type( - compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) - conf.env.append_unique('LINKFLAGS', conf.get_flags_by_type( - linker_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) + compiler_optional_flags = [ + '-fdiagnostics-color=always', + '-Werror=implicit-function-declaration', + '-Werror=int-conversion', + '-Werror=return-type', + '-Werror=parentheses', + '-Werror=vla', + '-Werror=tautological-compare', + '-Werror=duplicated-cond', + '-Werror=bool-compare', + '-Werror=bool-operation', + '-Wstrict-aliasing', + ] + + c_compiler_optional_flags = [ + '-Werror=implicit-int', + '-Werror=declaration-after-statement' + ] + + linkflags = conf.get_flags_by_type(linker_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC, conf.env.CC_VERSION[0]) + cflags = conf.get_flags_by_type(compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC, conf.env.CC_VERSION[0]) + + # Here we don't differentiate C or C++ flags + if conf.options.LTO: + lto_cflags = { + 'msvc': ['/GL'], + 'gcc': ['-flto'], + 'clang': ['-flto'] + } + + lto_linkflags = { + 'msvc': ['/LTCG'], + 'gcc': ['-flto'], + 'clang': ['-flto'] + } + cflags += conf.get_flags_by_compiler(lto_cflags, conf.env.COMPILER_CC) + linkflags += conf.get_flags_by_compiler(lto_linkflags, conf.env.COMPILER_CC) + + if conf.options.POLLY: + polly_cflags = { + 'gcc': ['-fgraphite-identity'], + 'clang': ['-mllvm', '-polly'] + # msvc sosat :( + } + + cflags += conf.get_flags_by_compiler(polly_cflags, conf.env.COMPILER_CC) + + # And here C++ flags starts to be treated separately + cxxflags = list(cflags) + if conf.env.COMPILER_CC != 'msvc': + conf.check_cc(cflags=cflags, msg= 'Checking for required C flags') + conf.check_cxx(cxxflags=cflags, msg= 'Checking for required C++ flags') + + cflags += conf.filter_cflags(compiler_optional_flags + c_compiler_optional_flags, cflags) + cxxflags += conf.filter_cxxflags(compiler_optional_flags, cflags) + + conf.env.append_unique('CFLAGS', cflags) + conf.env.append_unique('CXXFLAGS', cxxflags) + conf.env.append_unique('LINKFLAGS', linkflags) + + # check if we can use C99 tgmath + if conf.check_cc(header_name='tgmath.h', mandatory=False): + tgmath_usable = conf.check_cc(fragment='''#include + int main(void){ return (int)sin(2.0f); }''', + msg='Checking if tgmath.h is usable', mandatory=False) + conf.define_cond('HAVE_TGMATH_H', tgmath_usable) + else: + conf.undefine('HAVE_TGMATH_H') if conf.env.COMPILER_CC == 'msvc': - conf.env.append_unique('DEFINES', ['_CRT_SECURE_NO_WARNINGS','_CRT_NONSTDC_NO_DEPRECATE']) + conf.define('_CRT_SECURE_NO_WARNINGS', 1) + conf.define('_CRT_NONSTDC_NO_DEPRECATE', 1) else: - conf.env.append_unique('DEFINES', ['stricmp=strcasecmp','strnicmp=strncasecmp','_LINUX','LINUX','_snprintf=snprintf','_vsnprintf=vsnprintf']) - cflags = ['-fvisibility=hidden','-Wno-write-strings'] - conf.env.append_unique('CFLAGS', cflags) - conf.env.append_unique('CXXFLAGS', cflags + ['-Wno-invalid-offsetof', '-fno-rtti', '-fno-exceptions']) + conf.env.append_unique('DEFINES', ['stricmp=strcasecmp', 'strnicmp=strncasecmp', '_snprintf=snprintf', '_vsnprintf=vsnprintf', '_LINUX', 'LINUX']) + conf.env.append_unique('CXXFLAGS', ['-Wno-invalid-offsetof', '-fno-rtti', '-fno-exceptions']) # strip lib from pattern if conf.env.DEST_OS in ['linux', 'darwin']: @@ -150,14 +261,14 @@ def configure(conf): if conf.env.cxxshlib_PATTERN.startswith('lib'): conf.env.cxxshlib_PATTERN = conf.env.cxxshlib_PATTERN[3:] - conf.env.append_unique('DEFINES', 'CLIENT_WEAPONS') + conf.define('CLIENT_WEAPONS', '1') - #conf.recurse('cl_dll dlls') - conf.recurse('cl_dll') + #conf.add_subproject(["cl_dll", "dlls"]) + conf.add_subproject(["cl_dll"]) def build(bld): - #bld.recurse('cl_dll dlls') - bld.recurse('cl_dll') - - - + #bld.add_subproject(["cl_dll", "dlls"]) + bld.add_subproject(["cl_dll"]) + + +