Modern Warfare 3 Source Code / Address Thread

Posts 31–45 of 117 · Page 3 of 8
.text:0041C4C0 ; void __cdecl AngleVectors(const float *angles, float *forward, float *right, float *up)
.text:00431750 ; int __cdecl R_TextWidth(const char *text, int maxChars, Font_s *font, int scale)
.text:00779000 ; int __cdecl R_TextHeight(Font_s *font)
.text:0050EBA0 ; void __cdecl CL_DrawTextPhysical(const char *text, int maxChars, Font_s *font, float x, float y, float xScale, float yScale, const vec4_t *color, int style)
Quote Originally Posted by rawr im a tiger View Post
.text:0041C4C0 ; void __cdecl AngleVectors(const float *angles, float *forward, float *right, float *up)
.text:00431750 ; int __cdecl R_TextWidth(const char *text, int maxChars, Font_s *font, int scale)
.text:00779000 ; int __cdecl R_TextHeight(Font_s *font)
.text:0050EBA0 ; void __cdecl CL_DrawTextPhysical(const char *text, int maxChars, Font_s *font, float x, float y, float xScale, float yScale, const vec4_t *color, int style)
Code:
.text:0050EBA0   ; void __cdecl CL_DrawTextPhysical(const char *text, int maxChars, Font_s *font, float x, float y, float xScale, float yScale, const vec4_t *color, int style)
This is like the regular DrawText? And what is "int style" here?
Quote Originally Posted by Kenshin13 View Post
Code:
.text:0050EBA0   ; void __cdecl CL_DrawTextPhysical(const char *text, int maxChars, Font_s *font, float x, float y, float xScale, float yScale, const vec4_t *color, int style)
This is like the regular DrawText? And what is "int style" here?
Try it on IW5M and see the difference. As for style, it's some flags to do with bold etc iirc.
Some usercmd_t decoding:

Code:
class usercmd_t
{
public:
	__int32 ServerTime; //0x0000 
	__int32 CurrentButton; //0x0004 
	__int32 ViewAngles[3]; //0x0008 
	BYTE CurrentWeapon; //0x0014 
	__int32 WeaponAttachments; //0x0015 
char _0x0019[3];
	BYTE VerticalMovement; //0x001C 127 = Foward, 129 = Back, 0 = Still 
	BYTE HorizontalMovement; //0x001D 127 = Right, 129 = Left, 0 = Still
char _0x001E[14];

};//Size=0x002C
Code:
//sub_541670
double __cdecl VectorNormalize(float* Vector3)
{
  double result;
  float VectorCalc;
  float Multiplier;

  VectorCalc = *(float *)(Vector3 + 4) * *(float *)(Vector3 + 4) + *(float *)Vector3 * *(float *)Vector3 + *(float *)(Vector3 + 8) * *(float *)(Vector3 + 8);
  result = sqrt(VectorCalc);
  if ( -result >= 0.0 )
    result = 1.0;
  Multiplier = 1.0 / result;
  *(float *)Vector3 = *(float *)Vector3 * Multiplier;
  *(float *)(Vector3 + 4) = Multiplier * *(float *)(Vector3 + 4);
  *(float *)(Vector3 + 8) = Multiplier * *(float *)(Vector3 + 8);
  return result;
}
INFINITE HEALTH NEVER POSTED . STATIC >>>> 0x10C04A8
STEAL DEM STRUCTS:

Code:
class ClientInfo_T
{
public:
	__int32 ClientNumber; //0x0000 
	__int32 IsValid; //0x0004 
char _0x0008[4];
	char ClientName[16]; //0x000C 
	__int32 Team_1; //0x001C 
	__int32 Team_2; //0x0020 
	__int32 Rank; //0x0024 
char _0x0028[16];
	__int32 Perk; //0x0038 
char _0x003C[8];
	__int32 Score; //0x0044 
char _0x0048[8];
	char BodyName[32]; //0x0050 
char _0x0070[32];
	char HeadName[32]; //0x0090 
char _0x00B0[992];
	BYTE IsStanding; //0x0490 
	BYTE IsWalking; //0x0491 
	BYTE IsSprinting; //0x0492 
char _0x0493[13];
	__int32 IsAttacking; //0x04A0 
char _0x04A4[4];
	__int32 IsZooming; //0x04A8 
char _0x04AC[68];
	__int32 WeaponNumber1; //0x04F0 
char _0x04F4[24];
	__int32 WeaponNumber2; //0x050C 
char _0x0510[80];

};//Size=0x0560

class CG_T
{
public:
	__int32 ServerTime; //0x0000 
	__int32 State; //0x0004 
	__int32 StaminaTimer; //0x0008 
	__int16 Stance; //0x000C 
char _0x000E[10];
	__int32 GeneralVelocity; //0x0018 
	Vec3 Origin; //0x001C 
	Vec3 vVelocity; //0x0028 
char _0x0034[44];
	float RefDef_Y; //0x0060 
	float RefDef_X; //0x0064 
char _0x0068[232];
	__int32 LocalClientID; //0x0150 
char _0x0154[4];
	float View_Y; //0x0158 
	float View_X; //0x015C 
char _0x0160[4];
	__int32 IntStance; //0x0164 
	float FltStance; //0x0168 
char _0x016C[80];
	__int32 ENTITIESMAX; //0x01BC 
char _0x01C0[68];
	__int32 AdvUAV; //0x0204 
char _0x0208[56];
	__int32 NextAttack; //0x0240 
char _0x0244[300];
	__int32 WeaponID; //0x0370 
	__int16 EquiptmentState; //0x0374  2 = Holding
	__int16 EquiptmentSwapState; //0x0376 
	float ZoomProgress; //0x0378 
	float MovementSpreadMultiplier; //0x037C 
char _0x0380[4];
	float DefaultSpreadMultiplier; //0x0384 
	__int32 WeaponState; //0x0388 
char _0x038C[352];
	BYTE PerkSlot3; //0x04EC 
char _0x04ED[19];

};//Size=0x0500

class Entity_T
{
public:
char _0x0000[2];
	__int16 IsValid; //0x0002 
char _0x0004[16];
	Vec3 Origin; //0x0014 
	Vec3 ViewAngles; //0x0020 
char _0x002C[60];
	__int32 Flags; //0x0068 
char _0x006C[12];
	Vec3 oOrigin; //0x0078 
char _0x0084[24];
	Vec3 oAngles; //0x009C 
char _0x00A8[40];
	__int32 ClientNumber; //0x00D0 
char _0x00D4[2];
	__int16 Type; //0x00D6 
char _0x00D8[16];
	Vec3 nOrigin; //0x00E8 
char _0x00F4[28];
	Vec3 nAngles; //0x0110 
char _0x011C[124];
	BYTE WeaponID; //0x0198 
char _0x0199[55];
	__int32 IsAlive; //0x01D0 
char _0x01D4[36];

};//Size=0x01F8

class RefDef_T
{
public:
char _0x0000[8];
	__int32 Width; //0x0008 
	__int32 Height; //0x000C 
	__int32 FoV_X; //0x0010 
	__int32 FoV_Y; //0x0014 
	Vec3 Origin; //0x0018 
	Vec3 ViewAxis_1; //0x0024 
	Vec3 ViewAxis_2; //0x0030 
	Vec3 ViewAxis_3; //0x003C 
char _0x0048[36];
	float ZoomProgress; //0x006C 
char _0x0070[19132];
	Vec3 ViewAngles; //0x4B2C 
char _0x4B38[36];
	float WeaponAngle_X; //0x4B5C 
	float WeaponAngle_Y; //0x4B60 

};//Size=0x4B64
Quote Originally Posted by Kenshin13 View Post
STEAL DEM STRUCTS:

Code:
class ClientInfo_T
{
public:
	__int32 ClientNumber; //0x0000 
	__int32 IsValid; //0x0004 
char _0x0008[4];
	char ClientName[16]; //0x000C 
	__int32 Team_1; //0x001C 
	__int32 Team_2; //0x0020 
	__int32 Rank; //0x0024 
char _0x0028[16];
	__int32 Perk; //0x0038 
char _0x003C[8];
	__int32 Score; //0x0044 
char _0x0048[8];
	char BodyName[32]; //0x0050 
char _0x0070[32];
	char HeadName[32]; //0x0090 
char _0x00B0[992];
	BYTE IsStanding; //0x0490 
	BYTE IsWalking; //0x0491 
	BYTE IsSprinting; //0x0492 
char _0x0493[13];
	__int32 IsAttacking; //0x04A0 
char _0x04A4[4];
	__int32 IsZooming; //0x04A8 
char _0x04AC[68];
	__int32 WeaponNumber1; //0x04F0 
char _0x04F4[24];
	__int32 WeaponNumber2; //0x050C 
char _0x0510[80];

};//Size=0x0560

class CG_T
{
public:
	__int32 ServerTime; //0x0000 
	__int32 State; //0x0004 
	__int32 StaminaTimer; //0x0008 
	__int16 Stance; //0x000C 
char _0x000E[10];
	__int32 GeneralVelocity; //0x0018 
	Vec3 Origin; //0x001C 
	Vec3 vVelocity; //0x0028 
char _0x0034[44];
	float RefDef_Y; //0x0060 
	float RefDef_X; //0x0064 
char _0x0068[232];
	__int32 LocalClientID; //0x0150 
char _0x0154[4];
	float View_Y; //0x0158 
	float View_X; //0x015C 
char _0x0160[4];
	__int32 IntStance; //0x0164 
	float FltStance; //0x0168 
char _0x016C[80];
	__int32 ENTITIESMAX; //0x01BC 
char _0x01C0[68];
	__int32 AdvUAV; //0x0204 
char _0x0208[56];
	__int32 NextAttack; //0x0240 
char _0x0244[300];
	__int32 WeaponID; //0x0370 
	__int16 EquiptmentState; //0x0374  2 = Holding
	__int16 EquiptmentSwapState; //0x0376 
	float ZoomProgress; //0x0378 
	float MovementSpreadMultiplier; //0x037C 
char _0x0380[4];
	float DefaultSpreadMultiplier; //0x0384 
	__int32 WeaponState; //0x0388 
char _0x038C[352];
	BYTE PerkSlot3; //0x04EC 
char _0x04ED[19];

};//Size=0x0500

class Entity_T
{
public:
char _0x0000[2];
	__int16 IsValid; //0x0002 
char _0x0004[16];
	Vec3 Origin; //0x0014 
	Vec3 ViewAngles; //0x0020 
char _0x002C[60];
	__int32 Flags; //0x0068 
char _0x006C[12];
	Vec3 oOrigin; //0x0078 
char _0x0084[24];
	Vec3 oAngles; //0x009C 
char _0x00A8[40];
	__int32 ClientNumber; //0x00D0 
char _0x00D4[2];
	__int16 Type; //0x00D6 
char _0x00D8[16];
	Vec3 nOrigin; //0x00E8 
char _0x00F4[28];
	Vec3 nAngles; //0x0110 
char _0x011C[124];
	BYTE WeaponID; //0x0198 
char _0x0199[55];
	__int32 IsAlive; //0x01D0 
char _0x01D4[36];

};//Size=0x01F8

class RefDef_T
{
public:
char _0x0000[8];
	__int32 Width; //0x0008 
	__int32 Height; //0x000C 
	__int32 FoV_X; //0x0010 
	__int32 FoV_Y; //0x0014 
	Vec3 Origin; //0x0018 
	Vec3 ViewAxis_1; //0x0024 
	Vec3 ViewAxis_2; //0x0030 
	Vec3 ViewAxis_3; //0x003C 
char _0x0048[36];
	float ZoomProgress; //0x006C 
char _0x0070[19132];
	Vec3 ViewAngles; //0x4B2C 
char _0x4B38[36];
	float WeaponAngle_X; //0x4B5C 
	float WeaponAngle_Y; //0x4B60 

};//Size=0x4B64
Cool... oh well .. Can I use this Structure on private Versions? (well Since you posted in private server sections.. or maybe you forgot)..

EDIT : Fail.. I though you said "STEAM STRUCTS" .... but it was "STEAL" -.-
Code:
#define SnapSize 64
#define SNAP_NUMBER_MAX 32
#define SNAP_MASK (SNAP_NUMBER_MAX - 1)

typedef struct CSnapshot_s
{
	__int32 commandTime; //0x0000 
	char _0x0004[4];
	__int32 bobCycle; //0x0008 
	__int32 pm_flags; //0x000C 
	char _0x0010[8];
	__int32 pm_time; //0x0018 
	vec3_t Origin; //0x001C 
	vec3_t Velocity; //0x0028
	char _0x0034[12];
}Snaps;

typedef struct GetSnapshot_s
{
	Snaps CSnapshots[SNAP_NUMBER_MAX];
	Snaps* GetCurrentSnap(int snapNumber) //0x10636D4
	{
		return ( Snaps * )&CSnapshots[ snapNumber & SNAP_MASK ];
	}
}CSnapshot_t;
This is clientSnap btw. I reversed it to see if it held the ping (Like the q_shared.h said....It lies....) but alas it doesn't so I though I would share since I got no reason to keep it private.

Credits: Me for reversing structure and porting. CypherPresents.
I really need to start sleeping:
Code:
//Should start 0x132C554 or at least 0x132XXXX

class ConnectionInfo_t
{
public:
	char ClientName[32]; //0x0000 
char _0x0020[124];
	__int32 IP_Local; //0x009C 
char _0x00A0[14];
	__int32 IP_External; //0x00AE 
char _0x00B2[134];

};//Size=0x0138
IP's as they are stored as 4 groups of bytes, I just made it an Integer for simplicity. Seperate them to get the real IP.

Credits: Me for porting and someone from another forum (Forgot name)
Some Signatures :
Code:
OverlayPackage : \x55\x8B\xEC\x83\xE4\xF8\x81\xEC\x00\x00\x00\x00\xA1 xxxxxxxx????x
OverlayEnemy : \x83\xEC\x64\x53\x56\x8B\x74\x24\x70 xxxxxxxxx
overlayFriendly : \x81\xEC\x00\x00\x00\x00\xF7\x05\x00\x00\x00\x00\x00\x00\x00\x00\x75\x0D xx????xx????????xx
overlayTurret : \xA1\x00\x00\x00\x00\x69\xC0\x00\x00\x00\x00\x83\xEC\x68 x????xx????xxx
overlayhelicopter : \x83\xEC\x50\x83\x3D xxxxx
overlayPlane : \x83\xEC\x54\xA1\x00\x00\x00\x00\x53 xxxx????x
R_WeaponSpread : \x83\xEC\x18\x56\x8B\x74\x24\x20\x85\xF6 xxxxxxxxxx
DrawEngineRadar : \x83\xEC\x2C\xA1\x00\x00\x00\x00\x53 xxxx????x
ChopperBoxes : \x83\xEC\x20\x53\x8B\x5C\x24\x28\x53 xxxxxxxxx
CG_Draw2D : \x56\x8B\x74\x24\x08\x56\xE8\x00\x00\x00\x00\x83\xC4\x04\x83\x3D xxxxxxx????xxxxx
WritePacket : \xB8\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x8B\x84\x24\x00\x00\x00\x00\x56\x8B\x35 x????x????xxx????xxx
cant find the nospread and the norecoil values game crash evry time if i shoot maybe somone can post them ?
Quote Originally Posted by unitedhackzz View Post
cant find the nospread and the norecoil values game crash evry time if i shoot maybe somone can post them ?
It makes no sense posting them, Private servers only use Dedicated servers and thus u aren't host. Host-Only no spread doesnt work....If you're a programmer, grab the spread offsets I posted above and do a no spread Client-Server sided!!
Useless I know but: (They're used by the Engine.)

Code:
#define TRACE_MASK_1    0x2806091
#define TRACE_MASK_2    0x2807821
#define TRACE_MASK_3    0x2806831
#define TRACE_MASK_4    0x803003
If you like pseudo-autowall:

addr.A_DynEntCl_EntityImpactEvent = 0x005AAED0;

Hard values in the decom are for the steam version.
Code:
int __usercall DynEntCl_EntityImpactEvent<eax>(int a1<ebx>, int a2<edi>, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, char a12, int a13)
{
  int result; // eax@2
  char *v14; // ecx@8
  char v15; // cl@10

  if ( a6 == dword_9DF6E0 )
    result = sub_50FCF0(a11);
  else
    result = CG_PlaySoundAlias(a11);
  if ( result == 60
    || result == 64
    || result == 61
    || result == 65
    || ((v14 = (char *)&unk_AE59C0 + 504 * a5) == 0 || *((_DWORD *)v14 + 53) != 1 ? (v15 = 0) : (v15 = 1), !v15) )
  {
    if ( a6 == dword_9DF6E0 )
      result = DynEntCl_PlayImpactEffects(a3, a4, a7, a8, a9, a1, a2, result, a12);
    else
      result = Phys_ObjBulletImpact(a3, a4, a5, a7, a8, a9, a1, a10, a2, result, a12, a13);
  }
  return result;
}
Posts 31–45 of 117 · Page 3 of 8

Post a Reply

Similar Threads

Talk with us