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
18 changes: 11 additions & 7 deletions src/game/server/hl2mp/bot/behavior/hl2mp_bot_behavior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,17 @@ Vector CHL2MPBotMainAction::SelectTargetPoint( const INextBot *meBot, const CBas
float flForceMax = physcannon_maxforce.GetFloat();
float flForce = flForceMax;

float mass = pHeldEntity->VPhysicsGetObject()->GetMass();
if ( mass > 100 )
{
mass = MIN( mass, 1000 );
float flForceMin = physcannon_minforce.GetFloat();
flForce = SimpleSplineRemapVal( mass, 100, 600, flForceMax, flForceMin );
}
IPhysicsObject* pPhysObj = pHeldEntity->VPhysicsGetObject();
if (pPhysObj)
{
float mass = pPhysObj->GetMass();
if (mass > 100.0f)
{
mass = MIN(mass, 1000.0f);
float flForceMin = physcannon_minforce.GetFloat();
flForce = SimpleSplineRemapVal(mass, 100.0f, 600.0f, flForceMax, flForceMin);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just want to mention that the formatting seems to have changed, maybe try to re-add the spaces for ( & ) to stay consistent with the code? :)

}
}

const float veryCloseRange = 150.0f;
if ( rangeBetween > veryCloseRange )
Expand Down