-
Notifications
You must be signed in to change notification settings - Fork 0
/
sdk.h
1346 lines (1096 loc) · 41.1 KB
/
sdk.h
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
#pragma once
#include "vector.h"
enum offsets : std::int32_t {
BoneMatrix = 0x1EB8938, // updated for v30.01
StaticFindObject = 0x146D58C, // updated for v30.01
CurrentVehicle = 0x2960,
LastFireTime = 0xC50,
LastFireTimeVerified = 0xC54,
CustomTimeDilation = 0x64,
GlobalAnimRateScale = 0xa18,
Mesh = 0x318,
bIsReloadingWeapon = 0x388,
VehicleAttributes = 0x10C8,
CachedSpeed = 0xCEC,
TopSpeedCurrentMultiplier = 0x968,
PushForceCurrentMultiplier = 0x96C,
WaterEffectsVehicleMaxSpeedKmh = 0x7FC,
bAdsWhileNotOnGround = 0x5468,
bDisableEquipAnimation = 0x362,
bIgnoreTryToFireSlotCooldownRestriction = 0x12C9,
ZiplineState = 0x24E0,
TriggerType = 0xB4C,
WeaponData = 0x500,
};
enum fort_item_tier : std::uint8_t {
No_Tier = 0,
I = 1,
II = 2,
III = 3,
IV = 4,
V = 5,
VI = 6,
VII = 7,
VIII = 8,
IX = 9,
X = 10,
NumItemTierValues = 11,
EFortItemTier_MAX = 12
};
struct ftextdata {
char pad_0[0x38];
wchar_t* name;
__int32 length;
};
struct ftext {
ftextdata* data;
char pad_0[0x10];
wchar_t* c_str() const {
if (this->data) {
return data->name;
}
return nullptr;
}
};
template <class type>
struct tarray {
public:
tarray() { this->data = nullptr; this->count = this->max = 0; };
type* data;
std::int32_t count, max;
type& operator[](int i) {
return this->data[i];
};
int size() {
return this->count;
}
bool valid(int i) {
return bool(i < this->count);
}
};
struct fstring : private tarray<wchar_t> {
fstring() { };
fstring(const wchar_t* other) {
this->max = this->count = *other ? static_cast<int>(std::wcslen(other)) + 1 : 0;
if (this->count)
this->data = const_cast<wchar_t*>(other);
};
wchar_t* c_str() {
return this->data;
}
bool valid() {
return this->data != nullptr;
}
};
struct fmatrix {
double m[4][4];
};
struct fvector {
fvector() : x(), y(), z() { }
fvector(double _x, double _y, double _z) : x(_x), y(_y), z(_z) { }
double x, y, z;
operator bool() { return bool(this->x && this->y && this->z); }
bool operator==(fvector in) { return bool(this->x == in.x && this->y == in.y && this->z == in.z); }
fvector operator+(fvector in) { return fvector(this->x + in.x, this->y + in.y, this->z + in.z); }
fvector operator-(fvector in) { return fvector(this->x - in.x, this->y - in.y, this->z - in.z); }
};
struct fvector2d {
fvector2d() : x(), y() { }
fvector2d(double _x, double _y) : x(_x), y(_y) { }
double x, y;
operator bool() { return bool(this->x && this->y); }
bool operator==(fvector2d in) { return bool(this->x == in.x && this->y == in.y); }
fvector2d operator+(fvector2d in) { return fvector2d(this->x + in.x, this->y + in.y); }
fvector2d operator-(fvector2d in) { return fvector2d(this->x - in.x, this->y - in.y); }
};
struct frotator {
frotator() : pitch(), yaw(), roll() { }
frotator(double _pitch, double _yaw, double _roll) : pitch(_pitch), yaw(_yaw), roll(_roll) { }
double pitch, yaw, roll;
operator bool() { return bool(this->pitch && this->yaw); }
bool operator==(frotator in) { return bool(this->pitch == in.pitch && this->yaw == in.yaw && this->roll == in.roll); }
frotator operator+(frotator in) { return frotator(this->pitch + in.pitch, this->yaw + in.yaw, this->roll + in.roll); }
frotator operator-(frotator in) { return frotator(this->pitch - in.pitch, this->yaw - in.yaw, this->roll - in.roll); }
};
struct flinearcolor {
flinearcolor() : r(), g(), b(), a() { }
flinearcolor(float _r, float _g, float _b, float _a) : r(_r), g(_g), b(_b), a(_a) { }
float r, g, b, a;
operator bool() { return bool(this->r || this->g || this->b || this->a); }
bool operator==(flinearcolor in) { return bool(this->r == in.r && this->g == in.g && this->b == in.b && this->a == in.a); }
};
struct fminimalviewinfo {
fvector location;
frotator rotation;
float fov;
};
struct fname {
fname() : index() { }
fname(std::uint32_t _index) : index(_index) { }
std::uint32_t index;
};
struct fkey {
fname name;
std::uint8_t details[20];
};
class uobject {
public:
fname get_name() {
return read<fname>(std::uintptr_t(this) + 0x18);
}
static uobject* find_object(const wchar_t* name, uobject* outer = nullptr) {
return reinterpret_cast<uobject*>(uobject::static_find_objecttwo(nullptr, outer, name));
}
static uobject* static_find_objecttwo(uobject* klass, uobject* outer, const wchar_t* name) {
return reinterpret_cast<uobject * (*)(uobject*, uobject*, const wchar_t*)>(game + offsets::StaticFindObject)(klass, outer, name);
}
static uobject* static_find_object(uobject* klass, uobject* outer, const wchar_t* name, bool exact) {
return reinterpret_cast<uobject * (*)(uobject*, uobject*, const wchar_t*, bool)>(game + offsets::StaticFindObject)(klass, outer, name, exact);
}
void process_event(uobject* function, void* args) {
auto vtable = *reinterpret_cast<void***>(this);
reinterpret_cast<void(*)(void*, void*, void*)>(vtable[77])(this, function, args);
}
};
class ucanvas : public uobject {
public:
float clip_x() {
return read<float>(std::uintptr_t(this) + 0x30); //maybe wrong
}
float clip_y() {
return read<float>(std::uintptr_t(this) + 0x34); //maybe wrong
}
fvector2d k2_text_size(uobject* render_font, fstring render_text, fvector2d scale) {
struct {
uobject* render_font;
fstring render_text;
fvector2d scale;
fvector2d return_value;
} params = { render_font, render_text, scale };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Canvas.K2_TextSize", false);
this->process_event(function, ¶ms);
return params.return_value;
}
void k2_draw_text(uobject* render_font, fstring render_text, fvector2d screen_position, fvector2d scale, flinearcolor render_color, float kerning, flinearcolor shadow_color, fvector2d shadow_offset, bool center_x, bool center_y, bool outlined, flinearcolor outline_color) {
struct {
uobject* render_font;
fstring render_text;
fvector2d screen_position;
fvector2d scale;
flinearcolor render_color;
float kerning;
flinearcolor shadow_color;
fvector2d shadow_offset;
bool center_x;
bool center_y;
bool outlined;
flinearcolor outline_color;
} params = { render_font, render_text, screen_position, scale, render_color, kerning, shadow_color, shadow_offset, center_x, center_y, outlined, outline_color };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Canvas.K2_DrawText", false);
this->process_event(function, ¶ms);
}
void k2_draw_line(fvector2d screen_position_a, fvector2d screen_position_b, float thickness, flinearcolor render_color) {
struct {
fvector2d screen_position_a;
fvector2d screen_position_b;
float thickness;
flinearcolor render_color;
} params = { screen_position_a, screen_position_b, thickness, render_color };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Canvas.K2_DrawLine", false);
this->process_event(function, ¶ms);
}
};
class uworld : public uobject {
public:
};
class uengine : public uobject {
public:
uobject* get_font() {
return read<uobject*>(std::uintptr_t(this) + 0x70);
}
};
class ugameviewportclient : public uobject {
public:
uworld* get_world() {
return read<uworld*>(std::uintptr_t(this) + 0x78);
}
};
class item_definition : public uobject {
public:
//enum class EFortItemTier Tier; // 0x74(0x01)
fort_item_tier get_tier() {
return read<fort_item_tier>(std::uintptr_t(this) + 0x73);
}
ftext display_name() {
return read<ftext>(std::uintptr_t(this) + 0x98);
}
};
struct fortitementry { //0x1a0
char pad_0[0x18];
item_definition* item_def;
char pad_1[0x180];
};
class weapon : public uobject {
public:
std::int32_t get_magazine_ammo_count() {
struct {
std::int32_t return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"FortWeapon.GetMagazineAmmoCount", false);
this->process_event(function, ¶ms);
return params.return_value;
}
std::int32_t get_bullets_per_clip() {
struct {
std::int32_t return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"FortWeapon.GetBulletsPerClip", false);
this->process_event(function, ¶ms);
return params.return_value;
}
item_definition* get_weapon_data() {
struct {
item_definition* return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"FortWeapon.GetWeaponData", false);
this->process_event(function, ¶ms);
return params.return_value;
}
};
class mesh : public uobject {
public:
std::int32_t get_num_bones() {
struct {
std::int32_t return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"SkinnedMeshComponent.GetNumBones", false);
this->process_event(function, ¶ms);
return params.return_value;
}
fvector get_bone_location(std::int32_t index) {
fmatrix out_matrix = { };
reinterpret_cast<fmatrix* (*)(mesh*, fmatrix*, std::int32_t)>(game + offsets::BoneMatrix)(this, &out_matrix, index);
return fvector(out_matrix.m[3][0], out_matrix.m[3][1], out_matrix.m[3][2]);
}
};
class actor : public uobject {
public:
void enable_input(uobject* playercontroller) {
struct {
uobject* playercontroller;
} params = { playercontroller };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Actor.EnableInput", false);
this->process_event(function, ¶ms);
}
bool set_actor_location(fvector new_location, bool sweep, uint8_t sweep_hit_result, bool teleport) {
static uobject* function;
if (!function)
function = uobject::static_find_object(0, 0, L"Actor.K2_SetActorLocation", false);
struct { fvector a1; bool a2; uint8_t a3; bool a4; bool ret; } params;
params.a1 = new_location;
params.a2 = sweep;
params.a3 = sweep_hit_result;
params.a4 = teleport;
this->process_event(function, ¶ms);
return params.ret;
}
bool k2_teleport_to(const fvector& DestLocation, const frotator& DestRotation) {
static uobject* function;
if (!function)
function = uobject::static_find_object(0, 0, L"Actor.K2_TeleportTo", false);
struct
{
fvector DestLocation; // (Parm, ZeroConstructor, IsPlainOldData)
frotator DestRotation; // (Parm, ZeroConstructor, IsPlainOldData)
bool ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData)
} params;
params.DestLocation = DestLocation;
params.DestRotation = DestRotation;
this->process_event(function, ¶ms);
return params.ReturnValue;
}
char get_team() {
static uobject* function = 0;
if (!function)
function = uobject::static_find_object(0, 0, L"FortniteGame.FortPawn.GetTeam", false);
if (function == nullptr) return false;
struct
{
char return_value;
} params = { };
this->process_event(function, ¶ms);
return params.return_value;
}
void disable_input(uobject* playercontroller) {
struct {
uobject* playercontroller;
} params = { playercontroller };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Actor.DisableInput", false);
this->process_event(function, ¶ms);
}
bool was_recently_rendered(float tolerance) {
struct {
float tolerance;
bool return_value;
} params = { tolerance };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Actor.WasRecentlyRendered", false);
this->process_event(function, ¶ms);
return params.return_value;
}
bool set_actor_rotation(frotator new_rotation, bool teleport_physics) {
struct {
frotator new_rotation;
bool teleport_physics;
bool return_value;
} params = { new_rotation, teleport_physics };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Actor.K2_SetActorRotation", false);
this->process_event(function, ¶ms);
return params.return_value;
}
bool set_actor_location2(Vector3 new_location, bool sweep, uint8_t sweep_hit_result, bool teleport) {
static uobject* function;
if (!function)
function = uobject::static_find_object(0, 0, L"Actor.K2_SetActorLocation", false);
struct { Vector3 a1; bool a2; uint8_t a3; bool a4; bool ret; } params;
params.a1 = new_location;
params.a2 = sweep;
params.a3 = sweep_hit_result;
params.a4 = teleport;
this->process_event(function, ¶ms);
return params.ret;
}
bool k2_set_actor_location_and_rotation(const fvector& new_location, const frotator& new_rotation, bool b_sweep, bool b_teleport) {
static uobject* function;
if (!function)
function = uobject::static_find_object(0, 0, L"Actor.K2_SetActorLocationAndRotation", false);
struct aactor_k2_set_actor_location_and_rotation_params
{
fvector new_location; // (Parm, ZeroConstructor, IsPlainOldData)
frotator new_rotation; // (Parm, ZeroConstructor, IsPlainOldData)
bool b_sweep; // (Parm, ZeroConstructor, IsPlainOldData)
int sweep_hit_result; // (Parm, OutParm, IsPlainOldData)
bool b_teleport; // (Parm, ZeroConstructor, IsPlainOldData)
bool return_value; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData)
};
aactor_k2_set_actor_location_and_rotation_params params{};
params.new_location = new_location;
params.new_rotation = new_rotation;
params.b_sweep = b_sweep;
params.b_teleport = b_teleport;
this->process_event(function, ¶ms);
return params.return_value;
}
frotator get_actor_rotation() {
struct {
frotator return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Actor.K2_GetActorRotation", false);
this->process_event(function, ¶ms);
return params.return_value;
}
fvector get_actor_location() {
struct {
fvector return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Actor.K2_GetActorLocation", false);
this->process_event(function, ¶ms);
return params.return_value;
}
};
struct container_struct_0x102a {
char bForceSpawnLootOnDestruction : 1; // 0x102a(0x01)
char bForceTossLootOnSpawn : 1; // 0x102a(0x01)
char bAlreadySearched : 1; // 0x102a(0x01)
char bGivePickupsDirectlyToPlayer : 1; // 0x102a(0x01)
char bDoNotDropLootOnDestruction : 1; // 0x102a(0x01)
char bSkipRollForDestruction : 1; // 0x102a(0x01)
char pad_102A_6 : 2; // 0x102a(0x01)
};
class container_actor : public actor {
public:
bool already_searched() {
return read<container_struct_0x102a>(std::uintptr_t(this) + 0xeea).bAlreadySearched;
}
};
class afortvehicle : public actor {
public:
};
class flag_actor : public actor {
public:
};
class trap_actor : public actor {
public:
};
class rift_actor : public actor {
public:
};
class vehicle_actor : public actor {
public:
fstring get_display_name() {
struct {
fstring return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"FortAthenaVehicle.GetDisplayName", false);
this->process_event(function, ¶ms);
return params.return_value;
}
};
class pickup_actor : public actor {
public:
item_definition* get_item_definition() {
return read<item_definition*>(std::uintptr_t(this) + 0x338 + 0x18);
}
};
struct weakspot_struft_0x2b8 {
char bHit : 1; // 0x2b8(0x01)
char bFadeOut : 1; // 0x2b8(0x01)
char bActive : 1; // 0x2b8(0x01)
char pad_2B8_3 : 5; // 0x2b8(0x01)
};
class weakspot_actor : public actor {
public:
bool is_active() {
weakspot_struft_0x2b8 weakspot_struct = read<weakspot_struft_0x2b8>(std::uintptr_t(this) + 0x2b8);
return weakspot_struct.bActive;
}
};
class player_pawn : public actor {
public:
mesh* get_pawn_mesh() {
return read<mesh*>(std::uintptr_t(this) + offsets::Mesh);
}
bool is_in_vehicle() {
//IsInVehicle
static uobject* function;
if (!function)
function = uobject::static_find_object(0, 0, L"FortPlayerPawn.IsInVehicle", false);
struct { bool ret; } params;
this->process_event(function, ¶ms);
return params.ret;
}
bool is_dead() {
struct {
bool return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"FortPawn.IsDead", false);
this->process_event(function, ¶ms);
return params.return_value;
}
bool is_dbno() {
struct {
bool return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"FortPawn.IsDBNO", false);
this->process_event(function, ¶ms);
return params.return_value;
}
char get_team() {
struct {
char return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"FortPawn.GetTeam", false);
this->process_event(function, ¶ms);
return params.return_value;
}
weapon* get_current_weapon() {
struct {
weapon* return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"FortPawn.GetCurrentWeapon", false);
this->process_event(function, ¶ms);
return params.return_value;
}
afortvehicle* get_current_vehicle() {
struct {
afortvehicle* return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"FortniteGame.FortPlayerPawn.GetVehicle", false);
this->process_event(function, ¶ms);
return params.return_value;
}
};
class aplayercontroller : public uobject {
public:
float input_pitch_scale() {
return read<float>(std::uintptr_t(this) + 0x534);
}
float input_yaw_scale() {
return read<float>(std::uintptr_t(this) + 0x530);
}
bool is_key_down(fkey key) {
struct {
fkey key;
bool return_value;
} params = { key };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"PlayerController.IsInputKeyDown", false);
this->process_event(function, ¶ms);
return params.return_value;
}
static bool is_visible(aplayercontroller* PlayerController, player_pawn* Pawn, fvector* ViewPoint)
{
auto subIsVisible = reinterpret_cast<bool(__fastcall*)(aplayercontroller * PlayerController, player_pawn * Pawn, fvector * ViewPoint)>(0x7857C3C);
return subIsVisible(PlayerController, Pawn, ViewPoint);
}
bool LineOfSightTo(class actor* Other, const struct fvector& ViewPoint)
{
struct
{
class actor* Other; // (ConstParm, Parm, ZeroConstructor, IsPlainOldData)
struct fvector ViewPoint; // (Parm, ZeroConstructor, IsPlainOldData)
bool bAlternateChecks; // (Parm, ZeroConstructor, IsPlainOldData)
bool ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData)
} params;
params.Other = Other;
params.ViewPoint = ViewPoint;
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Function Engine.Controller.LineOfSightTo", false);
this->process_event(function, ¶ms);
return params.ReturnValue;
}
bool w2s(fvector world_location, fvector2d* screen_location) {
struct {
fvector world_location;
fvector2d screen_location;
bool return_value;
} params = { world_location, fvector2d(), true };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"PlayerController.ProjectWorldLocationToScreen", false);
this->process_event(function, ¶ms);
*screen_location = params.screen_location;
return params.return_value;
}
player_pawn* get_pawn() {
struct {
player_pawn* return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"Controller.K2_GetPawn", false);
this->process_event(function, ¶ms);
return params.return_value;
}
fvector2d get_mouse_position() {
struct {
float x;
float y;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"PlayerController.GetMousePosition", false);
this->process_event(function, ¶ms);
return fvector2d((double)params.x, (double)params.y);
}
void add_pitch_input(float val) {
struct {
float val;
} params = { val };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"PlayerController.AddPitchInput", false);
this->process_event(function, ¶ms);
}
void add_yaw_input(float val) {
struct {
float val;
} params = { val };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"PlayerController.AddYawInput", false);
this->process_event(function, ¶ms);
}
void fov(float NewFOV) {
struct {
float NewFOV;
} params = { NewFOV };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"PlayerController.FOV", false);
params.NewFOV = NewFOV;
this->process_event(function, ¶ms);
}
};
class ulocalplayer : public uobject {
public:
ugameviewportclient* get_viewport() {
return read<ugameviewportclient*>(std::uintptr_t(this) + 0x78);
}
};
class ugameinstance : public uobject {
public:
tarray<ulocalplayer*> get_local_players() {
return read<tarray<ulocalplayer*>>(std::uintptr_t(this) + 0x38);
}
};
class camera_manager : public uobject {
public:
//struct FRotator GetCameraRotation(); // Function Engine.PlayerCameraManager.GetCameraRotation
//struct FVector GetCameraLocation(); // Function Engine.PlayerCameraManager.GetCameraLocation
frotator get_camera_rotation() {
struct {
frotator return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"PlayerCameraManager.GetCameraRotation", false);
this->process_event(function, ¶ms);
return params.return_value;
}
fvector get_camera_location() {
struct {
fvector return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"PlayerCameraManager.GetCameraLocation", false);
this->process_event(function, ¶ms);
return params.return_value;
}
float get_fov_angle() {
struct {
float return_value;
} params = { };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"PlayerCameraManager.GetFOVAngle", false);
this->process_event(function, ¶ms);
return params.return_value;
}
};
namespace library {
class lib_game_statics : public uobject {
public:
tarray<uobject*> get_all_actors_of_class(uobject* world_context_object, uobject* actor_class) {
struct {
uobject* world_context_object;
uobject* actor_class;
tarray<uobject*> out_actors;
} params = { world_context_object, actor_class };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"GameplayStatics.GetAllActorsOfClass", false);
this->process_event(function, ¶ms);
return params.out_actors;
}
ugameinstance* get_game_instance(uobject* world_context_object) {
struct {
uobject* world_context_object;
ugameinstance* return_value;
} params = { world_context_object };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"GameplayStatics.GetGameInstance", false);
this->process_event(function, ¶ms);
return params.return_value;
}
aplayercontroller* get_player_controller(uobject* world_context_object, std::int32_t player_index) {
struct {
uobject* world_context_object;
std::int32_t player_index;
aplayercontroller* return_value;
} params = { world_context_object, player_index };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"GameplayStatics.GetPlayerController", false);
this->process_event(function, ¶ms);
return params.return_value;
}
double get_world_delta_seconds(uobject* world_context_object) {
struct {
uobject* world_context_object;
double return_value;
} params = { world_context_object };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"GameplayStatics.GetWorldDeltaSeconds", false);
this->process_event(function, ¶ms);
return params.return_value;
}
camera_manager* get_player_camera_manager(uobject* world_context_object, std::int32_t player_index) {
struct {
uobject* world_context_object;
std::int32_t player_index;
camera_manager* return_value;
} params = { world_context_object, player_index };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"GameplayStatics.GetPlayerCameraManager", false);
this->process_event(function, ¶ms);
return params.return_value;
}
};
class lib_system : public uobject {
public:
fstring get_object_name(uobject* object) {
struct {
uobject* object;
fstring return_value;
} params = { object };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"KismetSystemLibrary.GetObjectName", false);
this->process_event(function, ¶ms);
return params.return_value;
}
const char* get_object_name_char(uobject* object) {
struct {
uobject* object;
const char* return_value;
} params = { object };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"KismetSystemLibrary.GetObjectName", false);
this->process_event(function, ¶ms);
return params.return_value;
}
uobject* get_outer_object(uobject* object) {
struct {
uobject* object;
uobject* return_value;
} params = { object };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"KismetSystemLibrary.GetOuterObject", false);
this->process_event(function, ¶ms);
return params.return_value;
}
};
class lib_lib : public uobject {
public:
fstring get_player_name_safe(actor* actor, uobject* playernameprivate) {
struct {
uobject* actor;
fstring return_value;
} params = { actor };
static uobject* function;
if (!function) function = playernameprivate;
this->process_event(function, ¶ms);
return params.return_value;
}
};
class lib_string : public uobject {
public:
fname string_to_name(fstring in_string) {
struct {
fstring in_string;
fname return_value;
} params = { in_string };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"KismetStringLibrary.Conv_StringToName", false);
this->process_event(function, ¶ms);
return params.return_value;
}
fstring build_string_double(fstring append_to, fstring prefix, double in_double, fstring suffix) {
struct {
fstring append_to;
fstring prefix;
double in_double;
fstring suffix;
fstring return_value;
} params = { append_to, prefix, in_double, suffix };
static uobject* function;
if (!function) function = uobject::static_find_object(nullptr, nullptr, L"KismetStringLibrary.BuildString_Double", false);
this->process_event(function, ¶ms);
return params.return_value;
}
fstring build_string_int(fstring append_to, fstring prefix, std::int32_t in_int, fstring suffix) {
struct {
fstring append_to;