• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Library] 3DTryg
#10
Update v5.3.0:



- Added definitions:

Code:
WEAPON_DYNAMIC_EXPLOSION_DMG - Cast3D::ExplosionDMG

WEAPON_DYNAMIC_EXPLOSION_RANGE - Cast3D::ExplosionRangeDMG

TRYG3D_MAX_AREA_CHECK - define area check limit when using Vehicle/Player/Actor collision



TRYG3D_COLLISION_FLAG_NONE

TRYG3D_COLLISION_FLAG_OBJECT

TRYG3D_COLLISION_FLAG_VEHICLE

TRYG3D_COLLISION_FLAG_PLAYER

TRYG3D_COLLISION_FLAG_ACTOR

TRYG3D_COLLISION_FLAG_ALL



- Added compiler options

Code:
ENABLE_3D_TRYG_VEHICLECOL //Use before 3DTryg.inc for enable VehicleCollision Module

ENABLE_3D_TRYG_PLAYERCOL? ? ? ? //Use before 3DTryg.inc for enable PlayerCollision Module

ENABLE_3D_TRYG_ACTORCOL? ? ? ? //Use before 3DTryg.inc for enable ActorCollision Module



- Renamed functions:

Code:
CreateDynamicExplosion -> Cast3D::Explosion

CreateDynamicExplosionDMG -> Cast3D::ExplosionDMG

SendFakeDamageInRadius -> Cast3D::Damage

SendGravityInRadius -> Cast3D::Gravity



- Added functions:

Code:
bool:IsPolygonClosed(const Float:points[],maxpoints = sizeof(points));

bool:IsValidPolygon(const Float:points[],maxpoints = sizeof(points));



//Created by $continue$, Nero_3D (It can work outside the cylinder, use GetDistanceFromPointToLine if you need check only in cylinder)

Float:GetDistanceFromPointToLineEx(Float:px,Float:py,Float:pz,Float:sX,Float:sY,Float:sZ,Float:eX,Float:eY,Float:eZ,&Float:iX=0.0,&Float:iY=0.0,&Float:iZ=0.0);



//Created by $continue$

GetNearest2DPointOnPolygon(const Float:polygon_points[],Float:x,Float:y,&Float:tx,&Float:ty,maxpoints = sizeof(polygon_points));



Cast3D::ExplosionRangeDMG(Float:x,Float:y,Float:z,type,Float:radius,worldid = -1,interiorid = -1,playerid = -1,Float:distance = 200.0,Float:min_damage=10.0,Float:max_damage=82.5,Float:min_vehicle_damage=50.0,Float:max_vehicle_damage=250.0,byplayerid=INVALID_PLAYER_ID,ignore_vehicle = INVALID_VEHICLE_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_NONE);



Tryg3D::GetOrientation(Float:angle);

Tryg3D::GetOrientationName(orientation_name[],Float:angle,bool:as_compass=false,maxdest = sizeof(orientation_name));



- Added ColAndreas functions:

Code:
//example: collision_flags = TRYG3D_COLLISION_FLAG_OBJECT  TRYG3D_COLLISION_FLAG_VEHICLE

Tryg3D::CollisionCheck(Float:StartX,Float:StartY,Float:StartZ,Float:EndX,Float:EndY,Float:EndZ,&Float:x,&Float:y,&Float:z,&Item3D_Type:item_type=Item3D_Type:0,&element_id=0,Float:cut_size=0.0,ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_ALL);



Item::CollisionToPoint(Float:x,Float:y,Float:z,TRYG3D_ELEMENT_TAG:targetid,Item3D_Type:target_type,ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_ALL);

Item::CollisionToItem(TRYG3D_ELEMENT_TAG:elementid,Item3D_Type:element_type,TRYG3D_ELEMENT_TAG:targetid,Item3D_Type:target_type,ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_ALL);



- Updated functions:

Code:
Random::PointInPolygon(const Float:points[],&Float:tx,&Float:ty,maxpoints = sizeof(points), max_iterations = 10000); //return -1 if polygon is invalid or iteration limit exceeded



// added collision params

Cast3D::ExplosionDMG(Float:x,Float:y,Float:z,type,Float:radius,worldid = -1,interiorid = -1,playerid = -1,Float:distance = 200.0,Float:damage=82.5,Float:vehicle_damage=82.5,byplayerid=INVALID_PLAYER_ID,ignore_vehicle = INVALID_VEHICLE_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_NONE);



//syntax changed, now return collision objectid

UndergroundFindZ(Float:x,Float:y,&Float:z);



//syntax changed, now return collision objectid

InteriorFindZ(Float:px,Float:py,Float:pz,Float:size=2.0,&Float:z=0.0);



//return number of points

GetArcPoints3D(...);



//removed testLOS and veh_col arguments, added new collision engine support (default dont check collisions), function may be used without ColAndreas

Item::InRangeOfPoint(Float:x,Float:y,Float:z,Float:range,TRYG3D_ELEMENT_TAG:targetid,Item3D_Type:target_type=item_player,ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_NONE);

Item::IsPlayerInRange(playerid,Float:range,targetid,Item3D_Type:target_type=item_player,ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_NONE);

Item::InRangeOfItem(elementid,Item3D_Type:element_type,Float:range,targetid,Item3D_Type:target_type=item_player,ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_NONE);

Area::PointInSphericalSectorEx(Float:px,Float:py,Float:pz,Float:x,Float:y,Float:z,Float:rx,Float:rz,Float:radius,Float:vrx,Float:vrz,ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_OBJECT);

Item::OnPlayerScreen(playerid,targetid,Item3D_Type:target_type=item_player,element_orientation:orientation=o_front,Float:rx=INVALID_ROTATION,Float:rz=INVALID_ROTATION,Float:vrx=VERTICAL_CAMERA_RADIUS,Float:vrz=HORIZONTAL_CAMERA_RADIUS,bool:testVW=true,ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_OBJECT);

Item::OnFakeScreen(Float:x,Float:y,Float:z,targetid,Item3D_Type:target_type,Float:rx,Float:rz,Float:vrx=VERTICAL_CAMERA_RADIUS,Float:vrz=HORIZONTAL_CAMERA_RADIUS,ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_OBJECT);

CatchItems::SphericalSectorEx(Float:x,Float:y,Float:z,Float:rx,Float:rz,Float:radius,Float:vrx,Float:vrz,Item3D_Type:element_type,element_list[],ignore_vehicle = INVALID_VEHICLE_ID,ignore_player = INVALID_PLAYER_ID,ignore_actor = INVALID_ACTOR_ID,collision_flags = TRYG3D_COLLISION_FLAG_OBJECT,worldid = -1,interiorid = -1,max_element=sizeof(element_list));



- Added PlayerCollision Functions:

Code:
IsPlayerCollisionEnabled();

Tryg3D::InitPlayerCollision(); //OnGameModeInit / OnFilterScriptInit

Tryg3D::ExitPlayerCollision();

Tryg3D::SyncPlayerCollision(playerid); //auto called after player spawn

IsToggledPlayerCollision(playerid);

TogglePlayerCollision(playerid,bool:toggle);



- Added ActorCollision Functions:

Code:
IsActorCollisionEnabled();

Tryg3D::InitActorCollision(); //OnGameModeInit / OnFilterScriptInit

Tryg3D::ExitActorCollision();

Tryg3D::SyncActorCollision(actorid); //Must be call after create/change actor position

IsToggledActorCollision(actorid);

ToggleActorCollision(actorid,bool:toggle);



- Added polygon validations



- Added auto closing polygons in functions



- Removed compiler options:

Code:
DISABLE_3D_TRYG_VEHICLECOL



- Fixed collision sync after init



- Fixed functions:

Code:
Draw3D::Cube2D - bad distance betwen vertical points



- Marked functions as deprecated:

Code:
MovePointColWithVehicle? ? ? ? -> Tryg3D::CollisionCheck

MovePointColWithVehicleCut? ? -> Tryg3D::CollisionCheck

Item::ToPointIsVeh? ? ? ? ? ? -> Item::CollisionToPoint

Item::ToItemIsVeh? ? ? ? ? ? ? -> Item::CollisionToItem



- Removed deprecated macros:

Code:
GetArcPointsFloor2D

GetArcPointsCellar2D

GetArcPointsLarboard2D

GetArcPointsStarboard2D

GetArcPointsFloor3D

GetArcPointsCellar3D

GetArcPointsStarboard3D

GetArcPointsLarboard3D

IsPlayerInCircularSector

IsPlayerInCube3D

IsPlayerInEllipse

IsPlayerInEllipticalCylinder2D

IsPlayerInSphericalSector

IsPlayerInCylinder3D

IsPlayerInCylinder2D

IsObjectInRangeOfPoint

GetObjectDistanceFromPoint

IsDynamicObjectInRangeOfPoint

IsDynamicActorInRangeOfPoint



- Updated library compatibility (need redownload if you use):

Code:
EVF.inc

ExtendedGrenade.inc

Mines.inc

Missile.inc

Missions.inc

VehicleMissileCol.inc
  Reply


Messages In This Thread
3DTryg - by AbyssMorgan - 2021-04-18, 07:24 AM
RE: 3DTryg - by Pinch - 2021-04-18, 02:48 PM
RE: 3DTryg - by AbyssMorgan - 2021-05-01, 01:24 PM
RE: 3DTryg - by AbyssMorgan - 2021-05-05, 07:52 PM
RE: 3DTryg - by Radical - 2021-05-25, 11:18 PM
RE: 3DTryg - by AbyssMorgan - 2021-05-26, 03:28 PM
RE: 3DTryg - by Radical - 2021-05-30, 09:28 PM
RE: 3DTryg - by AbyssMorgan - 2021-06-03, 06:14 AM
RE: 3DTryg - by AbyssMorgan - 2021-09-17, 08:22 PM
RE: 3DTryg - by AbyssMorgan - 2021-09-19, 04:10 PM
RE: 3DTryg - by AbyssMorgan - 2021-10-31, 10:41 AM
RE: 3DTryg - by Salik_Davince - 2022-04-24, 08:05 AM

Forum Jump: