Browse Source

Merge branch 'master' into opfor

opforfixed
Andrey Akhmichin 2 years ago
parent
commit
59014b1389
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
  1. 46
      README.md
  2. 28
      dlls/player.cpp
  3. 2
      dlls/weapons.cpp
  4. 3
      dlls/weapons.h

46
README.md

@ -2,6 +2,52 @@ @@ -2,6 +2,52 @@
Half-Life SDK for GoldSource & Xash3D with some bugfixes.
<details><summary>Changelog</summary>
<p>
- Fixed an occasional bug when houndeyes stuck unable to do anything. Technical detail: now monster's `Activity` is set before the call to `SetYawSpeed`. [Patch](https://github.com/FWGS/hlsdk-portable/commit/467899b99aa225a95d90222137f18c141c929c86)
- Monsters now play idle sounds as it's supposed by the code. Technical detail: the problem was a check for a wrong variable. [Patch](https://github.com/FWGS/hlsdk-portable/commit/9fc712da019a1ca646171e912209a993e7c43976)
- Fixed a bug that caused talk monsters (scientists and security guards) to face a wrong direction during scripted sequence sometimes. [Patch](https://github.com/FWGS/hlsdk-portable/commit/3e2808de62e479e83068c075cb88b4f177f9acc7)
- Fixed squad member removal. This bug affected houndeye attacks as their attack depends on percieved number of squad members. [Patch](https://github.com/FWGS/hlsdk-portable/commit/b4502f71336a08f3f2c72b7b061b2838a149a11b)
- 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.
- 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)
- Fixed beam attachment invalidated on restore (that led to visual bugs). [Patch](https://github.com/FWGS/hlsdk-xash3d/commit/74b5543c83c5cdcb88e9254bacab08bc63c4c896)
- Fixed alien controllers facing wrong direction in non-combat state. [Patch](https://github.com/FWGS/hlsdk-portable/commit/e51878c45b618f9b3920b46357545cbb47befeda)
- Fixed weapon deploy animations not playing sometimes on fast switching between weapons. [Patch](https://github.com/FWGS/hlsdk-portable/commit/ed676a5413c2d26b2982e5b014e0731f0eda6a0d) [Patch2](https://github.com/FWGS/hlsdk-portable/commit/4053dca7a9cf999391cbd77224144da207e4540b)
- Fixed tripmine sometimes having wrong body on pickup [Patch](https://github.com/FWGS/hlsdk-portable/commit/abf08e4520e3b6cd12a40f269f4a256cf8496227)
Bugfix-related macros that can be enabled during the compilation:
- **CROWBAR_DELAY_FIX** fixes a bug when crowbar has a longer delay after the first hit.
- **CROWBAR_FIX_RAPID_CROWBAR** fixes a "rapid crowbar" bug when hitting corpses of killed monsters.
- **GAUSS_OVERCHARGE_FIX** fixes tau-cannon (gauss) charge sound not stopping after the overcharge.
- **CROWBAR_IDLE_ANIM** makes crowbar play idle animations.
- **TRIPMINE_BEAM_DUPLICATION_FIX** fixes tripmine's beam duplication on level transition.
- **HANDGRENADE_DEPLOY_FIX** makes handgrenade play draw animation after finishing a throw.
- **WEAPONS_ANIMATION_TIMES_FIX** fixes deploy and idle animation times of some weapons.
Bugfix-related server cvars:
- **satchelfix**: if set to 1, doors won't get blocked by satchels. Fixes an infamous exploit on `crossfire` map.
- **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.
Other server cvars:
- **mp_bhopcap**: if set to 1, enable bunny-hop.
- **chargerfix**: if set to 1, wall-mounted health and battery chargers will play reject sounds if player has the full health or armor.
- **corpsephysics**: if set to 1, corpses of killed monsters will fly a bit from an impact. It's a cut feature from Half-Life.
</p>
</details>
# 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.

28
dlls/player.cpp

@ -3298,15 +3298,9 @@ void CBasePlayer::SelectItem( const char *pstr ) @@ -3298,15 +3298,9 @@ void CBasePlayer::SelectItem( const char *pstr )
if( m_pActiveItem )
{
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(m_pActiveItem->GetWeaponPtr());
if (weapon)
weapon->m_ForceSendAnimations = true;
m_pActiveItem->pev->oldbuttons = 1;
m_pActiveItem->Deploy();
if (weapon)
weapon->m_ForceSendAnimations = false;
m_pActiveItem->pev->oldbuttons = 0;
m_pActiveItem->UpdateItemInfo();
}
}
@ -3333,14 +3327,9 @@ void CBasePlayer::SelectLastItem( void ) @@ -3333,14 +3327,9 @@ void CBasePlayer::SelectLastItem( void )
m_pActiveItem = m_pLastItem;
m_pLastItem = pTemp;
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(m_pActiveItem->GetWeaponPtr());
if (weapon)
weapon->m_ForceSendAnimations = true;
m_pActiveItem->pev->oldbuttons = 1;
m_pActiveItem->Deploy();
if (weapon)
weapon->m_ForceSendAnimations = false;
m_pActiveItem->pev->oldbuttons = 0;
m_pActiveItem->UpdateItemInfo();
}
@ -4842,14 +4831,9 @@ BOOL CBasePlayer::SwitchWeapon( CBasePlayerItem *pWeapon ) @@ -4842,14 +4831,9 @@ BOOL CBasePlayer::SwitchWeapon( CBasePlayerItem *pWeapon )
m_pActiveItem = pWeapon;
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(pWeapon->GetWeaponPtr());
if (weapon)
weapon->m_ForceSendAnimations = true;
pWeapon->pev->oldbuttons = 1;
pWeapon->Deploy();
if (weapon)
weapon->m_ForceSendAnimations = false;
pWeapon->pev->oldbuttons = 0;
return TRUE;
}

2
dlls/weapons.cpp

@ -849,7 +849,7 @@ int CBasePlayerWeapon::UpdateClientData( CBasePlayer *pPlayer ) @@ -849,7 +849,7 @@ int CBasePlayerWeapon::UpdateClientData( CBasePlayer *pPlayer )
void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal, int body )
{
if( UseDecrement() )
skiplocal = !m_ForceSendAnimations;
skiplocal = !pev->oldbuttons;
else
skiplocal = 0;

3
dlls/weapons.h

@ -397,9 +397,6 @@ public: @@ -397,9 +397,6 @@ public:
// hle time creep vars
float m_flPrevPrimaryAttack;
float m_flLastFireTime;
//Hack so deploy animations work when weapon prediction is enabled.
bool m_ForceSendAnimations;
};
class CBasePlayerAmmo : public CBaseEntity

Loading…
Cancel
Save