From 4d2af42bef6e8da4fc358b508cd7a49e10585b7f Mon Sep 17 00:00:00 2001 From: Andrey01 Date: Wed, 26 Jun 2019 18:37:38 +0300 Subject: [PATCH] Update README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 5c7e283..febc9de 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Adds smart different cars (passenger cars, trucks, buses, service). This mod int ## API Documentation ###adv_vehicles.register_vehicle(vehicle_name, vehicle_properties, vehicle_item) +--Registers a vehicle in the game. *vehicle_name* is entity string. *vehicle_properties* is a table with following fields: @@ -16,8 +17,22 @@ Adds smart different cars (passenger cars, trucks, buses, service). This mod int player_eye_offset, is pos table *vehicle_item* is a table with item spawner data. Fields: description, inv_image, craft_recipe. +###adv_vehicles.rotate_point_around_other_point(circle_center_pos, rotating_point_pos, fixed_point_yaw, current_point_yaw) +--This method implements affine transformation of a point *rotating_point_pos* rotation along a circle with *circle_center_pos* center. +*circle_center_pos* is position table. +*rotating_point_pos* is position table. +*fixed_point_yaw* is the last fixed yaw of a vehicle (saving in self.fixed_veh_rotate_angle). +*current_point_yaw* is current yaw of a vehicle. +###adv_vehicles.attach_player_to_veh(player, vehicle, seated, model, animation) +--Attaches a player to the vehicle. + +*player* is PlayerObjectRef. +*vehicle* is ObjectRef. +*seated* is "driver" or "passenger" keys depending on which field in *seats_list* used. +*model* is vehicle model (.b3d format). +*aniamtion* is animation table. *This documentation is in working progress.*