Skip to content

Commit

Permalink
server: Add isEntityInStreamRange overload with entity id
Browse files Browse the repository at this point in the history
Former-commit-id: 46d2cad
  • Loading branch information
LeonMrBonnie committed Jan 4, 2022
1 parent 9b2baed commit 3a5970e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions server/src/bindings/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,16 @@ static void IsEntityInStreamRange(const v8::FunctionCallbackInfo<v8::Value>& inf
V8_CHECK_ARGS_LEN(1);
V8_GET_THIS_BASE_OBJECT(player, IPlayer);

V8_ARG_TO_BASE_OBJECT(1, entity, IEntity, "Entity");

V8_RETURN_BOOLEAN(player->IsEntityInStreamingRange(entity));
if(info[0]->IsNumber())
{
V8_ARG_TO_UINT(1, entity);
V8_RETURN_BOOLEAN(player->IsEntityInStreamingRange(entity));
}
else
{
V8_ARG_TO_BASE_OBJECT(1, entity, IEntity, "Entity");
V8_RETURN_BOOLEAN(player->IsEntityInStreamingRange(entity));
}
}

static void SetIntoVehicle(const v8::FunctionCallbackInfo<v8::Value>& info)
Expand Down

0 comments on commit 3a5970e

Please sign in to comment.