Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Anti-UC

Status
Not open for further replies.
Hi, I'm Omar!
Member
Joined
Jan 6, 2011
Messages
1,345
Reaction score
646
Very late Christmas gift, anyway, have fun.

Code:
float ZTimer::UpdateFrame()
{
	LARGE_INTEGER qwTime;

	if(!m_bInitialized)
	{
		m_bInitialized = true;
		/*LARGE_INTEGER qwTicksPerSec;
		(*m_pbUsingQPF) = QueryPerformanceFrequency( &qwTicksPerSec );
		if( (*m_pbUsingQPF) )
		{
			(*m_pllQPFTicksPerSec) = qwTicksPerSec.QuadPart;

			QueryPerformanceCounter( &qwTime );

			(*m_pllLastElapsedTime) = qwTime.QuadPart;
		}
		else
		{
			(*m_pLasttime) = timeGetTime();
		}*/
		(*m_pLasttime) = timeGetTime();
	}

	float fElapsed;

	if( (*m_pbUsingQPF) )
	{
		QueryPerformanceCounter( &qwTime );

		fElapsed = (float)((double) ( qwTime.QuadPart - (*m_pllLastElapsedTime) ) / (double) (*m_pllQPFTicksPerSec));
		(*m_pllLastElapsedTime) = qwTime.QuadPart;
	}
	else
	{
		(*m_pThistime) = timeGetTime();
		(*m_pElapsed) = (*m_pThistime) - (*m_pLasttime);
		(*m_pLasttime) = (*m_pThistime);
		(*m_pllLastElapsedTime) = *m_pElapsed;
		fElapsed=.001f*(float)(*m_pElapsed);
	}

	
	UpdateEvents();			// ŸÀÌ¸Ó À̺¥Æ®µé ¾÷µ¥ÀÌÆ®

	ShiftFugitiveValues();

	return fElapsed;
}
 
Elite Diviner
Joined
Jul 27, 2012
Messages
411
Reaction score
49
u sure this owkr?
 
Last edited:
Initiate Mage
Joined
Sep 13, 2012
Messages
99
Reaction score
46
I had one like this, good release (I did not know it had on the source gunz).
 
Last edited:
Joined
Sep 10, 2007
Messages
970
Reaction score
815
Terrible.

Code:
#ifndef _ZTIMER_H
#define _ZTIMER_H


#include <list>
using namespace std;


typedef void(ZGameTimerEventCallback)(void* pParam);
class ZTimerEvent;


// ¾ÕÀ¸·Î °ÔÀÓƽ, ŸÀÌ¸Ó °ü·ÃÀº ¿©±â¼­ °ü¸®Çϵµ·Ï ÇÏÀÚ
class ZTimer
{
private:
	bool						m_bInitialized;




	unsigned long int			m_nLastTime;
	unsigned long int			m_nNowTime;
	list<ZTimerEvent*>			m_EventList;


	// ŸÀÌ¸Ó °»½Å¿ë º¯¼öµé : ¸Þ¸ð¸®ÇÙÀ¸·Î º¯Á¶ÇÏ¸é ½ºÇǵåÇÙÀÌ °¡´ÉÇÏ´Ù ±×·¡¼­ ÈüÇÒ´çÇÏ°í ÁÖ±âÀûÀ¸·Î À§Ä¡¸¦ ¿Å±ä´Ù
	BOOL* m_pbUsingQPF;
	LONGLONG* m_pllQPFTicksPerSec;
	LONGLONG* m_pllLastElapsedTime;
	DWORD* m_pThistime;
	DWORD* m_pLasttime;
	DWORD* m_pElapsed;


	void UpdateEvents();
	void ShiftFugitiveValues();


public:
	ZTimer();
	virtual ~ZTimer();


	float UpdateFrame();
	void ResetFrame();


	// ŸÀÌ¸Ó À̺¥Æ® °ü·Ã
	void SetTimerEvent(unsigned long int nElapsedTime, ZGameTimerEventCallback* fnTimerEventCallback, void* pParam, bool bTimerOnce=false);
	void ClearTimerEvent(ZGameTimerEventCallback* fnTimerEventCallback);




	unsigned long int GetNowTick() { return m_nNowTime; }
};


class ZUpdateTimer
{
private:
	float		m_fUpdateTime;
	float		m_fElapsedTime;
public:
	ZUpdateTimer(float fUpdateTime) : m_fUpdateTime(fUpdateTime), m_fElapsedTime(0.0f) { }
	ZUpdateTimer() : m_fUpdateTime(0.0f), m_fElapsedTime(0.0f) { }
	bool Update(float fDelta)
	{
		m_fElapsedTime += fDelta;
		if (m_fElapsedTime < m_fUpdateTime) return false;


		m_fElapsedTime = 0.0f;
		return true;
	}
	void Init(float fUpdateTime)	{ m_fUpdateTime = fUpdateTime; m_fElapsedTime = 0.0f; }
	void Force()					{ m_fElapsedTime = m_fUpdateTime; }
	void SetUpdateTime(float fUpdateTime) { m_fUpdateTime = fUpdateTime; }
	float GetUpdateTime() const { return m_fUpdateTime; }
};




#endif

Code:
#include "stdafx.h"
#include "ZTimer.h"
#include <Windows.h>


typedef unsigned __int8  UI8;
typedef   signed __int8  SI8;
typedef unsigned __int16 UI16;
typedef   signed __int16 SI16;
typedef unsigned __int32 UI32;
typedef   signed __int32 SI32;
typedef unsigned __int64 UI64;
typedef   signed __int64 SI64;




typedef SI32 (NTAPI *PFN_NT_QUERY_PERFORMANCE_COUNTER)(OUT PLARGE_INTEGER PerformanceCounter, OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL);
PFN_NT_QUERY_PERFORMANCE_COUNTER NtQueryPerformanceCounter;


class ZTimerEvent
{
private:
	unsigned long int			m_nUpdatedTime;				///< ½Ã°£°è»êÇϱâ À§ÇØ ³»ºÎ¿¡¼­¸¸ »ç¿ëÇÏ´Â º¯¼ö
	unsigned long int			m_nElapse;					///< »ç¿ëÀÚ°¡ ¼³Á¤ÇÑ ½Ã°£(1000 - 1ÃÊ)
	bool						m_bOnce;					///< true·Î ¼³Á¤µÇ¸é Çѹø¸¸ ŸÀÌ¸Ó À̺¥Æ®°¡ ¹ß»ýÇÑ´Ù.
	void*						m_pParam;					///< Event CallbackÀÇ ÆĶó¸ÞÅÍ
public:
	ZTimerEvent() { m_nUpdatedTime = 0; m_nElapse = 0; m_bOnce = false; m_fnTimerEventCallBack = NULL; m_pParam=NULL; }
	bool UpdateTick(unsigned long int nDelta)
	{
		if (m_nElapse<0) return false;


		m_nUpdatedTime += nDelta;


		if (m_nUpdatedTime >= m_nElapse)
		{
			if (m_fnTimerEventCallBack)
			{
				m_fnTimerEventCallBack(m_pParam);
			}


			if (m_bOnce) return true;
		}


		return false;
	}
	void SetTimer(unsigned long int nElapse, ZGameTimerEventCallback* fnTimerEventCallback, void* pParam, bool bTimerOnce)
	{
		m_nElapse = nElapse;
		m_fnTimerEventCallBack = fnTimerEventCallback;
		m_pParam = pParam;
		m_bOnce = bTimerOnce;
	}


	ZGameTimerEventCallback*	m_fnTimerEventCallBack;		///< Event Callback Æ÷ÀÎÅÍ
};




/////////////////////////////////////////////////////////////////////////////////////////////////////


ZTimer::ZTimer()
{
	m_bInitialized = false;
	m_nNowTime = 0;
	m_nLastTime = 0;


	m_pbUsingQPF = new BOOL(FALSE);
	m_pllQPFTicksPerSec = new LONGLONG(0);
	m_pllLastElapsedTime = new LONGLONG(0);
	m_pThistime = new DWORD;
	m_pLasttime = new DWORD;
	m_pElapsed = new DWORD;
	HMODULE Ntdll;


	Ntdll = GetModuleHandleW(L"ntdll.dll");
	NtQueryPerformanceCounter = (PFN_NT_QUERY_PERFORMANCE_COUNTER) GetProcAddress(Ntdll, "NtQueryPerformanceCounter");


}


ZTimer::~ZTimer()
{
	for (list<ZTimerEvent*>::iterator itor = m_EventList.begin(); itor != m_EventList.end(); ++itor)
	{
		ZTimerEvent* pEvent = (*itor);
		delete pEvent;
	}


	m_EventList.clear();


	delete m_pbUsingQPF;
	delete m_pllQPFTicksPerSec;
	delete m_pllLastElapsedTime;
	delete m_pThistime;
	delete m_pLasttime;
	delete m_pElapsed;
}


void ZTimer::ResetFrame()
{
	m_bInitialized=false;
}


float ZTimer::UpdateFrame()
{
	LARGE_INTEGER qwTime;
	LARGE_INTEGER PerformanceCounter;


	if(!m_bInitialized)
	{
		m_bInitialized = true;
		LARGE_INTEGER qwTicksPerSec;
		(*m_pbUsingQPF) = NtQueryPerformanceCounter( &PerformanceCounter, &qwTicksPerSec );
		(*m_pllQPFTicksPerSec) = qwTicksPerSec.QuadPart;


		NtQueryPerformanceCounter( &qwTime, &PerformanceCounter );


		(*m_pllLastElapsedTime) = qwTime.QuadPart;
	}


	float fElapsed;


	NtQueryPerformanceCounter( &qwTime, &PerformanceCounter );


	fElapsed = (float)((double) ( qwTime.QuadPart - (*m_pllLastElapsedTime) ) / (double) (*m_pllQPFTicksPerSec));
	(*m_pllLastElapsedTime) = qwTime.QuadPart;


	
	UpdateEvents();			// ŸÀÌ¸Ó À̺¥Æ®µé ¾÷µ¥ÀÌÆ®


	ShiftFugitiveValues();
	return fElapsed;
}


void ZTimer::ShiftFugitiveValues()
{
	// ¸Þ¸ð¸®ÇÙÀ» ÇÇÇϱâ À§ÇØ °ü·Ã º¯¼öÀÇ Èü À§Ä¡¸¦ ¿Å±ä´Ù


	BOOL* pBool1 = m_pbUsingQPF;
	m_pbUsingQPF = new BOOL(*pBool1);


	LONGLONG* pll1 = m_pllQPFTicksPerSec;
	m_pllQPFTicksPerSec = new LONGLONG(*pll1);


	LONGLONG* pll2 = m_pllLastElapsedTime;
	m_pllLastElapsedTime = new LONGLONG(*pll2);


	DWORD* pDword1 = m_pThistime;
	m_pThistime = new DWORD(*pDword1);


	DWORD* pDword2 = m_pLasttime;
	m_pLasttime = new DWORD(*pDword2);


	DWORD* pDword3 = m_pElapsed;
	m_pElapsed = new DWORD(*pDword3);


	delete pBool1;
	delete pll1;
	delete pll2;
	delete pDword1;
	delete pDword2;
	delete pDword3;
}


void ZTimer::UpdateEvents()
{
	m_nNowTime = timeGetTime();
	unsigned long int nDeltaTime = m_nNowTime - m_nLastTime;
	m_nLastTime = m_nNowTime;


	if (m_EventList.empty()) return;


	for (list<ZTimerEvent*>::iterator itor = m_EventList.begin(); itor != m_EventList.end(); )
	{
		ZTimerEvent* pEvent = (*itor);
		bool bDone = pEvent->UpdateTick(nDeltaTime);
		if (bDone)
		{
			delete pEvent;
			itor = m_EventList.erase(itor);
		}
		else
		{
			++itor;
		}
	}
}


void ZTimer::SetTimerEvent(unsigned long int nElapsedTime, ZGameTimerEventCallback* fnTimerEventCallback, void* pParam, bool bTimerOnce)
{
	ZTimerEvent* pNewTimerEvent = new ZTimerEvent;
	pNewTimerEvent->SetTimer(nElapsedTime, fnTimerEventCallback, pParam, bTimerOnce);
	m_EventList.push_back(pNewTimerEvent);
}


void ZTimer::ClearTimerEvent(ZGameTimerEventCallback* fnTimerEventCallback)
{
	if (fnTimerEventCallback == NULL) return;


	for (list<ZTimerEvent*>::iterator itor = m_EventList.begin(); itor != m_EventList.end(); )
	{
		ZTimerEvent* pEvent = (*itor);


		if (pEvent->m_fnTimerEventCallBack == fnTimerEventCallback)
		{
			delete pEvent;
			itor = m_EventList.erase(itor);
		}
		else
		{
			++itor;
		}
	}


}
 
Hi, I'm Omar!
Member
Joined
Jan 6, 2011
Messages
1,345
Reaction score
646
Terrible.

Code:
#ifndef _ZTIMER_H
#define _ZTIMER_H


#include <list>
using namespace std;


typedef void(ZGameTimerEventCallback)(void* pParam);
class ZTimerEvent;


// ¾ÕÀ¸·Î °ÔÀÓƽ, ŸÀÌ¸Ó °ü·ÃÀº ¿©±â¼­ °ü¸®Çϵµ·Ï ÇÏÀÚ
class ZTimer
{
private:
	bool						m_bInitialized;




	unsigned long int			m_nLastTime;
	unsigned long int			m_nNowTime;
	list<ZTimerEvent*>			m_EventList;


	// ŸÀÌ¸Ó °»½Å¿ë º¯¼öµé : ¸Þ¸ð¸®ÇÙÀ¸·Î º¯Á¶ÇÏ¸é ½ºÇǵåÇÙÀÌ °¡´ÉÇÏ´Ù ±×·¡¼­ ÈüÇÒ´çÇÏ°í ÁÖ±âÀûÀ¸·Î À§Ä¡¸¦ ¿Å±ä´Ù
	BOOL* m_pbUsingQPF;
	LONGLONG* m_pllQPFTicksPerSec;
	LONGLONG* m_pllLastElapsedTime;
	DWORD* m_pThistime;
	DWORD* m_pLasttime;
	DWORD* m_pElapsed;


	void UpdateEvents();
	void ShiftFugitiveValues();


public:
	ZTimer();
	virtual ~ZTimer();


	float UpdateFrame();
	void ResetFrame();


	// ŸÀÌ¸Ó À̺¥Æ® °ü·Ã
	void SetTimerEvent(unsigned long int nElapsedTime, ZGameTimerEventCallback* fnTimerEventCallback, void* pParam, bool bTimerOnce=false);
	void ClearTimerEvent(ZGameTimerEventCallback* fnTimerEventCallback);




	unsigned long int GetNowTick() { return m_nNowTime; }
};


class ZUpdateTimer
{
private:
	float		m_fUpdateTime;
	float		m_fElapsedTime;
public:
	ZUpdateTimer(float fUpdateTime) : m_fUpdateTime(fUpdateTime), m_fElapsedTime(0.0f) { }
	ZUpdateTimer() : m_fUpdateTime(0.0f), m_fElapsedTime(0.0f) { }
	bool Update(float fDelta)
	{
		m_fElapsedTime += fDelta;
		if (m_fElapsedTime < m_fUpdateTime) return false;


		m_fElapsedTime = 0.0f;
		return true;
	}
	void Init(float fUpdateTime)	{ m_fUpdateTime = fUpdateTime; m_fElapsedTime = 0.0f; }
	void Force()					{ m_fElapsedTime = m_fUpdateTime; }
	void SetUpdateTime(float fUpdateTime) { m_fUpdateTime = fUpdateTime; }
	float GetUpdateTime() const { return m_fUpdateTime; }
};




#endif

Code:
#include "stdafx.h"
#include "ZTimer.h"
#include <Windows.h>


typedef unsigned __int8  UI8;
typedef   signed __int8  SI8;
typedef unsigned __int16 UI16;
typedef   signed __int16 SI16;
typedef unsigned __int32 UI32;
typedef   signed __int32 SI32;
typedef unsigned __int64 UI64;
typedef   signed __int64 SI64;




typedef SI32 (NTAPI *PFN_NT_QUERY_PERFORMANCE_COUNTER)(OUT PLARGE_INTEGER PerformanceCounter, OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL);
PFN_NT_QUERY_PERFORMANCE_COUNTER NtQueryPerformanceCounter;


class ZTimerEvent
{
private:
	unsigned long int			m_nUpdatedTime;				///< ½Ã°£°è»êÇϱâ À§ÇØ ³»ºÎ¿¡¼­¸¸ »ç¿ëÇÏ´Â º¯¼ö
	unsigned long int			m_nElapse;					///< »ç¿ëÀÚ°¡ ¼³Á¤ÇÑ ½Ã°£(1000 - 1ÃÊ)
	bool						m_bOnce;					///< true·Î ¼³Á¤µÇ¸é Çѹø¸¸ ŸÀÌ¸Ó À̺¥Æ®°¡ ¹ß»ýÇÑ´Ù.
	void*						m_pParam;					///< Event CallbackÀÇ ÆĶó¸ÞÅÍ
public:
	ZTimerEvent() { m_nUpdatedTime = 0; m_nElapse = 0; m_bOnce = false; m_fnTimerEventCallBack = NULL; m_pParam=NULL; }
	bool UpdateTick(unsigned long int nDelta)
	{
		if (m_nElapse<0) return false;


		m_nUpdatedTime += nDelta;


		if (m_nUpdatedTime >= m_nElapse)
		{
			if (m_fnTimerEventCallBack)
			{
				m_fnTimerEventCallBack(m_pParam);
			}


			if (m_bOnce) return true;
		}


		return false;
	}
	void SetTimer(unsigned long int nElapse, ZGameTimerEventCallback* fnTimerEventCallback, void* pParam, bool bTimerOnce)
	{
		m_nElapse = nElapse;
		m_fnTimerEventCallBack = fnTimerEventCallback;
		m_pParam = pParam;
		m_bOnce = bTimerOnce;
	}


	ZGameTimerEventCallback*	m_fnTimerEventCallBack;		///< Event Callback Æ÷ÀÎÅÍ
};




/////////////////////////////////////////////////////////////////////////////////////////////////////


ZTimer::ZTimer()
{
	m_bInitialized = false;
	m_nNowTime = 0;
	m_nLastTime = 0;


	m_pbUsingQPF = new BOOL(FALSE);
	m_pllQPFTicksPerSec = new LONGLONG(0);
	m_pllLastElapsedTime = new LONGLONG(0);
	m_pThistime = new DWORD;
	m_pLasttime = new DWORD;
	m_pElapsed = new DWORD;
	HMODULE Ntdll;


	Ntdll = GetModuleHandleW(L"ntdll.dll");
	NtQueryPerformanceCounter = (PFN_NT_QUERY_PERFORMANCE_COUNTER) GetProcAddress(Ntdll, "NtQueryPerformanceCounter");


}


ZTimer::~ZTimer()
{
	for (list<ZTimerEvent*>::iterator itor = m_EventList.begin(); itor != m_EventList.end(); ++itor)
	{
		ZTimerEvent* pEvent = (*itor);
		delete pEvent;
	}


	m_EventList.clear();


	delete m_pbUsingQPF;
	delete m_pllQPFTicksPerSec;
	delete m_pllLastElapsedTime;
	delete m_pThistime;
	delete m_pLasttime;
	delete m_pElapsed;
}


void ZTimer::ResetFrame()
{
	m_bInitialized=false;
}


float ZTimer::UpdateFrame()
{
	LARGE_INTEGER qwTime;
	LARGE_INTEGER PerformanceCounter;


	if(!m_bInitialized)
	{
		m_bInitialized = true;
		LARGE_INTEGER qwTicksPerSec;
		(*m_pbUsingQPF) = NtQueryPerformanceCounter( &PerformanceCounter, &qwTicksPerSec );
		(*m_pllQPFTicksPerSec) = qwTicksPerSec.QuadPart;


		NtQueryPerformanceCounter( &qwTime, &PerformanceCounter );


		(*m_pllLastElapsedTime) = qwTime.QuadPart;
	}


	float fElapsed;


	NtQueryPerformanceCounter( &qwTime, &PerformanceCounter );


	fElapsed = (float)((double) ( qwTime.QuadPart - (*m_pllLastElapsedTime) ) / (double) (*m_pllQPFTicksPerSec));
	(*m_pllLastElapsedTime) = qwTime.QuadPart;


	
	UpdateEvents();			// ŸÀÌ¸Ó À̺¥Æ®µé ¾÷µ¥ÀÌÆ®


	ShiftFugitiveValues();
	return fElapsed;
}


void ZTimer::ShiftFugitiveValues()
{
	// ¸Þ¸ð¸®ÇÙÀ» ÇÇÇϱâ À§ÇØ °ü·Ã º¯¼öÀÇ Èü À§Ä¡¸¦ ¿Å±ä´Ù


	BOOL* pBool1 = m_pbUsingQPF;
	m_pbUsingQPF = new BOOL(*pBool1);


	LONGLONG* pll1 = m_pllQPFTicksPerSec;
	m_pllQPFTicksPerSec = new LONGLONG(*pll1);


	LONGLONG* pll2 = m_pllLastElapsedTime;
	m_pllLastElapsedTime = new LONGLONG(*pll2);


	DWORD* pDword1 = m_pThistime;
	m_pThistime = new DWORD(*pDword1);


	DWORD* pDword2 = m_pLasttime;
	m_pLasttime = new DWORD(*pDword2);


	DWORD* pDword3 = m_pElapsed;
	m_pElapsed = new DWORD(*pDword3);


	delete pBool1;
	delete pll1;
	delete pll2;
	delete pDword1;
	delete pDword2;
	delete pDword3;
}


void ZTimer::UpdateEvents()
{
	m_nNowTime = timeGetTime();
	unsigned long int nDeltaTime = m_nNowTime - m_nLastTime;
	m_nLastTime = m_nNowTime;


	if (m_EventList.empty()) return;


	for (list<ZTimerEvent*>::iterator itor = m_EventList.begin(); itor != m_EventList.end(); )
	{
		ZTimerEvent* pEvent = (*itor);
		bool bDone = pEvent->UpdateTick(nDeltaTime);
		if (bDone)
		{
			delete pEvent;
			itor = m_EventList.erase(itor);
		}
		else
		{
			++itor;
		}
	}
}


void ZTimer::SetTimerEvent(unsigned long int nElapsedTime, ZGameTimerEventCallback* fnTimerEventCallback, void* pParam, bool bTimerOnce)
{
	ZTimerEvent* pNewTimerEvent = new ZTimerEvent;
	pNewTimerEvent->SetTimer(nElapsedTime, fnTimerEventCallback, pParam, bTimerOnce);
	m_EventList.push_back(pNewTimerEvent);
}


void ZTimer::ClearTimerEvent(ZGameTimerEventCallback* fnTimerEventCallback)
{
	if (fnTimerEventCallback == NULL) return;


	for (list<ZTimerEvent*>::iterator itor = m_EventList.begin(); itor != m_EventList.end(); )
	{
		ZTimerEvent* pEvent = (*itor);


		if (pEvent->m_fnTimerEventCallBack == fnTimerEventCallback)
		{
			delete pEvent;
			itor = m_EventList.erase(itor);
		}
		else
		{
			++itor;
		}
	}


}

I guess you aren't aware of how old this is. And you aren't aware that I left GunZ and whether it's terrible or not, I do not care.
 
Junior Spellweaver
Joined
Dec 22, 2012
Messages
171
Reaction score
9
Very late Christmas gift, anyway, have fun.

Code:
float ZTimer::UpdateFrame()
{
	LARGE_INTEGER qwTime;

	if(!m_bInitialized)
	{
		m_bInitialized = true;
		/*LARGE_INTEGER qwTicksPerSec;
		(*m_pbUsingQPF) = QueryPerformanceFrequency( &qwTicksPerSec );
		if( (*m_pbUsingQPF) )
		{
			(*m_pllQPFTicksPerSec) = qwTicksPerSec.QuadPart;

			QueryPerformanceCounter( &qwTime );

			(*m_pllLastElapsedTime) = qwTime.QuadPart;
		}
		else
		{
			(*m_pLasttime) = timeGetTime();
		}*/
		(*m_pLasttime) = timeGetTime();
	}

	float fElapsed;

	if( (*m_pbUsingQPF) )
	{
		QueryPerformanceCounter( &qwTime );

		fElapsed = (float)((double) ( qwTime.QuadPart - (*m_pllLastElapsedTime) ) / (double) (*m_pllQPFTicksPerSec));
		(*m_pllLastElapsedTime) = qwTime.QuadPart;
	}
	else
	{
		(*m_pThistime) = timeGetTime();
		(*m_pElapsed) = (*m_pThistime) - (*m_pLasttime);
		(*m_pLasttime) = (*m_pThistime);
		(*m_pllLastElapsedTime) = *m_pElapsed;
		fElapsed=.001f*(float)(*m_pElapsed);
	}

	
	UpdateEvents();			// ŸÀÌ¸Ó À̺¥Æ®µé ¾÷µ¥ÀÌÆ®

	ShiftFugitiveValues();

	return fElapsed;
}

What .ccp or i make new .ccp? how about the main.ccp no codes added thre?
 
Currently Stoned !
Joined
Dec 6, 2011
Messages
879
Reaction score
108
Nice one !!

you should call it as New years gift ... ! ^^
 
Hi, I'm Omar!
Member
Joined
Jan 6, 2011
Messages
1,345
Reaction score
646
make new .ccp?

Just replace the function you have in your source with this one.

Edit; I just remembered when Jacob was talking to me about how UC can't be patched and now that I did post a patch, he decides to rewrite it and call mine terrible. Jacob, you're gonna make a fool of yourself as always.
 
Last edited:
Joined
Sep 10, 2007
Messages
970
Reaction score
815
Just replace the function you have in your source with this one.

Edit; I just remembered when Jacob was talking to me about how UC can't be patched and now that I did post a patch, he decides to rewrite it and call mine terrible. Jacob, you're gonna make a fool of yourself as always.

Except this isn't even an 'anit-uc' it fixes hitboxes on timing but animations and gravity is still slowed. I've had this for a while I removed ALL usages of timeGetTime.
 
Junior Spellweaver
Joined
Dec 22, 2012
Messages
171
Reaction score
9
Just replace the function you have in your source with this one.

Edit; I just remembered when Jacob was talking to me about how UC can't be patched and now that I did post a patch, he decides to rewrite it and call mine terrible. Jacob, you're gonna make a fool of yourself as always.

ok what .cpp i edit?
 
Praise the Sun!
Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Just replace the function you have in your source with this one.

Edit; I just remembered when Jacob was talking to me about how UC can't be patched and now that I did post a patch, he decides to rewrite it and call mine terrible. Jacob, you're gonna make a fool of yourself as always.

Except this isn't even an 'anit-uc' it fixes hitboxes on timing but animations and gravity is still slowed. I've had this for a while I removed ALL usages of timeGetTime.

The easy route beats the both of you.

PHP:
        VM_START
            EnterCriticalSection(&m_CriticalSection);
        
             m_pMemoryCheckList.push_back(new  MemoryCheck((DWORD)GetProcAddress(hKernel32, "QueryPerformanceCounter"),  true, "QueryPerformanceCounter")); //Underclocking
             m_pMemoryCheckList.push_back(new  MemoryCheck((DWORD)GetProcAddress(hKernel32, "GetTickCount"), true,  "GetTickCount")); //Underclocking
             m_pMemoryCheckList.push_back(new  MemoryCheck((DWORD)GetProcAddress(GetModuleHandleA("winmm.dll"),  "timeGetTime"), true, "timeGetTime")); //Underclocking
            
            LeaveCriticalSection(&m_CriticalSection);
        VM_END

PHP:
            /* Memory checks */
            EnterCriticalSection(&m_CriticalSection);

            for (std::list<class MemoryCheck *>::iterator  pMemoryCheckListIt = m_pMemoryCheckList.begin(); pMemoryCheckListIt !=  m_pMemoryCheckList.end(); *pMemoryCheckListIt++) {
                MemoryCheck *pMemoryCheck = (*pMemoryCheckListIt);

                if (memcmp(pMemoryCheck->m_byChecksum, (void  *)pMemoryCheck->m_dwAddress, pMemoryCheck->m_nSize) != 0) {
                    VM_START
                        hackDetected(HACK_CHECKSUM, (int)pMemoryCheck->m_dwAddress, 0, 0, pMemoryCheck->m_szFunctionName);
                    VM_END
                }
            }

            LeaveCriticalSection(&m_CriticalSection);
 
Praise the Sun!
Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Stop using std::list for things that do not require middle insertions.

As you may have mentioned the post above you does not contain full source code. There's several extensions to it that do.
 
Joined
Sep 10, 2007
Messages
970
Reaction score
815
As you may have mentioned the post above you does not contain full source code. There's several extensions to it that do.
You only use std::list when constantly altering the middle of the container. Things such as a memory map that you have should use a vector since it's mainly about looking up values instead of altering them consistently.
 
Status
Not open for further replies.
Back
Top