|
OpenGothic
Open source reimplementation of Gothic I and II
|
#include <movealgo.h>
Classes | |
| struct | JumpStatus |
Public Types | |
| enum | MvFlags { NoFlag = 0 , FaiMove = 1 , WaitMove = 1<<1 } |
Public Member Functions | |
| MoveAlgo (Npc &unit) | |
| void | load (Serialize &fin) |
| void | save (Serialize &fout) const |
| void | tick (uint64_t dt, MvFlags fai=NoFlag) |
| void | multSpeed (float s) |
| void | clearSpeed () |
| void | accessDamFly (float dx, float dz) |
| bool | testSlide (const Tempest::Vec3 &p, DynamicWorld::CollisionTest &out, bool cont=false) const |
| bool | startClimb (JumpStatus ani) |
| void | startDive () |
| bool | isFalling () const |
| bool | isSlide () const |
| bool | isInAir () const |
| bool | isJumpup () const |
| bool | isClimb () const |
| bool | isInWater () const |
| bool | isSwim () const |
| bool | isDive () const |
| zenkit::MaterialGroup | groundMaterial () const |
| auto | groundNormal () const -> Tempest::Vec3 |
| auto | portalName () -> std::string_view |
| auto | formerPortalName () -> std::string_view |
| int32_t | diveTime () const |
| float | waterDepthKnee () const |
| float | waterDepthChest () const |
| bool | canFlyOverWater () const |
| bool | checkLastBounce () const |
Static Public Member Functions | |
| static bool | isClose (const Npc &npc, const Npc &p, float dist) |
| static bool | isClose (const Npc &npc, const WayPoint &p) |
| static bool | isClose (const Npc &npc, const WayPoint &p, float dist) |
| static bool | isClose (const Npc &npc, const Tempest::Vec3 &p, float dist) |
Static Public Attributes | |
| static const float | closeToPointThreshold = 40 |
| static const float | climbMove = 55 |
Definition at line 18 of file movealgo.h.
| enum MoveAlgo::MvFlags |
| Enumerator | |
|---|---|
| NoFlag | |
| FaiMove | |
| WaitMove | |
Definition at line 31 of file movealgo.h.
| MoveAlgo::MoveAlgo | ( | Npc & | unit | ) |
Definition at line 15 of file movealgo.cpp.
| void MoveAlgo::accessDamFly | ( | float | dx, |
| float | dz | ||
| ) |
Definition at line 536 of file movealgo.cpp.
| bool MoveAlgo::canFlyOverWater | ( | ) | const |
Definition at line 673 of file movealgo.cpp.
| bool MoveAlgo::checkLastBounce | ( | ) | const |
Definition at line 680 of file movealgo.cpp.
| void MoveAlgo::clearSpeed | ( | ) |
Definition at line 529 of file movealgo.cpp.
| int32_t MoveAlgo::diveTime | ( | ) | const |
Definition at line 703 of file movealgo.cpp.
| std::string_view MoveAlgo::formerPortalName | ( | ) | -> std::string_view |
Definition at line 1093 of file movealgo.cpp.
| zenkit::MaterialGroup MoveAlgo::groundMaterial | ( | ) | const |
Definition at line 1078 of file movealgo.cpp.
| Tempest::Vec3 MoveAlgo::groundNormal | ( | ) | const -> Tempest::Vec3 |
Definition at line 1085 of file movealgo.cpp.
| bool MoveAlgo::isClimb | ( | ) | const |
Definition at line 816 of file movealgo.cpp.
Definition at line 709 of file movealgo.cpp.
|
static |
Definition at line 737 of file movealgo.cpp.
Definition at line 722 of file movealgo.cpp.
Definition at line 729 of file movealgo.cpp.
| bool MoveAlgo::isDive | ( | ) | const |
Definition at line 828 of file movealgo.cpp.
| bool MoveAlgo::isFalling | ( | ) | const |
Definition at line 800 of file movealgo.cpp.
| bool MoveAlgo::isInAir | ( | ) | const |
Definition at line 808 of file movealgo.cpp.
| bool MoveAlgo::isInWater | ( | ) | const |
Definition at line 820 of file movealgo.cpp.
| bool MoveAlgo::isJumpup | ( | ) | const |
Definition at line 812 of file movealgo.cpp.
| bool MoveAlgo::isSlide | ( | ) | const |
Definition at line 804 of file movealgo.cpp.
| bool MoveAlgo::isSwim | ( | ) | const |
Definition at line 824 of file movealgo.cpp.
| void MoveAlgo::load | ( | Serialize & | fin | ) |
Definition at line 19 of file movealgo.cpp.
|
inline |
Definition at line 47 of file movealgo.h.
| std::string_view MoveAlgo::portalName | ( | ) | -> std::string_view |
Definition at line 1089 of file movealgo.cpp.
| void MoveAlgo::save | ( | Serialize & | fout | ) | const |
Definition at line 33 of file movealgo.cpp.
| bool MoveAlgo::startClimb | ( | JumpStatus | ani | ) |
Definition at line 746 of file movealgo.cpp.
| void MoveAlgo::startDive | ( | ) |
Definition at line 786 of file movealgo.cpp.
| bool MoveAlgo::testSlide | ( | const Tempest::Vec3 & | p, |
| DynamicWorld::CollisionTest & | out, | ||
| bool | cont = false |
||
| ) | const |
Definition at line 620 of file movealgo.cpp.
Definition at line 441 of file movealgo.cpp.
| float MoveAlgo::waterDepthChest | ( | ) | const |
Definition at line 668 of file movealgo.cpp.
| float MoveAlgo::waterDepthKnee | ( | ) | const |
Definition at line 663 of file movealgo.cpp.
|
static |
Definition at line 21 of file movealgo.h.
|
static |
Definition at line 20 of file movealgo.h.