mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
Some checks failed
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Has been cancelled
35 lines
927 B
C++
35 lines
927 B
C++
#include "object/movement/CPassenger.hpp"
|
|
#include <tempest/Matrix.hpp>
|
|
|
|
float CPassenger::GetFacing() const {
|
|
return this->GetFacing(this->m_facing);
|
|
}
|
|
|
|
float CPassenger::GetFacing(float facing) const {
|
|
// If on transport, transform facing by transport facing
|
|
if (this->m_transportGUID) {
|
|
float transportFacing = 0.0f;
|
|
// TODO MovementGetTransportFacing(this->m_transportGUID);
|
|
|
|
return facing + transportFacing;
|
|
}
|
|
|
|
return facing;
|
|
}
|
|
|
|
C3Vector CPassenger::GetPosition() const {
|
|
return this->GetPosition(this->m_position);
|
|
}
|
|
|
|
C3Vector CPassenger::GetPosition(const C3Vector& position) const {
|
|
// If on transport, transform position by transport matrix
|
|
if (this->m_transportGUID) {
|
|
C44Matrix transportMatrix;
|
|
// TODO MovementGetTransportMtxX(this->m_transportGUID, &transportMatrix);
|
|
|
|
return position * transportMatrix;
|
|
}
|
|
|
|
return position;
|
|
}
|