mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 21:24:27 +00:00
Merge branch 'opfor' into opforfixed
This commit is contained in:
commit
8e03550238
14
README.md
14
README.md
@ -76,7 +76,7 @@ git clone --recursive https://github.com/FWGS/hlsdk-portable
|
|||||||
|
|
||||||
# Build Instructions
|
# Build Instructions
|
||||||
|
|
||||||
## Windows
|
## Windows x86.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ cmake -G "Visual Studio 16 2019" -A Win32 -B build
|
|||||||
|
|
||||||
After the configuration step, `HLSDK-PORTABLE.sln` should appear in the `build` directory. You can open this solution in Visual Studio and continue developing there.
|
After the configuration step, `HLSDK-PORTABLE.sln` should appear in the `build` directory. You can open this solution in Visual Studio and continue developing there.
|
||||||
|
|
||||||
## Windows. Using Microsoft Visual Studio 6
|
## Windows x86. Using Microsoft Visual Studio 6
|
||||||
|
|
||||||
Microsoft Visual Studio 6 is very old, but if you still have it installed, you can use it to build this hlsdk. There are no project files, but two `.bat` files, for server and client libraries. They require variable **MSVCDir** to be set to the installation path of Visual Studio:
|
Microsoft Visual Studio 6 is very old, but if you still have it installed, you can use it to build this hlsdk. There are no project files, but two `.bat` files, for server and client libraries. They require variable **MSVCDir** to be set to the installation path of Visual Studio:
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ cd dlls && compile.bat && cd ../cl_dll && compile.bat
|
|||||||
|
|
||||||
`hl.dll` and `client.dll` will appear in `dlls/` and `cl_dll/` diretories. The libraries built with msvc6 should be compatible with Windows XP.
|
`hl.dll` and `client.dll` will appear in `dlls/` and `cl_dll/` diretories. The libraries built with msvc6 should be compatible with Windows XP.
|
||||||
|
|
||||||
## Linux. Using Steam Runtime in chroot
|
## Linux x86. Portable steam-compatible build using Steam Runtime in chroot
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ schroot --chroot steamrt_scout_i386 -- cmake -B build-in-steamrt -S .
|
|||||||
schroot --chroot steamrt_scout_i386 -- cmake --build build-in-steamrt
|
schroot --chroot steamrt_scout_i386 -- cmake --build build-in-steamrt
|
||||||
```
|
```
|
||||||
|
|
||||||
## Linux. Build without Steam Runtime
|
## Linux x86. Portable steam-compatible build without Steam Runtime
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ cmake .. -DCMAKE_C_FLAGS="-static-libstdc++ -static-libgcc"
|
|||||||
```
|
```
|
||||||
To ensure portability it's still better to build using Steam Runtime or another chroot of some older distro.
|
To ensure portability it's still better to build using Steam Runtime or another chroot of some older distro.
|
||||||
|
|
||||||
## Linux. Build in your own chroot
|
## Linux x86. Portable steam-compatible build in your own chroot
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
@ -272,11 +272,11 @@ make -j
|
|||||||
|
|
||||||
## Other platforms
|
## Other platforms
|
||||||
|
|
||||||
Building on other Unix-like platforms (e.g. FreeBSD) is supported.
|
Building on other architectures (e.g x86_64 or arm) and POSIX-compliant OSes (e.g. FreeBSD) is supported.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
Install C and C++ compilers (like gcc or clang), cmake and make (or gmake)
|
Install C and C++ compilers (like gcc or clang), cmake and make.
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ void IN_SetMouseMode(bool enable)
|
|||||||
if (mouseparmsvalid)
|
if (mouseparmsvalid)
|
||||||
restore_spi = SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
|
restore_spi = SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
|
||||||
|
|
||||||
m_bRawInput = m_rawinput->value != 0;
|
m_bRawInput = m_rawinput && m_rawinput->value != 0;
|
||||||
if(m_bRawInput)
|
if(m_bRawInput)
|
||||||
{
|
{
|
||||||
#if USE_SDL2
|
#if USE_SDL2
|
||||||
@ -788,7 +788,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
|
|||||||
|
|
||||||
bool lockEntered = MouseThread_ActiveLock_Enter();
|
bool lockEntered = MouseThread_ActiveLock_Enter();
|
||||||
|
|
||||||
m_bRawInput = m_rawinput->value != 0;
|
m_bRawInput = m_rawinput && m_rawinput->value != 0;
|
||||||
|
|
||||||
if(m_bRawInput && !isMouseRelative)
|
if(m_bRawInput && !isMouseRelative)
|
||||||
{
|
{
|
||||||
@ -1573,7 +1573,7 @@ void GoldSourceInput::IN_Init (void)
|
|||||||
|
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
m_rawinput = gEngfuncs.pfnGetCvarPointer("m_rawinput");
|
m_rawinput = gEngfuncs.pfnGetCvarPointer("m_rawinput");
|
||||||
m_bRawInput = m_rawinput->value != 0;
|
m_bRawInput = m_rawinput && m_rawinput->value != 0;
|
||||||
m_bMouseThread = gEngfuncs.CheckParm ("-mousethread", NULL ) != NULL;
|
m_bMouseThread = gEngfuncs.CheckParm ("-mousethread", NULL ) != NULL;
|
||||||
m_mousethread_sleep = gEngfuncs.pfnRegisterVariable ( "m_mousethread_sleep", "1", FCVAR_ARCHIVE ); // default to less than 1000 Hz
|
m_mousethread_sleep = gEngfuncs.pfnRegisterVariable ( "m_mousethread_sleep", "1", FCVAR_ARCHIVE ); // default to less than 1000 Hz
|
||||||
|
|
||||||
|
@ -40,19 +40,23 @@ void CShockrifle::Spawn()
|
|||||||
{
|
{
|
||||||
Precache();
|
Precache();
|
||||||
m_iId = WEAPON_SHOCKRIFLE;
|
m_iId = WEAPON_SHOCKRIFLE;
|
||||||
SET_MODEL(ENT(pev), "models/w_shock.mdl");
|
SET_MODEL(ENT(pev), "models/w_shock_rifle.mdl");
|
||||||
|
|
||||||
m_iDefaultAmmo = SHOCKRIFLE_DEFAULT_GIVE;
|
m_iDefaultAmmo = SHOCKRIFLE_DEFAULT_GIVE;
|
||||||
m_iFirePhase = 0;
|
m_iFirePhase = 0;
|
||||||
|
|
||||||
FallInit();// get ready to fall down.
|
FallInit();// get ready to fall down.
|
||||||
|
|
||||||
|
pev->sequence = 0;
|
||||||
|
pev->animtime = gpGlobals->time;
|
||||||
|
pev->framerate = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CShockrifle::Precache(void)
|
void CShockrifle::Precache(void)
|
||||||
{
|
{
|
||||||
PRECACHE_MODEL("models/v_shock.mdl");
|
PRECACHE_MODEL("models/v_shock.mdl");
|
||||||
PRECACHE_MODEL("models/w_shock.mdl");
|
PRECACHE_MODEL("models/w_shock_rifle.mdl");
|
||||||
PRECACHE_MODEL("models/p_shock.mdl");
|
PRECACHE_MODEL("models/p_shock.mdl");
|
||||||
|
|
||||||
PRECACHE_SOUND("weapons/shock_discharge.wav");
|
PRECACHE_SOUND("weapons/shock_discharge.wav");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user