This commit is contained in:
aozhiwei 2023-12-25 14:01:32 +08:00
parent b0d9768b37
commit 4d3412ded8
3 changed files with 7 additions and 0 deletions

View File

@ -3912,4 +3912,9 @@ void Creature::AdjustMobaBornDir()
if (!room->IsMobaModeRoom()) { if (!room->IsMobaModeRoom()) {
return; return;
} }
if (side == 1) {
SetAttackDir(GlmHelper::RIGHT);
} else if(side == 2) {
SetAttackDir(GlmHelper::LEFT);
}
} }

View File

@ -8,6 +8,7 @@
#include "glmhelper.h" #include "glmhelper.h"
const glm::vec3 GlmHelper::ZERO = glm::vec3(0.0f, 0.0f, 0.0f); const glm::vec3 GlmHelper::ZERO = glm::vec3(0.0f, 0.0f, 0.0f);
const glm::vec3 GlmHelper::LEFT = glm::vec3(-1.0f, 0.0f, 0.0f);
const glm::vec3 GlmHelper::RIGHT = glm::vec3(1.0f, 0.0f, 0.0f); const glm::vec3 GlmHelper::RIGHT = glm::vec3(1.0f, 0.0f, 0.0f);
const glm::vec3 GlmHelper::UP = glm::vec3(0.0f, 0.0f, 1.0f); const glm::vec3 GlmHelper::UP = glm::vec3(0.0f, 0.0f, 1.0f);
const glm::vec3 GlmHelper::DONW = glm::vec3(0.0f, 0.0f, -1.0f); const glm::vec3 GlmHelper::DONW = glm::vec3(0.0f, 0.0f, -1.0f);

View File

@ -4,6 +4,7 @@ class GlmHelper
{ {
public: public:
static const glm::vec3 ZERO; static const glm::vec3 ZERO;
static const glm::vec3 LEFT;
static const glm::vec3 RIGHT; static const glm::vec3 RIGHT;
static const glm::vec3 UP; static const glm::vec3 UP;
static const glm::vec3 DONW; static const glm::vec3 DONW;