Skip to content

Commit

Permalink
Merge branch 'rc' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
vadzz-dev committed Mar 30, 2024
2 parents 9240608 + 65fa81b commit 839e290
Show file tree
Hide file tree
Showing 39 changed files with 280 additions and 167 deletions.
2 changes: 1 addition & 1 deletion client/src/CV8Resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void StartFile(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_CHECK(!maybeMod.IsEmpty(), "Failed to start file");
auto mod = maybeMod.ToLocalChecked();
static_cast<CV8ResourceImpl*>(resource)->InstantiateModule(mod);
const alt::MValueDict& exports = std::dynamic_pointer_cast<alt::IMValueDict>(
const alt::MValueDict& exports = std::static_pointer_cast<alt::IMValueDict>(
V8Helpers::V8ToMValue(mod->GetModuleNamespace()));
resource->GetResource()->SetExports(exports);
}
Expand Down
13 changes: 13 additions & 0 deletions client/src/CV8ScriptRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,12 @@ void CV8ScriptRuntime::OnEntityStreamIn(alt::IEntity* entity)
streamedInPeds.insert({ entity->GetID(), dynamic_cast<alt::IPed*>(entity) });
break;
}
case alt::IEntity::Type::LOCAL_OBJECT:
case alt::IEntity::Type::OBJECT:
{
streamedInObjects.insert({ entity->GetID(), dynamic_cast<alt::IObject*>(entity) });
break;
}
}
}

Expand All @@ -437,12 +443,19 @@ void CV8ScriptRuntime::OnEntityStreamOut(alt::IEntity* entity)
streamedInPeds.erase(entity->GetID());
break;
}
case alt::IEntity::Type::LOCAL_OBJECT:
case alt::IEntity::Type::OBJECT:
{
streamedInObjects.erase(entity->GetID());
break;
}
}
}
void CV8ScriptRuntime::OnDisconnect()
{
streamedInPlayers.clear();
streamedInVehicles.clear();
streamedInPeds.clear();
streamedInObjects.clear();
resourcesLoaded = false;
}
12 changes: 8 additions & 4 deletions client/src/CV8ScriptRuntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ class CV8ScriptRuntime : public alt::IScriptRuntime, public IRuntimeEventHandler
v8::CpuProfiler* profiler;
uint32_t profilerSamplingInterval = 100;

std::unordered_map<uint16_t, alt::IPlayer*> streamedInPlayers;
std::unordered_map<uint16_t, alt::IVehicle*> streamedInVehicles;
std::unordered_map<uint16_t, alt::IPed*> streamedInPeds;
std::unordered_map<uint32_t, alt::IPlayer*> streamedInPlayers;
std::unordered_map<uint32_t, alt::IVehicle*> streamedInVehicles;
std::unordered_map<uint32_t, alt::IPed*> streamedInPeds;
std::unordered_map<uint32_t, alt::IObject*> streamedInObjects;

uint32_t activeWorkers = 0;

Expand Down Expand Up @@ -218,7 +219,10 @@ class CV8ScriptRuntime : public alt::IScriptRuntime, public IRuntimeEventHandler
{
return streamedInPeds;
}

auto GetStreamedInObjects()
{
return streamedInObjects;
}

void OnDisconnect();
};
4 changes: 2 additions & 2 deletions client/src/bindings/Audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ static void GetOutputs(const v8::FunctionCallbackInfo<v8::Value>& info)
auto val = list->Get(i);
if(val->GetType() == alt::IMValue::Type::BASE_OBJECT)
{
auto baseObj = resource->GetBaseObjectOrNull(std::dynamic_pointer_cast<alt::IMValueBaseObject>(val)->RawValue());
auto baseObj = resource->GetBaseObjectOrNull(std::static_pointer_cast<alt::IMValueBaseObject>(val)->RawValue());
arr->Set(ctx, i, baseObj);
}
else if(val->GetType() == alt::IMValue::Type::UINT)
arr->Set(ctx, i, v8::Integer::NewFromUnsigned(isolate, std::dynamic_pointer_cast<alt::IMValueUInt>(val)->Value()));
arr->Set(ctx, i, v8::Integer::NewFromUnsigned(isolate, std::static_pointer_cast<alt::IMValueUInt>(val)->Value()));
}

V8_RETURN(arr);
Expand Down
5 changes: 3 additions & 2 deletions client/src/bindings/AudioCategory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ static void Constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
auto audioCategory = alt::ICore::Instance().GetAudioCategory(audioCategoryStr);
V8_CHECK(audioCategory, "Audio category not found");

info.This()->SetInternalField(0, v8::String::NewFromUtf8(isolate, audioCategoryStr.c_str()).ToLocalChecked());
V8Helpers::SetObjectClass(info.GetIsolate(), info.This(), V8Class::ObjectClass::AUDIO_CATEGORY);
info.This()->SetInternalField(1, v8::String::NewFromUtf8(isolate, audioCategoryStr.c_str()).ToLocalChecked());
}

// Getters
Expand Down Expand Up @@ -356,7 +357,7 @@ extern V8Class v8AudioCategory("AudioCategory",
[](v8::Local<v8::FunctionTemplate> tpl)
{
v8::Isolate* isolate = v8::Isolate::GetCurrent();
tpl->InstanceTemplate()->SetInternalFieldCount(1);
tpl->InstanceTemplate()->SetInternalFieldCount(static_cast<int>(V8Class::InternalFields::COUNT));

V8Helpers::SetStaticMethod(isolate, tpl, "getForName", &GetForName);

Expand Down
2 changes: 1 addition & 1 deletion client/src/bindings/AudioOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static void AllAudioOutputGetter(v8::Local<v8::String> name, const v8::PropertyC
{
V8_GET_ISOLATE_CONTEXT_RESOURCE();

V8_RETURN(resource->GetAllAudioOutputs()->Clone());
V8_RETURN(resource->GetAllAudioOutputs());
}

static void AudioOutputCountGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
Expand Down
9 changes: 7 additions & 2 deletions client/src/bindings/FocusData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ static void OverrideFocus(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_GET_ISOLATE_CONTEXT_RESOURCE();
V8_CHECK_ARGS_LEN2(1, 2);

if(resource->IsVector3(info[0]))

auto cls = V8Class::ObjectClass::NONE;
if(info[0]->IsObject())
cls = V8Helpers::GetObjectClass(info[0].As<v8::Object>());

if(cls == V8Class::ObjectClass::VECTOR3)
{
V8_ARG_TO_VECTOR3(1, pos);
alt::Vector3f offset = { 0, 0, 0 };
Expand All @@ -42,7 +47,7 @@ static void OverrideFocus(const v8::FunctionCallbackInfo<v8::Value>& info)
}
alt::ICore::Instance().OverrideFocusPosition(pos, offset);
}
else if(resource->IsBaseObject(info[0]))
else if(cls == V8Class::ObjectClass::BASE_OBJECT)
{
V8_ARG_TO_BASE_OBJECT(1, entity, alt::IEntity, "Entity");
alt::ICore::Instance().OverrideFocusEntity(entity);
Expand Down
5 changes: 3 additions & 2 deletions client/src/bindings/Handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ static void Constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_CHECK_ARGS_LEN(1);
V8_ARG_TO_OBJECT(1, vehicle);

info.This()->SetInternalField(0, vehicle);
V8Helpers::SetObjectClass(info.GetIsolate(), info.This(), V8Class::ObjectClass::HANDLING);
info.This()->SetInternalField(1, vehicle);
}

static void IsModified(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -1213,7 +1214,7 @@ extern V8Class v8Handling("Handling", Constructor, [](v8::Local<v8::FunctionTemp

v8::Local<v8::ObjectTemplate> proto = tpl->PrototypeTemplate();

tpl->InstanceTemplate()->SetInternalFieldCount(1);
tpl->InstanceTemplate()->SetInternalFieldCount(static_cast<int>(V8Class::InternalFields::COUNT));

V8Helpers::SetMethod(isolate, tpl, "isModified", &IsModified);
V8Helpers::SetMethod(isolate, tpl, "reset", &Reset);
Expand Down
8 changes: 5 additions & 3 deletions client/src/bindings/HandlingData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ static void Constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
auto handling = alt::ICore::Instance().GetHandlingData(modelHash);
V8_CHECK(handling, "model doesn't exist");

info.This()->SetInternalField(0, info[0]);

V8Helpers::SetObjectClass(info.GetIsolate(), info.This(), V8Class::ObjectClass::HANDLING_DATA);
info.This()->SetInternalField(1, info[0]);
}

static void GetForHandlingName(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down Expand Up @@ -1731,8 +1733,8 @@ static void DamageFlagsSetter(v8::Local<v8::String>, v8::Local<v8::Value> val, c

extern V8Class v8HandlingData("HandlingData", Constructor, [](v8::Local<v8::FunctionTemplate> tpl) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();

tpl->InstanceTemplate()->SetInternalFieldCount(1);
tpl->InstanceTemplate()->SetInternalFieldCount(static_cast<int>(V8Class::InternalFields::COUNT));

V8Helpers::SetStaticMethod(isolate, tpl, "getForHandlingName", &GetForHandlingName);

Expand Down
20 changes: 10 additions & 10 deletions client/src/bindings/HttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static void GetExtraHeaders(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = dict->Begin(); it != dict->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}

V8_RETURN(headers);
Expand Down Expand Up @@ -71,7 +71,7 @@ static void Get(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = response.headers->Begin(); it != response.headers->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}
responseObj->Set(ctx, V8Helpers::JSValue("headers"), headers);
resolver->Resolve(resolver->GetCreationContext().ToLocalChecked(), responseObj);
Expand Down Expand Up @@ -114,7 +114,7 @@ static void Head(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = response.headers->Begin(); it != response.headers->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}
responseObj->Set(ctx, V8Helpers::JSValue("headers"), headers);
resolver->Resolve(resolver->GetCreationContext().ToLocalChecked(), responseObj);
Expand Down Expand Up @@ -158,7 +158,7 @@ static void Post(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = response.headers->Begin(); it != response.headers->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}
responseObj->Set(ctx, V8Helpers::JSValue("headers"), headers);
resolver->Resolve(resolver->GetCreationContext().ToLocalChecked(), responseObj);
Expand Down Expand Up @@ -202,7 +202,7 @@ static void Put(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = response.headers->Begin(); it != response.headers->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}
responseObj->Set(ctx, V8Helpers::JSValue("headers"), headers);
resolver->Resolve(resolver->GetCreationContext().ToLocalChecked(), responseObj);
Expand Down Expand Up @@ -246,7 +246,7 @@ static void Delete(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = response.headers->Begin(); it != response.headers->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}
responseObj->Set(ctx, V8Helpers::JSValue("headers"), headers);
resolver->Resolve(resolver->GetCreationContext().ToLocalChecked(), responseObj);
Expand Down Expand Up @@ -290,7 +290,7 @@ static void Connect(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = response.headers->Begin(); it != response.headers->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}
responseObj->Set(ctx, V8Helpers::JSValue("headers"), headers);
resolver->Resolve(resolver->GetCreationContext().ToLocalChecked(), responseObj);
Expand Down Expand Up @@ -334,7 +334,7 @@ static void Options(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = response.headers->Begin(); it != response.headers->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}
responseObj->Set(ctx, V8Helpers::JSValue("headers"), headers);
resolver->Resolve(resolver->GetCreationContext().ToLocalChecked(), responseObj);
Expand Down Expand Up @@ -378,7 +378,7 @@ static void Trace(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = response.headers->Begin(); it != response.headers->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}
responseObj->Set(ctx, V8Helpers::JSValue("headers"), headers);
resolver->Resolve(resolver->GetCreationContext().ToLocalChecked(), responseObj);
Expand Down Expand Up @@ -422,7 +422,7 @@ static void Patch(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_NEW_OBJECT(headers);
for(auto it = response.headers->Begin(); it != response.headers->End(); ++it)
{
headers->Set(ctx, V8Helpers::JSValue(it->first.c_str()), V8Helpers::JSValue(std::dynamic_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
headers->Set(ctx, V8Helpers::JSValue(it->first), V8Helpers::JSValue(std::static_pointer_cast<const alt::IMValueString>(it->second)->Value().c_str()));
}
responseObj->Set(ctx, V8Helpers::JSValue("headers"), headers);
resolver->Resolve(resolver->GetCreationContext().ToLocalChecked(), responseObj);
Expand Down
8 changes: 5 additions & 3 deletions client/src/bindings/MapZoomData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ static void Constructor(const v8::FunctionCallbackInfo<v8::Value>& info)

V8_CHECK(info[0]->IsNumber() || info[0]->IsString(), "zoomDataId must be a number or string");


V8Helpers::SetObjectClass(info.GetIsolate(), info.This(), V8Class::ObjectClass::MAP_ZOOM_DATA);
if(info[0]->IsNumber())
{
V8_ARG_TO_UINT(1, zoomDataId);
auto data = alt::ICore::Instance().GetMapData(zoomDataId);
V8_CHECK(data, "zoomData with this id not found");

info.This()->SetInternalField(0, info[0]);
info.This()->SetInternalField(1, info[0]);
}
else
{
Expand All @@ -28,7 +30,7 @@ static void Constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_CHECK(data, "zoomData with this id not found");

uint8_t id = alt::ICore::Instance().GetMapDataIDFromAlias(zoomDataAlias);
info.This()->SetInternalField(0, V8Helpers::JSValue(id));
info.This()->SetInternalField(1, V8Helpers::JSValue(id));
}
}

Expand Down Expand Up @@ -176,7 +178,7 @@ extern V8Class v8MapZoomData("MapZoomData", Constructor, [](v8::Local<v8::Functi

v8::Local<v8::ObjectTemplate> proto = tpl->PrototypeTemplate();

tpl->InstanceTemplate()->SetInternalFieldCount(1);
tpl->InstanceTemplate()->SetInternalFieldCount(static_cast<int>(V8Class::InternalFields::COUNT));

V8Helpers::SetStaticMethod(isolate, tpl, "get", &Get);
V8Helpers::SetStaticMethod(isolate, tpl, "resetAll", &ResetAll);
Expand Down
12 changes: 7 additions & 5 deletions client/src/bindings/MemoryBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ static void Constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_CHECK_CONSTRUCTOR();
V8_CHECK_ARGS_LEN(1);

V8Helpers::SetObjectClass(info.GetIsolate(), info.This(), V8Class::ObjectClass::MEMORY_BUFFER);

// Ask alt:V to add pattern searching to C++ SDK if you want this available
// if(info[0]->IsString())
// {
Expand All @@ -38,16 +40,16 @@ static void Constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
V8_ARG_TO_UINT(1, size);
if(size == 0)
{
info.This()->SetAlignedPointerInInternalField(0, nullptr);
info.This()->SetInternalField(1, V8Helpers::JSValue(0));
info.This()->SetAlignedPointerInInternalField(1, nullptr);
info.This()->SetInternalField(2, V8Helpers::JSValue(0));
return;
}
V8_CHECK(size <= 1024, "You can't allocate > 1KB");

uint8_t* allocatedMemory = new uint8_t[size];
memset(allocatedMemory, 0, size);
info.This()->SetAlignedPointerInInternalField(0, allocatedMemory);
info.This()->SetInternalField(1, V8Helpers::JSValue(size));
info.This()->SetAlignedPointerInInternalField(1, allocatedMemory);
info.This()->SetInternalField(2, V8Helpers::JSValue(size));
}

/*v8::Global<v8::Object> persistent(isolate, info.This());
Expand Down Expand Up @@ -170,7 +172,7 @@ static void GetDataOfType(const v8::FunctionCallbackInfo<v8::Value>& info)
extern V8Class v8MemoryBuffer("MemoryBuffer", Constructor, [](v8::Local<v8::FunctionTemplate> tpl) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();

tpl->InstanceTemplate()->SetInternalFieldCount(2);
tpl->InstanceTemplate()->SetInternalFieldCount(3);

V8Helpers::SetAccessor(isolate, tpl, "size", SizeGetter);
V8Helpers::SetAccessor(isolate, tpl, "address", AddressGetter);
Expand Down
18 changes: 18 additions & 0 deletions client/src/bindings/Object.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "V8Helpers.h"
#include "helpers/BindHelpers.h"
#include "../CV8ScriptRuntime.h"

static void AllGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
Expand All @@ -25,6 +26,22 @@ static void CountGetter(v8::Local<v8::String> name, const v8::PropertyCallbackIn
V8_RETURN_UINT(alt::ICore::Instance().GetBaseObjects(alt::IBaseObject::Type::OBJECT).size());
}

static void StreamedInGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
V8_GET_ISOLATE_CONTEXT_RESOURCE();

auto streamedIn = CV8ScriptRuntime::Instance().GetStreamedInObjects();
auto arr = v8::Array::New(isolate, streamedIn.size());
int i = 0;
for(auto kv : streamedIn)
{
arr->Set(ctx, i, resource->GetOrCreateEntity(kv.second, "Object")->GetJSVal(isolate));
i++;
}

V8_RETURN(arr);
}

static void StaticGetByScriptID(const v8::FunctionCallbackInfo<v8::Value>& info)
{
V8_GET_ISOLATE_CONTEXT_RESOURCE();
Expand Down Expand Up @@ -94,6 +111,7 @@ extern V8Class v8Object("Object", v8Entity, [](v8::Local<v8::FunctionTemplate> t

V8Helpers::SetStaticAccessor(isolate, tpl, "all", &AllGetter);
V8Helpers::SetStaticAccessor(isolate, tpl, "count", &CountGetter);
V8Helpers::SetStaticAccessor(isolate, tpl, "streamedIn", &StreamedInGetter);

V8Helpers::SetAccessor<alt::IObject, uint8_t, &alt::IObject::GetAlpha>(isolate, tpl, "alpha");
V8Helpers::SetAccessor<alt::IObject, uint8_t, &alt::IObject::GetTextureVariation>(isolate, tpl, "textureVariation");
Expand Down
2 changes: 1 addition & 1 deletion client/src/bindings/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static void AllGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo
{
V8_GET_ISOLATE_CONTEXT_RESOURCE();

V8_RETURN(resource->GetAllPlayers()->Clone());
V8_RETURN(resource->GetAllPlayers());
}

static void CountGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
Expand Down
Loading

0 comments on commit 839e290

Please sign in to comment.