Fix tripmines not detonating if placed on breakable and a save game is loaded

Resolves #192
This commit is contained in:
Sam V 2023-03-01 19:15:24 +01:00
parent 0621b39bd2
commit 79f9e956bd
2 changed files with 10 additions and 0 deletions

View file

@ -1,5 +1,13 @@
# Half-Life Updated changelog
## Changges in V1.0.0 Beta 015
> Note: this beta has not been released yet.
### Bug fixes
* Fixed tripmines not detonating if placed on breakable and a save game is loaded [#192](https://github.com/SamVanheer/halflife-updated/issues/192) (Thanks forklift.mdl)
## Changes in V1.0.0 Beta 014
### Bug fixes

View file

@ -269,6 +269,8 @@ void CTripmineGrenade::BeamBreakThink()
{
// Use the same trace parameters as the original trace above so the right entity is hit.
TraceResult tr2;
// Clear out old owner so it can be hit by traces.
pev->owner = nullptr;
UTIL_TraceLine(pev->origin + m_vecDir * 8, pev->origin - m_vecDir * 32, dont_ignore_monsters, ENT(pev), &tr2);
MakeBeam();
if (tr2.pHit)