Jump to content
  • Create New...
  • 0

[HELP] Object Collision



  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0
  • Nitro Booster

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 comment
Share on other sites

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Metin2 Dev Github
  • Activity

    1. 0

      Extended memory pool

    2. 7

      Wear (use) item only on specific map

    3. 4

      Python tool for analyzing average yang drop per hour in each map.

    4. 162

      Plechito - Halloween 2022

    5. 0

      disable quest esc

    6. 7

      Wear (use) item only on specific map

    7. 7

      Wear (use) item only on specific map

    8. 7

      Wear (use) item only on specific map

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.