diff --git a/cl_dll/input.cpp b/cl_dll/input.cpp index f89f0232..c6cd841c 100644 --- a/cl_dll/input.cpp +++ b/cl_dll/input.cpp @@ -23,7 +23,7 @@ extern "C" #include "const.h" #include "camera.h" #include "in_defs.h" -#include "view.h" +//#include "view.h" #include #include diff --git a/cl_dll/inputw32.cpp b/cl_dll/inputw32.cpp index 1bacdf07..33144a8b 100644 --- a/cl_dll/inputw32.cpp +++ b/cl_dll/inputw32.cpp @@ -18,7 +18,7 @@ #include "camera.h" #include "in_defs.h" #include "../engine/keydefs.h" -#include "view.h" +//#include "view.h" #include "windows.h" #define MOUSE_BUTTON_COUNT 5 @@ -304,11 +304,6 @@ void IN_MouseMove ( float frametime, usercmd_t *cmd) gEngfuncs.GetViewAngles( (float *)viewangles ); - if ( in_mlook.state & 1) - { - V_StopPitchDrift (); - } - //jjb - this disbles normal mouse control if the user is trying to // move the camera, or if the mouse cursor is visible or if we're in intermission if ( !iMouseInUse && !g_iVisibleMouse && !gHUD.m_iIntermission ) @@ -791,18 +786,6 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd ) { viewangles[PITCH] += (fAxisValue * joy_pitchsensitivity->value) * aspeed * cl_pitchspeed->value; } - V_StopPitchDrift(); - } - else - { - // no pitch movement - // disable pitch return-to-center unless requested by user - // *** this code can be removed when the lookspring bug is fixed - // *** the bug always has the lookspring feature on - if(lookspring->value == 0.0) - { - V_StopPitchDrift(); - } } } else @@ -844,7 +827,6 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd ) { viewangles[YAW] += (fAxisValue * joy_yawsensitivity->value) * speed * 180.0; } - } } break; @@ -863,18 +845,6 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd ) { viewangles[PITCH] += (fAxisValue * joy_pitchsensitivity->value) * speed * 180.0; } - V_StopPitchDrift(); - } - else - { - // no pitch movement - // disable pitch return-to-center unless requested by user - // *** this code can be removed when the lookspring bug is fixed - // *** the bug always has the lookspring feature on - if( lookspring->value == 0.0 ) - { - V_StopPitchDrift(); - } } } break; @@ -944,4 +914,4 @@ void IN_Init (void) IN_StartupMouse (); IN_StartupJoystick (); -} \ No newline at end of file +} diff --git a/dlls/Android.mk b/dlls/Android.mk index e0266879..495abd6a 100644 --- a/dlls/Android.mk +++ b/dlls/Android.mk @@ -14,7 +14,7 @@ LOCAL_MODULE_FILENAME = libserver_hardfp endif LOCAL_CFLAGS += -D_LINUX -DCLIENT_WEAPONS -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf \ - -fno-exceptions -w + -fno-exceptions -DNO_VOICEGAMEMGR -w LOCAL_CPPFLAGS := $(LOCAL_CFLAGS) -frtti @@ -126,8 +126,8 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \ zombie.cpp \ ../pm_shared/pm_debug.c \ ../pm_shared/pm_math.c \ - ../pm_shared/pm_shared.c \ - ../game_shared/voice_gamemgr.cpp + ../pm_shared/pm_shared.c +# ../game_shared/voice_gamemgr.cpp LOCAL_LDLIBS := -llog diff --git a/dlls/client.cpp b/dlls/client.cpp index 02ba4582..14646a32 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -204,9 +204,11 @@ void ClientPutInServer( edict_t *pEntity ) } + +#ifndef NO_VOICEGAMEMGR #include "voice_gamemgr.h" extern CVoiceGameMgr g_VoiceGameMgr; - +#endif //// HOST_SAY // String comes in as // say blah blah blah @@ -313,9 +315,11 @@ void Host_Say( edict_t *pEntity, int teamonly ) if ( !(client->IsNetClient()) ) // Not a client ? (should never be true) continue; +#ifndef NO_VOICEGAMEMGR // can the receiver hear the sender? or has he muted him? if ( g_VoiceGameMgr.PlayerHasBlockedPlayer( client, player ) ) continue; +#endif if ( teamonly && g_pGameRules->PlayerRelationship(client, CBaseEntity::Instance(pEntity)) != GR_TEAMMATE ) continue; diff --git a/dlls/extdll.h b/dlls/extdll.h index a368a2ff..659f9a0a 100644 --- a/dlls/extdll.h +++ b/dlls/extdll.h @@ -49,14 +49,14 @@ typedef int BOOL; #define MAX_PATH PATH_MAX #include #include +#endif //_WIN32 #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif #ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) -#define _vsnprintf(a,b,c,d) vsnprintf(a,b,c,d) #endif -#endif //_WIN32 + // Misc C-runtime library headers #include "stdio.h" diff --git a/dlls/gauss.cpp b/dlls/gauss.cpp index 2830c9a9..78ad6493 100644 --- a/dlls/gauss.cpp +++ b/dlls/gauss.cpp @@ -583,8 +583,9 @@ void CGauss::WeaponIdle( void ) iAnim = GAUSS_FIDGET; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3; } +#ifndef CLIENT_DLL SendWeaponAnim( iAnim ); - +#endif } } diff --git a/dlls/h_export.cpp b/dlls/h_export.cpp index cae7e59f..1712a70a 100644 --- a/dlls/h_export.cpp +++ b/dlls/h_export.cpp @@ -46,9 +46,14 @@ BOOL WINAPI DllMain( } return TRUE; } + +// stdcall for win32 +#define EXPORT2 WINAPI +#else +#define EXPORT2 #endif -extern "C" void DLLEXPORT GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) +extern "C" void DLLEXPORT EXPORT2 GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); gpGlobals = pGlobals; diff --git a/dlls/multiplay_gamerules.cpp b/dlls/multiplay_gamerules.cpp index d79a4128..9b505549 100644 --- a/dlls/multiplay_gamerules.cpp +++ b/dlls/multiplay_gamerules.cpp @@ -43,7 +43,9 @@ extern int g_teamplay; float g_flIntermissionStartTime = 0; +#ifndef NO_VOICEGAMEMGR CVoiceGameMgr g_VoiceGameMgr; +#endif class CMultiplayGameMgrHelper : public IVoiceGameMgrHelper { @@ -63,13 +65,16 @@ public: }; static CMultiplayGameMgrHelper g_GameMgrHelper; + //********************************************************* // Rules for the half-life multiplayer game. //********************************************************* CHalfLifeMultiplay :: CHalfLifeMultiplay() { +#ifndef NO_VOICEGAMEMGR g_VoiceGameMgr.Init(&g_GameMgrHelper, gpGlobals->maxClients); +#endif RefreshSkillData(); m_flIntermissionEndTime = 0; @@ -116,8 +121,10 @@ CHalfLifeMultiplay :: CHalfLifeMultiplay() BOOL CHalfLifeMultiplay::ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) { +#ifndef NO_VOICEGAMEMGR if(g_VoiceGameMgr.ClientCommand(pPlayer, pcmd)) return TRUE; +#endif return CGameRules::ClientCommand(pPlayer, pcmd); } @@ -186,7 +193,9 @@ extern cvar_t mp_chattime; //========================================================= void CHalfLifeMultiplay :: Think ( void ) { +#ifndef NO_VOICEGAMEMGR g_VoiceGameMgr.Update(gpGlobals->frametime); +#endif ///// Check game rules ///// static int last_frags; @@ -397,7 +406,9 @@ BOOL CHalfLifeMultiplay :: GetNextBestWeapon( CBasePlayer *pPlayer, CBasePlayerI //========================================================= BOOL CHalfLifeMultiplay :: ClientConnected( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] ) { +#ifndef NO_VOICEGAMEMGR g_VoiceGameMgr.ClientConnected(pEntity); +#endif return TRUE; } diff --git a/dlls/nodes.cpp b/dlls/nodes.cpp index 18c145dd..d512e54c 100644 --- a/dlls/nodes.cpp +++ b/dlls/nodes.cpp @@ -40,7 +40,7 @@ CGraph WorldGraph; LINK_ENTITY_TO_CLASS( info_node, CNodeEnt ); LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt ); -#ifdef _LINUX +#if defined _LINUX && !defined _WIN32 #include #include #define CreateDirectory(p, n) mkdir(p, 0777) diff --git a/dlls/teamplay_gamerules.cpp b/dlls/teamplay_gamerules.cpp index 9bc7830e..c673d4c6 100644 --- a/dlls/teamplay_gamerules.cpp +++ b/dlls/teamplay_gamerules.cpp @@ -68,9 +68,10 @@ CHalfLifeTeamplay :: CHalfLifeTeamplay() extern cvar_t timeleft, fragsleft; +#ifndef NO_VOICEGAMEMGR #include "voice_gamemgr.h" extern CVoiceGameMgr g_VoiceGameMgr; - +#endif void CHalfLifeTeamplay :: Think ( void ) { ///// Check game rules ///// @@ -80,8 +81,9 @@ void CHalfLifeTeamplay :: Think ( void ) int frags_remaining = 0; int time_remaining = 0; +#ifndef NO_VOICEGAMEMGR g_VoiceGameMgr.Update(gpGlobals->frametime); - +#endif if ( g_fGameOver ) // someone else quit the game already { CHalfLifeMultiplay::Think(); @@ -145,8 +147,11 @@ void CHalfLifeTeamplay :: Think ( void ) //========================================================= BOOL CHalfLifeTeamplay :: ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) { + +#ifndef NO_VOICEGAMEMGR if(g_VoiceGameMgr.ClientCommand(pPlayer, pcmd)) return TRUE; +#endif if ( FStrEq( pcmd, "menuselect" ) ) { @@ -286,7 +291,8 @@ void CHalfLifeTeamplay::ChangePlayerTeam( CBasePlayer *pPlayer, const char *pTea } // copy out the team name from the model - strncpy( pPlayer->m_szTeamName, pTeamName, TEAM_NAME_LENGTH ); + if( pPlayer->m_szTeamName != pTeamName ) + strncpy( pPlayer->m_szTeamName, pTeamName, TEAM_NAME_LENGTH ); g_engfuncs.pfnSetClientKeyValue( clientIndex, g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model", pPlayer->m_szTeamName ); g_engfuncs.pfnSetClientKeyValue( clientIndex, g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "team", pPlayer->m_szTeamName ); diff --git a/pm_shared/pm_shared.c b/pm_shared/pm_shared.c index 292720a1..9fa5accf 100644 --- a/pm_shared/pm_shared.c +++ b/pm_shared/pm_shared.c @@ -21,7 +21,7 @@ #include "pm_shared.h" #include "pm_movevars.h" #include "pm_debug.h" -#include // NULL +//#include // NULL #include // sqrt #include // strcpy #include // atoi