Fix leaderboard opponent times and authentic pitstop recharging

This commit is contained in:
Luxferre committed 2026-12-01 08:33:48 +02:00
1 parent b9353f552c
commit 3a377b0534
8 files changed
+592 -79

No files matched your search

+17 -1
View File
@@ -95,6 +95,21 @@ struct EffectEntity {
float x = 0.0f, z = 0.0f;
};
enum class ChargerType : uint8_t {
Shield = 1, // Green pitstop bay
Fuel = 2, // Blue pitstop bay
Ammo = 3, // Yellow pitstop bay
};
struct ChargerPad {
uint16_t region_id = 0;
ChargerType type = ChargerType::Fuel;
float cx = 0.0f;
float cz = 0.0f;
float half_x = 0.0f;
float half_z = 0.0f;
};
struct LevelData {
int level_number = 1; // 1..6
int world_index = 0; // 0..5 (corresponding to TEXTU0-x / SKY0-x / TABLE0-x)
@@ -113,7 +128,8 @@ struct LevelData {
std::vector<LevelEntity> triggers; // type 8
std::vector<MorphDefinition> morphs; // type 2 subtype 16/23 paired with subtype 9/7 source
std::vector<EffectEntity> effects; // type 2 subtype 1/2/3/5/8
std::vector<LevelEntity> pads; // type 10
std::vector<ChargerPad> pads; // authentic charger regions (type 1=Shield, 2=Fuel, 3=Ammo)
std::vector<LevelEntity> recovery_spawns; // type 10 (ENTITY_RECOVERY_TRUCK)
int min_x = 0, max_x = kMapWidth - 1;
int min_z = 0, max_z = kMapHeight - 1;