forked from GameChaos/cs2_things
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cs2_movement_reverse_engineering.cpp
5589 lines (5342 loc) · 181 KB
/
cs2_movement_reverse_engineering.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// most things taken from: https://github.com/neverlosecc/source2sdk/tree/cs2
#pragma pack(8)
// Alignment: 4
// Size: 0x49
enum loadout_positions_t : uint32_t
{
LOADOUT_POSITION_INVALID = 0xffffffff,
LOADOUT_POSITION_MELEE = 0x0,
LOADOUT_POSITION_C4 = 0x1,
LOADOUT_POSITION_FIRST_AUTO_BUY_WEAPON = 0x0,
LOADOUT_POSITION_LAST_AUTO_BUY_WEAPON = 0x1,
LOADOUT_POSITION_SECONDARY0 = 0x2,
LOADOUT_POSITION_SECONDARY1 = 0x3,
LOADOUT_POSITION_SECONDARY2 = 0x4,
LOADOUT_POSITION_SECONDARY3 = 0x5,
LOADOUT_POSITION_SECONDARY4 = 0x6,
LOADOUT_POSITION_SECONDARY5 = 0x7,
LOADOUT_POSITION_SMG0 = 0x8,
LOADOUT_POSITION_SMG1 = 0x9,
LOADOUT_POSITION_SMG2 = 0xa,
LOADOUT_POSITION_SMG3 = 0xb,
LOADOUT_POSITION_SMG4 = 0xc,
LOADOUT_POSITION_SMG5 = 0xd,
LOADOUT_POSITION_RIFLE0 = 0xe,
LOADOUT_POSITION_RIFLE1 = 0xf,
LOADOUT_POSITION_RIFLE2 = 0x10,
LOADOUT_POSITION_RIFLE3 = 0x11,
LOADOUT_POSITION_RIFLE4 = 0x12,
LOADOUT_POSITION_RIFLE5 = 0x13,
LOADOUT_POSITION_HEAVY0 = 0x14,
LOADOUT_POSITION_HEAVY1 = 0x15,
LOADOUT_POSITION_HEAVY2 = 0x16,
LOADOUT_POSITION_HEAVY3 = 0x17,
LOADOUT_POSITION_HEAVY4 = 0x18,
LOADOUT_POSITION_HEAVY5 = 0x19,
LOADOUT_POSITION_FIRST_WHEEL_WEAPON = 0x2,
LOADOUT_POSITION_LAST_WHEEL_WEAPON = 0x19,
LOADOUT_POSITION_FIRST_PRIMARY_WEAPON = 0x8,
LOADOUT_POSITION_LAST_PRIMARY_WEAPON = 0x19,
LOADOUT_POSITION_FIRST_WHEEL_GRENADE = 0x1a,
LOADOUT_POSITION_GRENADE0 = 0x1a,
LOADOUT_POSITION_GRENADE1 = 0x1b,
LOADOUT_POSITION_GRENADE2 = 0x1c,
LOADOUT_POSITION_GRENADE3 = 0x1d,
LOADOUT_POSITION_GRENADE4 = 0x1e,
LOADOUT_POSITION_GRENADE5 = 0x1f,
LOADOUT_POSITION_LAST_WHEEL_GRENADE = 0x1f,
LOADOUT_POSITION_EQUIPMENT0 = 0x20,
LOADOUT_POSITION_EQUIPMENT1 = 0x21,
LOADOUT_POSITION_EQUIPMENT2 = 0x22,
LOADOUT_POSITION_EQUIPMENT3 = 0x23,
LOADOUT_POSITION_EQUIPMENT4 = 0x24,
LOADOUT_POSITION_EQUIPMENT5 = 0x25,
LOADOUT_POSITION_FIRST_WHEEL_EQUIPMENT = 0x20,
LOADOUT_POSITION_LAST_WHEEL_EQUIPMENT = 0x25,
LOADOUT_POSITION_CLOTHING_CUSTOMPLAYER = 0x26,
LOADOUT_POSITION_PET = 0x27,
LOADOUT_POSITION_CLOTHING_FACEMASK = 0x28,
LOADOUT_POSITION_CLOTHING_HANDS = 0x29,
LOADOUT_POSITION_FIRST_COSMETIC = 0x29,
LOADOUT_POSITION_LAST_COSMETIC = 0x29,
LOADOUT_POSITION_CLOTHING_EYEWEAR = 0x2a,
LOADOUT_POSITION_CLOTHING_HAT = 0x2b,
LOADOUT_POSITION_CLOTHING_LOWERBODY = 0x2c,
LOADOUT_POSITION_CLOTHING_TORSO = 0x2d,
LOADOUT_POSITION_CLOTHING_APPEARANCE = 0x2e,
LOADOUT_POSITION_MISC0 = 0x2f,
LOADOUT_POSITION_MISC1 = 0x30,
LOADOUT_POSITION_MISC2 = 0x31,
LOADOUT_POSITION_MISC3 = 0x32,
LOADOUT_POSITION_MISC4 = 0x33,
LOADOUT_POSITION_MISC5 = 0x34,
LOADOUT_POSITION_MISC6 = 0x35,
LOADOUT_POSITION_MUSICKIT = 0x36,
LOADOUT_POSITION_FLAIR0 = 0x37,
LOADOUT_POSITION_SPRAY0 = 0x38,
LOADOUT_POSITION_FIRST_ALL_CHARACTER = 0x36,
LOADOUT_POSITION_LAST_ALL_CHARACTER = 0x38,
LOADOUT_POSITION_COUNT = 0x39,
};
// Alignment: 4
// Size: 0xe
enum TakeDamageFlags_t : uint32_t
{
DFLAG_NONE = 0x0,
DFLAG_SUPPRESS_HEALTH_CHANGES = 0x1,
DFLAG_SUPPRESS_PHYSICS_FORCE = 0x2,
DFLAG_SUPPRESS_EFFECTS = 0x4,
DFLAG_PREVENT_DEATH = 0x8,
DFLAG_FORCE_DEATH = 0x10,
DFLAG_ALWAYS_GIB = 0x20,
DFLAG_NEVER_GIB = 0x40,
DFLAG_REMOVE_NO_RAGDOLL = 0x80,
DFLAG_SUPPRESS_DAMAGE_MODIFICATION = 0x100,
DFLAG_ALWAYS_FIRE_DAMAGE_EVENTS = 0x200,
DFLAG_RADIUS_DMG = 0x400,
DMG_LASTDFLAG = 0x400,
DFLAG_IGNORE_ARMOR = 0x800,
};
// Alignment: 1
// Size: 0x6
enum MoveCollide_t : uint8_t
{
MOVECOLLIDE_DEFAULT = 0x0,
MOVECOLLIDE_FLY_BOUNCE = 0x1,
MOVECOLLIDE_FLY_CUSTOM = 0x2,
MOVECOLLIDE_FLY_SLIDE = 0x3,
MOVECOLLIDE_COUNT = 0x4,
MOVECOLLIDE_MAX_BITS = 0x3,
};
// Alignment: 1
// Size: 0x9
enum SolidType_t : uint8_t
{
SOLID_NONE = 0x0,
SOLID_BSP = 0x1,
SOLID_BBOX = 0x2,
SOLID_OBB = 0x3,
SOLID_SPHERE = 0x4,
SOLID_POINT = 0x5,
SOLID_VPHYSICS = 0x6,
SOLID_CAPSULE = 0x7,
SOLID_LAST = 0x8,
};
// Alignment: 1
// Size: 0x9
enum SurroundingBoundsType_t : uint8_t
{
USE_OBB_COLLISION_BOUNDS = 0x0,
USE_BEST_COLLISION_BOUNDS = 0x1,
USE_HITBOXES = 0x2,
USE_SPECIFIED_BOUNDS = 0x3,
USE_GAME_CODE = 0x4,
USE_ROTATION_EXPANDED_BOUNDS = 0x5,
USE_COLLISION_BOUNDS_NEVER_VPHYSICS = 0x6,
USE_ROTATION_EXPANDED_SEQUENCE_BOUNDS = 0x7,
SURROUNDING_TYPE_BIT_COUNT = 0x3,
};
// Alignment: 1
// Size: 0xe
enum MoveType_t : uint8_t
{
MOVETYPE_NONE = 0x0,
MOVETYPE_OBSOLETE = 0x1,
MOVETYPE_WALK = 0x2,
MOVETYPE_STEP = 0x3,
MOVETYPE_FLY = 0x4,
MOVETYPE_FLYGRAVITY = 0x5,
MOVETYPE_VPHYSICS = 0x6,
MOVETYPE_PUSH = 0x7,
MOVETYPE_NOCLIP = 0x8,
MOVETYPE_OBSERVER = 0x9,
MOVETYPE_LADDER = 0xa,
MOVETYPE_CUSTOM = 0xb,
MOVETYPE_LAST = 0xc,
MOVETYPE_MAX_BITS = 0x5,
};
// Alignment: 1
// Size: 0xd
enum RenderMode_t : uint8_t
{
kRenderNormal = 0x0,
kRenderTransColor = 0x1,
kRenderTransTexture = 0x2,
kRenderGlow = 0x3,
kRenderTransAlpha = 0x4,
kRenderTransAdd = 0x5,
kRenderEnvironmental = 0x6,
kRenderTransAddFrameBlend = 0x7,
kRenderTransAlphaAdd = 0x8,
kRenderWorldGlow = 0x9,
kRenderNone = 0xa,
kRenderDevVisualizer = 0xb,
kRenderModeCount = 0xc,
};
// Alignment: 1
// Size: 0x14
enum RenderFx_t : uint8_t
{
kRenderFxNone = 0x0,
kRenderFxPulseSlow = 0x1,
kRenderFxPulseFast = 0x2,
kRenderFxPulseSlowWide = 0x3,
kRenderFxPulseFastWide = 0x4,
kRenderFxFadeSlow = 0x5,
kRenderFxFadeFast = 0x6,
kRenderFxSolidSlow = 0x7,
kRenderFxSolidFast = 0x8,
kRenderFxStrobeSlow = 0x9,
kRenderFxStrobeFast = 0xa,
kRenderFxStrobeFaster = 0xb,
kRenderFxFlickerSlow = 0xc,
kRenderFxFlickerFast = 0xd,
kRenderFxNoDissipation = 0xe,
kRenderFxFadeOut = 0xf,
kRenderFxFadeIn = 0x10,
kRenderFxPulseFastWider = 0x11,
kRenderFxGlowShell = 0x12,
kRenderFxMax = 0x13,
};
// Alignment: 4
// Size: 0xe
enum HitGroup_t : uint32_t
{
HITGROUP_INVALID = 0xffffffff,
HITGROUP_GENERIC = 0x0,
HITGROUP_HEAD = 0x1,
HITGROUP_CHEST = 0x2,
HITGROUP_STOMACH = 0x3,
HITGROUP_LEFTARM = 0x4,
HITGROUP_RIGHTARM = 0x5,
HITGROUP_LEFTLEG = 0x6,
HITGROUP_RIGHTLEG = 0x7,
HITGROUP_NECK = 0x8,
HITGROUP_UNUSED = 0x9,
HITGROUP_GEAR = 0xa,
HITGROUP_SPECIAL = 0xb,
HITGROUP_COUNT = 0xc,
};
// Alignment: 4
// Size: 0xb
enum Hull_t : uint32_t
{
HULL_HUMAN = 0x0,
HULL_SMALL_CENTERED = 0x1,
HULL_WIDE_HUMAN = 0x2,
HULL_TINY = 0x3,
HULL_MEDIUM = 0x4,
HULL_TINY_CENTERED = 0x5,
HULL_LARGE = 0x6,
HULL_LARGE_CENTERED = 0x7,
HULL_MEDIUM_TALL = 0x8,
NUM_HULLS = 0x9,
HULL_NONE = 0xa,
};
// Alignment: 4
// Size: 0x7
enum ObserverMode_t : uint32_t
{
OBS_MODE_NONE = 0x0,
OBS_MODE_FIXED = 0x1,
OBS_MODE_IN_EYE = 0x2,
OBS_MODE_CHASE = 0x3,
OBS_MODE_ROAMING = 0x4,
OBS_MODE_DIRECTED = 0x5,
NUM_OBSERVER_MODES = 0x6,
};
// Alignment: 4
// Size: 0x2
enum attributeprovidertypes_t : uint32_t
{
PROVIDER_GENERIC = 0x0,
PROVIDER_WEAPON = 0x1,
};
// Alignment: 4
// Size: 0x3
enum WeaponState_t : uint32_t
{
WEAPON_NOT_CARRIED = 0x0,
WEAPON_IS_CARRIED_BY_PLAYER = 0x1,
WEAPON_IS_ACTIVE = 0x2,
};
// Alignment: 4
// Size: 0x6
enum RelativeDamagedDirection_t : uint32_t
{
DAMAGED_DIR_NONE = 0x0,
DAMAGED_DIR_FRONT = 0x1,
DAMAGED_DIR_BACK = 0x2,
DAMAGED_DIR_LEFT = 0x3,
DAMAGED_DIR_RIGHT = 0x4,
DAMAGED_DIR_TOTAL = 0x5,
};
// Alignment: 4
// Size: 0xa
enum CSPlayerState : uint32_t
{
STATE_ACTIVE = 0x0,
STATE_WELCOME = 0x1,
STATE_PICKINGTEAM = 0x2,
STATE_PICKINGCLASS = 0x3,
STATE_DEATH_ANIM = 0x4,
STATE_DEATH_WAIT_FOR_KEY = 0x5,
STATE_OBSERVER_MODE = 0x6,
STATE_GUNGAME_RESPAWN = 0x7,
STATE_DORMANT = 0x8,
NUM_PLAYER_STATES = 0x9,
};
// Alignment: 4
// Size: 0x12
enum CSPlayerBlockingUseAction_t : uint32_t
{
k_CSPlayerBlockingUseAction_None = 0x0,
k_CSPlayerBlockingUseAction_DefusingDefault = 0x1,
k_CSPlayerBlockingUseAction_DefusingWithKit = 0x2,
k_CSPlayerBlockingUseAction_HostageGrabbing = 0x3,
k_CSPlayerBlockingUseAction_HostageDropping = 0x4,
k_CSPlayerBlockingUseAction_OpeningSafe = 0x5,
k_CSPlayerBlockingUseAction_EquippingParachute = 0x6,
k_CSPlayerBlockingUseAction_EquippingHeavyArmor = 0x7,
k_CSPlayerBlockingUseAction_EquippingContract = 0x8,
k_CSPlayerBlockingUseAction_EquippingTabletUpgrade = 0x9,
k_CSPlayerBlockingUseAction_TakingOffHeavyArmor = 0xa,
k_CSPlayerBlockingUseAction_PayingToOpenDoor = 0xb,
k_CSPlayerBlockingUseAction_CancelingSpawnRappelling = 0xc,
k_CSPlayerBlockingUseAction_EquippingExoJump = 0xd,
k_CSPlayerBlockingUseAction_PickingUpBumpMine = 0xe,
k_CSPlayerBlockingUseAction_MapLongUseEntity_Pickup = 0xf,
k_CSPlayerBlockingUseAction_MapLongUseEntity_Place = 0x10,
k_CSPlayerBlockingUseAction_MaxCount = 0x11,
};
// Alignment: 8
// Size: 0x15
enum InputBitMask_t : uint64_t
{
IN_NONE = 0x0,
IN_ALL = 0xffffffffffffffff,
IN_ATTACK = 0x1,
IN_JUMP = 0x2,
IN_DUCK = 0x4,
IN_FORWARD = 0x8,
IN_BACK = 0x10,
IN_USE = 0x20,
IN_TURNLEFT = 0x80,
IN_TURNRIGHT = 0x100,
IN_MOVELEFT = 0x200,
IN_MOVERIGHT = 0x400,
IN_ATTACK2 = 0x800,
IN_RELOAD = 0x2000,
IN_SPEED = 0x10000,
IN_JOYAUTOSPRINT = 0x20000,
IN_FIRST_MOD_SPECIFIC_BIT = 0x100000000,
IN_USEORRELOAD = 0x100000000,
IN_SCORE = 0x200000000,
IN_ZOOM = 0x400000000,
IN_JUMP_THROW_RELEASE = 0x800000000,
};
// Alignment: 4
// Size: 0x5
enum LifeState_t : uint8_t
{
LIFE_ALIVE = 0x0,
LIFE_DYING = 0x1,
LIFE_DEAD = 0x2,
LIFE_RESPAWNABLE = 0x3,
LIFE_RESPAWNING = 0x4,
};
// Alignment: 1
// Size: 0x6
enum WaterLevel_t : uint8_t
{
WL_NotInWater = 0x0,
WL_Feet = 0x1,
WL_Waist = 0x2,
WL_Chest = 0x3,
WL_FullyUnderwater = 0x4,
WL_Count = 0x5,
};
enum Contents : uint64_t
{
// from CBaseEntity::OnEntityEvent function offset 121 in CBaseEntity vtable
CONTENTS_WATER = 0x8000,
CONTENTS_SLIME = 0x10000,
};
// copied from source1
enum EntityEvent_t : uint32_t
{
ENTITY_EVENT_WATER_TOUCH = 0,
ENTITY_EVENT_WATER_UNTOUCH,
ENTITY_EVENT_PARENT_CHANGED,
};
enum EntityFlag_t : uint32_t
{
FL_ONGROUND = (1<<0), // At rest / on the ground
FL_DUCKING = (1<<1),
FL_WATERJUMP = (1<<2), // player jumping out of water
// Unused 1<<3
FL_UNKNOWN0 = (1<<4), // Something related to UserCmd
FL_FROZEN = (1<<5), // Player is frozen for 3rd person camera
FL_ATCONTROLS = (1<<6),
FL_CLIENT = (1<<7), // Unsure
FL_FAKECLIENT = (1<<8), // Unsure
// Unused 1<<9
FL_FLY = (1<<10),
FL_UNKNOWN1 = (1<<11), // Something to do with CRevertSaved
// Unused 1<<12
// Unused 1<<13
FL_GODMODE = (1<<14),
FL_NOTARGET = (1<<15),
FL_AIMTARGET = (1<<16),
// Unused 1<<17
FL_STATICPROP = (1<<18),
// Unused 1<<19
FL_GRENADE = (1<<20),
FL_DONTTOUCH = (1<<22),
FL_BASEVELOCITY = (1<<23),
FL_WORLDBRUSH = (1<<24),
FL_OBJECT = (1<<25),
FL_ONFIRE = (1<<27),
FL_DISSOLVING = (1<<28),
FL_TRANSRAGDOLL = (1<<29),
FL_UNBLOCKABLE_BY_PLAYER = (1<<30)
};
enum EntityEffect_t
{
EF_BONEMERGE = 0x001,
EF_BRIGHTLIGHT = 0x002,
EF_DIMLIGHT = 0x004,
EF_NOINTERP = 0x008,
EF_NOSHADOW = 0x010,
EF_NODRAW = 0x020,
EF_NORECEIVESHADOW = 0x040,
EF_BONEMERGE_FASTCULL = 0x080,
EF_ITEM_BLINK = 0x100, // blink an item so that the user notices it.
EF_PARENT_ANIMATES = 0x200, // always assume that the parent entity is animating
EF_MARKED_FOR_FAST_REFLECTION = 0x400, // marks an entity for reflection rendering when using $reflectonlymarkedentities material variable
EF_NOSHADOWDEPTH = 0x800, // Indicates this entity does not render into any shadow depthmap
EF_SHADOWDEPTH_NOCACHE = 0x1000, // Indicates this entity cannot be cached in shadow depthmap and should render every frame
EF_NOFLASHLIGHT = 0x2000,
EF_NOCSM = 0x4000, // Indicates this entity does not render into the cascade shadow depthmap
EF_MAX_BITS = 15
};
// Alignment: 4
// Size: 0x7
enum PlayerConnectedState : uint32_t
{
PlayerNeverConnected = 0xffffffffffffffff,
PlayerConnected = 0x0,
PlayerConnecting = 0x1,
PlayerReconnecting = 0x2,
PlayerDisconnecting = 0x3,
PlayerDisconnected = 0x4,
PlayerReserved = 0x5,
};
// Alignment: 4
// Size: 0x3
enum ChatIgnoreType_t : uint32_t
{
CHAT_IGNORE_NONE = 0x0,
CHAT_IGNORE_ALL = 0x1,
CHAT_IGNORE_TEAM = 0x2,
};
// Alignment: 4
// Size: 0x5
enum MedalRank_t : uint32_t
{
MEDAL_RANK_NONE = 0x0,
MEDAL_RANK_BRONZE = 0x1,
MEDAL_RANK_SILVER = 0x2,
MEDAL_RANK_GOLD = 0x3,
MEDAL_RANK_COUNT = 0x4,
};
class Vector2D
{
public:
float x;
float y;
};
class Vector
{
public:
float x;
float y;
float z;
};
typedef Vector QAngle;
class Vector4D
{
public:
float x;
float y;
float z;
float w;
};
class CInButtonState
{
public:
virtual void *MaybeGetSchema();
InputBitMask_t m_pButtonStates[3];
};
// Size: 0x4
class CUtlStringToken
{
public:
uint32_t m_nHashCode;
};
// Alignment: 1
// Size: 0x28
class CNetworkVarChainer
{
public:
uint8_t unknown0[0x20];
int16_t m_PathIndex; // 0x20
uint8_t unknown1[6];
};
// Alignment: 1
// Size: 0x4
struct GameTime_t
{
public:
float m_Value; // 0x0
};
class CCSPlayerPawn;
// Alignment: 1
// Size: 0x40
class CPlayerPawnComponent
{
public:
virtual void *MaybeGetSchema();
virtual int64_t *Unk0();
virtual void *Unk1(char a2);
virtual void MergedNullSub2();
virtual int64_t Unk3();
virtual int64_t Unk4();
virtual void MergedNullSub5();
virtual int64_t Unk6();
virtual int64_t Unk7();
virtual void PostThink();
virtual char Unk9();
virtual int64_t Unk10();
virtual void MergedNullSub11();
virtual void MergedNullSub12();
virtual int32_t *Unk13(int32_t *outWorldGroupId);
CNetworkVarChainer __m_pChainEntity; // 0x8
CCSPlayerPawn *pawn; // 0x30
uint8_t unknown0[6];
};
class CMoveData;
// Alignment: 14
// Size: 0x1b8
class CPlayer_MovementServices : public CPlayerPawnComponent
{
public:
virtual void *MaybeGetSchema();
virtual int64_t *Unk0();
virtual void *Unk1(char a2);
// virtual void MergedNullSub2();
virtual int64_t Unk3();
virtual int64_t Unk4();
// virtual void MergedNullSub5();
virtual int64_t Unk6();
// virtual int64_t Unk7();
// virtual void PostThink();
// virtual char Unk9();
virtual int64_t Unk10();
// virtual void MergedNullSub11();
// virtual void MergedNullSub12();
virtual int32_t *Unk13(int32_t *outWorldGroupId);
virtual void UpdateButtonState(void *ucmd);
virtual void PlayerRunCommand(void *ucmd);
virtual void ProcessMovement(CMoveData *mv);
virtual int64_t Unk17(int64_t a2);
virtual bool ReturnOne18();
virtual void *ResetMoveData();
virtual int64_t SetupMove(void *ucmd, CMoveData *mv);
virtual int64_t FinishMove(void *ucmd, CMoveData *mv);
virtual void SetPredictionRandomSeed(void *ucmd);
virtual int64_t Unk23(void *ucmd, int64_t a2);
virtual bool ReturnOne24();
virtual void CheckMovingGround(double frametime);
virtual bool ReturnZero26();
virtual int64_t Unk27(int64_t a2, float a3, float a4, float a5, char a6);
int32_t m_nImpulse; // 0x40
CInButtonState m_nButtons; // 0x48
uint64_t m_nQueuedButtonDownMask; // 0x68
uint64_t m_nQueuedButtonChangeMask; // 0x70
uint64_t m_nButtonDoublePressed; // 0x78
uint32_t m_pButtonPressedCmdNumber[64]; // 0x80
uint32_t m_nLastCommandNumberProcessed; // 0x180
// assume ida pads correctly to 8 bytes :)
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
uint64_t m_nToggleButtonDownMask; // 0x188
// MNetworkEnable
// MNetworkBitCount "12"
// MNetworkMinValue "0"
// MNetworkMaxValue "2048"
// MNetworkEncodeFlags
float m_flMaxspeed; // 0x190
// MNetworkEnable
float m_arrForceSubtickMoveWhen[4]; // 0x194
float m_flForwardMove; // 0x198
float m_flLeftMove; // 0x19c
float m_flUpMove; // 0x1a0
Vector m_vecLastMovementImpulses; // 0x1a4
Vector m_vecOldViewAngles; // 0x1a4
uint8_t unknown[8];
};
// Alignment: 14
// Size: 0x208
class CPlayer_MovementServices_Humanoid : public CPlayer_MovementServices
{
public:
virtual void *MaybeGetSchema();
virtual int64_t *Unk0();
virtual void *Unk1(char a2);
// virtual void MergedNullSub2();
virtual int64_t Unk3();
// virtual int64_t Unk4();
// virtual void MergedNullSub5();
// virtual int64_t Unk6();
virtual int64_t Unk7();
virtual void PostThink();
virtual char Unk9();
virtual int64_t Unk10();
// virtual void MergedNullSub11();
// virtual void MergedNullSub12();
virtual int32_t *Unk13(int32_t *outWorldGroupId);
// virtual void UpdateButtonState(void *ucmd);
// virtual void PlayerRunCommand(void *ucmd);
// virtual void ProcessMovement(CMoveData *mv);
virtual int64_t Unk17(int64_t a2);
// virtual bool ReturnOne18();
// virtual void *ResetMoveData();
// virtual int64_t SetupMove(void *ucmd, CMoveData *mv);
// virtual int64_t FinishMove(void *ucmd, CMoveData *mv);
// virtual void SetPredictionRandomSeed(void *ucmd);
// virtual int64_t Unk23(void *ucmd, int64_t a2);
virtual bool ReturnOne24();
// virtual void CheckMovingGround(double frametime);
// virtual bool ReturnZero26();
// virtual int64_t Unk27(int64_t a2, float a3, float a4, float a5, char a6);
virtual float FlPlayerFallDamage();
virtual void UpdateCollisionBounds();
virtual void UnkNull30();
virtual int64_t GetLadderSurface();
virtual void UpdateStepSound(int64_t psurface, const Vector &vecOrigin, const Vector &vecVelocity);
virtual void PlayStepSound(Vector &vecOrigin, uint64_t psurface, float fvol);
virtual void GetStepSoundVelocities( float *velwalk, float *velrun );
virtual CCSPlayerPawn *SetStepSoundTime(int a2, bool a3);
virtual int64_t MaybeGetFootstepEntry();
virtual void UnkNull37();
virtual void UnkNull38();
float m_flStepSoundTime; // 0x1b8
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
// MNetworkBitCount "17"
// MNetworkMinValue "-4096"
// MNetworkMaxValue "4096"
// MNetworkEncodeFlags
float m_flFallVelocity; // 0x1bc
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
bool m_bInCrouch; // 0x1c0
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
uint32_t m_nCrouchState; // 0x1c4
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
float m_flCrouchTransitionStartTime; // 0x1c8
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
bool m_bDucked; // 0x1cc
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
bool m_bDucking; // 0x1cd
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
bool m_bInDuckJump; // 0x1ce
Vector m_groundNormal; // 0x1d0
float m_flSurfaceFriction; // 0x1dc
CUtlStringToken m_surfaceProps; // 0x1e0
uint8_t unknown2[12];
int32_t m_nStepside; // 0x1f0
int32_t m_iTargetVolume; // 0x1f4
Vector m_vecSmoothedVelocity; // 0x1f8
uint8_t unknown3[4];
};
// Alignment: 35
// Size: 0x13c0
class CCSPlayer_MovementServices : public CPlayer_MovementServices_Humanoid
{
public:
virtual void *MaybeGetSchema();
virtual int64_t *Unk0();
virtual void *Unk1(char a2);
// virtual void MergedNullSub2();
virtual int64_t Unk3();
// virtual int64_t Unk4();
// virtual void MergedNullSub5();
// virtual int64_t Unk6();
// virtual int64_t Unk7();
// virtual void PostThink();
// virtual char Unk9();
// virtual int64_t Unk10();
// virtual void MergedNullSub11();
// virtual void MergedNullSub12();
virtual int32_t *Unk13(int32_t *outWorldGroupId);
virtual void UpdateButtonState(void *ucmd);
virtual void PlayerRunCommand(void *ucmd);
virtual void ProcessMovement(CMoveData *mv);
virtual int64_t Unk17(int64_t a2);
// virtual bool ReturnOne18();
virtual void *ResetMoveData();
virtual int64_t SetupMove(void *ucmd, CMoveData *mv);
virtual int64_t FinishMove(void *ucmd, CMoveData *mv);
// virtual void SetPredictionRandomSeed(void *ucmd);
virtual int64_t Unk23(void *ucmd, int64_t a2);
// virtual bool ReturnOne24();
virtual void CheckMovingGround(double frametime);
// virtual bool ReturnZero26();
// virtual int64_t Unk27(int64_t a2, float a3, float a4, float a5, char a6);
virtual float FlPlayerFallDamage();
// virtual void UpdateCollisionBounds();
// virtual void UnkNull30();
// virtual int64_t GetLadderSurface();
virtual void UpdateStepSound(uint64_t psurface, const Vector &vecOrigin, const Vector &vecVelocity);
// virtual void PlayStepSound(Vector &vecOrigin, uint64_t psurface, float fvol);
// virtual void GetStepSoundVelocities( float *velwalk, float *velrun );
// virtual CCSPlayerPawn *SetStepSoundTime(int a2, bool a3);
virtual int64_t MaybeGetFootstepEntry();
// virtual void UnkNull37();
// virtual void UnkNull38();
virtual void CSPlayStepSound( Vector &vecOrigin, uint64_t psurface, float fvol, bool force ); // psurface type is surfacedata_t *
// MNetworkEnable
float m_flMaxFallVelocity; // 0x208
// MNetworkEnable
// MNetworkEncoder
Vector m_vecLadderNormal; // 0x20c
// MNetworkEnable
int32_t m_nLadderSurfacePropIndex; // 0x218
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
bool m_bAllowAutoMovement; // 0x21c
// MNetworkEnable
float m_flDuckAmount; // 0x220
// MNetworkEnable
float m_flDuckSpeed; // 0x224
// MNetworkEnable
bool m_bDuckOverride; // 0x228
float m_flDuckOffset; // 0x22c
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
// MNetworkPriority "32"
uint32_t m_nDuckTimeMsecs; // 0x230
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
uint32_t m_nDuckJumpTimeMsecs; // 0x234
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
uint32_t m_nJumpTimeMsecs; // 0x238
// MNetworkEnable
// MNetworkUserGroup "LocalPlayerExclusive"
float m_flLastDuckTime; // 0x23c
uint8_t unknown3[8];
Vector2D m_vecLastPositionAtFullCrouchSpeed; // 0x248
bool m_duckUntilOnGround; // 0x250
bool m_bHasWalkMovedSinceLastJump; // 0x251
bool m_bInStuckTest; // 0x252
uint64_t m_CachedGetPointContents[64][3]; // 0x258
Vector m_CachedGetPointContentsPoint[64][3]; // 0x858
uint8_t unknown4[6];
float m_flStuckCheckTime[64][2]; // 0x1160
int32_t m_nTraceCount; // 0x1360
int32_t m_StuckLast; // 0x1364
bool m_bSpeedCropped; // 0x1368
int32_t m_nOldWaterLevel; // 0x136c
float m_flWaterEntryTime; // 0x1370
Vector m_vecForward; // 0x1374
Vector m_vecLeft; // 0x1380
Vector m_vecUp; // 0x138c
Vector m_vecPreviouslyPredictedOrigin; // 0x1398
bool m_bMadeFootstepNoise; // 0x13a4
int32_t m_iFootsteps; // 0x13a8
int32_t m_nRoundFootstepsMade; // 0x13ac
// MNetworkEnable
bool m_bOldJumpPressed; // 0x13b0
float m_flJumpPressedTime; // 0x13cc
// MNetworkEnable
float m_flJumpUntil; // 0x13b4
// MNetworkEnable
float m_flJumpVel; // 0x13b8
// MNetworkEnable
float m_fStashGrenadeParameterWhen; // 0x13bc
uint8_t __pad13dc[0x4]; // 0x13dc
// MNetworkEnable
uint64_t m_nButtonDownMaskPrev; // 0x13e0
// MNetworkEnable
float m_flOffsetTickCompleteTime; // 0x13e8
// MNetworkEnable
float m_flOffsetTickStashedSpeed; // 0x13ec
};
// Alignment: 0
// Size: 0x78
class CCSPlayer_ParachuteServices //: public CPlayerPawnComponent
{
public:
CPlayerPawnComponent pawnComponent;
uint8_t unknown[0x38];
};
// Alignment: 1
// Size: 0x48
class CCSPlayer_BulletServices //: public CPlayerPawnComponent
{
public:
CPlayerPawnComponent pawnComponent;
int32_t m_totalHitsOnServer; // 0x40
uint8_t unknown1[0x4];
};
class CHandle
{
public:
int32_t handle;
};
// Alignment: 2
// Size: 0x50
class CCSPlayer_HostageServices //: public CPlayerPawnComponent
{
public:
CPlayerPawnComponent pawnComponent;
// MNetworkEnable
CHandle m_hCarriedHostage; // 0x40
// MNetworkEnable
CHandle m_hCarriedHostageProp; // 0x44
uint8_t unknown[8];
};
// Alignment: 1
// Size: 0xc8
class CCSPlayer_BuyServices //: public CPlayerPawnComponent
{
public:
CPlayerPawnComponent pawnComponent;
float m_flNextAutoBuyAmmoTime; // 0x40
uint8_t unknown1[0x84];
};
// Alignment: 2
// Size: 0x58
class CCSPlayer_PingServices //: public CPlayerPawnComponent
{
public:
CPlayerPawnComponent pawnComponent;
float m_flPlayerPingTokens[5]; // 0x40
// MNetworkEnable
CHandle m_hPlayerPing; // 0x54
};
// Alignment: 5
// Size: 0x60
class CCSPlayer_RadioServices //: public CPlayerPawnComponent
{
public:
CPlayerPawnComponent pawnComponent;
float m_flGotHostageTalkTimer; // 0x40
float m_flDefusingTalkTimer; // 0x44
float m_flC4PlantTalkTimer; // 0x48
float m_flRadioTokenSlots[3]; // 0x4c
bool m_bIgnoreRadio; // 0x58
};
// Alignment: 0
// Size: 0x40
class CCSPlayer_DamageReactServices //: public CPlayerPawnComponent
{
public:
CPlayerPawnComponent pawnComponent;
};
// Size: 0x20
#pragma pack(16)
class CTransform
{
public:
Vector m_vPosition;
Vector4D m_orientation;
};
#pragma pack(8)
// Alignment: 2
// Size: 0x60
class CAttributeList // : public
{
public:
uint8_t unknown0[8];
// MNetworkEnable
// MNetworkTypeAlias "CUtlVector< CEconItemAttribute >"
void *m_Attributes; // 0x8
uint8_t unknown1[0x48];
void *m_pManager; // 0x58 CAttributeManager
};
// Alignment: 13
// Size: 0x278
class CEconItemView // : public IEconItemInterface
{
public:
uint8_t unknown0[0x38];
// MNetworkEnable
uint16_t m_iItemDefinitionIndex; // 0x38
// MNetworkEnable
int32_t m_iEntityQuality; // 0x3c
// MNetworkEnable
uint32_t m_iEntityLevel; // 0x40
uint64_t m_iItemID; // 0x48
// MNetworkEnable
uint32_t m_iItemIDHigh; // 0x50
// MNetworkEnable
uint32_t m_iItemIDLow; // 0x54
// MNetworkEnable
uint32_t m_iAccountID; // 0x58
// MNetworkEnable
uint32_t m_iInventoryPosition; // 0x5c
uint8_t unknown1[8];
// MNetworkEnable
bool m_bInitialized; // 0x68
// MNetworkEnable
CAttributeList m_AttributeList; // 0x70
// MNetworkEnable
CAttributeList m_NetworkedDynamicAttributes; // 0xd0
// MNetworkEnable
char m_szCustomName[161]; // 0x130
char m_szCustomNameOverride[161]; // 0x1d1
uint8_t unknown2[6];
};
// Size: 0x8
class IHandleEntity // : public
{
public:
virtual void *MaybeGetSchema();
virtual uint64_t *IheUnk0(char a2);
virtual int *IheUnk1(int *a2);
};
union CUtlSymbolLarge
{
public:
int64_t m_Id;
const char *m_pAsString;
};
// Alignment: 11
// Size: 0x78
class CEntityIdentity // : public
{
public:
uint8_t unknown0[0x14];
// MNetworkEnable
// MNetworkChangeCallback "entityIdentityNameChanged"
int32_t m_nameStringableIndex; // 0x14
CUtlSymbolLarge m_name; // 0x18
CUtlSymbolLarge m_designerName; // 0x20