#include <VehicleAI.h>
Definition at line 61 of file VehicleAI.h.
◆ VehicleAI()
◆ ~VehicleAI()
VehicleAI::~VehicleAI |
( |
| ) |
|
|
overridevirtual |
◆ addEvent()
void VehicleAI::addEvent |
( |
std::string const & |
id, |
|
|
int |
ev |
|
) |
| |
Adds a event.
- Parameters
-
id | The waypoint ID. |
ev | The ID of the event. |
- See also
- Ai_events
Definition at line 127 of file VehicleAI.cpp.
◆ addWaypoint()
void VehicleAI::addWaypoint |
( |
std::string const & |
id, |
|
|
Ogre::Vector3 const & |
point |
|
) |
| |
Adds one waypoint.
- Parameters
-
[in] | id | The waypoint ID. |
[in] | point | The coordinates of the waypoint. |
Definition at line 63 of file VehicleAI.cpp.
◆ addWaypoints()
void VehicleAI::addWaypoints |
( |
AngelScript::CScriptDictionary & |
d | ) |
|
Adds a dictionary with waypoints.
- Parameters
-
d | Dictionary with waypoints (string ID -> vector3 pos) |
Definition at line 74 of file VehicleAI.cpp.
◆ getTranslation()
Ogre::Vector3 VehicleAI::getTranslation |
( |
int |
offset, |
|
|
unsigned int |
wp |
|
) |
| |
Gets offset translation based on vehicle rotation and waypoints.
- Parameters
-
offset | The offset. |
wp | The waypoint. |
Definition at line 85 of file VehicleAI.cpp.
◆ isActive()
bool VehicleAI::isActive |
( |
| ) |
|
Returns the status of the AI.
- Returns
- True if the AI is driving
Definition at line 58 of file VehicleAI.cpp.
◆ setActive()
void VehicleAI::setActive |
( |
bool |
value | ) |
|
Activates/Deactivates the AI.
- Parameters
-
[in] | value | Activate or deactivation the AI |
Definition at line 52 of file VehicleAI.cpp.
◆ setValueAtWaypoint()
void VehicleAI::setValueAtWaypoint |
( |
std::string const & |
id, |
|
|
int |
value_id, |
|
|
float |
value |
|
) |
| |
Sets a value at a waypoint.
- Parameters
-
id | The waypoint ID. |
value_id | The ID of the value that will be set. |
value | The value itself. |
- See also
- Ai_values
Definition at line 134 of file VehicleAI.cpp.
◆ update()
void VehicleAI::update |
( |
float |
dt, |
|
|
int |
doUpdate |
|
) |
| |
◆ updateWaypoint()
void VehicleAI::updateWaypoint |
( |
| ) |
|
|
private |
◆ acc_power
float RoR::VehicleAI::acc_power = 0.8 |
|
private |
◆ beam
The verhicle the AI is driving.
Definition at line 141 of file VehicleAI.h.
◆ current_waypoint
Ogre::Vector3 RoR::VehicleAI::current_waypoint = Ogre::Vector3::ZERO |
|
private |
The coordinates of the waypoint that the AI is driving to.
Definition at line 143 of file VehicleAI.h.
◆ current_waypoint_id
int RoR::VehicleAI::current_waypoint_id = 0 |
|
private |
The coordinates of the next waypoint.
The curent waypoint ID.
Definition at line 146 of file VehicleAI.h.
◆ free_waypoints
int RoR::VehicleAI::free_waypoints = 0 |
|
private |
◆ hold
bool RoR::VehicleAI::hold = false |
|
private |
◆ init_y
float RoR::VehicleAI::init_y = 0 |
|
private |
◆ is_enabled
bool RoR::VehicleAI::is_enabled = false |
|
private |
True if the AI is driving.
Definition at line 142 of file VehicleAI.h.
◆ is_waiting
bool RoR::VehicleAI::is_waiting =false |
|
private |
◆ last_waypoint
bool RoR::VehicleAI::last_waypoint = false |
|
private |
◆ maxspeed
float RoR::VehicleAI::maxspeed = 50 |
|
private |
(KM/H) The max speed the AI is allowed to drive.
Definition at line 140 of file VehicleAI.h.
◆ next_waypoint
Ogre::Vector3 RoR::VehicleAI::next_waypoint = Ogre::Vector3::ZERO |
|
private |
The coordinates of the previous waypoint.
Definition at line 145 of file VehicleAI.h.
◆ prev_waypoint
Ogre::Vector3 RoR::VehicleAI::prev_waypoint = Ogre::Vector3::ZERO |
|
private |
◆ wait_time
float RoR::VehicleAI::wait_time =0.f |
|
private |
(seconds) The amount of time the AI has to wait.
Definition at line 138 of file VehicleAI.h.
◆ waypoint_events
std::map<int, int> RoR::VehicleAI::waypoint_events |
|
private |
Map with all waypoint events.
Definition at line 150 of file VehicleAI.h.
◆ waypoint_ids
std::map<std::string, int> RoR::VehicleAI::waypoint_ids |
|
private |
Map with all waypoint IDs.
Definition at line 148 of file VehicleAI.h.
◆ waypoint_names
std::map<int, std::string> RoR::VehicleAI::waypoint_names |
|
private |
Map with all waypoint names.
Definition at line 149 of file VehicleAI.h.
◆ waypoint_power
std::map<int, float> RoR::VehicleAI::waypoint_power |
|
private |
Map with all waypoint engine power.
Definition at line 152 of file VehicleAI.h.
◆ waypoint_speed
std::map<Ogre::String, float> RoR::VehicleAI::waypoint_speed |
|
private |
Map with all waypoint speeds.
Definition at line 151 of file VehicleAI.h.
◆ waypoint_wait_time
std::map<int, float> RoR::VehicleAI::waypoint_wait_time |
|
private |
Map with all waypoint wait times.
Definition at line 153 of file VehicleAI.h.
◆ waypoints
std::map<int, Ogre::Vector3> RoR::VehicleAI::waypoints |
|
private |
The documentation for this class was generated from the following files: