Browse Source

Merge branch 'master' into mobile_hacks

mobile_hacks
Andrey Akhmichin 2 years ago
parent
commit
4cdaa7c72e
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
  1. 22
      README.md
  2. 2
      cl_dll/vgui_SpectatorPanel.cpp
  3. 6
      dlls/func_tank.cpp

22
README.md

@ -12,7 +12,7 @@ Half-Life SDK for GoldSource & Xash3D with some bugfixes.
- Scientists now react to smells. [Patch](https://github.com/FWGS/hlsdk-portable/commit/2de4e7ab003d5b1674d12525f5aefb1e57a49fa3) - Scientists now react to smells. [Patch](https://github.com/FWGS/hlsdk-portable/commit/2de4e7ab003d5b1674d12525f5aefb1e57a49fa3)
- Tau-cannon (gauss) plays idle animations. - Tau-cannon (gauss) plays idle animations.
- Tau-cannon (gauss) beam color depends on the charge as it was before the prediction code was introduced in Half-Life. [Patch](https://github.com/FWGS/hlsdk-portable/commit/0a29ec49c8183ebb8da22a6d2ef395eae9c3dffe) - Tau-cannon (gauss) beam color depends on the charge as it was before the prediction code was introduced in Half-Life. [Patch](https://github.com/FWGS/hlsdk-portable/commit/0a29ec49c8183ebb8da22a6d2ef395eae9c3dffe)
- Brought back gluon flare in singleplayer. - Brought back gluon flare in singleplayer. [Patch](https://github.com/FWGS/hlsdk-portable/commit/9d7ab6acf46a8b71ef119d9c252767865522d21d)
- Hand grenades don't stay primed after holster, preventing detonation after weapon switch. [Patch](https://github.com/FWGS/hlsdk-portable/commit/6e1059026faa90c5bfe5e3b3f4f58fde398d4524) - Hand grenades don't stay primed after holster, preventing detonation after weapon switch. [Patch](https://github.com/FWGS/hlsdk-portable/commit/6e1059026faa90c5bfe5e3b3f4f58fde398d4524)
- Fixed flashlight battery appearing as depleted on restore. - Fixed flashlight battery appearing as depleted on restore.
- Fixed a potential overflow when reading sentences.txt. [Patch](https://github.com/FWGS/hlsdk-xash3d/commit/cb51d2aa179f1eb622e08c1c07b053ccd49e40a5) - Fixed a potential overflow when reading sentences.txt. [Patch](https://github.com/FWGS/hlsdk-xash3d/commit/cb51d2aa179f1eb622e08c1c07b053ccd49e40a5)
@ -37,7 +37,7 @@ Bugfix-related server cvars:
- **explosionfix**: if set to 1, explosion damage won't propagate through thin bruses. - **explosionfix**: if set to 1, explosion damage won't propagate through thin bruses.
- **selfgauss**: if set to 0, players won't hurt themselves with secondary attack when shooting thick brushes. - **selfgauss**: if set to 0, players won't hurt themselves with secondary attack when shooting thick brushes.
*Note*: the macros and cvars were adjusted in [hlfixed](https://github.com/FWGS/hlsdk-portable/tree/hlfixed) branch. The bugfix macros are kept turned off in master branch to maintain the compatibility with vanilla servers and clients. *Note*: the macros and cvars were adjusted in [hlfixed](https://github.com/FWGS/hlsdk-portable/tree/hlfixed) branch (for further information read [this](https://github.com/FWGS/hlsdk-portable/wiki/HL-Fixed)). The bugfix macros are kept turned off in `master` branch to maintain the compatibility with vanilla servers and clients.
Other server cvars: Other server cvars:
@ -48,6 +48,22 @@ Other server cvars:
</p> </p>
</details> </details>
<details><summary>Support for mods</summary>
<p>
This repository contains (re-)implementations of some mods as separate branches derived from `master`. The list of supported mods can be found [here](https://github.com/FWGS/hlsdk-portable/wiki/Mods). Note that some branches are unstable and incomplete.
To get the mod branch locally run the following git command:
```
git fetch origin asheep:asheep
```
This is considering that you have set **FWGS/hlsdk-portable** as an `origin` remote and want to fetch `asheep` branch.
</p>
</details>
# Obtaining source code # Obtaining source code
Either clone the repository via [git](`https://git-scm.com/downloads`) or just download ZIP via **Code** button on github. The first option is more preferable as it also allows you to search through the repo history, switch between branches and clone the vgui submodule. Either clone the repository via [git](`https://git-scm.com/downloads`) or just download ZIP via **Code** button on github. The first option is more preferable as it also allows you to search through the repo history, switch between branches and clone the vgui submodule.
@ -87,7 +103,7 @@ cd projects\hlsdk-portable
``` ```
cmake -A Win32 -B build cmake -A Win32 -B build
``` ```
Once you configure the project you don't need to call `cmake` anymore unless you modify `CMakeLists.txt` files or want to reconfigure the project with different parameters. Note that you must repeat the configuration step if you modify `CMakeLists.txt` files or want to reconfigure the project with different parameters.
The next step is to compile the libraries: The next step is to compile the libraries:
``` ```

2
cl_dll/vgui_SpectatorPanel.cpp

@ -29,7 +29,7 @@ Sets the location of the input for chat text
========================== ==========================
*/ */
void DLLEXPORT HUD_ChatInputPosition( int *x, int *y ) extern "C" void DLLEXPORT HUD_ChatInputPosition( int *x, int *y )
{ {
// RecClChatInputPosition( x, y ); // RecClChatInputPosition( x, y );

6
dlls/func_tank.cpp

@ -626,12 +626,14 @@ void CFuncTank::AdjustAnglesForBarrel( Vector &angles, float distance )
if( m_barrelPos.y ) if( m_barrelPos.y )
{ {
r2 = m_barrelPos.y * m_barrelPos.y; r2 = m_barrelPos.y * m_barrelPos.y;
angles.y += ( 180.0f / M_PI_F ) * atan2( m_barrelPos.y, sqrt( d2 - r2 ) ); if( d2 > r2 )
angles.y += ( 180.0f / M_PI_F ) * atan2( m_barrelPos.y, sqrt( d2 - r2 ) );
} }
if( m_barrelPos.z ) if( m_barrelPos.z )
{ {
r2 = m_barrelPos.z * m_barrelPos.z; r2 = m_barrelPos.z * m_barrelPos.z;
angles.x += ( 180.0f / M_PI_F ) * atan2( -m_barrelPos.z, sqrt( d2 - r2 ) ); if( d2 > r2 )
angles.x += ( 180.0f / M_PI_F ) * atan2( -m_barrelPos.z, sqrt( d2 - r2 ) );
} }
} }
} }

Loading…
Cancel
Save