From 80593d29bdde8c8afa7e1f66a44505d5dc3f0fbe Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 1 Feb 2017 14:55:40 +0000 Subject: [PATCH] Apply fixes from gravgun branch --- cl_dll/MOTD.cpp | 2 +- cl_dll/hl/hl_weapons.cpp | 2 +- cl_dll/message.cpp | 2 +- dlls/mpstubb.cpp | 2 +- dlls/stats.cpp | 2 +- engine/cdll_int.h | 8 +++++++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cl_dll/MOTD.cpp b/cl_dll/MOTD.cpp index 4273b0bf..6ab3a161 100644 --- a/cl_dll/MOTD.cpp +++ b/cl_dll/MOTD.cpp @@ -130,7 +130,7 @@ int CHudMOTD::MsgFunc_MOTD( const char *pszName, int iSize, void *pbuf ) BEGIN_READ( pbuf, iSize ); int is_finished = READ_BYTE(); - strncat( m_szMOTD, READ_STRING(), sizeof(m_szMOTD) ); + strncat( m_szMOTD, READ_STRING(), sizeof(m_szMOTD) - 1 ); if( is_finished ) { diff --git a/cl_dll/hl/hl_weapons.cpp b/cl_dll/hl/hl_weapons.cpp index 5a17e858..6d555b4c 100644 --- a/cl_dll/hl/hl_weapons.cpp +++ b/cl_dll/hl/hl_weapons.cpp @@ -288,7 +288,7 @@ Only produces random numbers to match the server ones. */ Vector CBaseEntity::FireBulletsPlayer ( ULONG cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker, int shared_rand ) { - float x, y, z; + float x = 0, y = 0, z; for( ULONG iShot = 1; iShot <= cShots; iShot++ ) { diff --git a/cl_dll/message.cpp b/cl_dll/message.cpp index a9c706ec..5d52d413 100644 --- a/cl_dll/message.cpp +++ b/cl_dll/message.cpp @@ -310,7 +310,7 @@ int CHudMessage::Draw( float fTime ) { int i, drawn; client_textmessage_t *pMessage; - float endTime; + float endTime = 0; drawn = 0; diff --git a/dlls/mpstubb.cpp b/dlls/mpstubb.cpp index 3cc2e5c2..703a4dba 100644 --- a/dlls/mpstubb.cpp +++ b/dlls/mpstubb.cpp @@ -74,7 +74,7 @@ void CBaseMonster::MonsterInitDead( void ) // Setup health counters, etc. BecomeDead(); - SetThink( &CorpseFallThink ); + SetThink( &CBaseMonster::CorpseFallThink ); pev->nextthink = gpGlobals->time + 0.5; } diff --git a/dlls/stats.cpp b/dlls/stats.cpp index 038e1667..9b21f792 100644 --- a/dlls/stats.cpp +++ b/dlls/stats.cpp @@ -15,7 +15,7 @@ #include "weapons.h" #include "soundent.h" #include "monsters.h" -#include "..\engine\shake.h" +#include "../engine/shake.h" #include "decals.h" #include "gamerules.h" diff --git a/engine/cdll_int.h b/engine/cdll_int.h index b77a174a..eaa7f4e8 100644 --- a/engine/cdll_int.h +++ b/engine/cdll_int.h @@ -93,6 +93,12 @@ typedef struct client_textmessage_s const char *pMessage; } client_textmessage_t; +#if __MSC_VER == 1200 +#define ulonglong_t __int64 +#else +#define ulonglong_t unsigned long long +#endif + typedef struct hud_player_info_s { char *name; @@ -106,7 +112,7 @@ typedef struct hud_player_info_s short topcolor; short bottomcolor; - unsigned long long m_nSteamID; + ulonglong_t m_nSteamID; } hud_player_info_t; typedef struct cl_enginefuncs_s