metarmask / teardown

Tools for parsing and converting Teardown game saves
GNU General Public License v3.0
12 stars 3 forks source link

No top speed attribute #5

Closed TTFH closed 3 years ago

TTFH commented 3 years ago

Vehicles do not have the correct top speed, attribute is set to a default value of 70 Km/h

TTFH commented 3 years ago

Hi, I found that the speed of a vehicle is stored in meters per seconds as a float 32 at the start of VehicleProperties

#[derive(Debug, Clone, Parse)]
pub struct VehicleProperties<'a> {
    /// Speed in mps (x 3.6 to Km/h)
    pub speed: f32,
    #[doc(hidden)]
    pub z_f32_1: f32,
    pub spring: f32,
    pub damping: f32,