Skip to content

1.5 [260731a]

Choose a tag to compare

@ejetaxeblevich ejetaxeblevich released this 30 Jul 22:57
  • Исправлен баг с 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 error bug with the occurred in functions with an undeclared alias m_atan2;
  • The functions CallEntityInZone and GetAllEntities have been changed and partially optimized. Now in the CallEntityInZone you 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 GetCameraPosLinked function has been changed. Now she can output the result to the game's .log for copying;
  • Added local functions for pcall under userdata objects;
  • Edited ReadMe.

Thanks Rusya_27 and Varisane for feedback and bug detection!