forked from root-cause/v-decompiled-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
am_gang_call.c
19498 lines (18129 loc) · 405 KB
/
am_gang_call.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;
var uLocal_12 = 0;
var uLocal_13 = 0;
float fLocal_14 = 0f;
var uLocal_15 = 0;
var uLocal_16 = 0;
int iLocal_17 = 0;
var uLocal_18 = 0;
var uLocal_19 = 0;
char* sLocal_20 = NULL;
var uLocal_21 = 0;
var uLocal_22 = 0;
float fLocal_23 = 0f;
float fLocal_24 = 0f;
float fLocal_25 = 0f;
var uLocal_26 = 0;
var uLocal_27 = 0;
float fLocal_28 = 0f;
var uLocal_29 = 0;
var uLocal_30 = 0;
var uLocal_31 = 0;
float fLocal_32 = 0f;
float fLocal_33 = 0f;
var uLocal_34 = 0;
var uLocal_35 = 0;
int iLocal_36 = 0;
var uLocal_37 = 0;
var uLocal_38 = 0;
var uLocal_39 = 0;
int iLocal_40 = 0;
int iLocal_41 = 0;
int iLocal_42 = 0;
int iLocal_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;
float fLocal_62 = 0f;
struct<55> Local_63 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 } ;
var uLocal_118 = 0;
struct<5> Local_119[32];
int iLocal_280 = 0;
int iLocal_281[3] = { 0, 0, 0 };
int iLocal_285 = 0;
int iLocal_286 = 0;
int iLocal_287 = 0;
int iLocal_288 = 0;
int iLocal_289 = 0;
struct<3> Local_290 = { 0, 0, 0 } ;
int iLocal_293 = 0;
int iLocal_294 = 0;
int iLocal_295 = 0;
int iLocal_296 = 0;
int* iLocal_297 = NULL;
var uLocal_298 = 0;
var uLocal_299 = 0;
var uLocal_300 = 0;
var uLocal_301 = 0;
var uLocal_302 = 0;
var uLocal_303 = 0;
var uLocal_304 = 0;
var uLocal_305 = 16;
var uLocal_306 = 0;
var uLocal_307 = 0;
var uLocal_308 = 0;
var uLocal_309 = 0;
var uLocal_310 = 0;
var uLocal_311 = 0;
var uLocal_312 = 0;
var uLocal_313 = 0;
var uLocal_314 = 0;
var uLocal_315 = 0;
var uLocal_316 = 0;
var uLocal_317 = 0;
var uLocal_318 = 0;
var uLocal_319 = 0;
var uLocal_320 = 0;
var uLocal_321 = 0;
var uLocal_322 = 0;
var uLocal_323 = 0;
var uLocal_324 = 0;
var uLocal_325 = 0;
var uLocal_326 = 0;
var uLocal_327 = 0;
var uLocal_328 = 0;
var uLocal_329 = 0;
var uLocal_330 = 0;
var uLocal_331 = 0;
var uLocal_332 = 0;
var uLocal_333 = 0;
var uLocal_334 = 0;
var uLocal_335 = 0;
var uLocal_336 = 0;
var uLocal_337 = 0;
var uLocal_338 = 0;
var uLocal_339 = 0;
var uLocal_340 = 0;
var uLocal_341 = 0;
var uLocal_342 = 0;
var uLocal_343 = 0;
var uLocal_344 = 0;
var uLocal_345 = 0;
var uLocal_346 = 0;
var uLocal_347 = 0;
var uLocal_348 = 0;
var uLocal_349 = 0;
var uLocal_350 = 0;
var uLocal_351 = 0;
var uLocal_352 = 0;
var uLocal_353 = 0;
var uLocal_354 = 0;
var uLocal_355 = 0;
var uLocal_356 = 0;
var uLocal_357 = 0;
var uLocal_358 = 0;
var uLocal_359 = 0;
var uLocal_360 = 0;
var uLocal_361 = 0;
var uLocal_362 = 0;
var uLocal_363 = 0;
var uLocal_364 = 0;
var uLocal_365 = 0;
var uLocal_366 = 0;
var uLocal_367 = 0;
var uLocal_368 = 0;
var uLocal_369 = 0;
var uLocal_370 = 0;
var uLocal_371 = 0;
var uLocal_372 = 0;
var uLocal_373 = 0;
var uLocal_374 = 0;
var uLocal_375 = 0;
var uLocal_376 = 0;
var uLocal_377 = 0;
var uLocal_378 = 0;
var uLocal_379 = 0;
var uLocal_380 = 0;
var uLocal_381 = 0;
var uLocal_382 = 0;
var uLocal_383 = 0;
var uLocal_384 = 0;
var uLocal_385 = 0;
var uLocal_386 = 0;
var uLocal_387 = 0;
var uLocal_388 = 0;
var uLocal_389 = 0;
var uLocal_390 = 0;
var uLocal_391 = 0;
var uLocal_392 = 0;
var uLocal_393 = 0;
var uLocal_394 = 0;
var uLocal_395 = 0;
var uLocal_396 = 0;
var uLocal_397 = 0;
var uLocal_398 = 0;
var uLocal_399 = 0;
var uLocal_400 = 0;
var uLocal_401 = 0;
var uLocal_402 = 0;
var uLocal_403 = 0;
var uLocal_404 = 0;
var uLocal_405 = 0;
var uLocal_406 = 0;
var uLocal_407 = 0;
var uLocal_408 = 0;
var uLocal_409 = 0;
var uLocal_410 = 0;
var uLocal_411 = 0;
var uLocal_412 = 0;
var uLocal_413 = 0;
var uLocal_414 = 0;
var uLocal_415 = 0;
var uLocal_416 = 0;
var uLocal_417 = 0;
var uLocal_418 = 0;
var uLocal_419 = 0;
var uLocal_420 = 0;
var uLocal_421 = 0;
var uLocal_422 = 0;
var uLocal_423 = 0;
var uLocal_424 = 0;
var uLocal_425 = 0;
var uLocal_426 = 0;
var uLocal_427 = 0;
var uLocal_428 = 0;
var uLocal_429 = 0;
var uLocal_430 = 0;
var uLocal_431 = 0;
var uLocal_432 = 0;
var uLocal_433 = 0;
var uLocal_434 = 0;
var uLocal_435 = 0;
var uLocal_436 = 0;
var uLocal_437 = 0;
var uLocal_438 = 0;
var uLocal_439 = 0;
var uLocal_440 = 0;
var uLocal_441 = 0;
var uLocal_442 = 0;
var uLocal_443 = 0;
var uLocal_444 = 0;
var uLocal_445 = 0;
var uLocal_446 = 0;
var uLocal_447 = 0;
var uLocal_448 = 0;
var uLocal_449 = 0;
var uLocal_450 = 0;
var uLocal_451 = 0;
var uLocal_452 = 0;
var uLocal_453 = 0;
var uLocal_454 = 0;
var uLocal_455 = 0;
var uLocal_456 = 0;
var uLocal_457 = 0;
var uLocal_458 = 0;
var uLocal_459 = 0;
var uLocal_460 = 0;
var uLocal_461 = 0;
var uLocal_462 = 0;
var uLocal_463 = 0;
var uLocal_464 = 0;
var uLocal_465 = 0;
var uLocal_466 = 0;
var uLocal_467 = 0;
var uLocal_468 = 0;
var uLocal_469 = 0;
int iLocal_470 = 0;
var uLocal_471[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int iLocal_488 = 0;
int iLocal_489 = 0;
var uLocal_490 = 0;
var uLocal_491 = 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
{
int iVar0;
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_14 = 0.001f;
iLocal_17 = -1;
sLocal_20 = "NULL";
fLocal_23 = 80f;
fLocal_24 = 140f;
fLocal_25 = 180f;
fLocal_28 = 0f;
fLocal_32 = -0.0375f;
fLocal_33 = 0.17f;
iLocal_36 = 3;
iLocal_40 = 1;
iLocal_41 = 65;
iLocal_42 = 49;
iLocal_43 = 64;
fLocal_62 = ((0.05f + 0.275f) - 0.01f);
iLocal_286 = -1;
iLocal_289 = -1;
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
{
func_562(ScriptParam_0);
}
while (true)
{
func_561();
if (func_554())
{
func_551();
}
iLocal_293 = NETWORK::GET_NETWORK_TIME();
func_542();
func_539();
func_534();
func_533();
switch (func_532(PLAYER::NETWORK_PLAYER_ID_TO_INT()))
{
case 0:
if (func_531() == 1)
{
Local_119[PLAYER::NETWORK_PLAYER_ID_TO_INT() /*5*/] = 1;
}
else if (func_531() == 4)
{
Local_119[PLAYER::NETWORK_PLAYER_ID_TO_INT() /*5*/] = 3;
}
break;
case 1:
if (func_531() == 1)
{
func_525();
}
else if (func_531() == 0)
{
func_519();
Local_119[PLAYER::NETWORK_PLAYER_ID_TO_INT() /*5*/] = 0;
}
else if (func_531() == 4)
{
Local_119[PLAYER::NETWORK_PLAYER_ID_TO_INT() /*5*/] = 3;
}
break;
case 3:
func_495();
func_493(&(Local_63.f_54));
if (func_492(&(Local_63.f_54)))
{
iVar0 = 0;
while (iVar0 < func_491(iLocal_286))
{
func_495();
iVar0++;
}
Local_119[PLAYER::NETWORK_PLAYER_ID_TO_INT() /*5*/] = 4;
}
break;
case 2:
Local_119[PLAYER::NETWORK_PLAYER_ID_TO_INT() /*5*/] = 4;
case 4:
func_265();
break;
}
if (NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT())
{
func_263();
func_262();
func_261();
switch (func_531())
{
case 0:
func_260();
if (func_256())
{
if (!ENTITY::IS_ENTITY_DEAD(PLAYER::GET_PLAYER_PED(iLocal_288), false))
{
func_254(PLAYER::GET_PLAYER_PED(iLocal_288));
}
else
{
Local_63.f_36 = { Local_290 };
}
MISC::CLEAR_BIT(&(Local_63.f_2), 6);
Local_63.f_0 = 1;
}
break;
case 1:
if (func_65())
{
func_64();
func_63();
}
func_45();
break;
case 4:
break;
}
func_1();
}
}
}
void func_1()//Position - 0x235
{
int iVar0;
if (func_531() < 4)
{
if (func_22())
{
iLocal_294 = 0;
iVar0 = 0;
while (iVar0 <= (func_491(iLocal_286) - 1))
{
func_2();
iVar0++;
}
Local_63.f_0 = 4;
}
}
}
void func_2()//Position - 0x271
{
var uVar0;
struct<14> Var1;
if (BitTest(Local_63.f_10[iLocal_294 /*7*/].f_2, 1) || BitTest(Local_63.f_10[iLocal_294 /*7*/].f_2, 6))
{
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(Local_63.f_10[iLocal_294 /*7*/]))
{
if (ENTITY::DOES_ENTITY_EXIST(NETWORK::NET_TO_PED(Local_63.f_10[iLocal_294 /*7*/])))
{
if (ENTITY::IS_ENTITY_DEAD(NETWORK::NET_TO_PED(Local_63.f_10[iLocal_294 /*7*/]), false))
{
if (!BitTest(Local_63.f_10[iLocal_294 /*7*/].f_2, 6))
{
if (iLocal_286 == 0)
{
Local_63.f_48++;
if (!BitTest(Local_63.f_2, 12))
{
if (NETWORK::NETWORK_GET_DESTROYER_OF_NETWORK_ID(Local_63.f_10[iLocal_294 /*7*/], &uVar0) == iLocal_288)
{
MISC::SET_BIT(&(Local_63.f_2), 12);
}
}
if ((Local_63.f_42 == iLocal_294 && !BitTest(Local_63.f_2, 5)) || Local_63.f_48 == func_491(iLocal_286))
{
Var1.f_2 = -368990008;
Var1.f_10 = iLocal_288;
Var1.f_11 = iLocal_287;
if (func_491(iLocal_286) > 1)
{
Var1.f_12 = PLAYER::INT_TO_PLAYERINDEX(1);
}
else
{
Var1.f_12 = PLAYER::INT_TO_PLAYERINDEX(0);
}
Var1.f_3 = Local_63.f_43;
func_20(Var1, func_21(1));
if (Local_63.f_42 == iLocal_294)
{
MISC::SET_BIT(&(Local_63.f_2), 5);
}
}
else if (!BitTest(Local_63.f_2, 5))
{
Var1.f_2 = -461851137;
Var1.f_11 = iLocal_287;
func_20(Var1, func_21(1));
}
}
MISC::SET_BIT(&(Local_63.f_10[iLocal_294 /*7*/].f_2), 6);
}
}
else
{
if (!BitTest(Local_63.f_10[iLocal_294 /*7*/].f_2, 5))
{
MISC::SET_BIT(&iLocal_280, 2);
}
MISC::SET_BIT(&iLocal_280, 1);
}
}
}
}
else
{
MISC::SET_BIT(&iLocal_280, 1);
MISC::SET_BIT(&iLocal_280, 2);
}
func_3(iLocal_294);
iLocal_294++;
if (iLocal_294 >= func_491(iLocal_286))
{
iLocal_294 = 0;
if (BitTest(Local_63.f_1, 0))
{
if (!BitTest(iLocal_280, 1))
{
if (!BitTest(Local_63.f_1, 1))
{
MISC::SET_BIT(&(Local_63.f_1), 1);
}
}
if (!BitTest(iLocal_280, 2))
{
if (!BitTest(Local_63.f_1, 9))
{
MISC::SET_BIT(&(Local_63.f_1), 9);
}
}
}
MISC::CLEAR_BIT(&iLocal_280, 1);
MISC::CLEAR_BIT(&iLocal_280, 2);
}
}
void func_3(int iParam0)//Position - 0x48F
{
int iVar0;
int iVar1;
bool bVar2;
if (NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT())
{
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(Local_63.f_10[iParam0 /*7*/]))
{
iVar0 = NETWORK::NET_TO_PED(Local_63.f_10[iParam0 /*7*/]);
if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
{
if (!BitTest(Local_63.f_10[iParam0 /*7*/].f_2, 9))
{
bVar2 = false;
switch (Local_63.f_10[iParam0 /*7*/].f_1)
{
case 0:
if (func_19(iVar0, 3))
{
bVar2 = true;
}
break;
}
if (bVar2)
{
MISC::SET_BIT(&(Local_63.f_10[iParam0 /*7*/].f_2), 9);
}
}
switch (Local_63.f_10[iParam0 /*7*/].f_5)
{
case 0:
break;
case 1:
if (Local_63.f_10[iParam0 /*7*/].f_4 == 0)
{
if (!BitTest(Local_63.f_10[iParam0 /*7*/].f_2, 7))
{
if ((((TASK::GET_NAVMESH_ROUTE_RESULT(iVar0) == 2 || (Global_2657589[iLocal_288 /*466*/].f_246 != -1 && func_18(Global_2657589[iLocal_288 /*466*/].f_246) == 4)) || BitTest(Global_1853910[iLocal_288 /*862*/].f_861, 14)) || func_16(iLocal_288, 0)) || func_9(iLocal_288))
{
Local_63.f_10[iParam0 /*7*/].f_3 = iLocal_293;
MISC::SET_BIT(&(Local_63.f_10[iParam0 /*7*/].f_2), 7);
}
}
else if ((((TASK::GET_NAVMESH_ROUTE_RESULT(iVar0) != 2 && Global_2657589[iLocal_288 /*466*/].f_246 == -1) && !BitTest(Global_1853910[iLocal_288 /*862*/].f_861, 14)) && !func_16(iLocal_288, 0)) && !func_9(iLocal_288))
{
MISC::CLEAR_BIT(&(Local_63.f_10[iParam0 /*7*/].f_2), 7);
}
else if (NETWORK::GET_TIME_DIFFERENCE(iLocal_293, Local_63.f_10[iParam0 /*7*/].f_3) > 10000 || TASK::GET_NAVMESH_ROUTE_RESULT(iVar0) != 2)
{
if (!BitTest(Local_63.f_2, 10))
{
MISC::SET_BIT(&(Local_63.f_2), 10);
Local_63.f_39 = { func_8(iLocal_288) };
iVar1 = 0;
iVar1 = 0;
while (iVar1 < func_491(iLocal_286))
{
func_7(iVar1, 3);
iVar1++;
}
}
}
if (BitTest(Local_63.f_10[iParam0 /*7*/].f_2, 2))
{
if (!BitTest(Local_63.f_10[iParam0 /*7*/].f_2, 3))
{
if (TASK::GET_PED_DESIRED_MOVE_BLEND_RATIO(iVar0) == 3f && !PED::GET_PED_CONFIG_FLAG(iVar0, 118, true))
{
MISC::SET_BIT(&(Local_63.f_10[iParam0 /*7*/].f_2), 3);
}
}
}
}
if (BitTest(Local_63.f_2, 1))
{
MISC::SET_BIT(&(Local_63.f_10[iParam0 /*7*/].f_2), 2);
func_7(iParam0, 3);
}
else if (func_6(iLocal_288, 1, 1))
{
if (!BitTest(Local_63.f_10[iParam0 /*7*/].f_2, 2))
{
if (func_5(ENTITY::GET_ENTITY_COORDS(iVar0, true), ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(iLocal_288), true), 25f) || !func_5(ENTITY::GET_ENTITY_COORDS(iVar0, true), ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(iLocal_288), true), 625f))
{
MISC::SET_BIT(&(Local_63.f_10[iParam0 /*7*/].f_2), 2);
}
}
if (func_4(ENTITY::GET_ENTITY_COORDS(iVar0, true), ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(iLocal_288), true)) || (PED::IS_PED_JACKING(iVar0) && PED::GET_JACK_TARGET(iVar0) == PLAYER::GET_PLAYER_PED(iLocal_288)))
{
func_7(iParam0, 2);
}
}
break;
case 2:
if (BitTest(Local_63.f_2, 1))
{
MISC::SET_BIT(&(Local_63.f_10[iParam0 /*7*/].f_2), 2);
func_7(iParam0, 3);
}
else if (func_6(iLocal_288, 1, 1))
{
if (!func_4(ENTITY::GET_ENTITY_COORDS(iVar0, true), ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(iLocal_288), true)) && !(PED::IS_PED_JACKING(iVar0) && PED::GET_JACK_TARGET(iVar0) == PLAYER::GET_PLAYER_PED(iLocal_288)))
{
func_7(iParam0, 1);
}
}
break;
case 3:
if (Local_63.f_10[iParam0 /*7*/].f_4 == 0)
{
if (!BitTest(Local_63.f_10[iParam0 /*7*/].f_2, 4))
{
if (PED::GET_PED_CONFIG_FLAG(iVar0, 118, true))
{
MISC::SET_BIT(&(Local_63.f_10[iParam0 /*7*/].f_2), 4);
}
}
}
break;
case 4:
break;
}
}
}
}
}
int func_4(struct<3> Param0, struct<3> Param3)//Position - 0x87E
{
struct<3> Var0;
struct<3> Var3;
if (MISC::ABSF((Param3.f_2 - Param0.f_2)) < 2f)
{
Var0.f_0 = Param0.f_0;
Var0.f_1 = Param0.f_1;
Var3.f_0 = Param3.f_0;
Var3.f_1 = Param3.f_1;
if (func_5(Var0, Var3, 2f))
{
return 1;
}
}
return 0;
}
int func_5(struct<3> Param0, struct<3> Param3, float fParam6)//Position - 0x8C5
{
if (SYSTEM::VDIST2(Param0, Param3) < fParam6)
{
return 1;
}
return 0;
}
int func_6(int iParam0, bool bParam1, bool bParam2)//Position - 0x8E4
{
int iVar0;
iVar0 = iParam0;
if (iVar0 != -1)
{
if (NETWORK::NETWORK_IS_PLAYER_ACTIVE(iParam0))
{
if (bParam1)
{
if (!PLAYER::IS_PLAYER_PLAYING(iParam0))
{
return 0;
}
}
if (bParam2)
{
if (iVar0 == Global_2672505.f_3)
{
return Global_2672505.f_2;
}
else if (Global_2657589[iVar0 /*466*/] != 4)
{
return 0;
}
}
return 1;
}
}
return 0;
}
void func_7(int iParam0, int iParam1)//Position - 0x944
{
Local_63.f_10[iParam0 /*7*/].f_5 = iParam1;
}
Vector3 func_8(int iParam0)//Position - 0x958
{
return ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(iParam0), false);
}
int func_9(int iParam0)//Position - 0x96B
{
int iVar0;
int iVar1;
if (NETWORK::NETWORK_IS_PLAYER_ACTIVE(iParam0))
{
if (func_14(iParam0, 1))
{
iVar0 = PLAYER::GET_PLAYER_PED(iParam0);
iVar1 = func_11(iParam0);
if (ENTITY::DOES_ENTITY_EXIST(iVar1))
{
if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar1, false))
{
if (PED::IS_PED_IN_VEHICLE(iVar0, iVar1, false))
{
return func_10(iVar1);
}
}
}
}
}
return 0;
}
int func_10(int iParam0)//Position - 0x9BF
{
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_11(int iParam0)//Position - 0x9FF
{
if (func_14(iParam0, 1))
{
return Global_2793046.f_5225.f_226[func_12(iParam0)];
}
return 0;
}
int func_12(int iParam0)//Position - 0xA26
{
if (iParam0 != func_13())
{
return Global_1894573[iParam0 /*608*/].f_10;
}
return func_13();
}
int func_13()//Position - 0xA49
{
return -1;
}
bool func_14(int iParam0, bool bParam1)//Position - 0xA52
{
if (!bParam1)
{
if (func_15(iParam0))
{
return 0;
}
}
return Global_1894573[iParam0 /*608*/].f_10 != func_13();
}
int func_15(int iParam0)//Position - 0xA7D
{
if (iParam0 != func_13())
{
if (Global_1894573[iParam0 /*608*/].f_10 != func_13())
{
return Global_1894573[iParam0 /*608*/].f_10 == iParam0;
}
}
return 0;
}
int func_16(int iParam0, bool bParam1)//Position - 0xAB2
{
int iVar0;
if (func_6(iParam0, 1, 1))
{
iVar0 = PLAYER::GET_PLAYER_PED(iParam0);
if (PED::IS_PED_IN_ANY_VEHICLE(iVar0, bParam1))
{
if (func_17(PED::GET_VEHICLE_PED_IS_IN(iVar0, bParam1), 1))
{
return 1;
}
}
}
return 0;
}
int func_17(int iParam0, bool bParam1)//Position - 0xAED
{
if (Global_78558)
{
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_18(int iParam0)//Position - 0xB2B
{
switch (iParam0)
{
case -1:
return 6;
break;
case 0:
return 0;
break;
case 1:
return 0;
break;
case 2:
return 0;
break;
case 3:
return 0;
break;
case 4:
return 0;
break;
case 5:
return 0;
break;
case 6:
return 0;
break;
case 50:
return 0;
break;
case 7:
return 1;
break;
case 8:
return 1;
break;
case 9:
return 1;
break;
case 10:
return 1;
break;
case 11:
return 1;
break;
case 12:
return 1;
break;
case 13:
return 1;
break;
case 14:
return 1;
break;
case 15:
return 1;
break;
case 16:
return 1;
break;
case 17:
return 1;
break;
case 18:
return 1;
break;
case 19:
return 1;
break;
case 20:
return 1;
break;
case 21:
return 1;
break;
case 22:
return 2;
break;
case 23:
return 2;
break;
case 24:
return 2;
break;
case 25:
return 2;
break;
case 26:
return 2;
break;
case 27:
return 2;
break;
case 28:
return 3;
break;
case 29:
return 3;
break;
case 30:
return 3;
break;
case 31:
return 3;
break;
case 32:
return 3;
break;
case 33:
return 3;
break;
case 34:
return 3;
break;
case 35:
return 3;