Jump to content

OX map player collision


Go to solution Solved by Think,

Recommended Posts

  • Solution
std::string strMapName = CPythonBackground::Instance().GetWarpMapName();
    if (strMapName == "metin2_map_oxevent")
    {
        //BlockMovement();
        return TRUE;
    }

Transform this into

return false; //(i.e return always false)

If you still collide on any map at all... that's magic or you are not updating your binary or something, because that really works (this is the only place where these collisions are checked). If in fact you do not collide, then go back and make sure that your map is called metin2_map_oxevent (which, yeah, if you didn't change anything... that should be it).

  • Love 1
Link to comment
Share on other sites

Apparently if I edit the function to return false , I can go trough players, but I can also go trough things I shouldn't ... e.g. ox border

Seems like that piece of code it's interfering with something (I guess one of the BlockMovement() from the bool)

 

I tried to move it at the beginning/end , run that piece of code first and the other part of the code as else , but it doesn't work ...

 

c851aa5849254eae3437a1e93e637d6d.gif

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Yes, of course. You did ask for guidance, I didn't quite give you the exact solution. Here's what you want/need:

 

If you want to still collide against the ox borders, but not against players, you will need to do a continue/break on this loop here (Making sure to avoid any calls to BlockMovement)

for(CPythonCharacterManager::CharacterIterator (...)

That is all you need to avoid collisions with players in OX.

Regards!

 

Edit: Whops I wrote that you needed to return false from the loop. That is not correct. You need to break out of it (or simply not run it).

Edited by Think
Link to comment
Share on other sites

  • 10 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.