This commit is contained in:
a1batross 2016-07-28 22:46:58 +06:00
commit 29f4c35e6e
11 changed files with 43 additions and 46 deletions

View File

@ -23,7 +23,7 @@ extern "C"
#include "const.h"
#include "camera.h"
#include "in_defs.h"
#include "view.h"
//#include "view.h"
#include <string.h>
#include <ctype.h>

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -49,14 +49,14 @@ typedef int BOOL;
#define MAX_PATH PATH_MAX
#include <limits.h>
#include <stdarg.h>
#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"

View File

@ -583,8 +583,9 @@ void CGauss::WeaponIdle( void )
iAnim = GAUSS_FIDGET;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3;
}
#ifndef CLIENT_DLL
SendWeaponAnim( iAnim );
#endif
}
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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 <unistd.h>
#include <sys/stat.h>
#define CreateDirectory(p, n) mkdir(p, 0777)

View File

@ -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 );

View File

@ -21,7 +21,7 @@
#include "pm_shared.h"
#include "pm_movevars.h"
#include "pm_debug.h"
#include <stdio.h> // NULL
//#include <stdio.h> // NULL
#include <math.h> // sqrt
#include <string.h> // strcpy
#include <stdlib.h> // atoi