Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/game/shared/tf/tf_weapon_jar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,16 @@ void JarExplode( int iEntIndex, CTFPlayer *pAttacker, CBaseEntity *pOriginalWeap
if ( !pPlayer->IsAlive() )
continue;

// UTIL_EntitiesInSphere actually uses a cube rather than a sphere
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than having to hack this in at every place where UTIL_EntitiesInSphere is called, this should just be done in UTIL_EntitiesInSphere itself

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree but this is supposed to be a bit more of a conservative approach for now since this would affect quite a lot of other things (airblast, dispensers, etc)

CCollisionProperty *pCollisionProp = pPlayer->CollisionProp();
if ( pCollisionProp )
{
Vector vecNearest;
pCollisionProp->CalcNearestPoint( vContactPoint, &vecNearest );
if ( vContactPoint.DistToSqr( vecNearest ) > flRadius * flRadius )
continue;
}

// Do a quick trace to see if there's any geometry in the way.
// Pee isn't stopped by other entities. Splishy splashy.
trace_t trace;
Expand Down