mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 23:14:59 +01:00
feat(blackbox): the black box on its own, writing the tapes of the user's vehicles at the end
"blackbox yes" in eu07.ini records the black box with the physics logs on or off, "blackbox no" never; with no entry it goes with "physicslog yes" as before. With the physics logs off, the recorder keeps the line of the physics log of the driver the user is with, every 0.05 s, and writes it to physicslog/<vehicle>.dat when the recording closes: the speed recorder's tape of the vehicles the user was in, without every vehicle keeping a log open and written twenty times a second. The line and the header of the log are made by one function of the driver, which its own log writes too, and the file is opened the same way, so the two are the same to the byte: the readers of these logs (the old Hasler tape viewer, the starter) read them as before.
This commit is contained in:
@@ -10,6 +10,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include "utilities/Classes.h"
|
||||
#include "utilities/utilities.h"
|
||||
#include "MOVER.h"
|
||||
@@ -730,6 +731,13 @@ private:
|
||||
public:
|
||||
TDynamicObject const *Vehicle() const {
|
||||
return pVehicle; }
|
||||
// the physics log (physicslog/<vehicle>.dat): the name of its file without the extension, its first line and
|
||||
// a line of it as the vehicle is now, each with its line end. the black box keeps the lines of the vehicle the
|
||||
// user is in, to write its log at the end when the logs of all the vehicles are off
|
||||
std::string const &physicslog_name() const {
|
||||
return VehicleName; }
|
||||
static std::string_view physicslog_header();
|
||||
std::string physicslog_line() const;
|
||||
TDynamicObject *Vehicle( end const Side ) const {
|
||||
return pVehicles[ Side ]; }
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user