DarkflameUniverse / DarkflameServer

The main repository for the Darkflame Universe Server Emulator project.
https://www.darkflameuniverse.org/
GNU Affero General Public License v3.0
629 stars 171 forks source link

fix: Falling Off Edge in Pet Puzzle #1584

Closed TAHuntling closed 2 months ago

TAHuntling commented 2 months ago

Issue #547 Description: Modified PetComponents.cpp, dNavMesh.cpp and dNavMesh.h to include a new function nearest point which helps to prevent players from falling off a cliff or an edge when taming a pet. It will instead try to keep the player on the nearest navMesh (terrain)

Motivation and Context: Linked issue from EmosewaMC to work on

Type of Changes: Added new function to dNavMesh and its respective includes in dNavMesh.h. Made changes to petcomponent OnUse (which is used to start a player taming pet interaction).

How Has This Been Tested? : Taming a pet, such as the Goat in Forbidden Valley while on the edge of a cliff, which resulted in keeping the player as close to the edge as necessary to prevent them from falling off. This allows (assuming the camera angle and perspective does not get wacky, which is another WIP). Also testing taming pets right next to ledges, which prevents falling through the wall or clipping through the wall as previously reported.