Recently it has been discovered a crash bug on HLDS related with func_tank entities.
Here it's the issue at official Half-Life Github:
https://github.com/ValveSoftware/halflife/issues/2594
The issue is related to player disconnection while using a func_tank entity.
Is this issue affecting me?
Only if your server is using a map that has a func_tank entity.
It's an entity used on too many jailbreak maps.
For example: the six canyons at jb_snow [
Screenshot ] [
Video ]
According to this comment:
https://forums.alliedmods.net/showpo...76&postcount=6
It's already fixed at ReGameDLL
What's a func_tank entity?
"It simulates a gun turret that can aim and shoot things." from
https://developer.valvesoftware.com/wiki/Func_tank
So, if you have a map in your server with something like this, that entity probably is a func_tank and your server it's affected by the issue.
List of entities affected and fixed by the plugin:
- func_tank
- func_tankmortar
- func_tankrocket
- func_tanklaser
Steps to reproduce both issues
First, a bug appeared. Steps to reproduce:
- Control a func_tank
- Disconnect using it
- Reconnect
- Now, if you look to the entity you have controlled previously, it follows your angles movement with the camera.
Really a visual bug, because player can't shoot with it unless he will use it again.
Then, players can abuse this bug to cause a server crash.
We will need two different players. Steps to reproduce:
- Connect the two players
- 1st player use the func_tank
- Disconnect while using (1st player)
- Reconnect (1st player).
Note: 1st player will be able to move the angles of the entity without using it (the visual bug mentioned above).
- 2nd player use the func_tank.
Now func_tank attached to 2nd player and 1st can't move the angles of the entity.
- 2nd player uses retry command while using func_tank
- Finally crash server when player full reconnected
To protect our servers against this bug abuse, I made a plugin to fix the bug while we wait for an official fix by Valve.
Possibly someone can provide a better way to fix this bug.
Any improvement for the plugin will be welcomed.
For developers:
Plugin was tested and working well.
Changelog
Code:
v0.2 (01 june 2020)
It seems using get_pdata_int on client_disconnect sometimes server crashes on mapchange.
- Replaced client_disconnect to fakemeta disconnect forward
- Not reset m_pTank offset (anyways, don't needed?)
v0.1 (28 july 2019) - 305 views
- First release