mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-08-26 05:42:00 +00:00
Merge branch 'master' into gravgun
This commit is contained in:
commit
a06b307be5
@ -91,7 +91,7 @@ SRCS+=./input_xash3d.cpp
|
||||
SRCS+=./scoreboard.cpp
|
||||
SRCS+=./MOTD.cpp
|
||||
INCLUDES = -I../common -I. -I../game_shared -I../pm_shared -I../engine -I../dlls
|
||||
DEFINES = -Wextra -Wno-missing-field-initializers -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL
|
||||
DEFINES = -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL -w
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/. \
|
||||
$(LOCAL_PATH)/../common \
|
||||
|
@ -25,7 +25,7 @@ project (CLDLL)
|
||||
|
||||
set (CLDLL_LIBRARY client)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings -w")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL -w")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
|
||||
|
||||
set (CLDLL_SOURCES
|
||||
@ -93,8 +93,6 @@ set (CLDLL_SOURCES
|
||||
MOTD.cpp)
|
||||
include_directories (. hl/ ../dlls ../dlls/wpn_shared ../common ../engine ../pm_shared ../game_shared ../public)
|
||||
|
||||
add_definitions( -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL )
|
||||
|
||||
if(USE_VOICEMGR)
|
||||
#set(CLDLL_SOURCES
|
||||
# ${CLDLL_SOURCES}
|
||||
|
@ -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) - 1 );
|
||||
strncat( m_szMOTD, READ_STRING(), sizeof(m_szMOTD) );
|
||||
|
||||
if( is_finished )
|
||||
{
|
||||
|
@ -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 = 0, y = 0, z;
|
||||
float x, y, z;
|
||||
|
||||
for( ULONG iShot = 1; iShot <= cShots; iShot++ )
|
||||
{
|
||||
@ -576,7 +576,7 @@ void CBasePlayerWeapon::PrintState( void )
|
||||
COM_Log( "c:\\hl.log", "%i ", m_iClip );
|
||||
}
|
||||
|
||||
long int RandomLong( long int a, long int b )
|
||||
int RandomLong( int a, int b )
|
||||
{
|
||||
return gEngfuncs.pfnRandomLong( a, b );
|
||||
}
|
||||
|
@ -299,7 +299,6 @@ void CHud::VidInit( void )
|
||||
|
||||
if( m_pSpriteList )
|
||||
{
|
||||
int j;
|
||||
// count the number of sprites of the appropriate res
|
||||
m_iSpriteCount = 0;
|
||||
client_sprite_t *p = m_pSpriteList;
|
||||
@ -336,7 +335,6 @@ void CHud::VidInit( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
int j;
|
||||
// we have already have loaded the sprite reference from hud.txt, but
|
||||
// we need to make sure all the sprites have been loaded (we've gone through a transition, or loaded a save game)
|
||||
client_sprite_t *p = m_pSpriteList;
|
||||
|
@ -310,7 +310,7 @@ int CHudMessage::Draw( float fTime )
|
||||
{
|
||||
int i, drawn;
|
||||
client_textmessage_t *pMessage;
|
||||
float endTime = 0;
|
||||
float endTime;
|
||||
|
||||
drawn = 0;
|
||||
|
||||
|
@ -22,8 +22,6 @@
|
||||
// the module specific types and m_dwLevel is set to the greater of the global
|
||||
// and the module specific settings.
|
||||
|
||||
#if defined(_DEBUG) && defined(_WIN32)
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@ -33,6 +31,7 @@
|
||||
|
||||
#include <tchar.h>
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
void WINAPI DbgInitModuleName(void);
|
||||
void WINAPI DbgInitModuleSettings(void);
|
||||
|
@ -74,7 +74,7 @@ void CBaseMonster::MonsterInitDead( void )
|
||||
|
||||
// Setup health counters, etc.
|
||||
BecomeDead();
|
||||
SetThink( &CBaseMonster::CorpseFallThink );
|
||||
SetThink( &CorpseFallThink );
|
||||
pev->nextthink = gpGlobals->time + 0.5;
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -1578,7 +1578,6 @@ void UTIL_StripToken( const char *pKey, char *pDest )
|
||||
pDest[i] = 0;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// CSave
|
||||
|
@ -93,12 +93,6 @@ typedef struct client_textmessage_s
|
||||
const char *pMessage;
|
||||
} client_textmessage_t;
|
||||
|
||||
#if __MSC_VER == 1200
|
||||
#define longlong_t __int64
|
||||
#else
|
||||
#define longlong_t long long
|
||||
#endif
|
||||
|
||||
typedef struct hud_player_info_s
|
||||
{
|
||||
char *name;
|
||||
@ -112,7 +106,7 @@ typedef struct hud_player_info_s
|
||||
short topcolor;
|
||||
short bottomcolor;
|
||||
|
||||
unsigned longlong_t m_nSteamID_1;
|
||||
unsigned long long m_nSteamID;
|
||||
} hud_player_info_t;
|
||||
|
||||
typedef struct cl_enginefuncs_s
|
||||
|
@ -82,8 +82,6 @@ typedef struct physent_s
|
||||
vec3_t vuser4;
|
||||
} physent_t;
|
||||
|
||||
typedef struct hull_s hull_t;
|
||||
|
||||
typedef struct playermove_s
|
||||
{
|
||||
int player_index; // So we don't try to run the PM_CheckStuck nudging too quickly.
|
||||
@ -196,8 +194,13 @@ typedef struct playermove_s
|
||||
int (*PM_PointContents)( float *p, int *truecontents /*filled in if this is non-null*/ );
|
||||
int (*PM_TruePointContents)( float *p );
|
||||
int (*PM_HullPointContents)( struct hull_s *hull, int num, float *p );
|
||||
#ifdef __MINGW32__
|
||||
pmtrace_t *(*PM_PlayerTrace_real)( pmtrace_t * retvalue, float *start, float *end, int traceFlags, int ignore_pe );
|
||||
|
||||
#else
|
||||
pmtrace_t (*PM_PlayerTrace)( float *start, float *end, int traceFlags, int ignore_pe );
|
||||
pmtrace_t *(*PM_TraceLine)( float *start, float *end, int flags, int usehulll, int ignore_pe );
|
||||
#endif
|
||||
struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehulll, int ignore_pe );
|
||||
long (*RandomLong)( long lLow, long lHigh );
|
||||
float (*RandomFloat)( float flLow, float flHigh );
|
||||
int (*PM_GetModelType)( struct model_s *mod );
|
||||
@ -215,9 +218,32 @@ typedef struct playermove_s
|
||||
void (*PM_PlaySound)( int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch );
|
||||
const char *(*PM_TraceTexture)( int ground, float *vstart, float *vend );
|
||||
void (*PM_PlaybackEventFull)( int flags, int clientindex, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
|
||||
#ifdef __MINGW32__
|
||||
pmtrace_t *(*PM_PlayerTraceEx_real) (pmtrace_t *retvalue, float *start, float *end, int traceFlags, int (*pfnIgnore)( physent_t *pe ));
|
||||
#else
|
||||
pmtrace_t (*PM_PlayerTraceEx) (float *start, float *end, int traceFlags, int (*pfnIgnore)( physent_t *pe ));
|
||||
#endif
|
||||
int (*PM_TestPlayerPositionEx) (float *pos, pmtrace_t *ptrace, int (*pfnIgnore)( physent_t *pe ));
|
||||
struct pmtrace_s *(*PM_TraceLineEx)( float *start, float *end, int flags, int usehulll, int (*pfnIgnore)( physent_t *pe ));
|
||||
struct msurface_s *(*PM_TraceSurface)( int ground, float *vstart, float *vend );
|
||||
} playermove_t;
|
||||
|
||||
#ifdef __MINGW32__
|
||||
static pmtrace_t _pm_globalresult, _pm_globaltmp;
|
||||
static inline pmtrace_t PM_PlayerTrace_wrap( float *start, float *end, int traceFlags, int ignore_pe, playermove_t *pmove )
|
||||
{
|
||||
_pm_globaltmp = pmove->touchindex[MAX_PHYSENTS -1];
|
||||
pmove->PM_PlayerTrace_real( &_pm_globalresult, start, end, traceFlags, ignore_pe );
|
||||
return _pm_globalresult;
|
||||
}
|
||||
static inline pmtrace_t PM_PlayerTraceEx_wrap( float *start, float *end, int traceFlags, int (*pfnIgnore)( physent_t *pe ), playermove_t *pmove )
|
||||
{
|
||||
_pm_globaltmp = pmove->touchindex[MAX_PHYSENTS -1];
|
||||
pmove->PM_PlayerTraceEx_real( &_pm_globalresult, start, end, traceFlags, pfnIgnore );
|
||||
return _pm_globalresult;
|
||||
}
|
||||
#define PM_PlayerTrace(a,b,c,d) touchindex[MAX_PHYSENTS -1] = PM_PlayerTrace_wrap( a, b, c, d, pmove );pmove->touchindex[MAX_PHYSENTS -1] = _pm_globaltmp
|
||||
#define PM_PlayerTraceEx(a,b,c,d) touchindex[MAX_PHYSENTS -1] = PM_PlayerTraceEx_wrap( a, b, c, d, pmove );pmove->touchindex[MAX_PHYSENTS -1] = _pm_globaltmp
|
||||
#endif
|
||||
|
||||
#endif//PM_DEFS_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user