1.5 [260731a]
- Исправлен баг с
runtime error, возникавший в функциях при необъявленном алиасеm_atan2; - Изменены и частично оптимизированы функции
CallEntityInZoneиGetAllEntities. Теперь вCallEntityInZoneможно указать сбор всех объектов в зоне или передать функцию-фильтр I3D. Также заменена кубическая зона захвата на сферическую:
Class I3D
{
[M] Objects CallEntityInZone( CVector pos, float ZoneSize, bool GetsIntoCamera, bool GetAllEntitiesAgain, bool AnythingInZone or function Condition, any FunctionConditionArgument )
/* Возвращает объект(ы), что находится в желаемой точке:
CVector pos = CVector точки, позиция камеры если nil;
float ZoneSize = размер зоны у точки, в которой может быть объект (в метрах);
bool GetsIntoCamera = захватывает только объекты, что могут быть спереди камеры если true;
Получит объекты карты снова, если GetAllEntitiesAgain = true;
Передайте AnythingInZone = true, чтобы функция вернула все найденные объекты
или функцию Condition для настройки фильтра
например [I3D.IsVehicleWithBelong] и аргумент для нее FunctionConditionArgument, например [1004].
Примеры:
local objects = I3D:CallEntityInZone(GetCameraPos(), 5, true, false, I3D.IsVehicleWithBelong, 1004)
local obj = I3D:CallEntityInZone(CVector(627, 228, -627), 10, true, true) */
}- Добавлены функции-фильтры для
CallEntityInZone. Вы можете аналогично добавить свои:
Class I3D
{
[M] bool IsVehicle( object )
[M] bool IsVehicleWithName( object, string Name )
[M] bool IsVehicleWithBelong( object, int Belong )
[M] bool IsVehicleWithPrototype( object, string Prototype )
}- Изменена функция
GetCameraPosLinked. Теперь она может вывести результат в .log игры для копирования; - Добавлены локальные функции для
pcallпод userdata объекты; - Изменен ReadMe.
Благодарность Rusya_27 и Varisane за обратную связь и выявление багов!
Click here for view text of the update is in English
- Fixed
runtime errorbug with the occurred in functions with an undeclared aliasm_atan2; - The functions
CallEntityInZoneandGetAllEntitieshave been changed and partially optimized. Now in theCallEntityInZoneyou can specify the collection of all objects in the zone or pass the I3D filter function. The cubic capture zone has also been replaced with a spherical one:
Class I3D
{
[M] Objects CallEntityInZone( CVector pos, float ZoneSize, bool GetsIntoCamera, bool GetAllEntitiesAgain, bool AnythingInZone or function Condition, any FunctionConditionArgument )
/* Returns the object(s) that is located at the desired point:
CVector pos = CVector of the point, camera position if nil;
float ZoneSize = the size of the zone at the point where the object can be located (in meters);
bool GetsIntoCamera = captures only objects that can be in front of the camera if true;
Will get the map objects again if GetAllEntitiesAgain = true;
Pass AnythingInZone = true so that the function returns all found objects.
or the Condition function for configuring the filter
for example [I3D.IsVehicleWithBelong] and the argument for it is FunctionConditionArgument, for example [1004].
Examples:
local objects = I3D:CallEntityInZone(GetCameraPos(), 5, true, false, I3D.IsVehicleWithBelong, 1004)
local obj = I3D:CallEntityInZone(CVector(627, 228, -627), 10, true, true) */
}- Added filter functions for
CallEntityInZone. You can similarly add your own:
Class I3D
{
[M] bool IsVehicle( object )
[M] bool IsVehicleWithName( object, string Name )
[M] bool IsVehicleWithBelong( object, int Belong )
[M] bool IsVehicleWithPrototype( object, string Prototype )
}- The
GetCameraPosLinkedfunction has been changed. Now she can output the result to the game's .log for copying; - Added local functions for
pcallunder userdata objects; - Edited ReadMe.
Thanks Rusya_27 and Varisane for feedback and bug detection!