Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock
You last visited: Today at 17:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Warrock - Code Snippets

Discussion on Warrock - Code Snippets within the WarRock forum part of the Shooter category.

Closed Thread
 
Old 05/03/2013, 07:48   #916
 
elite*gold: 0
Join Date: Mar 2012
Posts: 88
Received Thanks: 2
Ich kann auch deutsch Spe@ker

Quote:
Originally Posted by winkabean View Post
Anyone help me? This doesnt seem to work and ive tried everything but simply cant get it to work.

Structure.h:
Code:
struct CPlayer
{
 char ExoduS1[50244];//0x00
 float NoRecoil1;//0xC444
 float NoRecoil2;//0xC448
 float NoRecoil3;//0xC44C
 char ExoduS2[72];//0xC450
 BYTE index;//0xC498
 char ExoduS3[19];//0xC499
 float GravityX;//0xC4AC
 float GravityY;//0xC4B0
 float GravityZ;//0xC4B4
 char ExoduS4[24];//0xC4B8
 int WeaponState;//0xC4D0
 char ExoduS5[15416];//0xC4D4
 float PlayerSpeed;//0x1010C
 float NoSpread;//0x10110
 float FastNadeBlast;//0x10114
 char ExoduS6[136];//0x10118
 float PlayerView;//0x101A0
 char ExoduS7[4];//0x101A4
 float Pitch;//0x101A8
 char ExoduS8[24];//0x101AC
 float Yaw;//0x101C4
 char ExoduS9[12];//0x101C8
 float ViewX;//0x101D4
 float ViewY;//0x101D8
 float ViewZ;//0x101DC
 char ExoduS10[12];//0x101E0
 WORD Weapon1;//0x101EC
 WORD Weapon2;//0x101EE
 WORD Weapon3;//0x101F0
 char ExoduS11[90];//0x101F2
 BYTE PlayerState;//0x1024C
 char ExoduS12[155];//0x1024D
 float NoFallDamage;//0x102E8
 char ExoduS13[20];//0x102EC
 float PosX;//0x10300
 char ExoduS14[4];//0x10304
 float PosY;//0x10310
 char ExoduS15[4];//0x10314
 float PosZ;//0x10308
 char ExoduS16[100];//0x1030C
 DWORD AutoPlant;//0x10370
 DWORD AutoDefuse;//0x10374
 char ExoduS17[14];//0x10378
 DWORD AutoShot;//0x10386
 char ExoduS18[110];//0x1038A
 float NOM134IDLE;//0x103F8
};

struct CBase
{
	CPlayer* pLocal; 
	char* ExoduS[0x12B1A0];
	CPlayer** pGlobal;
};
CBase* p_Player = (CBase*)ADR_PLAYERPOINTER;
Addresses.h:
Code:
//================ [ Pointers ] ================//
#define ADR_PLAYERPOINTER 0x00A5348C
#define ADR_SERVERPOINTER 0x00A5341C
#define ADR_HEALTHPOINTER 0x00103E0
#define ADR_BASEPOINTER 0x000
#define ADR_VIEWANGELS 0x00A52FEC
#define HS1 0x8523E
#define HS2 0xA1A0
#define HS PACKET HANDLER 0x5E5E53
Main.cpp:
Code:
#include <Windows.h>
#include "Structure.h"
#include "Addresses.h"

DWORD Player = *(DWORD*)ADR_PLAYERPOINTER;

void NOSPREAD()
{
		p_Player->pLocal->NoSpread = 0.0F;
}


void NORECOIL()
{
		p_Player->pLocal->NoRecoil1 = 0;
		p_Player->pLocal->NoRecoil2 = 0;
		p_Player->pLocal->NoRecoil3 = 0;
}


void SUPERJUMP()
{
	if(GetAsyncKeyState(VK_SHIFT) &1)
		{
			p_Player->pLocal->ViewZ = 2000;
			p_Player->pLocal->NoFallDamage = -30000;
		}
}

void ProcessHacks()
{
	DWORD Player = *(DWORD*)ADR_PLAYERPOINTER;
	while (true)
	{
	if (Player)
	{
		NOSPREAD();
		NORECOIL();
		SUPERJUMP();
	}

	Sleep (100);
}
}

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ProcessHacks, 0, 0, 0);
}
return TRUE;
}
Your Basepointer is 0x000
xDDD
That will doesn't work xDDD
hansewurst is offline  
Old 05/03/2013, 08:00   #917
 
elite*gold: 0
Join Date: Nov 2012
Posts: 51
Received Thanks: 21
Dont say anything stupid idiot kid, i think he's got Windows 7 & Vista and he's got idiot injector too.

Use epvp injector its perfect and WarRock & Injector Run as Admin.
When its not working then write.
Lazl07 is offline  
Old 05/03/2013, 11:55   #918
 
Raz9r's Avatar
 
elite*gold: 297
Join Date: Dec 2010
Posts: 1,129
Received Thanks: 1,687
Quote:
Originally Posted by cheatslaw View Post
...
Containing a shitload of undefined behavior, is that intended:
- Violating the ODR (One Definition Rule): Everything not inline-specified (though it is just a hint) or templated (or even constexpr, which is implicitly inline), must be in source files. Header files shall contain declarations and class definitions, templates and inline marked functions.
- Your module does not unload properly, thus never allowing WarRock to properly exit.

Some other weird stuff:
- Classes with no fields being instantiated; use namespaces or static methods.
- When compiled with -O2 your module is about half the size than without any optimization. That proves you're doing something quite wrong.
- Coding style: Please use proper indentation and just one style, do not mix up camelCasing and the hungarian notation; this is considered bad style.

So tell me...
- Why don't you just use some basic STL functionality making life so much easier? Such as algorithms from <memory> and <algorithm>?
- Why don't you use templates to avoid type-unsafety when casting to void *?
- Why do you use that awkward __vptr thingy for accessing the vtable? Virtual methods exist for a reason.

All in all, that's a pretty crappy piece of code.
Raz9r is offline  
Thanks
3 Users
Old 05/03/2013, 22:38   #919
 
elite*gold: 0
Join Date: Mar 2012
Posts: 88
Received Thanks: 2
why does it cloes automaticly?
Code:
#include <Windows.h>
#include <stdio.h>

//=============== POINTER ===============//

#define ADR_PLAYERPOINTER		0x00A5348C
#define ADR_SERVERPOINTER     0x00A5341C
//=============== Hacks ===============//
#define ADR_OFS_NORECOIL1		0xC444
#define ADR_OFS_NORECOIL2		0xC448
#define ADR_OFS_NORECOIL3		0xC48C
#define OFS_NFD               0x102E8
#define OFS_Superjump      0x0010308
#define OFS_NOSPREAD          0x00A583B4




//--------------------------Define Hacks--------------------------//

DWORD *ingame = (DWORD*)ADR_PLAYERPOINTER;
DWORD *outgame = (DWORD*)ADR_SERVERPOINTER;


struct CPlayer
{
 char ExoduS1[50244];//0x00
 float NoRecoil1;//0xC444
 float NoRecoil2;//0xC448
 float NoRecoil3;//0xC44C
 char ExoduS2[72];//0xC450
 BYTE index;//0xC498
 char ExoduS3[19];//0xC499
 float GravityX;//0xC4AC
 float GravityY;//0xC4B0
 float GravityZ;//0xC4B4
 char ExoduS4[24];//0xC4B8
 int WeaponState;//0xC4D0
 char ExoduS5[15416];//0xC4D4
 float PlayerSpeed;//0x1010C
 float NoSpread;//0x10110
 float FastNadeBlast;//0x10114
 char ExoduS6[136];//0x10118
 float PlayerView;//0x101A0
 char ExoduS7[4];//0x101A4
 float Pitch;//0x101A8
 char ExoduS8[24];//0x101AC
 float Yaw;//0x101C4
 char ExoduS9[12];//0x101C8
 float ViewX;//0x101D4
 float ViewY;//0x101D8
 float ViewZ;//0x101DC
 char ExoduS10[12];//0x101E0
 WORD Weapon1;//0x101EC
 WORD Weapon2;//0x101EE
 WORD Weapon3;//0x101F0
 char ExoduS11[90];//0x101F2
 BYTE PlayerState;//0x1024C
 char ExoduS12[155];//0x1024D
 float NoFallDamage;//0x102E8
 char ExoduS13[20];//0x102EC
 float PosX;//0x10300
 char ExoduS14[4];//0x10304
 float PosY;//0x10310
 char ExoduS15[4];//0x10314
 float PosZ;//0x10308
 char ExoduS16[100];//0x1030C
 DWORD AutoPlant;//0x10370
 DWORD AutoDefuse;//0x10374
 char ExoduS17[14];//0x10378
 DWORD AutoShot;//0x10386
 char ExoduS18[110];//0x1038A
 float NOM134IDLE;//0x103F8
};

struct CBase
{
	CPlayer* pLocal; 
	char* ExoduS[0x12B1A0];
	CPlayer** pGlobal;
};
CBase* _Player = (CBase*)(0x0A5348C);


//--------------------------Start Hacks--------------------------//
void PlayerHacks()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{

_Player->pLocal->NoSpread = 0.00F;



//No Recoil
		
	{
		_Player->pLocal->NoRecoil1 = 0;
		_Player->pLocal->NoRecoil2 = 0;
		_Player->pLocal->NoRecoil3 = 0;
}

//Super Jump
{
if(GetAsyncKeyState(VK_F2) &1)
{
*(float*)(dwPlayerPtr + OFS_Superjump) = 2000;
}
}



//No Fall Damage

{
*(float*)(dwPlayerPtr +OFS_NFD) = -2000; 
}


//speed


	if(GetAsyncKeyState(VK_F1) &1)
	{
	_Player->pLocal->PlayerSpeed = -300.00F; // 3x Speed
	}
	


}

}

void ServerHacks()
{
}







//-------------------------HackThread--------------------------//

void HackThread()
{
for(;; )
{
if(*ingame)
{

	
PlayerHacks();
}
if(*outgame)
{
ServerHacks();
}
}
Sleep( 500 );
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);
}
return TRUE;
}
hansewurst is offline  
Old 05/04/2013, 01:32   #920
 
n4n033's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 726
Received Thanks: 1,128
Quote:
Originally Posted by hansewurst View Post
why does it cloes automaticly?
Code:
#include <Windows.h>
#include <stdio.h>

//=============== POINTER ===============//

#define ADR_PLAYERPOINTER		0x00A5348C
#define ADR_SERVERPOINTER     0x00A5341C
//=============== Hacks ===============//
#define ADR_OFS_NORECOIL1		0xC444
#define ADR_OFS_NORECOIL2		0xC448
#define ADR_OFS_NORECOIL3		0xC48C
#define OFS_NFD               0x102E8
#define OFS_Superjump      0x0010308
#define OFS_NOSPREAD          0x00A583B4




//--------------------------Define Hacks--------------------------//

DWORD *ingame = (DWORD*)ADR_PLAYERPOINTER;
DWORD *outgame = (DWORD*)ADR_SERVERPOINTER;


struct CPlayer
{
 char ExoduS1[50244];//0x00
 float NoRecoil1;//0xC444
 float NoRecoil2;//0xC448
 float NoRecoil3;//0xC44C
 char ExoduS2[72];//0xC450
 BYTE index;//0xC498
 char ExoduS3[19];//0xC499
 float GravityX;//0xC4AC
 float GravityY;//0xC4B0
 float GravityZ;//0xC4B4
 char ExoduS4[24];//0xC4B8
 int WeaponState;//0xC4D0
 char ExoduS5[15416];//0xC4D4
 float PlayerSpeed;//0x1010C
 float NoSpread;//0x10110
 float FastNadeBlast;//0x10114
 char ExoduS6[136];//0x10118
 float PlayerView;//0x101A0
 char ExoduS7[4];//0x101A4
 float Pitch;//0x101A8
 char ExoduS8[24];//0x101AC
 float Yaw;//0x101C4
 char ExoduS9[12];//0x101C8
 float ViewX;//0x101D4
 float ViewY;//0x101D8
 float ViewZ;//0x101DC
 char ExoduS10[12];//0x101E0
 WORD Weapon1;//0x101EC
 WORD Weapon2;//0x101EE
 WORD Weapon3;//0x101F0
 char ExoduS11[90];//0x101F2
 BYTE PlayerState;//0x1024C
 char ExoduS12[155];//0x1024D
 float NoFallDamage;//0x102E8
 char ExoduS13[20];//0x102EC
 float PosX;//0x10300
 char ExoduS14[4];//0x10304
 float PosY;//0x10310
 char ExoduS15[4];//0x10314
 float PosZ;//0x10308
 char ExoduS16[100];//0x1030C
 DWORD AutoPlant;//0x10370
 DWORD AutoDefuse;//0x10374
 char ExoduS17[14];//0x10378
 DWORD AutoShot;//0x10386
 char ExoduS18[110];//0x1038A
 float NOM134IDLE;//0x103F8
};

struct CBase
{
	CPlayer* pLocal; 
	char* ExoduS[0x12B1A0];
	CPlayer** pGlobal;
};
CBase* _Player = (CBase*)(0x0A5348C);


//--------------------------Start Hacks--------------------------//
void PlayerHacks()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{

_Player->pLocal->NoSpread = 0.00F;



//No Recoil
		
	{
		_Player->pLocal->NoRecoil1 = 0;
		_Player->pLocal->NoRecoil2 = 0;
		_Player->pLocal->NoRecoil3 = 0;
}

//Super Jump
{
if(GetAsyncKeyState(VK_F2) &1)
{
*(float*)(dwPlayerPtr + OFS_Superjump) = 2000;
}
}



//No Fall Damage

{
*(float*)(dwPlayerPtr +OFS_NFD) = -2000; 
}


//speed


	if(GetAsyncKeyState(VK_F1) &1)
	{
	_Player->pLocal->PlayerSpeed = -300.00F; // 3x Speed
	}
	


}

}

void ServerHacks()
{
}







//-------------------------HackThread--------------------------//

void HackThread()
{
for(;; )
{
if(*ingame)
{

	
PlayerHacks();
}
if(*outgame)
{
ServerHacks();
}
}
Sleep( 500 );
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);
}
return TRUE;
}
WTF you use {} ?

Example :

This :
Code:
//No Recoil
		
	{
		_Player->pLocal->NoRecoil1 = 0;
		_Player->pLocal->NoRecoil2 = 0;
		_Player->pLocal->NoRecoil3 = 0;
}
Should Be :
Code:
//No Recoil
		_Player->pLocal->NoRecoil1 = 0;
		_Player->pLocal->NoRecoil2 = 0;
		_Player->pLocal->NoRecoil3 = 0;
n4n033 is offline  
Thanks
2 Users
Old 05/04/2013, 11:11   #921
 
elite*gold: 0
Join Date: Apr 2013
Posts: 27
Received Thanks: 2
Anyone know why my unlimited ammo crashes when i enter a game?

Source:
Code:
void UNLIMITEDAMMO()
{
	WriteFunction<DWORD>((void*)Mem_UnlAmmo,1);
}
winkabean is offline  
Old 05/04/2013, 11:55   #922
 
elite*gold: 0
Join Date: Jul 2011
Posts: 3,812
Received Thanks: 1,840
Quote:
Originally Posted by winkabean View Post
Anyone know why my unlimited ammo crashes when i enter a game?

Source:
Code:
void UNLIMITEDAMMO()
{
	WriteFunction<DWORD>((void*)Mem_UnlAmmo,1);
}
I dont knew that unlimited ammo was patched

Code:
void UNLIMITEDAMMO()
*(int*)MEM_UnlAmmo = 0;
But if you will try it with this code , you will not be able to turn off.
You have to use Yazzn's patch class , or write an own.
xRoute66x is offline  
Old 05/04/2013, 12:47   #923
 
elite*gold: 1
Join Date: Apr 2013
Posts: 461
Received Thanks: 216
Quote:
Originally Posted by n4n033 View Post
WTF you use {} ?
Doesn't really matter. I could also do this:

Code:
void Test()
{
  {
    MessageBoxA(NULL, "Test", "asd", 0);
  }
  if(true)
  {
    MessageBoxA(NULL, "Another test", "1337", 0);
  }
}

But you SHOULD use brackets curly braces only if you really need them (looks still better).
.BlackHat is offline  
Old 05/04/2013, 12:54   #924
 
elite*gold: 0
Join Date: Apr 2013
Posts: 27
Received Thanks: 2
Quote:
Originally Posted by xroute66x™ :) View Post
I dont knew that unlimited ammo was patched

Code:
void UNLIMITEDAMMO()
*(int*)MEM_UnlAmmo = 0;
But if you will try it with this code , you will not be able to turn off.
You have to use Yazzn's patch class , or write an own.
Where can i find Yazzn's patch class?

also ive managed to get it working however it doesnt do damage to enemys.
winkabean is offline  
Old 05/04/2013, 14:08   #925
 
Tibolus_'s Avatar
 
elite*gold: 93
Join Date: Jan 2012
Posts: 517
Received Thanks: 585
Code:
void unlammocpp()
{
	int Log;
	DWORD OldValue=0;
	for(;;)
	{
	DWORD dwPlayer = *(DWORD*)ADR_PLAYERPOINTER;
               if( dwPlayer != NULL )
                {
                        if( ***** == 1 )
                        {
                                if( Log == NULL )
                                {
									OldValue=*(DWORD*)(ADR_UNLAMMO);
                                    Log = 1;
                                }
                                *(DWORD*)(ADR_UNLAMMO)=0;
                        }

                        
                        if( ***** == 0  && dwPlayer != 0 )
                        {
                                if( Log == 1 )
                                {
									*(DWORD*)(ADR_UNLAMMO)=OldValue;
                                    Log = 0;
								}
                        }
			   }
		  Sleep(300);
	}
}
here thats mine
it doesn´t crash, you must only deativate it when you leave the room

for nomenu
Code:
if(GetAsyncKeyState(VK_NUMPAD8)&1)
{
*****= true;
}
else  if(GetAsyncKeyState(VK_NUMPAD9)&1)
{
*****= false;
}
Tibolus_ is offline  
Old 05/04/2013, 18:02   #926
 
elite*gold: 0
Join Date: Mar 2012
Posts: 88
Received Thanks: 2
Code:
#include <Windows.h>
#include <stdio.h>

//=============== POINTER ===============//

#define ADR_PLAYERPOINTER		0x00A5348C
#define ADR_SERVERPOINTER     0x00A5341C
//=============== Hacks ===============//
#define ADR_OFS_NORECOIL1		0xC444
#define ADR_OFS_NORECOIL2		0xC448
#define ADR_OFS_NORECOIL3		0xC48C
#define OFS_NFD               0x102E8
#define OFS_Superjump      0x0010308
#define OFS_NOSPREAD          0x00A583B4




//--------------------------Define Hacks--------------------------//

DWORD *ingame = (DWORD*)ADR_PLAYERPOINTER;
DWORD *outgame = (DWORD*)ADR_SERVERPOINTER;


struct CPlayer
{
 char Speaker1[50244];//0x00
 float NoRecoil1;//0xC444
 float NoRecoil2;//0xC448
 float NoRecoil3;//0xC44C
 char Speaker2[72];//0xC450
 BYTE index;//0xC498
 char Speaker3[19];//0xC499
 float GravityX;//0xC4AC
 float GravityY;//0xC4B0
 float GravityZ;//0xC4B4
 char Speaker4[50020];//0xC4B8
 int WeaponState;//0x154
 char Speaker5[65460];//0x158
 float PlayerSpeed;//0x1010C
 float NoSpread;//0x10110
 float FastNadeBlast;//0x10114
 char Speaker6[136];//0x10118
 float PlayerView;//0x101A0
 char Speaker7[4];//0x101A4
 float Pitch;//0x101A8
 char Speaker8[24];//0x101AC
 float Yaw;//0x101C4
 char Speaker9[12];//0x101C8
 float ViewX;//0x101D4
 float ViewY;//0x101D8
 float ViewZ;//0x101DC
 char Speaker10[12];//0x101E0
 WORD Weapon1;//0x101EC
 WORD Weapon2;//0x101EE
 WORD Weapon3;//0x101F0
 char Speaker11[90];//0x101F2
 BYTE PlayerState;//0x1024C
 char Speaker12[155];//0x1024D
 float NoFallDamage;//0x102E8
 char Speaker13[20];//0x102EC
 float PosX;//0x10300
 char Speaker14[4];//0x10304
 float PosY;//0x10310
 char Speaker15[4];//0x10314
 float PosZ;//0x10308
 char Speaker16[100];//0x1030C
 DWORD AutoPlant;//0x10370
 DWORD AutoDefuse;//0x10374
 char Speaker17[14];//0x10378
 DWORD AutoShot;//0x10386
 char Speaker18[66106];//0x1038A
 float NOM134IDLE;//0x150
};

struct CBase
{
	CPlayer* pLocal;
	char* Speaker1[1225120];
	CPlayer** pGlobal;
};
CBase* _Player = (CBase*)ADR_PLAYERPOINTER;

//--------------------------Start Hacks--------------------------//
void PlayerHacks()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
	
_Player->pLocal->NoSpread = 0.00F;
	



//No Recoil
		
	
		_Player->pLocal->NoRecoil1 = 0.0F;
		_Player->pLocal->NoRecoil2 = 0.0F;
		_Player->pLocal->NoRecoil3 = 0.0F;


//Super Jump

if(GetAsyncKeyState(VK_F2) &1)
{
*(float*)(dwPlayerPtr + OFS_Superjump) = 2000;
}




//No Fall Damage


*(float*)(dwPlayerPtr +OFS_NFD) = -2000; 



//speed


	if(GetAsyncKeyState(VK_F5)&1)
	{
	_Player->pLocal->PlayerSpeed = -300.00F; // 3x Speed
	}


//speed normal

	if(GetAsyncKeyState(VK_F6)&1)
	
{
_Player->pLocal->PlayerSpeed = -100.00F;// 3x Speed
}


}

}

void ServerHacks()
{
}







//-------------------------HackThread--------------------------//

void HackThread()
{
for(;; )
{
if(*ingame)
{

	
PlayerHacks();
}
if(*outgame)
{
ServerHacks();
}
}
Sleep( 500 );
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);
}
return TRUE;
}
HELP

Weis jemand warum das game immer crasht wenn der hack injectet ist?

Englisch:
Do anybody know why does the game close automaticly when the hack is injectet?
hansewurst is offline  
Old 05/04/2013, 18:18   #927
 
xXrussXx's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 643
Received Thanks: 846
Quote:
Originally Posted by hansewurst View Post
Such deine Detection selber!!
xXrussXx is offline  
Old 05/04/2013, 19:08   #928
 
elite*gold: 0
Join Date: Mar 2012
Posts: 88
Received Thanks: 2
Quote:
Originally Posted by xXrussXx View Post
Such deine Detection selber!!
da ist nur ein kleiner fehler aber ich weis nicht wo -.-
hansewurst is offline  
Old 05/04/2013, 22:28   #929
 
elite*gold: 0
Join Date: Mar 2012
Posts: 194
Received Thanks: 311
Quote:
Originally Posted by Raz9r View Post
Containing a shitload of undefined behavior, is that intended:
- Violating the ODR (One Definition Rule): Everything not inline-specified (though it is just a hint) or templated (or even constexpr, which is implicitly inline), must be in source files. Header files shall contain declarations and class definitions, templates and inline marked functions.
- Your module does not unload properly, thus never allowing WarRock to properly exit.

Some other weird stuff:
- Classes with no fields being instantiated; use namespaces or static methods.
- When compiled with -O2 your module is about half the size than without any optimization. That proves you're doing something quite wrong.
- Coding style: Please use proper indentation and just one style, do not mix up camelCasing and the hungarian notation; this is considered bad style.

So tell me...
- Why don't you just use some basic STL functionality making life so much easier? Such as algorithms from <memory> and <algorithm>?
- Why don't you use templates to avoid type-unsafety when casting to void *?
- Why do you use that awkward __vptr thingy for accessing the vtable? Virtual methods exist for a reason.

All in all, that's a pretty crappy piece of code.
I know, didn't you read what i wrote in the topic?
I made this quickly..
Don't think im trying to ***** out, after 4 years of coding i know it to that i should use source files, but this is the way i prefer to code.
But your 100% right about what you write above.
cheatslaw is offline  
Old 05/05/2013, 08:39   #930
 
Raz9r's Avatar
 
elite*gold: 297
Join Date: Dec 2010
Posts: 1,129
Received Thanks: 1,687
Quote:
Originally Posted by cheatslaw View Post
I made this quickly..
Don't think im trying to ***** out, after 4 years of coding i know it to that i should use source files, but this is the way i prefer to code.
Being in a rush is no excuse for bad code. Also preferring violation of the ODR for whatever reason indicates that you indeed do not know much about software development.
Raz9r is offline  
Closed Thread


Similar Threads Similar Threads
WarRock EU - Code Snippets
07/12/2012 - WarRock - 7490 Replies
Hi Leute, in diesem Thread könnt ihr: -> Nach Sourcecodes fragen(Beispiel unten) -> Eure Sourcecodes posten(Wenn sie nicht von euch sind mit Credits!) -> Fragen ob eure Source evtl. einen Fehler hat -> Fragen was welcher Fehler bedeuted -> Sourcecodes entnehmen(Bitte beim Release dann Credits angeben!)



All times are GMT +1. The time now is 17:25.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.