This commit is contained in:
aozhiwei 2023-03-20 11:25:22 +08:00
parent 2d57d32108
commit 6ec4ffc438

View File

@ -1530,31 +1530,6 @@ void Creature::SummonObstacle(Buff* buff, int id, const Position& target_pos)
float *p_rotate = nullptr; float *p_rotate = nullptr;
float rotate = 0.0f; float rotate = 0.0f;
Position pos = target_pos; Position pos = target_pos;
if (buff->skill_meta) {
switch (buff->skill_meta->GetMagicId()) {
case MAGIC_20601_DJS:
{
if (!GlmHelper::IsZero(GetAttackDir())) {
// 999
#if 1
pos.AddGlmVec3(GetAttackDir() * 100.0f);
#else
pos = target_pos + GetAttackDir() * 100;
#endif
rotate = GlmHelper::CalcAngle(GetAttackDir(), GlmHelper::UP);
if (GetAttackDir().x < 0.00001f) {
rotate = -rotate;
}
p_rotate = &rotate;
}
}
break;
default:
{
}
break;
}
}
RoomObstacle* obstacle = room->CreateObstacle(id, pos.GetX(), pos.GetY(), pos.GetZ()); RoomObstacle* obstacle = room->CreateObstacle(id, pos.GetX(), pos.GetY(), pos.GetZ());
if (obstacle) { if (obstacle) {
obstacle->buff_meta = buff->meta; obstacle->buff_meta = buff->meta;