mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-12 05:10:52 +01:00
Merge branch 'master' into noffice
This commit is contained in:
commit
45a9a42fcd
@ -70,7 +70,8 @@ set SOURCES=../dlls/crossbow.cpp ^
|
||||
util.cpp ^
|
||||
view.cpp ^
|
||||
scoreboard.cpp ^
|
||||
MOTD.cpp
|
||||
MOTD.cpp ^
|
||||
../game_shared/vcs_info.cpp
|
||||
set DEFINES=/DCLIENT_DLL /DCLIENT_WEAPONS /Dsnprintf=_snprintf /DNO_VOICEGAMEMGR /DGOLDSOURCE_SUPPORT /DNDEBUG
|
||||
set LIBS=user32.lib Winmm.lib
|
||||
set OUTNAME=client.dll
|
||||
|
@ -175,9 +175,11 @@ int CHudDeathNotice::MsgFunc_DeathMsg( const char *pszName, int iSize, void *pbu
|
||||
strncat( killedwith, READ_STRING(), sizeof(killedwith) - strlen(killedwith) - 1 );
|
||||
killedwith[sizeof(killedwith) - 1] = '\0';
|
||||
|
||||
#if USE_VGUI
|
||||
#if USE_VGUI && !USE_NOVGUI_SCOREBOARD
|
||||
if (gViewPort)
|
||||
gViewPort->DeathMsg( killer, victim );
|
||||
#else
|
||||
gHUD.m_Scoreboard.DeathMsg( killer, victim );
|
||||
#endif
|
||||
|
||||
gHUD.m_Spectator.DeathMessage( victim );
|
||||
|
@ -811,6 +811,11 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
|
||||
mx = my = 0;
|
||||
}
|
||||
|
||||
if (ignoreNextDelta)
|
||||
{
|
||||
ignoreNextDelta = false;
|
||||
mx = my = 0;
|
||||
}
|
||||
if(pOutX) *pOutX = mx;
|
||||
if(pOutY) *pOutY = my;
|
||||
}
|
||||
@ -873,7 +878,12 @@ void GoldSourceInput::IN_MouseMove ( float frametime, usercmd_t *cmd)
|
||||
|
||||
if ( (in_mlook.state & 1) && !(in_strafe.state & 1))
|
||||
{
|
||||
viewangles[PITCH] += m_pitch->value * mouse_y;
|
||||
#if !USE_VGUI || USE_NOVGUI_MOTD
|
||||
if( gHUD.m_MOTD.m_bShow )
|
||||
gHUD.m_MOTD.scroll += m_pitch->value * mouse_y;
|
||||
else
|
||||
#endif
|
||||
viewangles[PITCH] += m_pitch->value * mouse_y;
|
||||
if (viewangles[PITCH] > cl_pitchdown->value)
|
||||
viewangles[PITCH] = cl_pitchdown->value;
|
||||
if (viewangles[PITCH] < -cl_pitchup->value)
|
||||
@ -1580,6 +1590,7 @@ IN_Init
|
||||
*/
|
||||
void GoldSourceInput::IN_Init (void)
|
||||
{
|
||||
ignoreNextDelta = false;
|
||||
m_filter = gEngfuncs.pfnRegisterVariable ( "m_filter","0", FCVAR_ARCHIVE );
|
||||
sensitivity = gEngfuncs.pfnRegisterVariable ( "sensitivity","3", FCVAR_ARCHIVE ); // user mouse sensitivity setting.
|
||||
|
||||
@ -1680,4 +1691,9 @@ void GoldSourceInput::IN_Init (void)
|
||||
IN_StartupJoystick ();
|
||||
}
|
||||
|
||||
void GoldSourceInput::IgnoreNextMouseDelta()
|
||||
{
|
||||
ignoreNextDelta = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -87,7 +87,12 @@ void IN_ResetMouse()
|
||||
currentInput->IN_ResetMouse();
|
||||
}
|
||||
|
||||
void IgnoreNextMouseDelta()
|
||||
{
|
||||
currentInput->IgnoreNextMouseDelta();
|
||||
}
|
||||
|
||||
AbstractInput* CurrentMouseInput()
|
||||
{
|
||||
return currentInput;
|
||||
return currentInput;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ public:
|
||||
virtual void IN_Init( void ) = 0;
|
||||
virtual void IN_ResetMouse( void ) = 0;
|
||||
virtual void Joy_AdvancedUpdate( void ) = 0;
|
||||
virtual void IgnoreNextMouseDelta() = 0;
|
||||
};
|
||||
|
||||
class FWGSInput : public AbstractInput
|
||||
@ -39,6 +40,7 @@ public:
|
||||
virtual void IN_Init( void );
|
||||
virtual void IN_ResetMouse( void ) {}
|
||||
virtual void Joy_AdvancedUpdate( void ) {}
|
||||
virtual void IgnoreNextMouseDelta() {}
|
||||
|
||||
protected:
|
||||
float ac_forwardmove;
|
||||
@ -82,6 +84,7 @@ public:
|
||||
virtual void IN_Init( void );
|
||||
virtual void IN_ResetMouse( void );
|
||||
virtual void Joy_AdvancedUpdate( void );
|
||||
virtual void IgnoreNextMouseDelta();
|
||||
|
||||
protected:
|
||||
void IN_GetMouseDelta( int *pOutX, int *pOutY);
|
||||
@ -98,6 +101,7 @@ protected:
|
||||
int old_mouse_x, old_mouse_y, mx_accum, my_accum;
|
||||
int mouseinitialized;
|
||||
void* sdl2Lib;
|
||||
bool ignoreNextDelta;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -58,6 +58,8 @@
|
||||
#include "screenfade.h"
|
||||
|
||||
void IN_SetVisibleMouse(bool visible);
|
||||
void IgnoreNextMouseDelta();
|
||||
|
||||
class CCommandMenu;
|
||||
|
||||
// Scoreboard positions
|
||||
@ -1672,6 +1674,7 @@ void TeamFortressViewport::UpdateCursorState()
|
||||
if( m_pSpectatorPanel->m_menuVisible || m_pCurrentMenu || m_pTeamMenu->isVisible() || GetClientVoiceMgr()->IsInSquelchMode() )
|
||||
{
|
||||
IN_SetVisibleMouse(true);
|
||||
IgnoreNextMouseDelta();
|
||||
App::getInstance()->setCursorOveride( App::getInstance()->getScheme()->getCursor(Scheme::scu_arrow) );
|
||||
return;
|
||||
}
|
||||
@ -1681,6 +1684,7 @@ void TeamFortressViewport::UpdateCursorState()
|
||||
if( gHUD.m_pCvarStealMouse->value != 0.0f )
|
||||
{
|
||||
IN_SetVisibleMouse(true);
|
||||
IgnoreNextMouseDelta();
|
||||
App::getInstance()->setCursorOveride( App::getInstance()->getScheme()->getCursor(Scheme::scu_arrow) );
|
||||
return;
|
||||
}
|
||||
|
@ -108,6 +108,7 @@ set SOURCES=agrunt.cpp ^
|
||||
world.cpp ^
|
||||
xen.cpp ^
|
||||
zombie.cpp ^
|
||||
../game_shared/vcs_info.cpp ^
|
||||
../pm_shared/pm_debug.c ../pm_shared/pm_math.c ../pm_shared/pm_shared.c
|
||||
set DEFINES=/DCLIENT_WEAPONS /Dsnprintf=_snprintf /DNO_VOICEGAMEMGR /DNDEBUG
|
||||
set LIBS=user32.lib
|
||||
|
@ -9,5 +9,5 @@ const char *g_VCSInfo_Commit = "unknown-commit";
|
||||
#ifdef XASH_BUILD_BRANCH
|
||||
const char *g_VCSInfo_Branch = XASH_BUILD_BRANCH;
|
||||
#else
|
||||
const char *g_VCSInfo_Branch = "unknown-commit";
|
||||
const char *g_VCSInfo_Branch = "unknown-branch";
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user