Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1.         // ----
  2.         // # Attack case(s)
  3.         // ----
  4.         /*case 0xD9:*/ case 0x1E: /*case 0x19:*/
  5.         {
  6.             if(gObj[aIndex].Type == OBJ_USER)
  7.             {
  8.                 _NEW_OBJECT * nObject       = & g_GS.nObject[FIXINDEX];
  9.                 // ----
  10.                 nObject->dwAttacks++;
  11.                 // ----
  12.                 nObject->dwCurrentTime = GetTickCount();
  13.                 nObject->dwElapsedTime = nObject->dwCurrentTime - nObject->dwLastUpdateTime;
  14.                 // ----
  15.                 if(nObject->dwElapsedTime >= 1500)
  16.                 {
  17.                     nObject->dwAttacksPerSec = (UINT)(nObject->dwAttacks * 1000.0 / nObject->dwElapsedTime);
  18.                     // ----
  19.                     if(nObject->dwBest < nObject->dwAttacksPerSec)
  20.                     {
  21.                         nObject->dwBest = nObject->dwAttacksPerSec;
  22.                     }
  23.                     // ----
  24.                     _beginthread(LOGIT, 4, (LPVOID)aIndex); // make log for test
  25.                     // ----
  26.                     nObject->dwAttacks = 0;
  27.                     nObject->dwLastUpdateTime = nObject->dwCurrentTime;
  28.                 }
  29.  
  30.             }
  31.            
  32.         }
  33.         break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement