Hey guys

Just started messing around trying to get stuff working with insurgency tonight and I'm having a few issues getting my usercmd's CRC's to match up with the ones in pVerified.

For starters, my Input class seems correct, the pointer to it is fine.

PHP Code:

class CInput
virtual void Init_All(void); //
virtual void Shutdown_All(void);; //
virtual int GetButtonBits(int);; //
virtual void CreateMove(int sequence_number, float input_sample_frametime, bool active);; //
virtual void ExtraMouseSample(float frametime, bool active);; //
virtual bool WriteUsercmdDeltaToBuffer(int *buf, int from, int to, bool isnewcommand);; //
virtual void EncodeUserCmdToBuffer(int buf, int slot);; //
virtual void DecodeUserCmdFromBuffer(int buf, int slot);; //
virtual CUserCmd* GetUserCmd(int seq);; //

char pad_0x0004[0xEC]; //0x0004
CUserCmd* m_pCmd; //0x00F0
CVerifiedUserCmd* m_pVerified; //0x00F4

All seems fine, the commands seem valid and aligned in those arrays, tested by comparing both the sequence number given as an argument to createmove, and checking its correct in command_number for both the normal pCmd and the verified one.

The problem seems to be coming down to me not knowing how much of the cmd to crc, and I can't exactly do specific members of it because I haven't actually reclassed it completely:

PHP Code:

class CUserCmd
virtual ~CUserCmd();

int command_number; //0x0004
int tick_count; //0x0008
Vector viewangles; //0x000C
Vector aimdirection;
float fowardmove; //0x0024
float sidemove; //0x0028
float upmove; //0x002C
int buttons; //0x0030
BYTE impulse; //0x0034
char pad_0x0035[0x3]; //0x0035
int N0000008B; //0x0038
int N0000008C; //0x003C
int random_seed; //0x0040
short mousex; //0x0044
short mousey; //0x0046
char pad_0x0048[0x40]; //0x0048


Size of it seems fine.

Tried just doing "CRC32_ProcessSingleBuffer(pCmd, sizeof(CUserCmd));", but I'm not getting the correct result from that.

I tried looping though incrementing the size up to the size of CUserCmd but I never hit a match either.

I'm probably just overlooking something seeing as it's late but I thought someone might be able to point out where I could be going wrong.

Thanks very much for any help,


Original Writen by Synraw in Other FPS Games Category, the date of 25-06-2015 12:54.