Jettyx 4 Posted December 27, 2020 Share Posted December 27, 2020 Hi, is there any way to disable an object collision ? (like stones, house, etc) Thanks. Link to comment Share on other sites More sharing options...
Contributor Amun 1918 Posted December 28, 2020 Contributor Share Posted December 28, 2020 (edited) Client source, ActorInstanceCollisionDetection.cpp Search for: BOOL CActorInstance::TestActorCollision(CActorInstance& rVictim) Write your conditions inside that function. Example: Disable collision with pets: if (rVictim.GetRace() >= 34001 && rVictim.GetRace() <= 34099) return FALSE; To disable collision with stones, just add another condition with the vnum range of the stones or individually if you only want it disabled for specific stones. NOTE: You should add a check to see if the player is attacking or not. I have never disabled the collision with metin stones so I am unsure if you'll be able to attack them anymore without a check. Untested Example for all metin stones(at least I think that's all of them): if (!isAttacking() && rVictim.GetRace() >= 8001 && rVictim.GetRace() <= 8206) return false; I advise you against disabling collision with houses and other objects since you'll just go right through them so they become useless. That can be done from __TestObjectCollision If you have any questions, let me know here or on Discord: Amun#3808 Good luck ! Edited December 28, 2020 by Amun Added example for stones. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now