18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 05:57:08 +01:00

Merge staging into feat/derailment-event

This commit is contained in:
jerrrrycho
2026-11-29 18:01:06 +01:00
189 changed files with 7375 additions and 5958 deletions
+6 -6
View File
@@ -334,7 +334,7 @@ void state_manager::process_commands() {
targetvehicle->ctOwner == currentvehicle->Mechanik
|| targetvehicle->ctOwner == currentvehicle->ctOwner };
auto const isincharge{ currentvehicle->Mechanik->primary() };
auto const aidriveractive{ currentvehicle->Mechanik->AIControllFlag };
auto const aidriveractive{ currentvehicle->Mechanik->AIControllFlag() };
// TODO: support for primary mode request passed as commanddata.param1
if( !sameconsist && isincharge ) {
// oddajemy dotychczasowy AI
@@ -459,10 +459,10 @@ void state_manager::process_commands() {
while (vehicle) {
// no damage, back on the rails with the state of the derailment cleared
vehicle->physics->repair_damage();
vehicle->physics->V = 0.000001; // HACK: force vehicle position re-calculation
vehicle->physics->DistCounter = 0.0;
vehicle->physics->OffsetTrackH = 0.0;
vehicle->physics->OffsetTrackV = 0.0;
vehicle->physics->SetV(0.000001); // HACK: force vehicle position re-calculation
vehicle->physics->SetDistCounter(0.0);
vehicle->physics->SetOffsetTrackH(0.0);
vehicle->physics->SetOffsetTrackV(0.0);
// pantographs
for( auto idx = 0; idx < vehicle->iAnimType[ ANIM_PANTS ]; ++idx ) {
@@ -489,7 +489,7 @@ void state_manager::process_commands() {
if (commanddata.command == user_command::fillcompressor) {
TDynamicObject *vehicle = simulation::Vehicles.find(commanddata.payload);
vehicle->physics->air.compressedVolume = 8.0f * vehicle->physics->air.mainReservoirVolume;
vehicle->physics->air.Fill(8.0f * vehicle->physics->air.config.mainReservoirVolume);
}
if (commanddata.command == user_command::dynamicmove) {