This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/BigBaseV2/src/services/vehicle/handling_profile.cpp

21 lines
489 B
C++
Raw Normal View History

#include "handling_profile.hpp"
namespace big
{
handling_profile::handling_profile(CVehicle* vehicle)
{
m_gravity = vehicle->m_gravity;
m_handling_data = *vehicle->m_handling_data;
}
void handling_profile::apply_to(CVehicle* vehicle, bool restore_hash) const
{
const auto hash = vehicle->m_handling_data->m_model_hash;
vehicle->m_gravity = m_gravity;
*vehicle->m_handling_data = m_handling_data;
if (restore_hash)
vehicle->m_handling_data->m_model_hash = hash;
}
}