fix(Script/BlackTemple): teleport position with fatal attraction (#19971)

* fix(Script/BlackTemple): teleport position with fatal attraction

* fix codestyle

* try a new way by keeping a random teleport

* remove the old fixed position

* improve the dest selection

* raycast around the new position for check a valid dest

* fix codestyle

* revert the old changes

* refactor to remove the while loop

* few refactor

* Revert "few refactor"

This reverts commit fb7613d5cc5a19df01bbcf41ef5c982119ee9685.

* .

* add a los check

* new improvement with stairs cases & console errors

* fix disableWarning option

* Update boss_mother_shahraz.cpp

* Update boss_mother_shahraz.cpp

* Update boss_mother_shahraz.cpp

* Update boss_mother_shahraz.cpp

* Update boss_mother_shahraz.cpp
This commit is contained in:
Grimdhex
2024-09-28 10:27:32 +02:00
committed by GitHub
parent c2a0d8cb99
commit 8bf3595cef
3 changed files with 60 additions and 10 deletions

View File

@@ -420,13 +420,13 @@ public:
void GetNearPoint(WorldObject const* searcher, float& x, float& y, float& z, float searcher_size, float distance2d, float absAngle, float controlZ = 0, Position const* startPos = nullptr) const;
void GetVoidClosePoint(float& x, float& y, float& z, float size, float distance2d = 0, float relAngle = 0, float controlZ = 0) const;
bool GetClosePoint(float& x, float& y, float& z, float size, float distance2d = 0, float angle = 0, WorldObject const* forWho = nullptr, bool force = false) const;
void MovePosition(Position& pos, float dist, float angle);
Position GetNearPosition(float dist, float angle);
void MovePosition(Position& pos, float dist, float angle, bool disableWarning = false);
Position GetNearPosition(float dist, float angle, bool disableWarning = false);
void MovePositionToFirstCollision(Position& pos, float dist, float angle);
Position GetFirstCollisionPosition(float startX, float startY, float startZ, float destX, float destY);
Position GetFirstCollisionPosition(float destX, float destY, float destZ);
Position GetFirstCollisionPosition(float dist, float angle);
Position GetRandomNearPosition(float radius);
Position GetRandomNearPosition(float radius, bool disableWarning = false);
void GetContactPoint(WorldObject const* obj, float& x, float& y, float& z, float distance2d = CONTACT_DISTANCE) const;
void GetChargeContactPoint(WorldObject const* obj, float& x, float& y, float& z, float distance2d = CONTACT_DISTANCE) const;