Jump to content

Gurgarath

Forum Moderator
  • Posts

    345
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    100%

Posts posted by Gurgarath

  1. Hey folks,

    Well, I won't go in details, but the official use this for some quests, including their over9refine. I noticed we missed that, it was added somewhere between 2014 and 2015, probably along the new armors. I am aware that the tooltip is a bit crazy, but it is like this on the official too so I share it as is.

    .gif

     

    NOTE: This is not reversed. Only the root part is official.

     

    Spoiler

    This is the hidden content, please

    Have a nice day 😄

     

     

    • Metin2 Dev 69
    • Eyes 1
    • Good 17
    • Love 3
    • Love 20
  2. Just open the .mse in World Editor. Once you did this, you will have to... well... make the effect you want with the icons you want.

    For example the telephone one is comprised of a background, an icon, and a "signal" effect. Every effect is different. In the end, it mostly relies on your ability to create a .mse.

    You can find the World Editor on the forum. We do not have any good tutorials for creating a .mse, so if you ever manage to create good effects, we will be happy to see you post a tutorial on the subtleties and the possibilities of the tool.

    • Good 1
  3. 4 hours ago, xXIntelXx said:

    Oh yeah, for sure, but (at least from original sources and package) I guess cmake kept detecting libtiff (and the others) in the system. If marty's version only goes for targa then it's great.

    I should definitely retry removing all the useless dependencies

     

    EDIT: Ok, I should nuke the useless stuff I guess before compiling DevIL or maybe it's just a Linux thing:

    ttVfPO9.png

     

    I never tried to directly compile LibDevIL on Linux, but I don't have any issue with it on the server. I just used the includes from the 1.7.8 version and on the running machine I installed the apt package "libdevil-dev". On the client I am still on the 1.6.5, but weirdly enough I didn't encounter a single issue with libdevil on the server, neither the order in the mark or the corrupted logo. Maybe I should start to compile it and to link it statically to see if it creates any issue

  4. 5 hours ago, PeaceMaker said:

    I guess you already answered yourself in your last post 😛 
    Ninja is indeed faster when it comes to parsing large build files and it's only beneficial when it's a humongous project such as chromium.

    The down side of having it on a metin2 project is that it wont' make a difference when it comes to build time... And of course GNU make syntax is simpler and easier to read.

    As I said, it is beneficial mostly for incremental build, which is something most of us use (or should use). Unless people do a full gmake clean followed by a gmake, Ninja will be more efficient for that. Considering the syntax, Ninja is arguably easier to read, that was actually one goal of the project, but anyway, I think most of us should use generators for that, such as CMake. Writing Makefiles or build.ninja is something we can afford not to do using modern toolsets. In the end, it's up to personal preferences, if you don't see it fit for your project, it is perfectly fine, I was just here to provide people with a way to add it if they have the use for it 😄

     

    • Love 2
  5. 2 hours ago, Seryov said:

    I usually close the cores using ESC in Windows, with this change is it now possible to close using CTRL + C?

    Exactly, @ Mali brought this up to me and I didn't know that I could close the server with ESC. With this change, you'll be able to use CTRL+C as well as CTRL+BREAK, indeed. Esc does a graceful shutdown as well. Note that you can already use CTRL+C without this fix, but it won't do a graceful shutdown.

    • Love 1
  6. Hello fine people,

    A little bit of context, recently we have been talking with @ msnas about doing an action upon server closure. Which is what the db/game should be doing by default when it exits MainLoop. However, I noticed that because of the way I shutdown my core, I wasn't receiving the right signal and was exiting the server before I can do any other actions. He then told me that he noticed this issue a long time ago because it was also present for him, only on Windows.

    Well, after a little bit of digging, I noticed that the signal was simply not handled on a Windows server. So here is a rudimentary (but working) signal management for Windows. I guess you can still rewrite the whole thing using more modern stuff like boost signal. But so far so good.

    Please not that you should close your db / game using CTRL+C or CTRL+BREAK if you want to gracefully shutdown. As a forced closure (closing the window, shutdown or task manager) would still not allow for the server to properly close, notably because it doesn't give enough grace time.

      So, here is the fix:

    Spoiler

    This is the hidden content, please

     

    Have a nice day! 😄

     

    • Metin2 Dev 85
    • Think 1
    • Confused 1
    • Good 15
    • Love 1
    • Love 21
  7. On 1/25/2023 at 12:24 PM, GenraliDev said:

    If you'd show a practical example of the performance improvement or comparison, that would make it more attractive for people.

    My goal is not to make it attractive to people nor to convince them to use it, but to share something that they can add if they want or if they see fit.

    The main difference between Ninja and Make is that Ninja is around 30 year newer than Make and is supported by Google for Chromium build (a very large project). You can find various Benchmarks online, for example this one from 2015. There are of course many others benchmarks here and there, as well as a nice YouTube video. As I explained in the post, Ninja is really good when you do incremental building (recompile just a few files) and the bigger your project, the better the gains.

     

  8. Hello guys,

    Recently I have been updating my whole workflow and I discovered Ninja. To be concise, Ninja is basically a more modern and lightweight equivalent to "Make" that we (almost) all use. Its motto is simple, avoid being too complex to allow for a faster build & rebuild time, while allowing a human-readable syntax. I will just paraphrase them :

    "When you are in a edit-compile cycle you want it to be as fast as possible — you want the build system to do the minimum work necessary to figure out what needs to be built immediately. [...] Ninja contains the barest functionality necessary to describe arbitrary dependency graphs. Its lack of syntax makes it impossible to express complex decisions."

    Long story short, using it, you will basically build slightly faster & rebuild your project even faster.

    Spoiler

    As everything related to work-flow & FreeBSD, I advise you to be as up to date as possible, so I all forward you to this tutorial if you didn't do it, and I even advise you to go the extra mile and update to clang15.

     

    Let's get started!

    Spoiler

    This is the hidden content, please

    Then you are good! As a rule of thumb, you can use the following commands the same way you use your previous Make commands:

    Clean your solution:

    ninja -t clean

    Build your solution using a number of workers:

    ninja -j<number_of_workers>

     

    Have a nice day!

    • Metin2 Dev 84
    • Not Good 1
    • Scream 2
    • Good 11
    • Love 2
    • Love 26
  9. 4 hours ago, SanctusCZE said:

    Hi i have a little problem with this system its work good but if you see the info, drop items seems not logic becose its shows more items even item that dont drop from that monster. But for First second show the right items, then it refresh And show wronk items. 

    Someone have solution? 

    Sorry for my bad english 😅

     

    3 hours ago, SanctusCZE said:

    Those are called "common_drop". This is how the game works. You can drop them on virtually any monsters, that's why they show there. Of course, it all comes to the logic of having them in this system, is it very good to have them for every monsters, or is it even worth to have them at all displayed? That's up to you. But this is not a bug

    • Metin2 Dev 1
  10. On 12/24/2022 at 5:40 PM, Trial said:

    I'm digging up this old topic because I'm doing some tests on new server files and I just encountered this problem.

    This solutions does work but it doesn't fix the issue at it's origin/source. The origin lies in "CHARACTER::StateMove", here:

    float fRate = (float)dwElapsedTime / (float)m_dwMoveDuration;

    it sometimes happens that "m_dwMoveDuration" equals 0 thus resulting in undefined behavior (see "CHARACTER::CalculateMoveDuration" for more info)

    in "CHARACTER::StateMove" replace this

    	DWORD dwElapsedTime = get_dword_time() - m_dwMoveStartTime;
    	float fRate = (float)dwElapsedTime / (float)m_dwMoveDuration;
    
    	if (fRate > 1.0f)
    		fRate = 1.0f;
    
    	int x = (int)((float)(m_posDest.x - m_posStart.x) * fRate + m_posStart.x);
    	int y = (int)((float)(m_posDest.y - m_posStart.y) * fRate + m_posStart.y);

    with this

    	const DWORD dwElapsedTime = get_dword_time() - m_dwMoveStartTime;
    	int x;
    	int y;
    	bool bMovementFinished = false; //indicates if character moved and has reached destination
    
    	if (!dwElapsedTime || !m_dwMoveDuration)
    	{
    		x = GetX();
    		y = GetY();
    	}
    	else
    	{
    		float fRate = (float)dwElapsedTime / (float)m_dwMoveDuration;
    
    		if (fRate >= 1.0f)
    		{
    			bMovementFinished = true;
    			fRate = 1.0f;
    		}
    
    		x = (int)((float)(m_posDest.x - m_posStart.x) * fRate + m_posStart.x);
    		y = (int)((float)(m_posDest.y - m_posStart.y) * fRate + m_posStart.y);
    	}

    still in same function replace this

    if (1.0f == fRate)

    with this

    if (bMovementFinished)

     

    To be fair, I had the exact same bug and I postponed the fix for months because it was a low importance bug so far, but your post interested me. In hindsight I decided to work on it because this didn't fix it for me (I also had no syserr, but I was experiencing the same bug with mounts).

    This kind of bug is easy to track, just do /state while running with a mount, if the mount has the bug, the coordinates won't be refreshed, which will postpone the loading of the chunks until the server finally catch up and decides to sent the move packet and the refreshing of the chunks.

    Usually, it can happen when the server cannot process something, for players, monsters and NPC it is the data folder that is responsible for dealing with that. It will use the duration and the accumulation of an animation to try to replicate as much as it can where a mob should be and when it should be there. If there is no data or if the data is incorrect, you will have many issues (including but not limited to):

    • False flagged as a cheater / speedhacker
    • Monsters will load with a slight delay (instead of loading in front of you they will load behind you) or won't load at all
    • You will receive damages from monsters far behind because the server thinks you are immobile
    • The server will think a monster has caught up with you while it hasn't and vice-versa

    To fix it, you just have to add the "folder" in the mob_proto of every mount having the issue. Long story short, some mounts won't have a "folder" field in your mob_proto.txt, which will result in them not having a data folder and triggering the aforementioned scenario. In my case, the Manny (20246/20247) was having the issue, so I just added "christmas_2016_mammoth" to the "folder" field in mob_proto.txt, made sure I had it in "share/data/monster" and voilà. It fixed the issue completely.

    To easily know the folder, just check in NPClist and make sure it is a folder and not a "subfolder".  A subfolder in npc_list.txt is working like this:

    #0	#SUBFOLDER	#FOLDER <- (This one should be added into mob_proto.txt)
    0	christmas_2016_mammoth_01	christmas_2016_mammoth

     

    • Metin2 Dev 2
    • Good 1
    • Love 1
  11. The main post have been updated with many fixes have been added on multiple bugs that were fixed overtime! If you find any new bug or new fix, do not hesitate to report or share them!

    14 hours ago, Trial said:

    This happens because the "Anisotropic Texture Filtering" is only applied when instancing "CStateManager" (CStateManager::SetDevice) it must be applied again after losing/resetting the D3D device.

    This could be done by moving this code below from "CStateManager::SetDevice" to "CStateManager::SetDefaultState"

    	D3DCAPS8 d3dCaps;
    	m_lpD3DDev->GetDeviceCaps(&d3dCaps);
    
    	if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MAGFANISOTROPIC)
    		m_dwBestMagFilter = D3DTEXF_ANISOTROPIC;
    	else
    		m_dwBestMagFilter = D3DTEXF_LINEAR;
    
    	if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MINFANISOTROPIC)
    		m_dwBestMinFilter = D3DTEXF_ANISOTROPIC;
    	else
    		m_dwBestMinFilter = D3DTEXF_LINEAR;
    
    	DWORD dwMax = d3dCaps.MaxAnisotropy;
    	dwMax = dwMax < 4 ? dwMax : 4;
    
    	for (int i = 0; i < 8; ++i)
    		m_lpD3DDev->SetTextureStageState(i, D3DTSS_MAXANISOTROPY, dwMax);

    so that "CStateManager::SetDevice" looks like this

    void CStateManager::SetDevice(LPDIRECT3DDEVICE8 lpDevice)
    {
    	StateManager_Assert(lpDevice);
    	lpDevice->AddRef();
    
    	if (m_lpD3DDev)
    	{
    		m_lpD3DDev->Release();
    		m_lpD3DDev = NULL;
    	}
    
    	m_lpD3DDev = lpDevice;
    
    	SetDefaultState();
    }

    (I know the "m_dwBestMagFilter" and "m_dwBestMinFilter" setting part does not need to be called every time device is reset, you are free to edit the code at your will, I kept things simple for the post)

    alternatively these lines could be moved to a new method that will be called in "CStateManager::SetDevice" and wherever there is D3D device reset. Although I recommend first solution.

    Exactly! Thank you for the fix. I wondered why I hadn't the bug for a while but shrugged it off. When adding your fix I noticed I did add Anisotropic on SetDefaultState when I was doing MSAA. Excellent!

    21 minutes ago, ReFresh said:

    So could it be placed at the end of the 'CStateManager::SetDefaultState' function? Or it should be placed somewhere else in 'CStateManager::SetDefaultState' function?

    So it will look like this?

      Hide contents
    void CStateManager::SetDefaultState()
    {
    	m_CurrentState.ResetState();
    	m_CopyState.ResetState();
    	m_ChipState.ResetState();
    
    	m_bScene = false;
    	m_bForce = true;
    
    	D3DXMATRIX Identity;
    	D3DXMatrixIdentity(&Identity);
    
    	SetTransform(D3DTS_WORLD, &Identity);
    	SetTransform(D3DTS_VIEW, &Identity);
    	SetTransform(D3DTS_PROJECTION, &Identity);
    
    	D3DMATERIAL8 DefaultMat;
    	ZeroMemory(&DefaultMat, sizeof(D3DMATERIAL8));
    
    	DefaultMat.Diffuse.r = 1.0f;
    	DefaultMat.Diffuse.g = 1.0f;
    	DefaultMat.Diffuse.b = 1.0f;
    	DefaultMat.Diffuse.a = 1.0f;
    	DefaultMat.Ambient.r = 1.0f;
    	DefaultMat.Ambient.g = 1.0f;
    	DefaultMat.Ambient.b = 1.0f;
    	DefaultMat.Ambient.a = 1.0f;
    	DefaultMat.Emissive.r = 0.0f;
    	DefaultMat.Emissive.g = 0.0f;
    	DefaultMat.Emissive.b = 0.0f;
    	DefaultMat.Emissive.a = 0.0f;
    	DefaultMat.Specular.r = 0.0f;
    	DefaultMat.Specular.g = 0.0f;
    	DefaultMat.Specular.b = 0.0f;
    	DefaultMat.Specular.a = 0.0f;
    	DefaultMat.Power = 0.0f;
    
    	SetMaterial(&DefaultMat);
    
    	SetRenderState(D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_MATERIAL);
    	SetRenderState(D3DRS_SPECULARMATERIALSOURCE, D3DMCS_MATERIAL);
    	SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, D3DMCS_MATERIAL);
    	SetRenderState(D3DRS_EMISSIVEMATERIALSOURCE, D3DMCS_MATERIAL);
    
    	SetRenderState(D3DRS_LINEPATTERN, 0xFFFFFFFF);
    	SetRenderState(D3DRS_LASTPIXEL, FALSE);
    	SetRenderState(D3DRS_ALPHAREF, 1);
    	SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL);
    	SetRenderState(D3DRS_ZVISIBLE, FALSE);
    	SetRenderState(D3DRS_FOGSTART, 0);
    	SetRenderState(D3DRS_FOGEND, 0);
    	SetRenderState(D3DRS_FOGDENSITY, 0);
    	SetRenderState(D3DRS_EDGEANTIALIAS, FALSE);
    	SetRenderState(D3DRS_ZBIAS, 0);
    	SetRenderState(D3DRS_STENCILWRITEMASK, 0xFFFFFFFF);
    	SetRenderState(D3DRS_AMBIENT, 0x00000000);
    	SetRenderState(D3DRS_LOCALVIEWER, FALSE);
    	SetRenderState(D3DRS_NORMALIZENORMALS, FALSE);
    	SetRenderState(D3DRS_VERTEXBLEND, D3DVBF_DISABLE);
    	SetRenderState(D3DRS_CLIPPLANEENABLE, 0);
    	SetRenderState(D3DRS_SOFTWAREVERTEXPROCESSING, FALSE);
    	SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, FALSE);
    	SetRenderState(D3DRS_MULTISAMPLEMASK, 0xFFFFFFFF);
    	SetRenderState(D3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
    	SetRenderState(D3DRS_COLORWRITEENABLE, 0xFFFFFFFF);
    	SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
    	SetRenderState(D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
    	SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);
    	SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
    	SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD);
    	SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
    	SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
    	SetRenderState(D3DRS_FOGENABLE, FALSE);
    	SetRenderState(D3DRS_FOGCOLOR, 0xFF000000);
    	SetRenderState(D3DRS_FOGTABLEMODE, D3DFOG_NONE);
    	SetRenderState(D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR);
    	SetRenderState(D3DRS_RANGEFOGENABLE, FALSE);
    	SetRenderState(D3DRS_ZENABLE, TRUE);
    	SetRenderState(D3DRS_ZFUNC, D3DCMP_LESSEQUAL);
    	SetRenderState(D3DRS_ZWRITEENABLE, TRUE);
    	SetRenderState(D3DRS_DITHERENABLE, TRUE);
    	SetRenderState(D3DRS_STENCILENABLE, FALSE);
    	SetRenderState(D3DRS_ALPHATESTENABLE, FALSE);
    	SetRenderState(D3DRS_CLIPPING, TRUE);
    	SetRenderState(D3DRS_LIGHTING, FALSE);
    	SetRenderState(D3DRS_SPECULARENABLE, FALSE);
    	SetRenderState(D3DRS_COLORVERTEX, FALSE);
    	SetRenderState(D3DRS_WRAP0, 0);
    	SetRenderState(D3DRS_WRAP1, 0);
    	SetRenderState(D3DRS_WRAP2, 0);
    	SetRenderState(D3DRS_WRAP3, 0);
    	SetRenderState(D3DRS_WRAP4, 0);
    	SetRenderState(D3DRS_WRAP5, 0);
    	SetRenderState(D3DRS_WRAP6, 0);
    	SetRenderState(D3DRS_WRAP7, 0);
    
    	SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
    	SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    	SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_CURRENT);
    	SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    	SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_CURRENT);
    	SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
    
    	SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
    	SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    	SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
    	SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    	SetTextureStageState(1, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    	SetTextureStageState(1, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
    
    	SetTextureStageState(2, D3DTSS_COLOROP, D3DTOP_DISABLE);
    	SetTextureStageState(2, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    	SetTextureStageState(2, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
    	SetTextureStageState(2, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    	SetTextureStageState(2, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    	SetTextureStageState(2, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
    
    	SetTextureStageState(3, D3DTSS_COLOROP, D3DTOP_DISABLE);
    	SetTextureStageState(3, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    	SetTextureStageState(3, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
    	SetTextureStageState(3, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    	SetTextureStageState(3, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    	SetTextureStageState(3, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
    
    	SetTextureStageState(4, D3DTSS_COLOROP, D3DTOP_DISABLE);
    	SetTextureStageState(4, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    	SetTextureStageState(4, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
    	SetTextureStageState(4, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    	SetTextureStageState(4, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    	SetTextureStageState(4, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
    
    	SetTextureStageState(5, D3DTSS_COLOROP, D3DTOP_DISABLE);
    	SetTextureStageState(5, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    	SetTextureStageState(5, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
    	SetTextureStageState(5, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    	SetTextureStageState(5, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    	SetTextureStageState(5, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
    
    	SetTextureStageState(6, D3DTSS_COLOROP, D3DTOP_DISABLE);
    	SetTextureStageState(6, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    	SetTextureStageState(6, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
    	SetTextureStageState(6, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    	SetTextureStageState(6, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    	SetTextureStageState(6, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
    
    	SetTextureStageState(7, D3DTSS_COLOROP, D3DTOP_DISABLE);
    	SetTextureStageState(7, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    	SetTextureStageState(7, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
    	SetTextureStageState(7, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
    	SetTextureStageState(7, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    	SetTextureStageState(7, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
    
    	SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, 0);
    	SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 1);
    	SetTextureStageState(2, D3DTSS_TEXCOORDINDEX, 2);
    	SetTextureStageState(3, D3DTSS_TEXCOORDINDEX, 3);
    	SetTextureStageState(4, D3DTSS_TEXCOORDINDEX, 4);
    	SetTextureStageState(5, D3DTSS_TEXCOORDINDEX, 5);
    	SetTextureStageState(6, D3DTSS_TEXCOORDINDEX, 6);
    	SetTextureStageState(7, D3DTSS_TEXCOORDINDEX, 7);
    
    	SetTextureStageState(0, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(0, D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
    
    	SetTextureStageState(1, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(1, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(1, D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
    
    	SetTextureStageState(2, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(2, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(2, D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
    
    	SetTextureStageState(3, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(3, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(3, D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
    
    	SetTextureStageState(4, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(4, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(4, D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
    
    	SetTextureStageState(5, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(5, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(5, D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
    
    	SetTextureStageState(6, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(6, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(6, D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
    
    	SetTextureStageState(7, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(7, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
    	SetTextureStageState(7, D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
    
    	SetTextureStageState(0, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    	SetTextureStageState(0, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    	SetTextureStageState(1, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    	SetTextureStageState(1, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    	SetTextureStageState(2, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    	SetTextureStageState(2, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    	SetTextureStageState(3, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    	SetTextureStageState(3, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    	SetTextureStageState(4, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    	SetTextureStageState(4, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    	SetTextureStageState(5, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    	SetTextureStageState(5, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    	SetTextureStageState(6, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    	SetTextureStageState(6, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    	SetTextureStageState(7, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    	SetTextureStageState(7, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    
    	SetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, 0);
    	SetTextureStageState(1, D3DTSS_TEXTURETRANSFORMFLAGS, 0);
    	SetTextureStageState(2, D3DTSS_TEXTURETRANSFORMFLAGS, 0);
    	SetTextureStageState(3, D3DTSS_TEXTURETRANSFORMFLAGS, 0);
    	SetTextureStageState(4, D3DTSS_TEXTURETRANSFORMFLAGS, 0);
    	SetTextureStageState(5, D3DTSS_TEXTURETRANSFORMFLAGS, 0);
    	SetTextureStageState(6, D3DTSS_TEXTURETRANSFORMFLAGS, 0);
    	SetTextureStageState(7, D3DTSS_TEXTURETRANSFORMFLAGS, 0);
    
    	SetTexture(0, NULL);
    	SetTexture(1, NULL);
    	SetTexture(2, NULL);
    	SetTexture(3, NULL);
    	SetTexture(4, NULL);
    	SetTexture(5, NULL);
    	SetTexture(6, NULL);
    	SetTexture(7, NULL);
    
    	SetPixelShader(0);
    	SetVertexShader(D3DFVF_XYZ);
    
    	D3DXVECTOR4 av4Null[STATEMANAGER_MAX_VCONSTANTS];
    	memset(av4Null, 0, sizeof(av4Null));
    	SetVertexShaderConstant(0, av4Null, STATEMANAGER_MAX_VCONSTANTS);
    	SetPixelShaderConstant(0, av4Null, STATEMANAGER_MAX_PCONSTANTS);
    
    	m_bForce = false;
    
    #ifdef _DEBUG
    	int i, j;
    	for (i = 0; i < STATEMANAGER_MAX_RENDERSTATES; i++)
    		m_bRenderStateSavingFlag[i] = FALSE;
    
    	for (j = 0; j < STATEMANAGER_MAX_TRANSFORMSTATES; j++)
    		m_bTransformSavingFlag[j] = FALSE;
    
    	for (j = 0; j < STATEMANAGER_MAX_STAGES; ++j)
    		for (i = 0; i < STATEMANAGER_MAX_TEXTURESTATES; ++i)
    			m_bTextureStageStateSavingFlag[j][i] = FALSE;
    #endif _DEBUG
    	D3DCAPS8 d3dCaps;
    	m_lpD3DDev->GetDeviceCaps(&d3dCaps);
    
    	if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MAGFANISOTROPIC)
    		m_dwBestMagFilter = D3DTEXF_ANISOTROPIC;
    	else
    		m_dwBestMagFilter = D3DTEXF_LINEAR;
    
    	if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MINFANISOTROPIC)
    		m_dwBestMinFilter = D3DTEXF_ANISOTROPIC;
    	else
    		m_dwBestMinFilter = D3DTEXF_LINEAR;
    
    	DWORD dwMax = d3dCaps.MaxAnisotropy;
    	dwMax = dwMax < 4 ? dwMax : 4;
    
    	for (int i = 0; i < 8; ++i)
    		m_lpD3DDev->SetTextureStageState(i, D3DTSS_MAXANISOTROPY, dwMax);
    }

    You can do like this indeed!

    • Metin2 Dev 3
    • Good 3
    • Love 3
  12. 1 hour ago, Euzebiusz said:

    Can you make a recording of what the situation looks like before adding the code and what the situation looks like after adding the code?

    Before: Consistent stuttering upon meeting an unloaded entity or walking through the map

    After: Minimal to no stuttering upon loading a chunk of the map

  13. On 10/30/2022 at 9:06 AM, Mafuyu said:

    dunno how i should post a gif for it, we are simply using bravery cape at the end of red forest and we get hundreds of spam messages in chat from the fix. The thing is, i didnt removed the return in the function so the outranged mobs should still gets "ignored" but for us, every mob dies fine. Its not like we are hitting 20 times on specific mobs and they wont die because of desync so they should be all in range but i dont know why we then get all those false positives. Can you give me your red forst mob folders so i can check their accumulation and compare with mine. 

     

    Also we have this issue with the red forest boss as you mentioned.

    Hello,

    Sorry for the late answer, I had to sort out other things before going back to this issue. I checked everything and the only time it occured so far with me was with the "Red Dryads". The maximum distance recorded was "8.60". It can also be related to the motion itself. So cranking it up to 9 should reduce most of the issues. I updated the tutorial and I will keep my informations like that to eventually make some fine-tune and publish it. Thank you for your report!

  14. 1 hour ago, Ace said:

    Hello friends,
    I never finished this map, and yet I work on it from time to time
    once a year for 1 hour. I thought I'd post it to you guys and maybe
    someone can use it, maybe for educational purposes? Please do not pass
    it off as your own, as the structure comes entirely from me.

    The download includes the map and the entire "ymir work" map folder.
    That means simply pushing it into drive (D) and you can edit it.
    So this is the same map that you will find on the first page, so the screens 
    are from this one.

    Have fun crafting and learning.

    MAP IS NOT FINISHED. I WILL NOT BE LIABLE FOR ANY KICKS OR ANYTHING ELSE.

    Minimap: 

    Download:
    >

    This is the hidden content, please

     

    Best regards

     

    Thank you for your reupload, however what is the password of the rar please?

    • Smile Tear 1
    • Good 1
  15. 3 hours ago, Mafuyu said:

    Bugged bro. Pulling mobs on maps with many mobs gets always detected. For us, red forest every pull with bravery cape triggers the "fix".

    Can you tell me the steps to reproduce please, with a gif eventually?

    It's possible that false positive occurs and it's very easy to fine-tune the detection based on specific cases. I personally just tried to exp 30 minutes in the redwood in multiple spots and with multiple mobs, even destroyed a stone and spawned two hundred monsters of different kind and I didn't manage to get a single report (until I fought the redwood boss, in which I got two reports during all the fight that I couldn't reproduce).

    I have had a few false positives so far, that I am logging and investigating, but please, note that for this fix to work, you must have correct server data for monsters (with correct accumulations and so on). Every fix on the server that relies on sectree (speedhack etc.) must have correct data for the server to correctly process what is going on. It is slightly prone to lags and you must be careful of your server's data.

    Spoiler

    A mismatch will occur if your client have different data than the server, for example on the client you will see a monster that is in your vicinity and attack it, while based on the server data, notably motion accumulation, this mob is 7 meters behind because on his motion data, he cannot travel the distance it does on the client, and the "fix" (as you call it) is rightfully telling you that you cannot attack a monster that is this far (because for the server, he is far).

     

    I do not say that the fix is perfect, far from that, but if your server data are correct, you are not supposed to get spammed like this and the amount of false positive is relatively small. The goal of the system is not to ban players, but to mitigate obvious abuse. If you are getting spammed ONLY in specific places, then it is more your fault than the system's fault. I would however gladfully fix the system if you provide me with enough informations, but so far, I only had a small amount of false positive, nothing that hinders the gameplay (I didn't notice once that I was flagged and that my hit was cancelled) and I log every single one of them to make sure they won't happen twice.

    I am genuinely interested on the issue, thank you for your report.

     

    • Metin2 Dev 1
×
×
  • 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.