1
0

code style

This commit is contained in:
Gargaj 2015-11-07 13:32:52 +01:00
parent 2f28c2f4ff
commit ad1e24e50b

View File

@ -63,14 +63,14 @@ void cPawn::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
}
// we only push other mobs, boats and minecarts
if (a_Entity->GetEntityType() != etMonster && a_Entity->GetEntityType() != etMinecart && a_Entity->GetEntityType() != etBoat)
if ((a_Entity->GetEntityType() != etMonster) && (a_Entity->GetEntityType() != etMinecart) && (a_Entity->GetEntityType() != etBoat))
{
return false;
}
Vector3d v3Delta = a_Entity->GetPosition() - m_Pusher->GetPosition();
v3Delta.y = 0.0; // we only push sideways
v3Delta *= 1.0 / v3Delta.Length(); // we push harder if we're close
v3Delta.y = 0.0; // we only push sideways
v3Delta *= 1.0 / v3Delta.Length(); // we push harder if we're close
// QUESTION: is there an additional multiplier for this? current shoving seems a bit weak
a_Entity->AddSpeed(v3Delta);