- instancebasebattle.cpp
- // arat
- BOOL CInstanceBase::CheckAdvancing()
- // içinde bul
- if (IsPC() && IsWalking())
- {
- CPythonCharacterManager& rkChrMgr=CPythonCharacterManager::Instance();
- // altına ekle
- CPythonBackground& rkBG = CPythonBackground::Instance(); // CPythonBackGround Mgr
- // fonksiyon içinde bul
- for(CPythonCharacterManager::CharacterIterator i = rkChrMgr.CharacterInstanceBegin(); i!=rkChrMgr.CharacterInstanceEnd();++i)
- {
- CInstanceBase* pkInstEach=*i;
- if (pkInstEach==this)
- continue;
- CActorInstance& rkActorSelf=m_GraphicThingInstance;
- CActorInstance& rkActorEach=pkInstEach->GetGraphicThingInstanceRef();
- //NOTE : Skil을 쓰더라도 Door Type과는 Collision체크 한다.
- if( bUsingSkill && !rkActorEach.IsDoor() )
- continue;
- // altına ekle
- #ifdef ENABLE_OXMAP_WITHOUT_COLLISIONS
- if (rkActorEach.IsPC() && strcmp(rkBG.GetWarpMapName(), "metin2_map_oxevent") == 0)
- {
- TPixelPosition pPixelPosition = rkActorSelf.NEW_GetCurPixelPositionRef();
- int x = pPixelPosition.x/100;
- int y = pPixelPosition.y/100;
- D3DXVECTOR2 playerPos(x, y);
- D3DXVECTOR2 cornerA(221, 228);
- D3DXVECTOR2 cornerB(300, 228);
- D3DXVECTOR2 cornerC(300, 265);
- D3DXVECTOR2 cornerD(221, 265);
- int width = cornerB.x - cornerA.x;
- int height = cornerD.y * cornerA.y;
- if (playerPos.x > cornerA.x && playerPos.x < cornerA.x + width &&
- playerPos.y > cornerA.y && playerPos.y < cornerA.x + height) //Inside the rectangle
- continue;
- }
- #endif
- locale_inc.h
- #define ENABLE_OXMAP_WITHOUT_COLLISIONS // Ox Haritasinda Karakterlerin Icinden Gecebilme Modulu