-
Posts
31 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by forum80
-
-
On 03.09.2023 at 11:15, Ballads said:
Kusursuz çalışıyor, tek detay ekranın sol üst kısmındaki beceri simgelerinin öldükten sonra kaybolması, bu da buff'ın aktif olmadığı hissini veriyor.
i have some problem
-
someone help me I have the same problem
-
how can we make it to readable format
Spoiler- 1
-
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 -
2 hours ago, Developer1321 said:
bro i fixed use experimental
-
i have a problem
1: buttons and textboxes pop out of the clipboard when I scroll
- 1
-
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
-
3 hours ago, WeedHex said:
Do it x20 times while checking your ram.
I tried 30 times, it's 300mb
- 1
-
-
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
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 )
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 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
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
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
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
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
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
GameLib/MapManager.cpp
CMapManager ::CMapManager() içinde şunu ekleyin:
Bundan sonra:
Bundan sonra void CMapManager::Create() içinde:
Bunu ekle:
GameLib/TerrainPatch.h
GameLib/TerrainPatch.cpp
Bundan sonra:
bool CTerrainPatch::SOFTWARE_TRANSFORM_PATCH_ENABLE=TRUE;
Add this:
bool CTerrainPatch::FULL_MAP_RENDER_ENABLE = false;
GameLib/MapOutdoor.cpp
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
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
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
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
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
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
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:
Sahne 3
Şu anda değil 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 Umarım bazen yakında yapacağım, ama söz yok...
4. Aşama
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 ) 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
-
1 hour ago, [007]DawisHU said:
Can you show us your uiscript/guildinfopage_eu.py or guildinfopage.py?
Ty for answer but i solved this problem in eterlib
- 1
-
hello friends, when I add the guild icon, both the icon on the character and the icon on the window go there. I made a few attempts to solve the problem, but I could not fix the error, what could the problem be?
https://metin2.download/picture/C2uRxDbAnLdzb2tsROdc8pruSEHjIf2D/.gif
- 1
-
sura horse skill problem ?
https://metin2.download/picture/iWEj7qUIIONIQflilNZURDnfrYsCdkU6/.gif
#solved
-
4 minutes ago, Ciucciamelo said:
Without click !! Brain
Wait me for home
-
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; }
- 1
-
-
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
-
hello, I have a problem. When I interact with the pet or horse with the right button, the selected effect does not appear and nothing can be done with either the left button or the right button. I wonder where is the problem? thanks and sorry for bad english
-
1 hour ago, SmyleMDFK said:
Hy Mali , you can make one adaptation to "shift+rclick open chest x10" and "ctrl+x show info drop" for this system?
Its easy add me discord ByDoqan80#1261
-
On 12/2/2021 at 5:19 AM, Owsap said:
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 ::
- 5
- 1
- 1
- 5
-
18 hours ago, Sunset said:
Did you added it correctly in the binary?
yes
-
-
14 hours ago, rares2017 said:
can u help me ?
-
costume weapon system does not work
https://metin2.download/picture/Qp37pr645dVZ03wa0svi3yh6hU3tW32M/.gif
Official Clip Masking [REVERSED]
in Features & Metin2 Systems
Posted
hi can you modify dxd9?