Jump to content
  • 0

[HELP] Object Collision



1 answer to this question

Recommended Posts

  • 0

Client source, ActorInstanceCollisionDetection.cpp

Search for: 

BOOL CActorInstance::TestActorCollision(CActorInstance& rVictim)

Write your conditions inside that function.



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 by Amun
Added example for stones.
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



Chatroom Rules


Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules


  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.