forked from root-cause/v-decompiled-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
am_armybase.c
6243 lines (5493 loc) · 126 KB
/
am_armybase.c
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
#region Local Var
var uLocal_0 = 0;
var uLocal_1 = 0;
int iLocal_2 = 0;
int iLocal_3 = 0;
int iLocal_4 = 0;
int iLocal_5 = 0;
int iLocal_6 = 0;
int iLocal_7 = 0;
int iLocal_8 = 0;
int iLocal_9 = 0;
int iLocal_10 = 0;
int iLocal_11 = 0;
float fLocal_12 = 0f;
var uLocal_13 = 0;
var uLocal_14 = 0;
int iLocal_15 = 0;
var uLocal_16 = 0;
var uLocal_17 = 0;
char* sLocal_18 = NULL;
var uLocal_19 = 0;
var uLocal_20 = 0;
float fLocal_21 = 0f;
float fLocal_22 = 0f;
float fLocal_23 = 0f;
var uLocal_24 = 0;
var uLocal_25 = 0;
float fLocal_26 = 0f;
var uLocal_27 = 0;
var uLocal_28 = 0;
var uLocal_29 = 0;
float fLocal_30 = 0f;
float fLocal_31 = 0f;
var uLocal_32 = 0;
var uLocal_33 = 0;
int iLocal_34 = 0;
var uLocal_35 = 0;
var uLocal_36 = 0;
var uLocal_37 = 0;
int iLocal_38 = 0;
int iLocal_39 = 0;
int iLocal_40 = 0;
int iLocal_41 = 0;
var uLocal_42 = 0;
var uLocal_43 = 0;
var uLocal_44 = 0;
var uLocal_45 = 0;
var uLocal_46 = 0;
var uLocal_47 = 0;
var uLocal_48 = 0;
var uLocal_49 = 0;
var uLocal_50 = 0;
var uLocal_51 = 0;
var uLocal_52 = 0;
var uLocal_53 = 0;
var uLocal_54 = 0;
var uLocal_55 = 0;
var uLocal_56 = 0;
var uLocal_57 = 0;
var uLocal_58 = 0;
var uLocal_59 = 0;
var uLocal_60 = 0;
var uLocal_61 = 0;
var uLocal_62 = 0;
float fLocal_63 = 0f;
var uLocal_64 = 0;
var uLocal_65 = 0;
var uLocal_66 = 0;
var uLocal_67 = 0;
var uLocal_68 = 0;
var uLocal_69 = 0;
var uLocal_70 = 0;
var uLocal_71 = 0;
var uLocal_72 = 0;
var uLocal_73 = 0;
var uLocal_74 = 0;
var uLocal_75 = 0;
var uLocal_76 = 0;
var uLocal_77 = 0;
var uLocal_78 = 0;
var uLocal_79 = 0;
var uLocal_80 = 0;
var uLocal_81 = 0;
var uLocal_82 = 0;
var uLocal_83 = 0;
var uLocal_84 = 0;
var uLocal_85 = 0;
var uLocal_86 = 0;
var uLocal_87 = 0;
var uLocal_88 = 0;
var uLocal_89 = 0;
var uLocal_90 = 0;
var uLocal_91 = 0;
var uLocal_92 = 0;
var uLocal_93 = 0;
var uLocal_94 = 0;
var uLocal_95 = 0;
var uLocal_96 = 0;
var uLocal_97 = 0;
struct<3> Local_98 = { 0, 0, 0 } ;
struct<4> Local_101 = { 2, 0, 0, 3 } ;
var uLocal_105 = 0;
var uLocal_106 = 0;
var uLocal_107 = 0;
var uLocal_108 = 0;
var uLocal_109 = 0;
var uLocal_110 = 0;
var uLocal_111 = 0;
var uLocal_112 = 0;
var uLocal_113 = 0;
var uLocal_114 = 0;
var uLocal_115 = 0;
var uLocal_116 = 0;
var uLocal_117 = 0;
var uLocal_118 = 0;
var uLocal_119 = 0;
var uLocal_120 = 0;
var uLocal_121 = 0;
var uLocal_122 = 2;
var uLocal_123 = 0;
var uLocal_124 = 0;
var uLocal_125 = 2;
var uLocal_126 = 0;
var uLocal_127 = 0;
struct<8> Local_128[32];
struct<184> Local_385 = { 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
var uLocal_569 = 0;
bool bLocal_570 = 0;
bool bLocal_571 = 0;
bool bLocal_572 = 0;
int iLocal_573 = 0;
int iLocal_574 = 0;
int iLocal_575 = 0;
int iLocal_576 = 0;
int iLocal_577 = 0;
var uLocal_578 = 0;
var uLocal_579 = 0;
var uLocal_580 = 0;
var uLocal_581 = 0;
struct<21> ScriptParam_0 = { 0, -1, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, -1 } ;
#endregion
void __EntryFunction__()//Position - 0x0
{
iLocal_2 = 1;
iLocal_3 = 134;
iLocal_4 = 134;
iLocal_5 = 1;
iLocal_6 = 1;
iLocal_7 = 1;
iLocal_8 = 134;
iLocal_9 = 1;
iLocal_10 = 12;
iLocal_11 = 12;
fLocal_12 = 0.001f;
iLocal_15 = -1;
sLocal_18 = "NULL";
fLocal_21 = 80f;
fLocal_22 = 140f;
fLocal_23 = 180f;
fLocal_26 = 0f;
fLocal_30 = -0.0375f;
fLocal_31 = 0.17f;
iLocal_34 = 3;
iLocal_38 = 1;
iLocal_39 = 65;
iLocal_40 = 49;
iLocal_41 = 64;
fLocal_63 = ((0.05f + 0.275f) - 0.01f);
Local_98 = { -2357.12f, 3250.68f, 106.04f };
iLocal_577 = -1;
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
{
func_183(ScriptParam_0);
}
else
{
func_180();
}
while (true)
{
func_179();
func_171();
if (func_163() || NETWORK::NETWORK_IS_IN_TUTORIAL_SESSION())
{
func_180();
}
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
{
if ((func_159() && !Global_262145.f_22179 /* Tunable: 1137600288 */) && !NETWORK::NETWORK_IS_ACTIVITY_SESSION())
{
func_150();
}
if (func_43())
{
func_180();
}
if (func_40(PLAYER::PLAYER_ID()))
{
if (!BitTest(Local_385.f_182, 3))
{
MISC::SET_BIT(&(Local_385.f_182), 3);
}
}
if (((((((((((!Global_1836225 && !func_39(2)) && !func_36(PLAYER::PLAYER_ID(), 0)) && !STREAMING::IS_PLAYER_SWITCH_IN_PROGRESS()) && PLAYER::IS_PLAYER_CONTROL_ON(PLAYER::PLAYER_ID())) && !func_34(PLAYER::PLAYER_ID())) && !func_32(func_33(PLAYER::PLAYER_ID()))) && !func_30(PLAYER::PLAYER_ID(), 146)) && !func_25(PLAYER::PLAYER_ID())) && !func_24(PLAYER::PLAYER_ID())) && !func_23()) && func_22() != 0)
{
if (func_21(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false), 3, 1000, 0) || func_20(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false), 1000))
{
if (!BitTest(Global_2738587.f_4661, 0))
{
if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
{
if (!func_159())
{
func_19();
if (PED::IS_PED_IN_ANY_PLANE(PLAYER::PLAYER_PED_ID()) || PED::IS_PED_IN_ANY_HELI(PLAYER::PLAYER_PED_ID()))
{
if (func_21(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false), 3, 0, 0) || func_20(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false), 0))
{
if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) < 4)
{
PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(), 36, (PLAYER::GET_WANTED_LEVEL_THRESHOLD(4) - PLAYER::GET_WANTED_LEVEL_THRESHOLD(PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()))));
}
else
{
PLAYER::REPORT_POLICE_SPOTTED_PLAYER(PLAYER::PLAYER_ID());
}
}
else if (!func_18(&(Local_385.f_3)))
{
func_15(&(Local_385.f_3));
}
else if (func_12(&(Local_385.f_3)) > 20f || Local_385.f_177)
{
if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) < 4)
{
PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(), 36, (PLAYER::GET_WANTED_LEVEL_THRESHOLD(4) - PLAYER::GET_WANTED_LEVEL_THRESHOLD(PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()))));
}
else
{
PLAYER::REPORT_POLICE_SPOTTED_PLAYER(PLAYER::PLAYER_ID());
}
}
}
else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) < 4)
{
PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(), 36, (PLAYER::GET_WANTED_LEVEL_THRESHOLD(4) - PLAYER::GET_WANTED_LEVEL_THRESHOLD(PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()))));
}
else
{
PLAYER::REPORT_POLICE_SPOTTED_PLAYER(PLAYER::PLAYER_ID());
}
}
else
{
if (Global_2738587.f_6896)
{
bLocal_570 = false;
Global_2738587.f_6896 = 0;
}
if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 0 && !iLocal_574)
{
iLocal_574 = 1;
}
if (Global_262145.f_22163 /* Tunable: -2075966757 */ && !func_10(PLAYER::PLAYER_ID()))
{
if ((!bLocal_570 && PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) != 0) && iLocal_574)
{
PLAYER::CLEAR_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID());
PLAYER::SET_MAX_WANTED_LEVEL(0);
iLocal_573 = 1;
}
if (func_3() && !bLocal_570)
{
bLocal_570 = true;
PLAYER::SET_MAX_WANTED_LEVEL(func_2());
}
}
if (func_3() && !bLocal_570)
{
bLocal_570 = true;
}
if (bLocal_570)
{
if (bLocal_571)
{
if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) < 2)
{
PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(), 36, (PLAYER::GET_WANTED_LEVEL_THRESHOLD(2) - PLAYER::GET_WANTED_LEVEL_THRESHOLD(PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()))));
}
else
{
PLAYER::REPORT_POLICE_SPOTTED_PLAYER(PLAYER::PLAYER_ID());
}
}
else if (bLocal_572)
{
if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) < 3)
{
PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(), 36, (PLAYER::GET_WANTED_LEVEL_THRESHOLD(3) - PLAYER::GET_WANTED_LEVEL_THRESHOLD(PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()))));
}
else
{
PLAYER::REPORT_POLICE_SPOTTED_PLAYER(PLAYER::PLAYER_ID());
}
}
else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) < Global_262145.f_22100 /* Tunable: 1302216568 */)
{
PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(), 36, (PLAYER::GET_WANTED_LEVEL_THRESHOLD(Global_262145.f_22100 /* Tunable: 1302216568 */) - PLAYER::GET_WANTED_LEVEL_THRESHOLD(PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()))));
}
else
{
PLAYER::REPORT_POLICE_SPOTTED_PLAYER(PLAYER::PLAYER_ID());
}
}
}
}
else
{
if (func_18(&(Local_385.f_3)))
{
func_1(&(Local_385.f_3));
}
if (Local_385.f_177)
{
Local_385.f_177 = 0;
}
func_19();
}
}
else
{
if (!Local_385.f_177)
{
Local_385.f_177 = 1;
}
func_19();
}
}
else
{
if (Local_385.f_177)
{
Local_385.f_177 = 0;
}
func_19();
}
}
else
{
func_19();
}
}
else
{
func_180();
}
}
}
void func_1(var uParam0)//Position - 0x4F5
{
uParam0->f_1 = 0f;
uParam0->f_2 = 0f;
*uParam0 = 0;
}
int func_2()//Position - 0x50B
{
if (func_22() != -1)
{
return func_22();
}
return 5;
}
int func_3()//Position - 0x523
{
int iVar0;
if ((((func_21(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false), 3, 1000, 0) || func_20(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false), 1000)) && !func_9()) && !func_24(PLAYER::PLAYER_ID())) && !Global_4456449.f_5 == 6)
{
if (Global_262145.f_22094 /* Tunable: 11080722 */)
{
return 0;
}
if (((ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::PLAYER_PED_ID(), -2346.9753f, 3259.7568f, 31.81074f, -2349.5073f, 3261.232f, 33.810738f, 9.5625f, false, true, 0) || ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::PLAYER_PED_ID(), -2054.8645f, 3240.9766f, 30.51001f, -2056.5515f, 3237.8462f, 32.501564f, 4.0625f, false, true, 0)) || ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::PLAYER_PED_ID(), -1792.9076f, 3091.104f, 31.812569f, -1812.7072f, 3102.736f, 39.466824f, 18.187f, false, true, 0)) || func_8(PLAYER::PLAYER_ID()))
{
bLocal_571 = false;
bLocal_572 = false;
return 1;
}
if (Global_262145.f_22101 /* Tunable: ACCESS_ARMY_BASE_IN_STOLEN_VEHICLE */)
{
if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
{
iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
if (VEHICLE::IS_VEHICLE_STOLEN(iVar0))
{
if (func_7(iVar0))
{
if ((!func_6(iVar0, 1) && !func_5(iVar0)) && !func_4(iVar0))
{
bLocal_571 = true;
bLocal_572 = false;
return 1;
}
}
}
}
}
else if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
{
if (VEHICLE::IS_VEHICLE_STOLEN(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false)))
{
if ((!func_6(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false), 1) && !func_5(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false))) && !func_4(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false)))
{
bLocal_571 = true;
bLocal_572 = false;
return 1;
}
}
}
if (Global_2738587.f_6894 || Global_2738587.f_6895)
{
if (Global_2738587.f_6895)
{
bLocal_571 = false;
bLocal_572 = true;
}
else
{
bLocal_571 = true;
bLocal_572 = false;
}
Global_2738587.f_6894 = 0;
Global_2738587.f_6895 = 0;
return 1;
}
}
return 0;
}
int func_4(int iParam0)//Position - 0x74B
{
int iVar0;
if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
{
if (DECORATOR::DECOR_IS_REGISTERED_AS_TYPE("MPBitset", 3) && DECORATOR::DECOR_EXIST_ON(iParam0, "MPBitset"))
{
iVar0 = DECORATOR::DECOR_GET_INT(iParam0, "MPBitset");
if (BitTest(iVar0, 17))
{
return 1;
}
}
}
return 0;
}
int func_5(int iParam0)//Position - 0x78B
{
if ((DECORATOR::DECOR_IS_REGISTERED_AS_TYPE("CreatedByPegasus", 2) && DECORATOR::DECOR_EXIST_ON(iParam0, "CreatedByPegasus")) && DECORATOR::DECOR_GET_BOOL(iParam0, "CreatedByPegasus"))
{
return 1;
}
return 0;
}
int func_6(int iParam0, bool bParam1)//Position - 0x7BF
{
if (Global_79248)
{
if (ENTITY::DOES_ENTITY_EXIST(iParam0) && (!bParam1 || VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false)))
{
if (DECORATOR::DECOR_EXIST_ON(iParam0, "Player_Vehicle"))
{
return 1;
}
}
}
return 0;
}
int func_7(int iParam0)//Position - 0x7FD
{
int iVar0;
iVar0 = ENTITY::GET_ENTITY_MODEL(iParam0);
switch (iVar0)
{
case joaat("barracks"):
case joaat("barracks2"):
case joaat("barracks3"):
case joaat("besra"):
case joaat("buzzard"):
case joaat("buzzard2"):
case joaat("cargobob"):
case joaat("crusader"):
case joaat("firetruk"):
case joaat("lazer"):
case joaat("rhino"):
case joaat("titan"):
return 1;
default:
}
return 0;
}
int func_8(int iParam0)//Position - 0x861
{
int iVar0;
int iVar1;
iVar0 = INTERIOR::GET_INTERIOR_FROM_ENTITY(PLAYER::GET_PLAYER_PED(iParam0));
iVar1 = INTERIOR::GET_INTERIOR_AT_COORDS_WITH_TYPE(-2346.9753f, 3259.7568f, 31.81074f, "v_tower");
if (INTERIOR::IS_VALID_INTERIOR(iVar0) && INTERIOR::IS_VALID_INTERIOR(iVar1))
{
if ((iVar0 == iVar1 && !ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::GET_PLAYER_PED(iParam0), -2345.4f, 3270.1f, 31.81f, -2347.9f, 3265.8f, 34.811f, 8.25f, false, true, 0)) && !ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::GET_PLAYER_PED(iParam0), -2349.3f, 3266.7f, 31.81f, -2350f, 3265.5f, 34.811f, 5.15f, false, true, 0))
{
return 1;
}
}
return 0;
}
bool func_9()//Position - 0x91A
{
return Global_4718592 == 3;
}
int func_10(int iParam0)//Position - 0x928
{
int iVar0;
iVar0 = iParam0;
if (iVar0 != -1)
{
return func_11(iParam0, 9);
}
return 0;
}
var func_11(int iParam0, int iParam1)//Position - 0x946
{
return BitTest(Global_1886967[iParam0 /*609*/].f_10.f_4, iParam1);
}
float func_12(int* iParam0)//Position - 0x95E
{
if (func_18(iParam0))
{
if (func_14(iParam0))
{
return iParam0->f_2;
}
else
{
return (func_13(BitTest(*iParam0, 4)) - iParam0->f_1);
}
}
return iParam0->f_1;
}
float func_13(bool bParam0)//Position - 0x99A
{
float fVar0;
float fVar1;
int iVar2;
float fVar3;
float fVar4;
if (bParam0)
{
fVar0 = SYSTEM::TO_FLOAT(MISC::GET_GAME_TIMER());
fVar1 = (fVar0 / 1000f);
return fVar1;
}
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
{
iVar2 = NETWORK::GET_NETWORK_TIME();
fVar3 = SYSTEM::TO_FLOAT(iVar2);
fVar4 = (fVar3 / 1000f);
return fVar4;
}
return (SYSTEM::TO_FLOAT(MISC::GET_GAME_TIMER()) / 1000f);
}
bool func_14(var uParam0)//Position - 0x9F2
{
return BitTest(*uParam0, 2);
}
void func_15(int* iParam0)//Position - 0x9FF
{
if (!func_18(iParam0))
{
func_16(iParam0);
}
}
void func_16(int* iParam0)//Position - 0xA17
{
func_17(iParam0, 0f);
}
void func_17(int* iParam0, float fParam1)//Position - 0xA26
{
iParam0->f_1 = (func_13(BitTest(*iParam0, 4)) - fParam1);
MISC::SET_BIT(iParam0, 1);
MISC::CLEAR_BIT(iParam0, 2);
iParam0->f_2 = 0f;
}
bool func_18(var uParam0)//Position - 0xA51
{
return BitTest(*uParam0, 1);
}
void func_19()//Position - 0xA5E
{
if (iLocal_573)
{
PLAYER::SET_MAX_WANTED_LEVEL(func_2());
}
Global_2738587.f_6894 = 0;
Global_2738587.f_6895 = 0;
iLocal_573 = 0;
bLocal_570 = false;
bLocal_571 = false;
iLocal_574 = 0;
}
int func_20(struct<3> Param0, int iParam3)//Position - 0xA94
{
struct<3> Var0[15];
struct<3> Var46[15];
float fVar92[15];
int iVar108;
int iVar109;
bool bVar110;
bVar110 = false;
Var0[0 /*3*/] = { -1877.4358f, 2783.1506f, 31.806177f };
Var46[0 /*3*/] = { -1797.8734f, 2924.3696f, (307.11057f + IntToFloat(iParam3)) };
fVar92[0] = 88f;
Var0[1 /*3*/] = { -1761.1156f, 2834.6511f, 31.806217f };
Var46[1 /*3*/] = { -1720.8875f, 2906.4192f, (281.80624f + IntToFloat(iParam3)) };
fVar92[1] = 88f;
Var0[2 /*3*/] = { -1761.4933f, 2817.68f, 32.37125f };
Var46[2 /*3*/] = { -1769.7045f, 2913.7344f, (281.8066f + IntToFloat(iParam3)) };
fVar92[2] = 88f;
Var0[3 /*3*/] = { -1879.297f, 2772.6526f, 29.57795f };
Var46[3 /*3*/] = { -1864.5205f, 2825.4724f, (281.80618f + IntToFloat(iParam3)) };
fVar92[3] = 88f;
Var0[4 /*3*/] = { -2676.74f, 3366.9875f, 29.923937f };
Var46[4 /*3*/] = { -2744.7896f, 3340.3467f, (37.803787f + IntToFloat(iParam3)) };
fVar92[4] = 9f;
Var0[5 /*3*/] = { -2676.74f, 3366.9875f, 29.923937f };
Var46[5 /*3*/] = { -2744.7896f, 3340.3467f, (37.803787f + IntToFloat(iParam3)) };
fVar92[5] = 9.5f;
Var0[6 /*3*/] = { -2807.3967f, 3264.2256f, 29.92764f };
Var46[6 /*3*/] = { -2879.8052f, 3309.0095f, (37.578644f + IntToFloat(iParam3)) };
fVar92[6] = 9.5f;
Var0[7 /*3*/] = { -2808.236f, 3264.6343f, 29.92764f };
Var46[7 /*3*/] = { -2747.5503f, 3187.8f, (37.45682f + IntToFloat(iParam3)) };
fVar92[7] = 9.5f;
Var0[8 /*3*/] = { -2530.9958f, 3064.151f, 29.71081f };
Var46[8 /*3*/] = { -2748.5571f, 3189.9392f, (37.45682f + IntToFloat(iParam3)) };
fVar92[8] = 9.5f;
Var0[9 /*3*/] = { -2533.9016f, 3062.4907f, 29.707146f };
Var46[9 /*3*/] = { -2520.674f, 2996.8174f, (37.457146f + IntToFloat(iParam3)) };
fVar92[9] = 9.5f;
Var0[10 /*3*/] = { -2500.7163f, 2927.1028f, 29.45663f };
Var46[10 /*3*/] = { -2445.696f, 2896.6575f, (37.680088f + IntToFloat(iParam3)) };
fVar92[10] = 9.5f;
Var0[11 /*3*/] = { -2020.5427f, 2810.7468f, 29.45658f };
Var46[11 /*3*/] = { -1927.949f, 2785.7788f, (37.67057f + IntToFloat(iParam3)) };
fVar92[11] = 9.5f;
Var0[12 /*3*/] = { -2261.8992f, 3376.5488f, 29.77859f };
Var46[12 /*3*/] = { -2141.0674f, 3376.773f, (37.90019f + IntToFloat(iParam3)) };
fVar92[12] = 9.5f;
iVar108 = 13;
iVar109 = 0;
while (iVar109 < iVar108)
{
if (OBJECT::IS_POINT_IN_ANGLED_AREA(Param0, Var0[iVar109 /*3*/], Var46[iVar109 /*3*/], fVar92[iVar109], bVar110, true))
{
return 1;
}
iVar109++;
}
return 0;
}
int func_21(struct<3> Param0, int iParam3, int iParam4, bool bParam5)//Position - 0xDF2
{
struct<3> Var0[15];
struct<3> Var46[15];
float fVar92[15];
int iVar108;
int iVar109;
bool bVar110;
int iVar111;
bVar110 = false;
switch (iParam3)
{
case 1:
Var0[0 /*3*/] = { -1332.2113f, 100.46083f, 40.384373f };
Var46[0 /*3*/] = { -1094.2382f, 148.42744f, 73f };
fVar92[0] = 171.25f;
Var0[1 /*3*/] = { -999.7344f, -110.22309f, 25.257057f };
Var46[1 /*3*/] = { -1149.4938f, 109.25583f, 73f };
fVar92[1] = 132f;
Var0[2 /*3*/] = { -1035.1129f, -84.958855f, 28.274601f };
Var46[2 /*3*/] = { -1261.1031f, 50.081482f, 73f };
fVar92[2] = 132f;
iVar108 = 3;
break;
case 2:
Var0[0 /*3*/] = { -804.3439f, -3346.5005f, 10f };
Var46[0 /*3*/] = { -1816.9539f, -2768.8933f, IntToFloat((250 + iParam4)) };
fVar92[0] = 247f;
Var0[1 /*3*/] = { -1911.4879f, -2934.197f, 10f };
Var46[1 /*3*/] = { -968.6236f, -3477.7476f, IntToFloat((250 + iParam4)) };
fVar92[1] = 149f;
Var0[2 /*3*/] = { -844.9433f, -2802.7852f, 10f };
Var46[2 /*3*/] = { -1011.08105f, -3086.9038f, IntToFloat((250 + iParam4)) };
fVar92[2] = 185.5f;
Var0[3 /*3*/] = { -1021.0861f, -2952.277f, 10f };
Var46[3 /*3*/] = { -1599.0082f, -2616.2705f, IntToFloat((250 + iParam4)) };
fVar92[3] = 250f;
Var0[4 /*3*/] = { -1027.1364f, -2436.457f, 10f };
Var46[4 /*3*/] = { -1392.6105f, -2226.7634f, IntToFloat((250 + iParam4)) };
fVar92[4] = 193.5f;
Var0[5 /*3*/] = { -1497.5493f, -2408.7122f, 10f };
Var46[5 /*3*/] = { -1136.9174f, -2617.9546f, IntToFloat((250 + iParam4)) };
fVar92[5] = 234.5f;
Var0[6 /*3*/] = { -982.79236f, -2831.7087f, 12.93313f };
Var46[6 /*3*/] = { -966.46765f, -2803.458f, 16.68313f };
fVar92[6] = 16f;
Var0[7 /*3*/] = { -1110.0831f, -3496.8057f, 12f };
Var46[7 /*3*/] = { -1955.2982f, -3010.4314f, IntToFloat((250 + iParam4)) };
fVar92[7] = 80f;
Var0[8 /*3*/] = { -1886.8994f, -3193.0237f, 12f };
Var46[8 /*3*/] = { -1836.143f, -3105.2683f, IntToFloat((250 + iParam4)) };
fVar92[8] = 142f;
Var0[9 /*3*/] = { -1134.3367f, -3535.6482f, 12f };
Var46[9 /*3*/] = { -1259.6486f, -3463.4863f, IntToFloat((250 + iParam4)) };
fVar92[9] = 30.75f;
Var0[10 /*3*/] = { -969.12787f, -3463.8994f, 12f };
Var46[10 /*3*/] = { -896.3734f, -3505.7148f, IntToFloat((250 + iParam4)) };
fVar92[10] = 150f;
Var0[11 /*3*/] = { -1369.4913f, -2173.5789f, 10f };
Var46[11 /*3*/] = { -1685.6256f, -2720.3635f, IntToFloat((250 + iParam4)) };
fVar92[11] = 29.25f;
Var0[12 /*3*/] = { -1010.9256f, -3550.9434f, 10f };
Var46[12 /*3*/] = { -1110.1978f, -3493.6172f, IntToFloat((250 + iParam4)) };
fVar92[12] = 43f;
iVar108 = 13;
break;
case 3:
Var0[0 /*3*/] = { -1773.944f, 3287.3342f, 30f };
Var46[0 /*3*/] = { -2029.7765f, 2845.0833f, IntToFloat((250 + iParam4)) };
fVar92[0] = 255f;
Var0[1 /*3*/] = { -2725.8894f, 3291.0986f, 30f };
Var46[1 /*3*/] = { -2009.1815f, 2879.8352f, IntToFloat((250 + iParam4)) };
fVar92[1] = 180f;
Var0[2 /*3*/] = { -2442.0261f, 3326.6987f, 30f };
Var46[2 /*3*/] = { -2033.9279f, 3089.0488f, IntToFloat((250 + iParam4)) };
fVar92[2] = 205f;
Var0[3 /*3*/] = { -1917.1654f, 3374.209f, 30f };
Var46[3 /*3*/] = { -2016.7909f, 3195.058f, IntToFloat((250 + iParam4)) };
fVar92[3] = 86.25f;
Var0[4 /*3*/] = { -2192.753f, 3373.2778f, 30f };
Var46[4 /*3*/] = { -2191.5444f, 3150.4165f, IntToFloat((250 + iParam4)) };
fVar92[4] = 150.5f;
Var0[5 /*3*/] = { -2077.6633f, 3344.5142f, 30f };
Var46[5 /*3*/] = { -2191.5444f, 3150.4165f, IntToFloat((250 + iParam4)) };
fVar92[5] = 140.5f;
Var0[6 /*3*/] = { -2861.7554f, 3352.6606f, 30f };
Var46[6 /*3*/] = { -2715.8708f, 3269.9155f, IntToFloat((250 + iParam4)) };
fVar92[6] = 90f;
Var0[7 /*3*/] = { -2005.5745f, 3364.5327f, 30f };
Var46[7 /*3*/] = { -1977.5688f, 3330.8882f, IntToFloat((250 + iParam4)) };
fVar92[7] = 100f;
Var0[8 /*3*/] = { -1682.235f, 3004.2852f, 30f };
Var46[8 /*3*/] = { -1942.747f, 2947.4412f, IntToFloat((250 + iParam4)) };
fVar92[8] = 248.75f;
Var0[9 /*3*/] = { -2393.2954f, 2936.406f, 31.680103f };
Var46[9 /*3*/] = { -2453.0366f, 3006.863f, 52.310028f };
fVar92[9] = 128f;
Var0[10 /*3*/] = { -2347.1848f, 3023.8298f, 31.56573f };
Var46[10 /*3*/] = { -2517.3298f, 2989.0635f, 49.956444f };
fVar92[10] = 140f;
Var0[11 /*3*/] = { -2259.9219f, 3358.0398f, 29.999718f };
Var46[11 /*3*/] = { -2299.772f, 3385.79f, 38.060143f };
fVar92[11] = 16f;
Var0[12 /*3*/] = { -2476.3093f, 3363.914f, 31.679329f };
Var46[12 /*3*/] = { -2431.9807f, 3287.6694f, 39.978264f };
fVar92[12] = 214.25f;
Var0[13 /*3*/] = { -2103.0813f, 2797.7834f, 29.37864f };
Var46[13 /*3*/] = { -2096.8213f, 2874.4233f, 57.80989f };
fVar92[13] = 65.75f;
if (bParam5)
{
iVar111 = iParam4;
}
else
{
iVar111 = 0;
}
Var46[9 /*3*/].f_2 = (Var46[9 /*3*/].f_2 + IntToFloat(iVar111));
Var46[10 /*3*/].f_2 = (Var46[10 /*3*/].f_2 + IntToFloat(iVar111));
Var46[11 /*3*/].f_2 = (Var46[11 /*3*/].f_2 + IntToFloat(iVar111));
Var46[12 /*3*/].f_2 = (Var46[12 /*3*/].f_2 + IntToFloat(iVar111));
Var46[13 /*3*/].f_2 = (Var46[13 /*3*/].f_2 + IntToFloat(iVar111));
iVar108 = 14;
break;
case 4:
Var0[0 /*3*/] = { 1541.6072f, 2527.555f, 40f };
Var46[0 /*3*/] = { 1815.5753f, 2535.0596f, IntToFloat((150 + iParam4)) };
fVar92[0] = 114f;
Var0[1 /*3*/] = { 1788.8787f, 2445.7273f, 40f };
Var46[1 /*3*/] = { 1716.9603f, 2502.957f, IntToFloat((150 + iParam4)) };
fVar92[1] = 88.5f;
Var0[2 /*3*/] = { 1601.1575f, 2436.2441f, 40f };
Var46[2 /*3*/] = { 1650.0776f, 2515.9226f, IntToFloat((150 + iParam4)) };
fVar92[2] = 133.25f;
Var0[3 /*3*/] = { 1706.3307f, 2407.5972f, 40f };
Var46[3 /*3*/] = { 1698.5546f, 2460.2078f, IntToFloat((150 + iParam4)) };
fVar92[3] = 104.5f;
Var0[4 /*3*/] = { 1712.4517f, 2756.2175f, 40f };
Var46[4 /*3*/] = { 1718.8477f, 2589.1616f, IntToFloat((150 + iParam4)) };
fVar92[4] = 121.75f;
Var0[5 /*3*/] = { 1830.2278f, 2661.2402f, 40f };
Var46[5 /*3*/] = { 1774.8124f, 2679.4187f, IntToFloat((150 + iParam4)) };
fVar92[5] = 84.5f;
Var0[6 /*3*/] = { 1559.0503f, 2632.2205f, 40f };
Var46[6 /*3*/] = { 1657.2083f, 2595.4844f, IntToFloat((150 + iParam4)) };
fVar92[6] = 103.75f;
Var0[7 /*3*/] = { 1612.0209f, 2716.869f, 40f };
Var46[7 /*3*/] = { 1657.1647f, 2669.721f, IntToFloat((150 + iParam4)) };
fVar92[7] = 104.25f;
Var0[8 /*3*/] = { 1809.8721f, 2729.827f, 40f };
Var46[8 /*3*/] = { 1789.8551f, 2705.0369f, IntToFloat((150 + iParam4)) };
fVar92[8] = 91f;
Var0[9 /*3*/] = { 1818.7888f, 2605.9478f, 40f };
Var46[9 /*3*/] = { 1783.1143f, 2606.7832f, IntToFloat((150 + iParam4)) };
fVar92[9] = 51.25f;
iVar108 = 10;
break;
case 5:
Var0[0 /*3*/] = { 3411.002f, 3663.1846f, 20f };
Var46[0 /*3*/] = { 3615.583f, 3626.1936f, IntToFloat((40 + iParam4)) };
fVar92[0] = 45.75f;
Var0[1 /*3*/] = { 3426.66f, 3733.078f, 20f };
Var46[1 /*3*/] = { 3643.8008f, 3694.3618f, IntToFloat((40 + iParam4)) };
fVar92[1] = 99f;
Var0[2 /*3*/] = { 3446.0364f, 3795.6882f, 20f };
Var46[2 /*3*/] = { 3650.9143f, 3766.1516f, IntToFloat((40 + iParam4)) };
fVar92[2] = 81.5f;
iVar108 = 3;
break;
case 6:
Var0[0 /*3*/] = { 526.05304f, -3391.4968f, -10f };
Var46[0 /*3*/] = { 523.22894f, -3118.678f, IntToFloat((10 + iParam4)) };
fVar92[0] = 120f;
Var0[1 /*3*/] = { 459.4397f, -3199.9895f, 4.819676f };
Var46[1 /*3*/] = { 593.89276f, -3199.998f, 30.069256f };
fVar92[1] = 170f;
Var0[2 /*3*/] = { 552.8467f, -3111.0537f, 4.819394f };
Var46[2 /*3*/] = { 585.3137f, -3111.8442f, 17.569231f };
fVar92[2] = 12.5f;
Var0[3 /*3*/] = { 598.46655f, -3140.1475f, 4.819257f };
Var46[3 /*3*/] = { 597.4973f, -3117.0627f, 17.319258f };
fVar92[3] = 9.75f;
iVar108 = 4;
break;
case 7:
Var0[0 /*3*/] = { -1108.5497f, -570.87976f, 20f };
Var46[0 /*3*/] = { -1187.8108f, -477.50366f, IntToFloat((50 + iParam4)) };
fVar92[0] = 162f;
Var0[1 /*3*/] = { -1201.3776f, -485.96732f, 20f };
Var46[1 /*3*/] = { -1215.7959f, -464.82806f, IntToFloat((50 + iParam4)) };
fVar92[1] = 124f;
Var0[2 /*3*/] = { -985.6311f, -525.42334f, 20f };
Var46[2 /*3*/] = { -1013.3932f, -475.20575f, IntToFloat((50 + iParam4)) };
fVar92[2] = 55f;
Var0[3 /*3*/] = { -1055.8492f, -477.8226f, 20f };
Var46[3 /*3*/] = { -1073.3325f, -498.717f, IntToFloat((50 + iParam4)) };
fVar92[3] = 142f;
iVar108 = 4;
break;
case 8:
Var0[0 /*3*/] = { 461.5684f, -984.57196f, 29.439508f };
Var46[0 /*3*/] = { 471.17004f, -984.4292f, 40.14212f };
fVar92[0] = 7.75f;
Var0[1 /*3*/] = { 457.3404f, -984.75604f, 34.439507f };
Var46[1 /*3*/] = { 457.20837f, -993.71893f, 29.389584f };
fVar92[1] = 14.75f;
Var0[2 /*3*/] = { 477.62268f, -986.60004f, 40.00819f };
Var46[2 /*3*/] = { 424.8687f, -986.3279f, 48.712406f };
fVar92[2] = 31.5f;
Var0[3 /*3*/] = { 474.38895f, -974.4613f, 39.557606f };
Var46[3 /*3*/] = { 474.0358f, -1021.9721f, 49.10033f };
fVar92[3] = 30.5f;
Var0[4 /*3*/] = { 442.17685f, -974.1888f, 29.689508f };
Var46[4 /*3*/] = { 442.18552f, -979.8635f, 33.439507f };
fVar92[4] = 6.75f;
iVar108 = 5;
break;
}
iVar109 = 0;
while (iVar109 < iVar108)
{
if (OBJECT::IS_POINT_IN_ANGLED_AREA(Param0, Var0[iVar109 /*3*/], Var46[iVar109 /*3*/], fVar92[iVar109], bVar110, true))
{
return 1;
}
iVar109++;
}
return 0;
}
int func_22()//Position - 0x1B46
{
return Global_2738587.f_6898;
}
bool func_23()//Position - 0x1B55
{
return Global_2738587.f_6897;
}
int func_24(int iParam0)//Position - 0x1B64
{
int iVar0;
int iVar1;
if (!NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
{
return 0;
}
if (iParam0 == PLAYER::PLAYER_ID())
{
return Global_2707705;
}
else
{
iVar0 = PLAYER::GET_PLAYER_PED(iParam0);
if (ENTITY::DOES_ENTITY_EXIST(iVar0))
{
iVar1 = ENTITY::GET_ENTITY_MODEL(iVar0);
if (iVar1 == joaat("MP_M_Freemode_01") || iVar1 == joaat("MP_F_Freemode_01"))
{
return 0;
}
else
{
return 1;
}
}
else
{
return 0;
}
}
return 0;
}
bool func_25(int iParam0)//Position - 0x1BD0
{
return func_26(func_27(iParam0));
}
int func_26(int iParam0)//Position - 0x1BE2
{
switch (iParam0)
{
case 167:
case 169:
case 168:
return 1;
default:
}
return 0;
}