1. instancebasebattle.cpp
  2. // arat
  3. BOOL CInstanceBase::CheckAdvancing()
  4. // içinde bul
  5. if (IsPC() && IsWalking())
  6. {
  7. CPythonCharacterManager& rkChrMgr=CPythonCharacterManager::Instance();
  8. // altına ekle
  9. CPythonBackground& rkBG = CPythonBackground::Instance(); // CPythonBackGround Mgr
  10. // fonksiyon içinde bul
  11. for(CPythonCharacterManager::CharacterIterator i = rkChrMgr.CharacterInstanceBegin(); i!=rkChrMgr.CharacterInstanceEnd();++i)
  12. {
  13. CInstanceBase* pkInstEach=*i;
  14. if (pkInstEach==this)
  15. continue;
  16. CActorInstance& rkActorSelf=m_GraphicThingInstance;
  17. CActorInstance& rkActorEach=pkInstEach->GetGraphicThingInstanceRef();
  18. //NOTE : Skil을 쓰더라도 Door Type과는 Collision체크 한다.
  19. if( bUsingSkill && !rkActorEach.IsDoor() )
  20. continue;
  21. // altına ekle
  22. #ifdef ENABLE_OXMAP_WITHOUT_COLLISIONS
  23. if (rkActorEach.IsPC() && strcmp(rkBG.GetWarpMapName(), "metin2_map_oxevent") == 0)
  24. {
  25. TPixelPosition pPixelPosition = rkActorSelf.NEW_GetCurPixelPositionRef();
  26. int x = pPixelPosition.x/100;
  27. int y = pPixelPosition.y/100;
  28. D3DXVECTOR2 playerPos(x, y);
  29. D3DXVECTOR2 cornerA(221, 228);
  30. D3DXVECTOR2 cornerB(300, 228);
  31. D3DXVECTOR2 cornerC(300, 265);
  32. D3DXVECTOR2 cornerD(221, 265);
  33. int width = cornerB.x - cornerA.x;
  34. int height = cornerD.y * cornerA.y;
  35. if (playerPos.x > cornerA.x && playerPos.x < cornerA.x + width &&
  36. playerPos.y > cornerA.y && playerPos.y < cornerA.x + height) //Inside the rectangle
  37. continue;
  38. }
  39. #endif
  40. locale_inc.h
  41. #define ENABLE_OXMAP_WITHOUT_COLLISIONS // Ox Haritasinda Karakterlerin Icinden Gecebilme Modulu