1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-31 18:07:14 +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? // Should we check for distance traveled?
if (inst.mFlags & ENF_DIST_TRACK) if (inst.mFlags & ENF_DIST_TRACK)
{ {
inst.mDistance += inst.mLastPosition.GetDistanceTo(pos); inst.mDistance += inst.mLastPosition.GetDistanceTo(pos);
} }
// Should we check for area collision? // Should we check for area collision?
if (inst.mFlags & ENF_AREA_TRACK) 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? // Should we check for distance traveled?
if (inst.mFlags & ENF_DIST_TRACK) if (inst.mFlags & ENF_DIST_TRACK)
{ {
inst.mDistance += inst.mLastPosition.GetDistanceTo(pos); inst.mDistance += inst.mLastPosition.GetDistanceTo(pos);
} }
// Should we check for area collision? // Should we check for area collision?
if (inst.mFlags & ENF_AREA_TRACK) 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 // Obtain the current health of this instance
float health = _Func->GetVehicleHealth(vehicle_id); float health = _Func->GetVehicleHealth(vehicle_id);
// Server is actually dumb and never triggers vcmpVehicleUpdateHealth // Server is actually dumb and never triggers vcmpVehicleUpdateHealth
if (!EpsEq(health, inst.mLastHealth)) if (!EpsEq(health, inst.mLastHealth))
{ {
// Trigger the event specific to this change // Trigger the event specific to this change
EmitVehicleHealth(vehicle_id, inst.mLastHealth, health); EmitVehicleHealth(vehicle_id, inst.mLastHealth, health);
// Update the tracked value // Update the tracked value
inst.mLastHealth = health; inst.mLastHealth = health;
} }
// Finally, forward the call to the update callback // Finally, forward the call to the update callback
(*inst.mOnUpdate.first)(static_cast< int32_t >(update_type)); (*inst.mOnUpdate.first)(static_cast< int32_t >(update_type));
(*mOnVehicleUpdate.first)(inst.mObj, static_cast< int32_t >(update_type)); (*mOnVehicleUpdate.first)(inst.mObj, static_cast< int32_t >(update_type));