1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Fix indentation.

This commit is contained in:
Sandu Liviu Catalin 2021-02-21 13:37:57 +02:00
parent 9017236b13
commit 6fa8a17e9d

View File

@ -1481,7 +1481,7 @@ void Core::EmitPlayerUpdate(int32_t player_id, vcmpPlayerUpdate update_type)
// Should we check for distance traveled?
if (inst.mFlags & ENF_DIST_TRACK)
{
inst.mDistance += inst.mLastPosition.GetDistanceTo(pos);
inst.mDistance += inst.mLastPosition.GetDistanceTo(pos);
}
// Should we check for area collision?
if (inst.mFlags & ENF_AREA_TRACK)
@ -1721,7 +1721,7 @@ void Core::EmitVehicleUpdate(int32_t vehicle_id, vcmpVehicleUpdate update_type)
// Should we check for distance traveled?
if (inst.mFlags & ENF_DIST_TRACK)
{
inst.mDistance += inst.mLastPosition.GetDistanceTo(pos);
inst.mDistance += inst.mLastPosition.GetDistanceTo(pos);
}
// Should we check for area collision?
if (inst.mFlags & ENF_AREA_TRACK)
@ -1812,14 +1812,14 @@ void Core::EmitVehicleUpdate(int32_t vehicle_id, vcmpVehicleUpdate update_type)
{
// Obtain the current health of this instance
float health = _Func->GetVehicleHealth(vehicle_id);
// Server is actually dumb and never triggers vcmpVehicleUpdateHealth
if (!EpsEq(health, inst.mLastHealth))
{
// Trigger the event specific to this change
EmitVehicleHealth(vehicle_id, inst.mLastHealth, health);
// Update the tracked value
inst.mLastHealth = health;
}
// Server is actually dumb and never triggers vcmpVehicleUpdateHealth
if (!EpsEq(health, inst.mLastHealth))
{
// Trigger the event specific to this change
EmitVehicleHealth(vehicle_id, inst.mLastHealth, health);
// Update the tracked value
inst.mLastHealth = health;
}
// Finally, forward the call to the update callback
(*inst.mOnUpdate.first)(static_cast< int32_t >(update_type));
(*mOnVehicleUpdate.first)(inst.mObj, static_cast< int32_t >(update_type));