Skip to content

Commit

Permalink
server: add Vehicle.steeringAngle, Vehicle.accelerationLevel & Vehicl…
Browse files Browse the repository at this point in the history
…e.brakeLevel
  • Loading branch information
vadzz-dev committed Jul 25, 2023
1 parent 3b81090 commit 5285964
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions server/src/bindings/Vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ extern V8Class v8Vehicle("Vehicle",
V8Helpers::SetAccessor<IVehicle, IVehicle*, &IVehicle::GetAttached>(isolate, tpl, "attached");
V8Helpers::SetAccessor<IVehicle, IVehicle*, &IVehicle::GetAttachedTo>(isolate, tpl, "attachedTo");

V8Helpers::SetAccessor<IVehicle, float, &IVehicle::GetSteeringAngle>(isolate, tpl, "steeringAngle");
V8Helpers::SetAccessor<IVehicle, float, &IVehicle::GetAccelerationLevel>(isolate, tpl, "accelerationLevel");
V8Helpers::SetAccessor<IVehicle, float, &IVehicle::GetBrakeLevel>(isolate, tpl, "brakeLevel");

// Train getter/setter
V8Helpers::SetAccessor<IVehicle, bool, &IVehicle::IsTrainMissionTrain, &IVehicle::SetTrainMissionTrain>(isolate, tpl, "isMissionTrain");
V8Helpers::SetAccessor<IVehicle, int8_t, &IVehicle::GetTrainTrackId, &IVehicle::SetTrainTrackId>(isolate, tpl, "trainTrackId");
Expand Down
2 changes: 1 addition & 1 deletion shared/deps/cpp-sdk
Submodule cpp-sdk updated 1 files
+7 −0 objects/IVehicle.h

0 comments on commit 5285964

Please sign in to comment.