Jump to content

Trial

Member
  • Posts

    63
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Trial last won the day on November 4 2014

Trial had the most liked content!

About Trial

Informations

  • Gender
    Male

Recent Profile Visitors

2439 profile views

Trial's Achievements

Enthusiast

Enthusiast (6/16)

  • Dedicated
  • Reacting Well
  • Very Popular Rare
  • First Post
  • Collaborator

Recent Badges

231

Reputation

  1. if (Cell == DestCell) return false;
  2. i don't think it's related, the bug is present on any map/location, it only depends on the call to CHARACTER::CalculateMoveDuration which sets the m_dwMoveDuration to 0 if CHARACTER::m_posStart equals CHARACTER::m_posDest it's easy to trigger : login, click somewhere to move (do not release mouse button) + CTRL+G to mount -> undefined behavior, it might be "fine" if the result of (float)dwElapsedTime / (float)m_dwMoveDuration is positive (inf) but if the result is negative (-nan / -inf) it results in -INTMAX coordinates. Anyway it's undefined behavior in all cases
  3. I still recommend you to apply this fix, I have folders configured as they should be but the problem persisted because of the undefined behavior I quoted above. SYSERR: Dec 26 17:40:03 :: CHARACTER::Sync: cannot find tree at -2147483648 -2147483648 (name: sync) Edit: Not same bug I think, the one caused by this undefined behavior is not directly related to motion files.
  4. 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)
  5. 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.
  6. Did this a while ago after noticing freak memory usage, I recommend you add these checks as well for more optimization: else if (m_me->IsType(ENTITY_ITEM) && ent->IsType(ENTITY_ITEM)) { //NOTE: no item to item insert return; } else if (m_me->IsType(ENTITY_ITEM) && ent->IsType(ENTITY_CHARACTER) && !ent->GetDesc()) { //NOTE: no item to NPC insert return; } else if (m_me->IsType(ENTITY_CHARACTER) && !m_me->GetDesc() && ent->IsType(ENTITY_ITEM)) { //NOTE: no NPC to item insert return; }
  7. Since I can't edit the original post (?) here are some explanations for those who are interested in the details: DB Cache should never be flushed manually, better let the normal cache handling process do it's work.
  8. Sorry if there was any confusion, I was just mentioning the fact that it was posted on your blog. And yes this is the same game admin I gave this fix to, don't know why he asked you about this as it was fixed, anyway. I suggest you remove the "how to" part from your screenshots as it may still be too early, I will edit my initial post about details soon.
  9. Hello, So I have shared this fix with someone a few days ago and saw this morning that martysama has published it on it's blog. I let you know before kids with "private" access to this start playing with it. (I do not have acces to martysama's blog member posts and do not know who does) The "pc_change_name" function has an exploitable item duplication bug. The fix is simple, in "pc_change_name" replace this code: db_clientdesc->DBPacketHeader(HEADER_GD_FLUSH_CACHE, 0, sizeof(DWORD)); db_clientdesc->Packet(&pid, sizeof(DWORD)); with this: if (!CHARACTER_MANAGER::instance().FlushDelayedSave(ch)) { ch->SaveReal(); } I will edit this post to add details on how and why later on to avoid kids playing with it before it's patched on majority of servers. Regards,
  10. Man you gotta understand that what OP is asking about is impossible to achieve and does not even make any sense. You keep talking about cores but here it's not relevant, OP wants 2 players to interact in real-time with them being on totally different servers. To be able to interact with other players in real-time you MUST be on same core, you can spread cores on multiple servers but this has nothing to do with OP's request. This could be achieved by the exchange of all data concerning the entities between cores but again refer to the quote below : Think 5 sec. about the request and what you are suggesting @Distraught and if you still don't understand I can't make it any simpler, have a nice day gameloft c++ programmer!
  11. Hi metin2dev community, I'm looking for a complete ItemShop script with official like user interface OR a fully qualified php developer familiar with laravel and/or symfony framework to develop it from scratch. You must have worked at least on one project using one of the following frameworks : Laravel 5.8+ / Symfony 4.X+ I'm in need of complete web ItemShop, it should include main features of a common game shop, something like this: Starting salary for coding the project from scratch: 500€ (to be discussed) Obviously I will not pay such a high price if you simply sell a ready-made project that you can resell to several other people. You can PM me or ask here for more details. Best regards,
×
×
  • 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.