From 72928cb3f13c5d2ae3690269719faf595cfd9a3b Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Sat, 28 Dec 2024 03:47:54 +0300 Subject: [PATCH] Fix crossbow bolts staying in air and not pushing the func_pushable in GoldSource --- dlls/crossbow.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dlls/crossbow.cpp b/dlls/crossbow.cpp index 97bc583c38..c7bfac4018 100644 --- a/dlls/crossbow.cpp +++ b/dlls/crossbow.cpp @@ -156,7 +156,7 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther ) pev->angles.z = RANDOM_LONG( 0, 360 ); pev->nextthink = gpGlobals->time + 10.0f; } - else if( pOther->pev->movetype == MOVETYPE_PUSH || pOther->pev->movetype == MOVETYPE_PUSHSTEP ) + else if( g_fIsXash3D && (pOther->pev->movetype == MOVETYPE_PUSH || pOther->pev->movetype == MOVETYPE_PUSHSTEP) ) { Vector vecDir = pev->velocity.Normalize(); UTIL_SetOrigin( pev, pev->origin - vecDir * 12.0f ); @@ -167,12 +167,9 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther ) pev->angles.z = RANDOM_LONG( 0, 360 ); pev->nextthink = gpGlobals->time + 10.0f; - if( g_fIsXash3D ) - { - // g-cont. Setup movewith feature - pev->movetype = MOVETYPE_COMPOUND; // set movewith type - pev->aiment = ENT( pOther->pev ); // set parent - } + // g-cont. Setup movewith feature + pev->movetype = MOVETYPE_COMPOUND; // set movewith type + pev->aiment = ENT( pOther->pev ); // set parent } if( UTIL_PointContents( pev->origin ) != CONTENTS_WATER )