2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-22 09:57:21 +01:00

Fix warnings.

This commit is contained in:
Andrey Akhmichin 2019-07-07 20:08:01 +05:00
parent 63b23b96a4
commit 40d4e75d4b
6 changed files with 14 additions and 14 deletions

View File

@ -38,7 +38,7 @@ typedef int ( *pfnUserMsgHook )( const char *pszName, int iSize, void *pbuf );
#include "../engine/cdll_int.h"
#include "../dlls/cdll_dll.h"
#ifndef __MSC_VER
#if !defined(_WIN32)
#define _cdecl
#endif
#include "exportdef.h"

View File

@ -1410,7 +1410,9 @@ enum EGON_FIREMODE
#define EGON_SOUND_RUN "weapons/egon_run3.wav"
#define EGON_SOUND_STARTUP "weapons/egon_windup2.wav"
#if !defined(ARRAYSIZE)
#define ARRAYSIZE(p) ( sizeof(p) /sizeof(p[0]) )
#endif
BEAM *pBeam;
BEAM *pBeam2;

View File

@ -118,7 +118,7 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
}
// if the player doesn't have the suit, or there is no juice left, make the deny noise
if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( chargerfix.value ) && ( pActivator->pev->armorvalue == MAX_NORMAL_BATTERY ) )
if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( ( chargerfix.value ) && ( pActivator->pev->armorvalue == MAX_NORMAL_BATTERY ) ) )
{
if( m_flSoundTime <= gpGlobals->time )
{

View File

@ -188,7 +188,7 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u
}
// if the player doesn't have the suit, or there is no juice left, make the deny noise
if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( chargerfix.value ) && ( pActivator->pev->health >= pActivator->pev->max_health ) )
if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( ( chargerfix.value ) && ( pActivator->pev->health >= pActivator->pev->max_health ) ) )
{
if( m_flSoundTime <= gpGlobals->time )
{

View File

@ -45,9 +45,7 @@ LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt )
#if !defined _WIN32
#include <unistd.h>
#include <sys/stat.h>
#define CreateDirectory(p, n) mkdir(p, 0777)
#else
#define CreateDirectory(p, n) CreateDirectoryA(p, n)
#define CreateDirectoryA(p, n) mkdir(p, 0777)
#endif
//=========================================================
@ -1702,9 +1700,9 @@ void CTestHull::BuildNodeGraph( void )
// make sure directories have been made
GET_GAME_DIR( szNrpFilename );
strcat( szNrpFilename, "/maps" );
CreateDirectory( szNrpFilename, NULL );
CreateDirectoryA( szNrpFilename, NULL );
strcat( szNrpFilename, "/graphs" );
CreateDirectory( szNrpFilename, NULL );
CreateDirectoryA( szNrpFilename, NULL );
strcat( szNrpFilename, "/" );
strcat( szNrpFilename, STRING( gpGlobals->mapname ) );
@ -2376,9 +2374,9 @@ int CGraph::FLoadGraph( const char *szMapName )
char szDirName[MAX_PATH];
GET_GAME_DIR( szDirName );
strcat( szDirName, "/maps" );
CreateDirectory( szDirName, NULL );
CreateDirectoryA( szDirName, NULL );
strcat( szDirName, "/graphs" );
CreateDirectory( szDirName, NULL );
CreateDirectoryA( szDirName, NULL );
strcpy( szFilename, "maps/graphs/" );
strcat( szFilename, szMapName );
@ -2585,9 +2583,9 @@ int CGraph::FSaveGraph( const char *szMapName )
// make sure directories have been made
GET_GAME_DIR( szFilename );
strcat( szFilename, "/maps" );
CreateDirectory( szFilename, NULL );
CreateDirectoryA( szFilename, NULL );
strcat( szFilename, "/graphs" );
CreateDirectory( szFilename, NULL );
CreateDirectoryA( szFilename, NULL );
strcat( szFilename, "/" );
strcat( szFilename, szMapName );

View File

@ -1733,8 +1733,8 @@ void CSaveRestoreBuffer::BufferRewind( int size )
extern "C" {
unsigned _rotr( unsigned val, int shift )
{
register unsigned lobit; /* non-zero means lo bit set */
register unsigned num = val; /* number to rotate */
unsigned lobit; /* non-zero means lo bit set */
unsigned num = val; /* number to rotate */
shift &= 0x1f; /* modulo 32 -- this will also make
negative shifts work */