Skip to content

Commit

Permalink
Fix crossbow bolts staying in air and not pushing the func_pushable i…
Browse files Browse the repository at this point in the history
…n GoldSource
  • Loading branch information
FreeSlave committed Dec 28, 2024
1 parent 881852d commit 72928cb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions dlls/crossbow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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 )
Expand Down

0 comments on commit 72928cb

Please sign in to comment.