18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 01:04:59 +01:00

Merge branch 'master' into feat/renderers-cleanup

This commit is contained in:
2026-11-16 21:44:48 +01:00
264 changed files with 41203 additions and 10041 deletions

View File

@@ -12,6 +12,7 @@ http://mozilla.org/MPL/2.0/.
#include "simulation/simulationtime.h"
#include "simulation/simulationenvironment.h"
#include "simulation/simulationtest.h"
#include "simulation/blackboxrecorder.h"
#include "utilities/Globals.h"
#include "world/Event.h"
@@ -234,6 +235,7 @@ state_manager::update_scripting_interface() {
void state_manager::process_commands() {
command_data commanddata;
while( Commands.pop( commanddata, (uint32_t)command_target::simulation )) {
Blackbox.command( nullptr, commanddata.command, commanddata.action, commanddata.param1, commanddata.param2 );
if (commanddata.command == user_command::consistreleaser) {
TDynamicObject *found_vehicle = simulation::Vehicles.find(commanddata.payload);
TDynamicObject *vehicle = found_vehicle;
@@ -456,6 +458,12 @@ void state_manager::process_commands() {
}
}
if (commanddata.command == user_command::repaircoupler) {
if (auto *vehicle{simulation::Vehicles.find(commanddata.payload)}; vehicle != nullptr) {
vehicle->MoverParameters->repair_coupler(static_cast<int>(commanddata.param1) == end::rear ? end::rear : end::front);
}
}
if (commanddata.command == user_command::fillcompressor) {
TDynamicObject *vehicle = simulation::Vehicles.find(commanddata.payload);
vehicle->MoverParameters->CompressedVolume = 8.0f * vehicle->MoverParameters->VeselVolume;