diff --git a/src/bindings/Vehicle.cpp b/src/bindings/Vehicle.cpp index f87acc18..5ada8818 100644 --- a/src/bindings/Vehicle.cpp +++ b/src/bindings/Vehicle.cpp @@ -230,6 +230,7 @@ extern V8Class v8Vehicle("Vehicle", v8Entity, Constructor, [](v8::LocalSet(v8::String::NewFromUtf8(isolate, "setArmoredWindowShootCount"), v8::FunctionTemplate::New(isolate, &SetArmoredWindowShootCount)); proto->Set(v8::String::NewFromUtf8(isolate, "getDamageStatusBase64"), v8::FunctionTemplate::New(isolate, &GetDamageStatus)); proto->Set(v8::String::NewFromUtf8(isolate, "setDamageStatusBase64"), v8::FunctionTemplate::New(isolate, &SetDamageStatus)); + proto->Set(v8::String::NewFromUtf8(isolate, "setFixed"), v8::FunctionTemplate::New(isolate, &SetFixed)); //Script getters/setters proto->SetAccessor(v8::String::NewFromUtf8(isolate, "manualEngineControl"), &ManualEngineControlGetter, &ManualEngineControlSetter); diff --git a/src/bindings/vehicle/Damage.h b/src/bindings/vehicle/Damage.h index f3e48a0c..59070fb6 100644 --- a/src/bindings/vehicle/Damage.h +++ b/src/bindings/vehicle/Damage.h @@ -324,6 +324,18 @@ namespace V8::Vehicle vehicle->LoadDamageDataFromBase64(*damageStatus); } + void SetFixed(const v8::FunctionCallbackInfo& info) + { + v8::Isolate* isolate = info.GetIsolate(); + + V8Entity* _this = V8Entity::Get(info.This()); + V8_CHECK(_this, "entity is invalid"); + + Ref vehicle = _this->GetHandle().As(); + + vehicle->SetFixed(); + } + void GetDamageStatus(const v8::FunctionCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); diff --git a/src/cpp-sdk b/src/cpp-sdk index 2888c40c..8fd6ecf5 160000 --- a/src/cpp-sdk +++ b/src/cpp-sdk @@ -1 +1 @@ -Subproject commit 2888c40c5d33bf570de1c409e6e382ae6bfe1129 +Subproject commit 8fd6ecf5a9d827ad872bef538c4e0fc3c7a356f5 diff --git a/src/helpers b/src/helpers index 57105860..14fa0191 160000 --- a/src/helpers +++ b/src/helpers @@ -1 +1 @@ -Subproject commit 57105860543fafb45ee2a5796cf00397916c96dd +Subproject commit 14fa019105fcc64838f441e001b4d457dcd2c69d