#include <TeleportPoint.h>
Describes target teleportation point of the party.
◆ doTeleport()
void TeleportPoint::doTeleport |
( |
bool |
keepOnZero | ) |
|
Perform teleportation using current valid point. Changes effective party position, speed and camera position. Target map is not used.
- Parameters
-
keepOnZero | Do not change speed/positions if corresponding parameter is set to 0. Does not affect yaw - it never updated if set to -1, and updated on any other value. |
◆ getTeleportMap()
const std::string & TeleportPoint::getTeleportMap |
( |
| ) |
|
|
inline |
◆ invalidate()
void TeleportPoint::invalidate |
( |
| ) |
|
Mark teleporation point as invalid. Invalid points cannot be used for teleportation.
◆ isValid()
bool TeleportPoint::isValid |
( |
| ) |
|
|
inline |
Checks validity of teleportation point
◆ setTeleportMap()
void TeleportPoint::setTeleportMap |
( |
std::string_view |
mapName | ) |
|
|
inline |
Set target map name for teleportation. Map name is not used by doTeleport function because map loading processing is required in this case. It is used separately in game message processing instead to change current map to previosly prepared one.
- Parameters
-
mapName | Name of the target map. |
◆ setTeleportTarget()
void TeleportPoint::setTeleportTarget |
( |
Vec3f |
pos, |
|
|
int |
yaw, |
|
|
int |
pitch, |
|
|
int |
zSpeed |
|
) |
| |
Set teleportation target within the map. Updates teleportation point validity if any of the set values is not zero (or -1 for yaw).
- Parameters
-
pos | Party position after teleportation. |
yaw | Camera yaw after teleportation, if set to -1 then yaw will not be changed after teleport. |
pitch | Camera pitch after teleportation. |
zSpeed | Vertical velocity of party after teleportation. |
◆ _pitch
int TeleportPoint::_pitch = 0 |
|
private |
◆ _pos
Vec3f TeleportPoint::_pos |
|
private |
◆ _targetMap
std::string TeleportPoint::_targetMap |
|
private |
◆ _teleportValid
bool TeleportPoint::_teleportValid = false |
|
private |
◆ _yaw
int TeleportPoint::_yaw = 0 |
|
private |
◆ _zSpeed
int TeleportPoint::_zSpeed = 0 |
|
private |
The documentation for this class was generated from the following files: