Jump to content

forum80

Member
  • Posts

    31
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by forum80

  1. On 12/16/2022 at 10:45 PM, masodikbela said:

    Here is a little collab for the clipping, this extends the ExpandedImageBox, so you can scale/rotate those images and still be able to clip them. The code contains very informative comments so if you want to learn a few tricks you might want to read them.

      Reveal hidden contents

    In GrpExpandedImageInstance.cpp replace the whole Render function with this:

    void CGraphicExpandedImageInstance::OnRender(RECT* rMask)
    {
    	// Okay so first we are gonna rework the code to use transofrmation matrix.
    	// To do that we just have to touch the xyzs. This means we have to setup
    	// them to match the original rectangle (without scaling rotation translation).
    	// Just like how we would want to render the image to the left top corner
    	// of the screen as it is in the file.
    	// 
    	// We will obviously need the UVs so I'm not gonna touch that part, it has
    	// nothing to do with the transformation matrix.
    	//
    	// The only thing is that the rotation and scaling is virtual so other codes 
    	// will not see the rect of the scaled/rotated eximagebox correctly so if you 
    	// want to put another image on such eximageboxes you will need extra logic,
    	// perhabs the current structure for clipping will not be enough for that anyway.
    	//
    	// With the DEBUG_CLIPMASK macro you can highlight the parent window's rect.
    
    
    	CGraphicImage* pImage = m_roImage.GetPointer();
    	CGraphicTexture* pTexture = pImage->GetTexturePointer();
    
    	const RECT& c_rRect = pImage->GetRectReference();
    	float texReverseWidth = 1.0f / float(pTexture->GetWidth());
    	float texReverseHeight = 1.0f / float(pTexture->GetHeight());
    	float su = (c_rRect.left - m_RenderingRect.left) * texReverseWidth;
    	float sv = (c_rRect.top - m_RenderingRect.top) * texReverseHeight;
    	float eu = (c_rRect.left + m_RenderingRect.right + (c_rRect.right - c_rRect.left)) * texReverseWidth;
    	float ev = (c_rRect.top + m_RenderingRect.bottom + (c_rRect.bottom - c_rRect.top)) * texReverseHeight;
    
    	// set up the vertex position in screen coordinates
    	// the rendering rect is usually 0, only used for stuff like hp bar, 
    	// normal window base and so on, where you want to replicate the texture
    	// multiple times (aka. wrap texture address mode). Since it will count
    	// as the "part of the basic image box" we will add it here as well.
    	//
    	// The only trick we will apply that we will shift the wrapping to the 
    	// end positions instead of substracting them from the start positions,
    	// since we want to base the original box to 0,0. We will adjust it on
    	// the translation.
    	float sx = 0.f;
    	float sy = 0.f;
    	float ex = float(pImage->GetWidth()) + m_RenderingRect.right + m_RenderingRect.left;
    	float ey = float(pImage->GetHeight()) + m_RenderingRect.bottom + m_RenderingRect.top;
    
    	TPDTVertex vertices[4];
    	vertices[0].position.x = sx;
    	vertices[0].position.y = sy;
    	vertices[0].position.z = 0.0f;
    	vertices[0].texCoord = TTextureCoordinate(su, sv);
    	vertices[0].diffuse = m_DiffuseColor;
    
    	vertices[1].position.x = ex;
    	vertices[1].position.y = sy;
    	vertices[1].position.z = 0.0f;
    	vertices[1].texCoord = TTextureCoordinate(eu, sv);
    	vertices[1].diffuse = m_DiffuseColor;
    
    	vertices[2].position.x = sx;
    	vertices[2].position.y = ey;
    	vertices[2].position.z = 0.0f;
    	vertices[2].texCoord = TTextureCoordinate(su, ev);
    	vertices[2].diffuse = m_DiffuseColor;
    
    	vertices[3].position.x = ex;
    	vertices[3].position.y = ey;
    	vertices[3].position.z = 0.0f;
    	vertices[3].texCoord = TTextureCoordinate(eu, ev);
    	vertices[3].diffuse = m_DiffuseColor;
    
    	// Now we are going to apply a transformation matrix that will
    	// rotate/scale/transpose the vertices to the correct position.
    	//
    	// We can do it 2 different ways, either set up a world transform
    	// so the GPU will do this for us for every vertex we stream to it,
    	// or we can directly apply it here CPU side.
    	// Since we have very few (4) vertices its better to do it here 
    	// since changing device states comes with some overhead, so its 
    	// better to do that only when its absolutely necessary or when
    	// we can spare some cpu cycles by sending the work to the GPU.
    
    	D3DXMATRIX transform, mTemp;
    	D3DXMatrixScaling(&transform, m_v2Scale.x, m_v2Scale.y, 1.f);
    	D3DXMatrixTranslation(&mTemp, -(ex - sx) / 2.f, -(ey - sy) / 2.f, 0.f);
    	transform *= mTemp;
    	D3DXMatrixRotationZ(&mTemp, D3DXToRadian(m_fRotation));
    	transform *= mTemp;
    	D3DXMatrixTranslation(&mTemp, (ex - sx) / 2.f, (ey - sy) / 2.f, 0.f);
    	transform *= mTemp;
    	D3DXMatrixTranslation(&mTemp, m_v2Position.x - m_RenderingRect.left, m_v2Position.y - m_RenderingRect.top, 0.f);
    	transform *= mTemp;
    
    	for (size_t i = 0; i < 4; ++i)
    	{
    		const D3DXVECTOR2 pos(vertices[i].position.x, vertices[i].position.y);
    		D3DXVECTOR4 out;
    		D3DXVec2Transform(&out, &pos, &transform);
    		vertices[i].position.x = out.x - 0.5f;
    		vertices[i].position.y = out.y - 0.5f;
    	}
    
    	switch (m_iRenderingMode)
    	{
    	case RENDERING_MODE_SCREEN:
    	case RENDERING_MODE_COLOR_DODGE:
    		STATEMANAGER.SaveRenderState(D3DRS_SRCBLEND, D3DBLEND_INVDESTCOLOR);
    		STATEMANAGER.SaveRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);
    		break;
    	case RENDERING_MODE_MODULATE:
    		STATEMANAGER.SaveRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO);
    		STATEMANAGER.SaveRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);
    		break;
    	}
    
    	// Since dx8 doesn't have clipping, we have to apply a bit of trickery here.
    	// We are going to use stenciling. This requires to have space for stencil
    	// information in the depth buffer, so you will need to ask the game to
    	// create an appropriate depth buffer, by changing m_dwMinStencilBits to 1
    	// in D3D_CDeviceInfo::FindDepthStencilFormat.
    	// Stencil buffer will store a custom value on every position you render to
    	// and you can later compare it when rendering something else to drop specific
    	// pixels to achieve various effects.
    	// With this method it is possible to later extend the functionality since 
    	// you can basically clip any shape not just rectangle like with dx9 clipping.
    	// This can be useful when your parent window is a rotated exImageBox and you
    	// want to clip inside it.
    	if (rMask)
    	{
    		// First of all we will draw a rectangle equal to the size of the parent
    		// window's size. We don't need any texture pos or colour, so SPVertex
    		// struct would be enough but I cba creating funcs for it so just go with
    		// this one.
    
    		TPDTVertex maskVertices[4];
    		maskVertices[0].position.x = float(rMask->left) - 0.5f;
    		maskVertices[0].position.y = float(rMask->top) - 0.5f;
    		maskVertices[0].position.z = 0.0f;
    
    		maskVertices[1].position.x = float(rMask->right) - 0.5f;
    		maskVertices[1].position.y = float(rMask->top) - 0.5f;
    		maskVertices[1].position.z = 0.0f;
    
    		maskVertices[2].position.x = float(rMask->left) - 0.5f;
    		maskVertices[2].position.y = float(rMask->bottom) - 0.5f;
    		maskVertices[2].position.z = 0.0f;
    
    		maskVertices[3].position.x = float(rMask->right) - 0.5f;
    		maskVertices[3].position.y = float(rMask->bottom) - 0.5f;
    		maskVertices[3].position.z = 0.0f;
    
    		// Normally nothing else uses stencil in the base game, but we will have to
    		// clear the other stuff we set up in previous renders.
    		STATEMANAGER.GetDevice()->Clear(0, NULL, D3DCLEAR_STENCIL, 0, 0.f, 0);
    
    		// Now enable stenciling, and make it to fail always (so this random rectangle
    		// wont show up in our rendertarget).
    		const DWORD zWrite = STATEMANAGER.GetRenderState(D3DRS_ZWRITEENABLE);
    		STATEMANAGER.SetRenderState(D3DRS_ZWRITEENABLE, FALSE);
    		STATEMANAGER.SaveRenderState(D3DRS_STENCILENABLE, TRUE);
    #ifdef DEBUG_CLIPMASK
    		maskVertices[0].diffuse = maskVertices[1].diffuse = maskVertices[2].diffuse = maskVertices[3].diffuse = 0x5F00FF00;
    		STATEMANAGER.SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_REPLACE);
    		STATEMANAGER.SetRenderState(D3DRS_STENCILFUNC, D3DCMP_ALWAYS);
    #else
    		STATEMANAGER.SetRenderState(D3DRS_STENCILFAIL, D3DSTENCILOP_REPLACE);
    		STATEMANAGER.SetRenderState(D3DRS_STENCILFUNC, D3DCMP_NEVER);
    #endif
    		STATEMANAGER.SetRenderState(D3DRS_STENCILREF, 1);
    
    		// And now just render it just as a normal image.
    		CGraphicBase::SetPDTStream(maskVertices, 4);
    		CGraphicBase::SetDefaultIndexBuffer(CGraphicBase::DEFAULT_IB_FILL_RECT);
    
    		STATEMANAGER.SetTexture(0, NULL);
    		STATEMANAGER.SetTexture(1, NULL);
    		STATEMANAGER.SetVertexShader(D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1);
    		STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 4, 0, 2);
    
    		// After the render set up the stencil to only succeed on pixels we wrote 1 to.
    #ifdef DEBUG_CLIPMASK
    		STATEMANAGER.SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_KEEP);
    #else
    		STATEMANAGER.SetRenderState(D3DRS_STENCILFAIL, D3DSTENCILOP_KEEP);
    #endif
    		STATEMANAGER.SetRenderState(D3DRS_STENCILFUNC, D3DCMP_EQUAL);
    
    		STATEMANAGER.SetRenderState(D3DRS_ZWRITEENABLE, zWrite);
    	}
    
    	// set up min/magfilter for scaling, instantly restore mipfilter, we don't need mips
    	DWORD minF, magF, mipF;
    	STATEMANAGER.GetTextureStageState(0, D3DTSS_MINFILTER, &minF);
    	STATEMANAGER.GetTextureStageState(0, D3DTSS_MAGFILTER, &magF);
    	STATEMANAGER.GetTextureStageState(0, D3DTSS_MIPFILTER, &mipF);
    	STATEMANAGER.SetBestFiltering(0);
    	STATEMANAGER.SetTextureStageState(0, D3DTSS_MIPFILTER, mipF);
    
    	// 2004.11.18.myevan.ctrl+alt+del ąÝşą »çżë˝Ă ƨ±â´Â ą®Á¦ 	
    	if (CGraphicBase::SetPDTStream(vertices, 4))
    	{
    		CGraphicBase::SetDefaultIndexBuffer(CGraphicBase::DEFAULT_IB_FILL_RECT);
    
    		STATEMANAGER.SetTexture(0, pTexture->GetD3DTexture());
    		STATEMANAGER.SetTexture(1, NULL);
    		STATEMANAGER.SetVertexShader(D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1);
    		STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 4, 0, 2);
    	}
    	//STATEMANAGER.DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, c_FillRectIndices, D3DFMT_INDEX16, vertices, sizeof(TPDTVertex));
    	/////////////////////////////////////////////////////////////
    
    	// reset filters
    	STATEMANAGER.SetTextureStageState(0, D3DTSS_MINFILTER, minF);
    	STATEMANAGER.SetTextureStageState(0, D3DTSS_MAGFILTER, magF);
    
    	// And finally disable stenciling again.
    	if (rMask)
    		STATEMANAGER.RestoreRenderState(D3DRS_STENCILENABLE);
    
    	switch (m_iRenderingMode)
    	{
    	case RENDERING_MODE_SCREEN:
    	case RENDERING_MODE_COLOR_DODGE:
    	case RENDERING_MODE_MODULATE:
    		STATEMANAGER.RestoreRenderState(D3DRS_SRCBLEND);
    		STATEMANAGER.RestoreRenderState(D3DRS_DESTBLEND);
    		break;
    	}
    }

    In StateManager.h add this function as public to the CStateManager class:

    LPDIRECT3DDEVICE8 GetDevice() { return m_lpD3DDev; }

    And last in GrpDetector.cpp search for m_dwMinStencilBits and set it to 1.

     

    hi can you modify dxd9?

  2. bool CompareShopItemVnum(const SShopItemTable& lhs, const SShopItemTable& rhs)
    {
    	return (lhs.vnum == rhs.vnum ? lhs.vnum + lhs.count < rhs.vnum + rhs.count : lhs.vnum < rhs.vnum);
    }

    first vnum after count compare 

    like this 

    Spoiler

  3. 2 minutes ago, Ymir said:

     

     

     

    I have both of these problems, does anyone know how to fix them?

     

     

     

    I have both of these problems, does anyone know how to fix them?

    1.PyhonPlayerSetting.cpp look Horse skills make all like warrior horse charge, horse splash

    2. problem check playerSetting.py affect count and PyhonPlayerSetting.cpp

  4. On 06.09.2018 at 17:02, masodikbela said:

    Merhaba devler,

    Tamam, başlığı okuduktan sonra "Hollllllllly sh..", "Oooookay..." veya sadece "?" gibi bazı düşünceleriniz/sorunuz olabilir (veya olmayabilir). Yaklaşık 1-2 yıl önce bir haritacı bana şunu sordu: "Bu, tüm haritayı görünür kılmak mümkün mü? Normal oyunlardaki gibi mi? Bu sis çok iğrenç, normal bir sisle daha güzel bir manzara yaratabilirdim..." Yaklaşık bir yıl önce yaptığım uykusuz bir geceden sonra bunu birçok şekilde yapmaya çalıştım. Bir kez bittiğinde, onunla ne yapacağımı bilmiyordum. Oldukça iyiydi (sanırım) ama haritacı olmadığım için onunla hiçbir şey yapamam. Satabilirdim ama bu kodu korumanın bir yolu olmadığı için bu benim için bir seçenek değil, bu yüzden onu halkla paylaşmaya karar verdim.

    "Vay canına, bu aslında fena değil" Bu manzarayı ilk gördüğümde bu benim ilk tepkimdi. AMA benden bu kadar, daha önemli şeylerden bahsedelim...

    Bu yüzden bu eğitim için aşamalar oluşturmaya karar verdim (aslında 4 aşama). Bu normal bir aşağıdan yukarıya doğru bir şey, yani 1., 2. aşamayı yapabilirsin ve sonra durabilirsin, ama 2. aşamayı 1 olmadan, 3'ü 2 olmadan ve 4'ü 3 olmadan yapamazsın... bu değişiklikleri özelleştirin. Ayrıca her aşama için bazı "ilginç" (en azından benim için) notlar/düşünceler yazabilirim. Ancak, göreceğiniz üzere son 2 aşama şu anda hazır değil, bu yüzden deneysel bir sürüm olduğunu söylemeyi tercih ederim... Neyse, bunu uygulamaya başlamadan önce testler, performans ve diğer az çok önemli hakkında konuşalım. şeyler.

    İçerik tablosu:

    • Aşama 1: Çöp toplayıcıları kaldırmak, haritayla ilgili tüm şeyleri belleğe yüklemek ("parçalar", nesneler vb.)
    • Aşama 2: Tam arazi oluşturma
    • Aşama 3: Tüm nesneleri haritada oluşturma [HENÜZ HAZIR DEĞİL]
    • 4. Aşama: Oyuncular için yapılandırma oluşturun [HENÜZ HAZIR DEĞİL]

    Verim

    Bir oyunla ilgili en önemli sorulardan biri: Onu teknik özelliklerimle oynayabilecek miyim? Tabi bu pek çok şeye bağlı. Yüksek poli nesneler, büyük haritalar, HD dokular, çok sayıda ağaç, efekt kullanmak, performans/oluşturma süresini oldukça etkileyebilir. Bu konuda kısaca söyleyebileceğim tek şey: bu gerçekten haritalarınıza (ve tabii ki oyuncunun makinesine) bağlıdır. Şimdiye kadar bu eski dostum hemen hemen her bilgisayarda çalıştırılabilirdi, ancak bununla bir şeyler değişebilir, bu yüzden bu özelliği etkinleştirerek veya devre dışı bırakarak bunun için yapılandırma oluşturdum.

    Deneyimlerim/testlerim hakkında

    Bellek kullanımı, varsayılan ~270 MB'den ~300 MB'a yükseldi (daha sonra açıklamalara bakın), işlemci kullanımı değişmedi (~%5-10). Ekran kartı kullanımım hakkında izleyemediğim için bir şey diyemem ama kullanımının (hem video belleği hem de işlemci) arttığına eminim... Videoda biraz gecikme fark etmişsinizdir belki ama durumda, bunun tek nedeni kayıt cihazım, oyun hala sorunsuz çalışıyor (unutmayın, bilgisayara ve haritaya bağlı...) Eğer yardımcı olursa bir Lenovo U41-70 dizüstü bilgisayarım var (Intel i7 5500U, 8GB DDR3 ve GeForce) 920M) ve "(eski) wom2 haritalarını" kullandım.

    Ancak, tüm gölgeler etkinken bazı fps düşüşleri fark ettim ve birçok karakterle test edemedim (çünkü karakter oluşturma bu olmadan da çok fazla işlem süresi tüketir), bu nedenle varsayılan olarak devre dışı bırakmanızı ve oyuncu karar verirse tavsiye ederim. kullanmak için, onu açabilecektir.

    1. Aşama

      Gizli içerikleri ortaya çıkarın

    Some personal hints:

    First let me explain what I meant when I said "chunks". As we all know, each map has a size, like 1x1, 2x2... If a map's size is 2x2 then it has 4 chunks... (I hope its clear now :P )
    Before we start to render the universe we need all the map related things already been loaded and ready for use in the memory. By default the game only loads maximum 9 chunks (the one you are standing on, and when its possible 8 other adjacent ones) but its not enough for us, for example when we are standing on a corner chunk of a 2x3 map we have only 4 chunks loaded so another 2 chunks will be "white" and only levitating trees will be seen. By the way this is the reason when we see hovering trees on the maps: The trees are rendered mapwide by default so even when we don't see them they are there so when the "eye"'s edge is near to a hill or something the tree appears before the terrain.

    You can do this change even if you don't want to "render the galaxy". You may wonder why... The first reason is the useless garbage collector which runs every rendering time and tries to collect unused objects, textures, chunks (even if we don't have any). It could be useful too but in these days its just fcking with the processor... The other reason is quite simple. When you leave a chunk the game instantly starts to load 3 other one (in the worst case) and it brakes the render for some ms which cause an fps drop.

    In this part we will meet with some usual code near to the heart of the area/terrain rendering (no dragons here sry) and we will delete some of them :P Although looks like this part is nearly untouched since the first release of the game and also looks like this part was written by a bit competent person (except the gb collector...) since its not the usual gf like trash code.

    Install (FINALLY)

    GameLib/MapOutdoorUpdate.cpp

      Hide contents

    in bool CMapOutdoor::Update(float fX, float fY, float fZ) replace this:

    	if ( bNeedInit ||
    		(m_CurCoordinate.m_sTerrainCoordX/LOAD_SIZE_WIDTH) != (sCoordX/LOAD_SIZE_WIDTH) || 
    		(m_CurCoordinate.m_sTerrainCoordY/LOAD_SIZE_WIDTH) != (sCoordY/LOAD_SIZE_WIDTH) )
    	{
    		if (bNeedInit)
    		{
    			m_PrevCoordinate.m_sTerrainCoordX = sCoordX;
    			m_PrevCoordinate.m_sTerrainCoordY = sCoordY;
    		}
    		else
    		{
    			m_PrevCoordinate.m_sTerrainCoordX = m_CurCoordinate.m_sTerrainCoordX;
    			m_PrevCoordinate.m_sTerrainCoordY = m_CurCoordinate.m_sTerrainCoordY;
    		}
    		
    		m_CurCoordinate.m_sTerrainCoordX = sCoordX;
    		m_CurCoordinate.m_sTerrainCoordY = sCoordY;
    		m_lCurCoordStartX = sCoordX * CTerrainImpl::TERRAIN_XSIZE;
    		m_lCurCoordStartY = sCoordY * CTerrainImpl::TERRAIN_YSIZE;
    
    		WORD wCellCoordX = (ix % CTerrainImpl::TERRAIN_XSIZE) / CTerrainImpl::CELLSCALE;
    		WORD wCellCoordY = (iy % CTerrainImpl::TERRAIN_YSIZE) / CTerrainImpl::CELLSCALE;
    
    		short sReferenceCoordMinX, sReferenceCoordMaxX, sReferenceCoordMinY, sReferenceCoordMaxY;
    		sReferenceCoordMinX = max(m_CurCoordinate.m_sTerrainCoordX - LOAD_SIZE_WIDTH, 0);
    		sReferenceCoordMaxX = min(m_CurCoordinate.m_sTerrainCoordX + LOAD_SIZE_WIDTH, m_sTerrainCountX - 1);
    		sReferenceCoordMinY = max(m_CurCoordinate.m_sTerrainCoordY - LOAD_SIZE_WIDTH, 0);
    		sReferenceCoordMaxY = min(m_CurCoordinate.m_sTerrainCoordY + LOAD_SIZE_WIDTH, m_sTerrainCountY - 1);
    		
    		for (WORD usY = sReferenceCoordMinY; usY <=sReferenceCoordMaxY; ++usY)
    		{
    			for (WORD usX = sReferenceCoordMinX; usX <= sReferenceCoordMaxX; ++usX)
    			{
    				LoadTerrain(usX, usY, wCellCoordX, wCellCoordY);
      				LoadArea(usX, usY, wCellCoordX, wCellCoordY);
    			}
    		}
    
    		AssignTerrainPtr();
    		m_lOldReadX = -1;
    
    		Tracenf("Update::Load spent %d ms\n", ELTimer_GetMSec() - t1);
    	}

    with this:

    	if (bNeedInit ||
    		m_CurCoordinate.m_sTerrainCoordX / LOAD_SIZE_WIDTH != sCoordX / LOAD_SIZE_WIDTH ||
    		m_CurCoordinate.m_sTerrainCoordY / LOAD_SIZE_WIDTH != sCoordY / LOAD_SIZE_WIDTH)
    	{
    		if (bNeedInit)
    		{
    			m_PrevCoordinate.m_sTerrainCoordX = sCoordX;
    			m_PrevCoordinate.m_sTerrainCoordY = sCoordY;
    			
    			//during the loading screen load everything
    			for (WORD usY = 0; usY < m_sTerrainCountY; ++usY)
    			{
    				for (WORD usX = 0; usX < m_sTerrainCountX; ++usX)
    				{
    					LoadTerrain(usX, usY);
    					LoadArea(usX, usY);
    				}
    			}
    		}
    		else
    		{
    			m_PrevCoordinate.m_sTerrainCoordX = m_CurCoordinate.m_sTerrainCoordX;
    			m_PrevCoordinate.m_sTerrainCoordY = m_CurCoordinate.m_sTerrainCoordY;
    		}
    
    		m_CurCoordinate.m_sTerrainCoordX = sCoordX;
    		m_CurCoordinate.m_sTerrainCoordY = sCoordY;
    		m_lCurCoordStartX = sCoordX * CTerrainImpl::TERRAIN_XSIZE;
    		m_lCurCoordStartY = sCoordY * CTerrainImpl::TERRAIN_YSIZE;
    
    		AssignTerrainPtr();
    		m_lOldReadX = -1;
    
    		Tracenf("Update::Load spent %d ms\n", ELTimer_GetMSec() - t1);
    	}

    Also delete this from the function:

    	__UpdateGarvage();

    In void CMapOutdoor::UpdateTerrain(float fX, float fY) delete this:

    	UpdateAreaList(lRealCenterX, lRealCenterY);

    Under this function delete the following functions:

    void CMapOutdoor::FPushTerrainToDeleteVector::operator () (CTerrain * pTerrain)
    void CMapOutdoor::FPushAreaToDeleteVector::operator () (CArea * pArea)
    void CMapOutdoor::__ClearGarvage()
    void CMapOutdoor::__UpdateGarvage()
    void CMapOutdoor::UpdateAreaList(long lCenterX, long lCenterY)

     

    GameLib/MapOutdoor.h

      Hide contents

    Delete these things:

    		virtual void	__ClearGarvage();
    		virtual void	__UpdateGarvage();
    		virtual void	UpdateAreaList(long lCenterX, long lCenterY);

    And replace these ones (those args are unused, so its just "cleaning"... 😞

    		virtual bool	LoadTerrain(WORD wTerrainCoordX, WORD wTerrainCoordY, WORD wCellCoordX, WORD wCellCoordY);
    		virtual bool	LoadArea(WORD wAreaCoordX, WORD wAreaCoordY, WORD wCellCoordX, WORD wCellCoordY);

    With these ones:

    		virtual bool	LoadTerrain(WORD wTerrainCoordX, WORD wTerrainCoordY);
    		virtual bool	LoadArea(WORD wAreaCoordX, WORD wAreaCoordY);

    Remove also these things:

    		TTerrainPtrVector			m_TerrainDeleteVector;
    		TTerrainPtrVectorIterator	m_TerrainPtrVectorIterator;
    		TTerrainPtrVector			m_TerrainLoadWaitVector;
    		TTerrainPtrVector			m_TerrainLoadRequestVector;
    
    		TAreaPtrVector				m_AreaDeleteVector;
    		TAreaPtrVectorIterator		m_AreaPtrVectorIterator;
    		TAreaPtrVector				m_AreaLoadWaitVector;
    		TAreaPtrVector				m_AreaLoadRequestVector;
    
    		struct FPushToDeleteVector
    		{
    			enum EDeleteDir
    			{
    				DELETE_LEFT,
    				DELETE_RIGHT,
    				DELETE_TOP,
    				DELETE_BOTTOM,
    			};
    
    			EDeleteDir m_eLRDeleteDir;
    			EDeleteDir m_eTBDeleteDir;
    			TOutdoorMapCoordinate m_CurCoordinate;
    
    			FPushToDeleteVector(EDeleteDir eLRDeleteDir, EDeleteDir eTBDeleteDir, TOutdoorMapCoordinate CurCoord)
    			{
    				m_eLRDeleteDir = eLRDeleteDir;
    				m_eTBDeleteDir = eTBDeleteDir;
    				m_CurCoordinate = CurCoord;
    			}
    		};
    		struct FPushTerrainToDeleteVector : public FPushToDeleteVector
    		{
    			TTerrainPtrVector	m_ReturnTerrainVector;
    
    			FPushTerrainToDeleteVector(EDeleteDir eLRDeleteDir, EDeleteDir eTBDeleteDir, TOutdoorMapCoordinate CurCoord)
    				: FPushToDeleteVector(eLRDeleteDir, eTBDeleteDir, CurCoord)
    			{
    				m_ReturnTerrainVector.clear();
    			}
    
    			void operator() (CTerrain * pTerrain);
    		};
    
    		struct FPushAreaToDeleteVector : public FPushToDeleteVector
    		{
    			TAreaPtrVector		m_ReturnAreaVector;
    
    			FPushAreaToDeleteVector(EDeleteDir eLRDeleteDir, EDeleteDir eTBDeleteDir, TOutdoorMapCoordinate CurCoord)
    				: FPushToDeleteVector(eLRDeleteDir, eTBDeleteDir, CurCoord)
    			{
    				m_ReturnAreaVector.clear();
    			}
    
    			void operator() (CArea * pArea);
    		};

     

    MapOutdoorLoad.cpp

      Hide contents

    Replace this:

    bool CMapOutdoor::LoadArea(WORD wAreaCoordX, WORD wAreaCoordY, WORD wCellCoordX, WORD wCellCoordY)

    with this:

    bool CMapOutdoor::LoadArea(WORD wAreaCoordX, WORD wAreaCoordY)

    And this:

    bool CMapOutdoor::LoadTerrain(WORD wTerrainCoordX, WORD wTerrainCoordY, WORD wCellCoordX, WORD wCellCoordY)

    With this:

    bool CMapOutdoor::LoadTerrain(WORD wTerrainCoordX, WORD wTerrainCoordY)

     

    MapOutdoor.cpp

      Hide contents

    Delete these ones from void Initialize():

    	m_TerrainDeleteVector.clear();
    	m_TerrainLoadRequestVector.clear();
    	m_TerrainLoadWaitVector.clear();
    	
    	m_AreaDeleteVector.clear();
    	m_AreaLoadRequestVector.clear();
    	m_AreaLoadWaitVector.clear();

    From void CMapOutdoor::DestroyArea() delete this:

    void CMapOutdoor::DestroyTerrain() öğesinden şunu silin :

     

     

    2. aşama

      Gizli içerikleri ortaya çıkarın

    Bazı kişisel ipuçları:

    Tamam, şimdi buradayız, oyunun en karmaşık kısımlarından biri (devlet yöneticisinden sonra) ve burada dörtlü ağaç ve araziPatchProxy (evet ilk şeyler fck dışarı atacağız). Bahsedilen bu iki şey (dörtlü ağaç ve proxy) mesafe oluşturmayı yönetiyor. Sadece ayakta dururken ve arazinin yerden rastgele büyüdüğünü veya rastgele kaybolduğunu fark ettiğinizde, bunun nedeni bu adamlar (oluşturma "uzak veya yakın" seçeneğine bağlıdır). Tüm haritayı oluşturmak istediğimiz için böyle bir sihire ihtiyacımız yok.

    Önemli: Yalnızca HTP oluşturmayı değiştirdim, bu, yalnızca donanım döşeme seçildiğinde (ve tam oluşturma etkinleştirildiğinde) çalışacağı anlamına gelir.

    GameLib/MapManager.h

      Gizli içerikleri ortaya çıkarın

    Bundan sonra:

    			

    Bunu ekle:

    			    
    			  

    Bundan sonra:

    		

    Bunu ekle:

    		

     

    GameLib/MapManager.cpp

      Gizli içerikleri ortaya çıkarın

    CMapManager ::CMapManager() içinde şunu ekleyin:

     

    Bundan sonra:

    Bundan sonra void CMapManager::Create() içinde:

    	

    Bunu ekle:

    	 

     

    GameLib/TerrainPatch.h

      Gizli içerikleri ortaya çıkarın

    Bundan sonra:

    	 

    Bunu ekle:

    	 

     

    GameLib/TerrainPatch.cpp

      Gizli içerikleri ortaya çıkarın

    Bundan sonra:

    bool CTerrainPatch::SOFTWARE_TRANSFORM_PATCH_ENABLE=TRUE;

    Add this:

    bool CTerrainPatch::FULL_MAP_RENDER_ENABLE = false;

     

    GameLib/MapOutdoor.cpp

      Gizli içerikleri ortaya çıkarın

    In void CMapOutdoor::CreateTerrainPatchProxyList() replace this:

    	m_pTerrainPatchProxyList = new CTerrainPatchProxy[m_wPatchCount * m_wPatchCount];

    With this:

    	if (!CTerrainPatch::FULL_MAP_RENDER_ENABLE) // don't need this nasty buddy for full map render
    		m_pTerrainPatchProxyList = new CTerrainPatchProxy[m_wPatchCount * m_wPatchCount];

     

    GameLib/MapOutdoor.h

      Gizli içerikleri ortaya çıkarın

    After this:

    		void					DrawWater(long patchnum);

    Add this:

    		void					DrawFullWater();

    After this:

    		void __RenderTerrain_RenderHardwareTransformPatch();

    Add this:

    		void RenderWholeMapMB(WORD wPrimitiveCount, D3DPRIMITIVETYPE ePrimitiveType);

     

    GameLib/MapOutdoorLoad.cpp

      Gizli içerikleri ortaya çıkarın

    In bool CMapOutdoor::Load(float x, float y, float z) relpace this:

    	BuildQuadTree();

    With this:

    	if (!CTerrainPatch::FULL_MAP_RENDER_ENABLE) // we don't need this too
    		BuildQuadTree();

     

    GameLib/MapOutdoorRender.cpp

      Gizli içerikleri ortaya çıkarın

    In void CMapOutdoor::RenderTerrain() replace this:

    	if (!m_pTerrainPatchProxyList)

    With this:

    	if (!m_pTerrainPatchProxyList && !CTerrainPatch::FULL_MAP_RENDER_ENABLE) // we don't use proxy and full render together

    Replace this:

    	m_PatchVector.clear();
    	
    	__RenderTerrain_RecurseRenderQuadTree(m_pRootNode);
    	
    	// °Ĺ¸®Ľř Á¤·Ä
    	std::sort(m_PatchVector.begin(),m_PatchVector.end());

    With this:

    	if (!CTerrainPatch::FULL_MAP_RENDER_ENABLE)
    	{
    		// this part responsible for the distance sorting for the basic render
    		m_PatchVector.clear();
    		__RenderTerrain_RecurseRenderQuadTree(m_pRootNode);
    		std::sort(m_PatchVector.begin(), m_PatchVector.end());
    	}

     

    GameLib/MapOutdoorRenderHTP.cpp

      Gizli içerikleri ortaya çıkarın

    Add this to the end of the file:

    void CMapOutdoor::RenderWholeMapMB(WORD wPrimitiveCount, D3DPRIMITIVETYPE ePrimitiveType)
    {
    	// now here we might see some dragons, cous I don't know everything's functionality here (and when I know it its because I messed them up before lol...)
    	// its mostly a mixed up code from the original ones
    	DWORD dwFogColor;
    	bool bEnableFog = false;
    	if (mc_pEnvironmentData) // check if the fog is enabled and its color
    	{
    		dwFogColor = mc_pEnvironmentData->FogColor;
    		bEnableFog = mc_pEnvironmentData->bFogEnable;
    	}
    
    	for (auto it = m_TerrainVector.begin(); it != m_TerrainVector.end(); ++it) // lets start render the whole map (all chunks)
    	{
    		CTerrain * pTerrain = (*it);
    
    		WORD wCoordX, wCoordY;
    		pTerrain->GetCoordinate(&wCoordX, &wCoordY);
    
    		TTerrainSplatPatch & rTerrainSplatPatch = pTerrain->GetTerrainSplatPatch();
    		for (BYTE y = 0; y < CTerrainImpl::PATCH_YCOUNT; ++y)
    		{
    			for (BYTE x = 0; x < CTerrainImpl::PATCH_XCOUNT; ++x)
    			{
    				// each chunk contains 64 patches, and its rendering order is important, otherwise we might would see some abstract textures :P
    				CTerrainPatch* pTerrainPath = pTerrain->GetTerrainPatchPtr(x, y);
    				if (!pTerrainPath)
    					continue;
    
    				// OKAY we gonna do SOMETHING with alpha texures and tiling here, I'm not a graphical processing expert...
    				D3DXMATRIX matTexTransform, matSplatAlphaTexTransform, matSplatColorTexTransform;
    				m_matWorldForCommonUse._41 = -(float)(wCoordX * CTerrainImpl::TERRAIN_XSIZE);
    				m_matWorldForCommonUse._42 = (float)(wCoordY * CTerrainImpl::TERRAIN_YSIZE);
    				D3DXMatrixMultiply(&matTexTransform, &m_matViewInverse, &m_matWorldForCommonUse);
    				D3DXMatrixMultiply(&matSplatAlphaTexTransform, &matTexTransform, &m_matSplatAlpha);
    				STATEMANAGER.SetTransform(D3DTS_TEXTURE1, &matSplatAlphaTexTransform);
    
    				D3DXMATRIX matTiling;
    				D3DXMatrixScaling(&matTiling, 1.0f / 640.0f, -1.0f / 640.0f, 0.0f);
    				matTiling._41 = 0.0f;
    				matTiling._42 = 0.0f;
    
    				D3DXMatrixMultiply(&matSplatColorTexTransform, &m_matViewInverse, &matTiling);
    				STATEMANAGER.SetTransform(D3DTS_TEXTURE0, &matSplatColorTexTransform);
    
    				CGraphicVertexBuffer* pkVB = pTerrainPath->HardwareTransformPatch_GetVertexBufferPtr();
    				if (!pkVB)
    					return;
    
    				STATEMANAGER.SetStreamSource(0, pkVB->GetD3DVertexBuffer(), m_iPatchTerrainVertexSize);
    				STATEMANAGER.SetRenderState(D3DRS_LIGHTING, FALSE);
    
    				bool isFirst = true;
    				for (DWORD j = 1; j < pTerrain->GetNumTextures(); ++j)
    				{
    					// okay lets start rendering the textures here (still don't fully get this part...)
    					TTerainSplat & rSplat = rTerrainSplatPatch.Splats[j];
    
    					if (!rSplat.Active)
    						continue;
    
    					if (rTerrainSplatPatch.PatchTileCount[y * CTerrainImpl::PATCH_YCOUNT + x][j] == 0)
    						continue;
    
    					const TTerrainTexture & rTexture = m_TextureSet.GetTexture(j);
    					D3DXMatrixMultiply(&matSplatColorTexTransform, &m_matViewInverse, &rTexture.m_matTransform);
    					STATEMANAGER.SetTransform(D3DTS_TEXTURE0, &matSplatColorTexTransform);
    					if (isFirst)
    					{
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    						STATEMANAGER.SetTexture(0, rTexture.pd3dTexture);
    						STATEMANAGER.SetTexture(1, rSplat.pd3dTexture);
    						STATEMANAGER.DrawIndexedPrimitive(ePrimitiveType, 0, m_iPatchTerrainVertexCount, 0, wPrimitiveCount);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
    						isFirst = false;
    					}
    					else
    					{
    						STATEMANAGER.SetTexture(0, rTexture.pd3dTexture);
    						STATEMANAGER.SetTexture(1, rSplat.pd3dTexture);
    						STATEMANAGER.DrawIndexedPrimitive(ePrimitiveType, 0, m_iPatchTerrainVertexCount, 0, wPrimitiveCount);
    					}
    
    				}
    
    				if (m_bDrawShadow) // lets render the shadows (its still some sort of graphic processing magic)
    				{
    					STATEMANAGER.SetRenderState(D3DRS_LIGHTING, TRUE);
    					STATEMANAGER.SetRenderState(D3DRS_FOGCOLOR, 0xFFFFFFFF);
    					STATEMANAGER.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO);
    					STATEMANAGER.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);
    
    					D3DXMATRIX matShadowTexTransform;
    					D3DXMatrixMultiply(&matShadowTexTransform, &matTexTransform, &m_matStaticShadow);
    
    					STATEMANAGER.SetTransform(D3DTS_TEXTURE0, &matShadowTexTransform);
    					STATEMANAGER.SetTexture(0, pTerrain->GetShadowTexture());
    
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_CURRENT);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_CURRENT);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_ADDRESSU, D3DTADDRESS_CLAMP);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_ADDRESSV, D3DTADDRESS_CLAMP);
    
    					if (m_bDrawChrShadow)
    					{
    						STATEMANAGER.SetTransform(D3DTS_TEXTURE1, &m_matDynamicShadow);
    						STATEMANAGER.SetTexture(1, m_lpCharacterShadowMapTexture);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_ADDRESSU, D3DTADDRESS_CLAMP);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_ADDRESSV, D3DTADDRESS_CLAMP);
    					}
    					else
    					{
    						STATEMANAGER.SetTexture(1, NULL);
    					}
    
    					ms_faceCount += wPrimitiveCount;
    					STATEMANAGER.DrawIndexedPrimitive(ePrimitiveType, 0, m_iPatchTerrainVertexCount, 0, wPrimitiveCount);
    					++m_iRenderedSplatNum;
    
    					if (m_bDrawChrShadow)
    					{
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_CURRENT);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    						STATEMANAGER.SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
    					}
    
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_CURRENT);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    					STATEMANAGER.SetTextureStageState(0, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    
    
    					STATEMANAGER.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
    					STATEMANAGER.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
    					if (bEnableFog)
    						STATEMANAGER.SetRenderState(D3DRS_FOGCOLOR, dwFogColor);
    
    					STATEMANAGER.SetRenderState(D3DRS_LIGHTING, FALSE);
    				}
    			}
    		}
    	}
    }

    In void CMapOutdoor::__RenderTerrain_RenderHardwareTransformPatch() after this:

    	float fFogNearDistance;

    Add this:

    	bool bEnableFog; //there is an option in the map's config to disable config but LOL its not implemented properly...

    After this:

    		fFogFarDistance=mc_pEnvironmentData->GetFogFarDistance();

    Add this:

    		bEnableFog = mc_pEnvironmentData->bFogEnable;

    Replace this:

    	{
    		dwFogColor=0xffffffff;
    		fFogNearDistance=5000.0f;
    		fFogFarDistance=10000.0f;
    	}

    With this:

    		bEnableFog = false;

    Replace this:

    	STATEMANAGER.SaveRenderState(D3DRS_TEXTUREFACTOR, dwFogColor);

    With this:

    	if (bEnableFog) // we don't need fog render when no fog activated
    		STATEMANAGER.SaveRenderState(D3DRS_TEXTUREFACTOR, dwFogColor);

    Replace this:

    	DWORD dwFogEnable = STATEMANAGER.GetRenderState(D3DRS_FOGENABLE);

    With this:

    	DWORD dwFogEnable = STATEMANAGER.GetRenderState(D3DRS_FOGENABLE);
    	if (!bEnableFog)
    		dwFogEnable = 0;

    Add this:

    	if (!CTerrainPatch::FULL_MAP_RENDER_ENABLE) // when full load is disabled this part renders the near things, without any fog

    Before this:

    	for( ; it != near_it; ++it)

    Before this:

    	if (m_iRenderedSplatNum < m_iSplatLimit) //there are two of them this is why I inserted the next few lines too
    	{
    		for(it = near_it; it != far_it; ++it)
    		{

    Add this:

    	if (CTerrainPatch::FULL_MAP_RENDER_ENABLE)
    		RenderWholeMapMB(wPrimitiveCount, ePrimitiveType);

    Replace this (there are two of them in the code, replace both):

    	if (m_iRenderedSplatNum < m_iSplatLimit)

    With this:

    	if (!CTerrainPatch::FULL_MAP_RENDER_ENABLE && m_iRenderedSplatNum < m_iSplatLimit)

     

    GameLib/MapOutdoorUpdate.cpp

      Gizli içerikleri ortaya çıkarın

    In void CMapOutdoor::UpdateTerrain(float fX, float fY) before this:

    		ConvertTerrainToTnL(lRealCenterX, lRealCenterY);

    Add this:

    		if (!CTerrainPatch::FULL_MAP_RENDER_ENABLE) // the ConvertTerrainToTnl fills the quadtree, but we don't need this when full render active

     

    Okay, now the terrain should be fully rendered if you activate it by setting m_isFullMapRenderEnable = true in the CMapManager::CMapManager() (and remember: you must set the tilling mode to GPU), but yet the water would be missing, so lets fix it.

    GameLib/MapOutdoorWater.cpp

      Gizli içerikleri ortaya çıkarın

    Add this to the end of the file:

    void CMapOutdoor::DrawFullWater()
    {
    	CTerrain* terra;
    	CTerrainPatch* pTerrainPath;
    	CGraphicVertexBuffer* pkVB;
    	UINT uPriCount;
    	for (auto it = m_TerrainVector.begin(); it != m_TerrainVector.end(); ++it)
    	{
    		terra = *it;
    		for (BYTE y = 0; y < CTerrainImpl::PATCH_YCOUNT; ++y)
    		{
    			for (BYTE x = 0; x < CTerrainImpl::PATCH_XCOUNT; ++x)
    			{
    				pTerrainPath = terra->GetTerrainPatchPtr(x, y);
    				if (!pTerrainPath || !pTerrainPath->IsWaterExist())
    					continue;
    
    				pkVB = pTerrainPath->GetWaterVertexBufferPointer();
    				if (!pkVB || !pkVB->GetD3DVertexBuffer())
    					continue;
    
    				uPriCount = pTerrainPath->GetWaterFaceCount();
    				if (!uPriCount)
    					return;
    
    				STATEMANAGER.SetStreamSource(0, pkVB->GetD3DVertexBuffer(), sizeof(SWaterVertex));
    				STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLELIST, 0, uPriCount);
    			}
    		}
    	}
    }

    In void CMapOutdoor::RenderWater() replace this:

    	if (m_PatchVector.empty())

    With this:

    	if (m_PatchVector.empty() && !CTerrainPatch::FULL_MAP_RENDER_ENABLE) // the patch vector will always be empty when using full render

    Replace this:

    	std::vector<std::pair<float, long> >::iterator i;
    
    	for (i = m_PatchVector.begin(); i != m_PatchVector.end(); ++i)
    	{
    		if (i->first < fFogDistance)
    			DrawWater(i->second);
    	}

    With this:

    	if (!CTerrainPatch::FULL_MAP_RENDER_ENABLE)
    	{
    		std::vector<std::pair<float, long> >::iterator i;
    
    		for (i = m_PatchVector.begin(); i != m_PatchVector.end(); ++i)
    		{
    			if (i->first < fFogDistance)
    				DrawWater(i->second);
    		}
    	}
    	else
    		DrawFullWater();

    Then this:

    	for (i = m_PatchVector.begin(); i != m_PatchVector.end(); ++i)
    	{
    		if (i->first >= fFogDistance)
    			DrawWater(i->second);
    	}

    With this:

    	  
    	  
    
    		  
    		
    			 
    				
    		
    	

     

    Şimdi render yapılmalı, ancak constinfo'daki sis seviyesini artırdınız, çünkü araziyi ve diğer şeyleri o beyaz şeyle kesen "göz" ü kontrol ediyor... Benim için örnek:

    ReIlJUF.png

    Sahne 3

      Gizli içerikleri ortaya çıkarın

    Şu anda değil :P  Yani evet, videoda fark edebileceğiniz gibi, bina görselleştirmesi arazi görselleştirmesiyle aynıdır, bu nedenle binayı yalnızca mevcut durumda ve diğer 8 parça üzerinde oluşturur . Sis özelliğini etkinleştirdiyseniz, muhtemelen orada olmadıklarını fark etmeyeceksiniz :DUmarım bazen yakında yapacağım, ama söz yok...

    4. Aşama

      Gizli içerikleri ortaya çıkarın

    Evet, yani atm, etkinleştirmek istiyorsanız, m_isFullMapRenderEnable'ı true olarak ayarlamanız gerekir, varsayılan olarak etkinleştirme ( MapManager.cpp'deki CMapManager::CMapManager() içinde ayarlayabilirsiniz, ancak beni beklemek istemiyorsanız) Bunu yapmak için kolayca kodlayabilirsiniz , yapılandırma dosyasını yüklediğinizde SetFullMapRender'ı çağırmanız (ve config ofc'ye yeni bir değişken eklemeniz) yeterlidir.

    Yani evet, şimdiye kadar bu kadar, kodla ilgili bir sorununuz varsa (derleme değil, vb.) Muhtemelen yanlış bir şey yapmış olmanızdan kaynaklanıyorsa, bu adımları tam el değmemiş bir istemci kaynağında da yaptım, bu yüzden sizin için de çalışması gerekir ... (Bu yüzden lütfen benden bu konuda yardım etmemi istemeyin :D) Ancak, eğitimde net olmayan bir şey varsa, benden resim veya açıklama isteyebilirsiniz. Zindanlarda (iç mekan haritaları) test etmedim, bu yüzden problemler olabilir...

    Ayrıca bunu yaptıysanız ve bazı güzel haritalarınız varsa veya bazı oyun içi resimler veya videolar için harika yerler bulursanız, burada yayınlamaktan çekinmeyin. :)

    https://metin2.download/picture/BLC850vFvO9grQZyABjkn7szm1I82266/.gif

     

    hello, thanks for sharing, when you turn off the map upload, colors appear like this when uploading

  5. 12 minutes ago, ASIKOO said:

    How?

    bool CInstanceBase::CanPickInstance() 
     { 
             if (!__IsInViewFrustum()) 
                     return false; 
      
             if (IsDoor()) 
             { 
                     if (IsDead()) 
                             return false; 
             } 
      
             if (IsPC()) 
             { 
                     if (IsAffect(AFFECT_EUNHYEONG)) 
                     { 
                             if (!__MainCanSeeHiddenThing()) 
                                     return false; 
                     } 
                     if (IsAffect(AFFECT_REVIVE_INVISIBILITY)) 
                             return false; 
                     if (IsAffect(AFFECT_INVISIBILITY)) 
                             return false; 
             } 
      /* i was add if (IsPet() || IsMount())
                       return false;
    and i removed this code is working */
             if (IsDead()) 
                     return false; 
      
             return true; 
     }

     

    • Love 1
  6. On 7/2/2022 at 1:28 AM, dumita123 said:

    Hello metin2dev,

     

    I've been facing a bug since quite some time and I can't get my head around it.

    The bug is mainly happening only for the main character, for every other instance you can select them properly, however for the main chararacter, neither the select circle effect won't appear when you point the click on the character neither right clicking on it will have an effect.

    Here's a gif with the problem:

    https://metin2.download/picture/rbHLz4gn7aCkbz3Xa2azo78oEMRM5ZuV/.gif

    The weird part is that I don't have any error in syserr related to it or to anything, as a matter of fact.

    I have same problem for horse and pet

  7. On 12/2/2021 at 5:19 AM, Owsap said:

    Nice release, as a contribution, I added support for scrollbar in case anyone prefers it.

    This is the hidden content, please


    mOZztPF.gif    xQbunuL.gif

     

    0127 22:41:11883 :: TypeError
    0127 22:41:11883 :: : 
    0127 22:41:11883 :: SetUp() takes exactly 2 arguments (3 given)
    0127 22:41:11883 :: 
     

    0127 22:41:11883 :: TypeError
    0127 22:41:11883 :: : 
    0127 22:41:11883 :: Open() takes exactly 2 arguments (3 given)
    0127 22:41:11883 :: 
     

    • Metin2 Dev 5
    • Dislove 1
    • Good 1
    • Love 5
×
×
  • 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.