From 939237df7156f903d2a84f37e5d9c2bde24d045e Mon Sep 17 00:00:00 2001
From: Roman Chistokhodov
Date: Sun, 28 Aug 2022 14:28:29 +0300
Subject: [PATCH 1/3] Update README.md. Add a note about mods [ci skip] (#321)
---
README.md | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index c07deea0..3f7e36a6 100644
--- a/README.md
+++ b/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)
- 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)
-- 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)
- 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)
@@ -37,7 +37,7 @@ Bugfix-related server cvars:
- **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.
-*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:
@@ -48,6 +48,22 @@ Other server cvars:
+Support for mods
+
+
+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.
+
+
+
+
# 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.
@@ -87,7 +103,7 @@ cd projects\hlsdk-portable
```
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:
```
From 99dc2c519f5523ed9c3bc38e1f81c29e09baf957 Mon Sep 17 00:00:00 2001
From: Roman Chistokhodov
Date: Tue, 30 Aug 2022 19:35:13 +0300
Subject: [PATCH 2/3] Fix HUD_ChatInputPosition qualifier (#323)
---
cl_dll/vgui_SpectatorPanel.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cl_dll/vgui_SpectatorPanel.cpp b/cl_dll/vgui_SpectatorPanel.cpp
index 4b2b897c..2d78b932 100644
--- a/cl_dll/vgui_SpectatorPanel.cpp
+++ b/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 );
From 1394637ce87755f9d1f2673a806b24dc8624f518 Mon Sep 17 00:00:00 2001
From: Alibek Omarov
Date: Sun, 18 Sep 2022 23:49:58 +0300
Subject: [PATCH 3/3] server: func_tank: prevent domain error on barrel adjust
(#328)
When target is too close to the tank origin, `d2 - r2` expression may become negative
causing domain error on square root, and poisoning other fields and even other entities with NaN
---
dlls/func_tank.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/func_tank.cpp b/dlls/func_tank.cpp
index fd6ff1e7..c9945848 100644
--- a/dlls/func_tank.cpp
+++ b/dlls/func_tank.cpp
@@ -626,12 +626,14 @@ void CFuncTank::AdjustAnglesForBarrel( Vector &angles, float distance )
if( 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 )
{
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 ) );
}
}
}