-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathaiDriveCommandHandler.script
More file actions
637 lines (570 loc) · 26.7 KB
/
Copy pathaiDriveCommandHandler.script
File metadata and controls
637 lines (570 loc) · 26.7 KB
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
class AIDriveCommandsDelegate extends ScriptBehaviorDelegate
{
private var useKinematic : Bool;
private var needDriver : Bool;
private var splineRef : NodeRef;
private var secureTimeOut : Float;
private var forcedStartSpeed : Float;
private var stopAtPathEnd : Bool;
private var driveBackwards : Bool;
private var reverseSpline : Bool;
private var startFromClosest : Bool;
private var keepDistanceBool : Bool;
private var keepDistanceCompanion : weak< GameObject >;
private var keepDistanceDistance : Float;
private var rubberBandingBool : Bool;
private var rubberBandingTargetRef : weak< GameObject >;
private var rubberBandingTargetForwardOffset : Float;
private var rubberBandingMinDistance : Float;
private var rubberBandingMaxDistance : Float;
private var rubberBandingStopAndWait : Bool;
private var rubberBandingTeleportToCatchUp : Bool;
private var rubberBandingStayInFront : Bool;
private var audioCurvesParam : vehicleAudioCurvesParam;
private var allowSimplifiedMovement : Bool;
private var ignoreTickets : Bool;
private var disabeStuckDetection : Bool;
private var aggressiveRammingEnabled : Bool;
private var useSpeedBasedLookupRange : Bool;
private var tryDriveAwayFromPlayer : Bool;
private var targetPosition : Vector3;
private var maxSpeed : Float;
private var minSpeed : Float;
private var clearTrafficOnPath : Bool;
private var minimumDistanceToTarget : Float;
private var emergencyPatrol : Bool;
private var numPatrolLoops : Uint32;
private var driveDownTheRoadIndefinitely : Bool;
private var ignoreChaseVehiclesLimit : Bool;
private var boostDrivingStats : Bool;
private var m_driveOnSplineCommand : AIVehicleOnSplineCommand;
public export function DoStartDriveOnSpline( context : ScriptExecutionContext ) : Bool
{
var cmd : AIVehicleOnSplineCommand;
cmd = m_driveOnSplineCommand;
useKinematic = cmd.useKinematic;
needDriver = cmd.needDriver;
splineRef = cmd.splineRef;
secureTimeOut = cmd.secureTimeOut;
forcedStartSpeed = cmd.forcedStartSpeed;
stopAtPathEnd = cmd.stopAtPathEnd;
driveBackwards = cmd.driveBackwards;
reverseSpline = cmd.reverseSpline;
startFromClosest = cmd.startFromClosest;
keepDistanceBool = cmd.keepDistanceBool;
keepDistanceCompanion = cmd.keepDistanceCompanion;
keepDistanceDistance = cmd.keepDistanceDistance;
rubberBandingBool = cmd.rubberBandingBool;
rubberBandingTargetRef = cmd.rubberBandingTargetRef;
rubberBandingTargetForwardOffset = cmd.rubberBandingTargetForwardOffset;
rubberBandingMinDistance = cmd.rubberBandingMinDistance;
rubberBandingMaxDistance = cmd.rubberBandingMaxDistance;
rubberBandingStopAndWait = cmd.rubberBandingStopAndWait;
rubberBandingTeleportToCatchUp = cmd.rubberBandingTeleportToCatchUp;
rubberBandingStayInFront = cmd.rubberBandingStayInFront;
audioCurvesParam = cmd.audioCurvesParam;
return true;
}
public constexpr function DoEndDriveOnSpline() : Bool
{
return true;
}
private var useTraffic : Bool;
private var speedInTraffic : Float;
private var target : weak< GameObject >;
private var distanceMin : Float;
private var distanceMax : Float;
private var stopWhenTargetReached : Bool;
private var trafficTryNeighborsForStart : Bool;
private var trafficTryNeighborsForEnd : Bool;
private var ignoreNoAIDrivingLanes : Bool;
private var m_driveFollowCommand : AIVehicleFollowCommand;
public export function DoStartDriveFollow( context : ScriptExecutionContext ) : Bool
{
var cmd : AIVehicleFollowCommand;
cmd = m_driveFollowCommand;
useKinematic = cmd.useKinematic;
needDriver = cmd.needDriver;
target = cmd.target;
secureTimeOut = cmd.secureTimeOut;
distanceMin = cmd.distanceMin;
distanceMax = cmd.distanceMax;
stopWhenTargetReached = cmd.stopWhenTargetReached;
useTraffic = cmd.useTraffic;
trafficTryNeighborsForStart = cmd.trafficTryNeighborsForStart;
trafficTryNeighborsForEnd = cmd.trafficTryNeighborsForEnd;
return true;
}
public export function DoUpdateDriveFollow( context : ScriptExecutionContext ) : Bool
{
if( !( m_driveFollowCommand ) || ( m_driveFollowCommand.target != target ) )
{
return false;
}
return true;
}
public constexpr export function DoEndDriveFollow( context : ScriptExecutionContext ) : Bool
{
return true;
}
public function DoStopDriveFollow( context : ScriptExecutionContext ) : Bool
{
if( m_driveFollowCommand )
{
m_driveFollowCommand = NULL;
}
return true;
}
private var m_driveChaseCommand : AIVehicleChaseCommand;
public function DoStartDriveChase( context : ScriptExecutionContext ) : Bool
{
var cmd : AIVehicleChaseCommand;
cmd = m_driveChaseCommand;
useKinematic = cmd.useKinematic;
needDriver = cmd.needDriver;
target = cmd.target;
distanceMin = cmd.distanceMin;
distanceMax = cmd.distanceMax;
forcedStartSpeed = cmd.forcedStartSpeed;
aggressiveRammingEnabled = cmd.aggressiveRamming;
ignoreChaseVehiclesLimit = cmd.ignoreChaseVehiclesLimit;
boostDrivingStats = cmd.boostDrivingStats;
return true;
}
public function DoUpdateDriveChase( context : ScriptExecutionContext ) : Bool
{
if( !( m_driveChaseCommand ) || ( m_driveChaseCommand.target != target ) )
{
return false;
}
return true;
}
public constexpr static function DoEndDriveChase( context : ScriptExecutionContext ) : Bool
{
return true;
}
public function DoStopDriveChase( context : ScriptExecutionContext ) : Bool
{
if( m_driveChaseCommand )
{
m_driveChaseCommand = NULL;
}
return true;
}
private var m_drivePanicCommand : AIVehiclePanicCommand;
public function DoStartDrivePanic( context : ScriptExecutionContext ) : Bool
{
var cmd : AIVehiclePanicCommand;
cmd = m_drivePanicCommand;
allowSimplifiedMovement = cmd.allowSimplifiedMovement;
ignoreTickets = cmd.ignoreTickets;
disabeStuckDetection = cmd.disableStuckDetection;
useSpeedBasedLookupRange = cmd.useSpeedBasedLookupRange;
tryDriveAwayFromPlayer = cmd.tryDriveAwayFromPlayer;
needDriver = cmd.needDriver;
return true;
}
public function DoUpdateDrivePanic( context : ScriptExecutionContext ) : Bool
{
if( !( m_drivePanicCommand ) )
{
return false;
}
return true;
}
public constexpr static function DoEndDrivePanic( context : ScriptExecutionContext ) : Bool
{
return true;
}
public function DoStopDrivePanic( context : ScriptExecutionContext ) : Bool
{
if( m_drivePanicCommand )
{
m_drivePanicCommand = NULL;
}
return true;
}
public function DoStartDriveToPointAutonomousAutodriveInCombat( context : ScriptExecutionContext ) : Bool
{
var owner : gamePuppet;
var gameInstance : GameInstance;
var vehicle : weak< VehicleObject >;
owner = ScriptExecutionContext.GetOwner( context );
gameInstance = owner.GetGame();
VehicleComponent.GetVehicle( gameInstance, owner, vehicle );
targetPosition = ( ( Vector3 )( vehicle.GetWorldPosition() ) );
return true;
}
public function DoStartDriveToPointAutonomousAutodrive( context : ScriptExecutionContext ) : Bool
{
var autoDriveSystem : AutoDriveSystem;
var owner : gamePuppet;
var gameInstance : GameInstance;
var vehicle : weak< VehicleObject >;
owner = ScriptExecutionContext.GetOwner( context );
gameInstance = owner.GetGame();
VehicleComponent.GetVehicle( gameInstance, owner, vehicle );
autoDriveSystem = ( ( AutoDriveSystem )( GameInstance.GetScriptableSystemsContainer( ScriptExecutionContext.GetOwner( context ).GetGame() ).Get( 'AutoDriveSystem' ) ) );
targetPosition = autoDriveSystem.GetAutodriveDestination();
return true;
}
public function DoUpdateDriveToPointAutonomousAutodrive( context : ScriptExecutionContext ) : Bool
{
var autoDriveSystem : AutoDriveSystem;
var owner : gamePuppet;
var gameInstance : GameInstance;
var vehicle : weak< VehicleObject >;
var driveToPointUpdate : DriveToPointAutonomousUpdate;
owner = ScriptExecutionContext.GetOwner( context );
gameInstance = owner.GetGame();
driveToPointUpdate = new DriveToPointAutonomousUpdate;
VehicleComponent.GetVehicle( gameInstance, owner, vehicle );
autoDriveSystem = ( ( AutoDriveSystem )( GameInstance.GetScriptableSystemsContainer( ScriptExecutionContext.GetOwner( context ).GetGame() ).Get( 'AutoDriveSystem' ) ) );
if( targetPosition != autoDriveSystem.GetAutodriveDestination() )
{
driveToPointUpdate.targetPosition = ( ( Vector4 )( autoDriveSystem.GetAutodriveDestination() ) );
vehicle.GetAIComponent().SetDriveToPointAutonomousUpdate( driveToPointUpdate );
}
return true;
}
private var m_driveToPointAutonomousCommand : AIVehicleDriveToPointAutonomousCommand;
public function DoStartDriveToPointAutonomous( context : ScriptExecutionContext ) : Bool
{
var cmd : AIVehicleDriveToPointAutonomousCommand;
cmd = m_driveToPointAutonomousCommand;
targetPosition = cmd.targetPosition;
maxSpeed = cmd.maxSpeed;
minSpeed = cmd.minSpeed;
clearTrafficOnPath = cmd.clearTrafficOnPath;
minimumDistanceToTarget = cmd.minimumDistanceToTarget;
forcedStartSpeed = cmd.forcedStartSpeed;
driveDownTheRoadIndefinitely = cmd.driveDownTheRoadIndefinitely;
return true;
}
public function DoUpdateDriveToPointAutonomous( context : ScriptExecutionContext ) : Bool
{
if( !( m_driveToPointAutonomousCommand ) )
{
return false;
}
return true;
}
public constexpr static function DoEndDriveToPointAutonomous( context : ScriptExecutionContext ) : Bool
{
return true;
}
public function DoStopDriveToPointAutonomous( context : ScriptExecutionContext ) : Bool
{
if( m_driveToPointAutonomousCommand )
{
m_driveToPointAutonomousCommand = NULL;
}
return true;
}
private var m_drivePatrolCommand : AIVehicleDrivePatrolCommand;
public function DoStartDrivePatrol( context : ScriptExecutionContext ) : Bool
{
var cmd : AIVehicleDrivePatrolCommand;
cmd = m_drivePatrolCommand;
maxSpeed = cmd.maxSpeed;
minSpeed = cmd.minSpeed;
clearTrafficOnPath = cmd.clearTrafficOnPath;
emergencyPatrol = cmd.emergencyPatrol;
numPatrolLoops = cmd.numPatrolLoops;
forcedStartSpeed = cmd.forcedStartSpeed;
return true;
}
public function DoUpdateDrivePatrol( context : ScriptExecutionContext ) : Bool
{
if( !( m_drivePatrolCommand ) )
{
return false;
}
return true;
}
public constexpr static function DoEndDrivePatrol( context : ScriptExecutionContext ) : Bool
{
return true;
}
public function DoStopDrivePatrol( context : ScriptExecutionContext ) : Bool
{
if( m_drivePatrolCommand )
{
m_drivePatrolCommand = NULL;
}
return true;
}
private var nodeRef : NodeRef;
private var isPlayer : Bool;
private var forceGreenLights : Bool;
private var portals : vehiclePortalsList;
private var m_driveToNodeCommand : AIVehicleToNodeCommand;
public export function DoStartDriveToNode( context : ScriptExecutionContext ) : Bool
{
var cmd : AIVehicleToNodeCommand;
cmd = m_driveToNodeCommand;
useKinematic = cmd.useKinematic;
needDriver = cmd.needDriver;
nodeRef = cmd.nodeRef;
stopAtPathEnd = cmd.stopAtPathEnd;
secureTimeOut = cmd.secureTimeOut;
isPlayer = cmd.isPlayer;
useTraffic = cmd.useTraffic;
speedInTraffic = cmd.speedInTraffic;
forceGreenLights = cmd.forceGreenLights;
portals = cmd.portals;
trafficTryNeighborsForStart = cmd.trafficTryNeighborsForStart;
trafficTryNeighborsForEnd = cmd.trafficTryNeighborsForEnd;
ignoreNoAIDrivingLanes = cmd.ignoreNoAIDrivingLanes;
return true;
}
public constexpr export function DoEndDriveToNode() : Bool
{
return true;
}
private var m_driveRacingCommand : AIVehicleRacingCommand;
public function DoStartDriveRacing( context : ScriptExecutionContext ) : Bool
{
var cmd : AIVehicleRacingCommand;
cmd = m_driveRacingCommand;
useKinematic = cmd.useKinematic;
needDriver = cmd.needDriver;
splineRef = cmd.splineRef;
secureTimeOut = cmd.secureTimeOut;
driveBackwards = cmd.driveBackwards;
reverseSpline = cmd.reverseSpline;
startFromClosest = cmd.startFromClosest;
rubberBandingBool = cmd.rubberBandingBool;
rubberBandingTargetRef = cmd.rubberBandingTargetRef;
rubberBandingTargetForwardOffset = cmd.rubberBandingTargetForwardOffset;
rubberBandingMinDistance = cmd.rubberBandingMinDistance;
rubberBandingMaxDistance = cmd.rubberBandingMaxDistance;
rubberBandingStopAndWait = cmd.rubberBandingStopAndWait;
rubberBandingTeleportToCatchUp = cmd.rubberBandingTeleportToCatchUp;
rubberBandingStayInFront = cmd.rubberBandingStayInFront;
return true;
}
public constexpr function DoEndDriveRacing() : Bool
{
return true;
}
private var m_driveJoinTrafficCommand : AIVehicleJoinTrafficCommand;
public function DoStartDriveJoinTraffic( context : ScriptExecutionContext ) : Bool
{
var cmd : AIVehicleJoinTrafficCommand;
cmd = m_driveJoinTrafficCommand;
useKinematic = cmd.useKinematic;
needDriver = cmd.needDriver;
return true;
}
public constexpr function DoEndDriveJoinTraffic() : Bool
{
return true;
}
}
class AIDriveOnSplineCommandHandler extends AICommandHandlerBase
{
protected editable inlined var m_outUseKinematic : AIArgumentMapping;
protected editable inlined var m_outNeedDriver : AIArgumentMapping;
protected editable inlined var m_outSpline : AIArgumentMapping;
protected editable inlined var m_outSecureTimeOut : AIArgumentMapping;
protected editable inlined var m_outDriveBackwards : AIArgumentMapping;
protected editable inlined var m_outReverseSpline : AIArgumentMapping;
protected editable inlined var m_outStartFromClosest : AIArgumentMapping;
protected editable inlined var m_outForcedStartSpeed : AIArgumentMapping;
protected editable inlined var m_outStopAtPathEnd : AIArgumentMapping;
protected editable inlined var m_outKeepDistanceBool : AIArgumentMapping;
protected editable inlined var m_outKeepDistanceCompanion : AIArgumentMapping;
protected editable inlined var m_outKeepDistanceDistance : AIArgumentMapping;
protected editable inlined var m_outRubberBandingBool : AIArgumentMapping;
protected editable inlined var m_outRubberBandingTargetRef : AIArgumentMapping;
protected editable inlined var m_outRubberBandingTargetForwardOffset : AIArgumentMapping;
protected editable inlined var m_outRubberBandingMinDistance : AIArgumentMapping;
protected editable inlined var m_outRubberBandingMaxDistance : AIArgumentMapping;
protected editable inlined var m_outRubberBandingStopAndWait : AIArgumentMapping;
protected editable inlined var m_outRubberBandingTeleportToCatchUp : AIArgumentMapping;
protected editable inlined var m_outRubberBandingStayInFront : AIArgumentMapping;
protected editable inlined var m_outAudioCurvesParam : AIArgumentMapping;
protected override function UpdateCommand( context : ScriptExecutionContext, command : AICommand ) : AIbehaviorUpdateOutcome
{
var typedCommand : AIVehicleOnSplineCommand;
typedCommand = ( ( AIVehicleOnSplineCommand )( command ) );
if( !( typedCommand ) )
{
return AIbehaviorUpdateOutcome.FAILURE;
}
ScriptExecutionContext.SetMappingValue( context, m_outUseKinematic, typedCommand.useKinematic );
ScriptExecutionContext.SetMappingValue( context, m_outNeedDriver, typedCommand.needDriver );
ScriptExecutionContext.SetMappingValue( context, m_outSpline, typedCommand.splineRef );
ScriptExecutionContext.SetMappingValue( context, m_outSecureTimeOut, typedCommand.secureTimeOut );
ScriptExecutionContext.SetMappingValue( context, m_outDriveBackwards, typedCommand.driveBackwards );
ScriptExecutionContext.SetMappingValue( context, m_outReverseSpline, typedCommand.reverseSpline );
ScriptExecutionContext.SetMappingValue( context, m_outStartFromClosest, typedCommand.startFromClosest );
ScriptExecutionContext.SetMappingValue( context, m_outForcedStartSpeed, typedCommand.forcedStartSpeed );
ScriptExecutionContext.SetMappingValue( context, m_outStopAtPathEnd, typedCommand.stopAtPathEnd );
ScriptExecutionContext.SetMappingValue( context, m_outKeepDistanceBool, typedCommand.keepDistanceBool );
ScriptExecutionContext.SetMappingValue( context, m_outKeepDistanceCompanion, typedCommand.keepDistanceCompanion );
ScriptExecutionContext.SetMappingValue( context, m_outKeepDistanceDistance, typedCommand.keepDistanceDistance );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingBool, typedCommand.rubberBandingBool );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingTargetRef, typedCommand.rubberBandingTargetRef );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingTargetForwardOffset, typedCommand.rubberBandingTargetForwardOffset );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingMinDistance, typedCommand.rubberBandingMinDistance );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingMaxDistance, typedCommand.rubberBandingMaxDistance );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingStopAndWait, typedCommand.rubberBandingStopAndWait );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingTeleportToCatchUp, typedCommand.rubberBandingTeleportToCatchUp );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingStayInFront, typedCommand.rubberBandingStayInFront );
ScriptExecutionContext.SetMappingValue( context, m_outAudioCurvesParam, typedCommand.audioCurvesParam );
return AIbehaviorUpdateOutcome.SUCCESS;
}
}
class AIDriveFollowCommandHandler extends AICommandHandlerBase
{
protected editable inlined var m_outUseKinematic : AIArgumentMapping;
protected editable inlined var m_outNeedDriver : AIArgumentMapping;
protected editable inlined var m_outTarget : AIArgumentMapping;
protected editable inlined var m_outSecureTimeOut : AIArgumentMapping;
protected editable inlined var m_outDistanceMin : AIArgumentMapping;
protected editable inlined var m_outDistanceMax : AIArgumentMapping;
protected editable inlined var m_outStopWhenTargetReached : AIArgumentMapping;
protected editable inlined var m_outUseTraffic : AIArgumentMapping;
protected editable inlined var m_outTrafficTryNeighborsForStart : AIArgumentMapping;
protected editable inlined var m_outTrafficTryNeighborsForEnd : AIArgumentMapping;
protected override function UpdateCommand( context : ScriptExecutionContext, command : AICommand ) : AIbehaviorUpdateOutcome
{
var typedCommand : AIVehicleFollowCommand;
typedCommand = ( ( AIVehicleFollowCommand )( command ) );
if( !( typedCommand ) )
{
return AIbehaviorUpdateOutcome.FAILURE;
}
ScriptExecutionContext.SetMappingValue( context, m_outUseKinematic, typedCommand.useKinematic );
ScriptExecutionContext.SetMappingValue( context, m_outNeedDriver, typedCommand.needDriver );
ScriptExecutionContext.SetMappingValue( context, m_outTarget, typedCommand.target );
ScriptExecutionContext.SetMappingValue( context, m_outSecureTimeOut, typedCommand.secureTimeOut );
ScriptExecutionContext.SetMappingValue( context, m_outDistanceMin, typedCommand.distanceMin );
ScriptExecutionContext.SetMappingValue( context, m_outDistanceMax, typedCommand.distanceMax );
ScriptExecutionContext.SetMappingValue( context, m_outStopWhenTargetReached, typedCommand.stopWhenTargetReached );
ScriptExecutionContext.SetMappingValue( context, m_outUseTraffic, typedCommand.useTraffic );
ScriptExecutionContext.SetMappingValue( context, m_outTrafficTryNeighborsForStart, typedCommand.trafficTryNeighborsForStart );
ScriptExecutionContext.SetMappingValue( context, m_outTrafficTryNeighborsForEnd, typedCommand.trafficTryNeighborsForEnd );
return AIbehaviorUpdateOutcome.SUCCESS;
}
}
class AIDriveToNodeCommandHandler extends AICommandHandlerBase
{
protected editable inlined var m_outUseKinematic : AIArgumentMapping;
protected editable inlined var m_outNeedDriver : AIArgumentMapping;
protected editable inlined var m_outNodeRef : AIArgumentMapping;
protected editable inlined var m_outSecureTimeOut : AIArgumentMapping;
protected editable inlined var m_outIsPlayer : AIArgumentMapping;
protected editable inlined var m_outUseTraffic : AIArgumentMapping;
protected editable inlined var m_forceGreenLights : AIArgumentMapping;
protected editable inlined var m_portals : AIArgumentMapping;
protected editable inlined var m_outTrafficTryNeighborsForStart : AIArgumentMapping;
protected editable inlined var m_outTrafficTryNeighborsForEnd : AIArgumentMapping;
protected editable inlined var m_outIgnoreNoAIDrivingLanes : AIArgumentMapping;
protected override function UpdateCommand( context : ScriptExecutionContext, command : AICommand ) : AIbehaviorUpdateOutcome
{
var typedCommand : AIVehicleToNodeCommand;
typedCommand = ( ( AIVehicleToNodeCommand )( command ) );
if( !( typedCommand ) )
{
return AIbehaviorUpdateOutcome.FAILURE;
}
ScriptExecutionContext.SetMappingValue( context, m_outUseKinematic, typedCommand.useKinematic );
ScriptExecutionContext.SetMappingValue( context, m_outNeedDriver, typedCommand.needDriver );
ScriptExecutionContext.SetMappingValue( context, m_outNodeRef, typedCommand.nodeRef );
ScriptExecutionContext.SetMappingValue( context, m_outSecureTimeOut, typedCommand.secureTimeOut );
ScriptExecutionContext.SetMappingValue( context, m_outIsPlayer, typedCommand.isPlayer );
ScriptExecutionContext.SetMappingValue( context, m_outUseTraffic, typedCommand.useTraffic );
ScriptExecutionContext.SetMappingValue( context, m_forceGreenLights, typedCommand.forceGreenLights );
ScriptExecutionContext.SetMappingValue( context, m_portals, typedCommand.portals );
ScriptExecutionContext.SetMappingValue( context, m_outTrafficTryNeighborsForStart, typedCommand.trafficTryNeighborsForStart );
ScriptExecutionContext.SetMappingValue( context, m_outTrafficTryNeighborsForEnd, typedCommand.trafficTryNeighborsForEnd );
ScriptExecutionContext.SetMappingValue( context, m_outIgnoreNoAIDrivingLanes, typedCommand.ignoreNoAIDrivingLanes );
return AIbehaviorUpdateOutcome.SUCCESS;
}
}
class AIDriveRacingCommandHandler extends AICommandHandlerBase
{
protected editable inlined var m_outUseKinematic : AIArgumentMapping;
protected editable inlined var m_outNeedDriver : AIArgumentMapping;
protected editable inlined var m_outSpline : AIArgumentMapping;
protected editable inlined var m_outSecureTimeOut : AIArgumentMapping;
protected editable inlined var m_outDriveBackwards : AIArgumentMapping;
protected editable inlined var m_outReverseSpline : AIArgumentMapping;
protected editable inlined var m_outStartFromClosest : AIArgumentMapping;
protected editable inlined var m_outRubberBandingBool : AIArgumentMapping;
protected editable inlined var m_outRubberBandingTargetRef : AIArgumentMapping;
protected editable inlined var m_outRubberBandingTargetForwardOffset : AIArgumentMapping;
protected editable inlined var m_outRubberBandingMinDistance : AIArgumentMapping;
protected editable inlined var m_outRubberBandingMaxDistance : AIArgumentMapping;
protected editable inlined var m_outRubberBandingStopAndWait : AIArgumentMapping;
protected editable inlined var m_outRubberBandingTeleportToCatchUp : AIArgumentMapping;
protected editable inlined var m_outRubberBandingStayInFront : AIArgumentMapping;
protected override function UpdateCommand( context : ScriptExecutionContext, command : AICommand ) : AIbehaviorUpdateOutcome
{
var typedCommand : AIVehicleRacingCommand;
typedCommand = ( ( AIVehicleRacingCommand )( command ) );
if( !( typedCommand ) )
{
return AIbehaviorUpdateOutcome.FAILURE;
}
ScriptExecutionContext.SetMappingValue( context, m_outUseKinematic, typedCommand.useKinematic );
ScriptExecutionContext.SetMappingValue( context, m_outNeedDriver, typedCommand.needDriver );
ScriptExecutionContext.SetMappingValue( context, m_outSpline, typedCommand.splineRef );
ScriptExecutionContext.SetMappingValue( context, m_outSecureTimeOut, typedCommand.secureTimeOut );
ScriptExecutionContext.SetMappingValue( context, m_outDriveBackwards, typedCommand.driveBackwards );
ScriptExecutionContext.SetMappingValue( context, m_outReverseSpline, typedCommand.reverseSpline );
ScriptExecutionContext.SetMappingValue( context, m_outStartFromClosest, typedCommand.startFromClosest );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingBool, typedCommand.rubberBandingBool );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingTargetRef, typedCommand.rubberBandingTargetRef );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingTargetForwardOffset, typedCommand.rubberBandingTargetForwardOffset );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingMinDistance, typedCommand.rubberBandingMinDistance );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingMaxDistance, typedCommand.rubberBandingMaxDistance );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingStopAndWait, typedCommand.rubberBandingStopAndWait );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingTeleportToCatchUp, typedCommand.rubberBandingTeleportToCatchUp );
ScriptExecutionContext.SetMappingValue( context, m_outRubberBandingStayInFront, typedCommand.rubberBandingStayInFront );
return AIbehaviorUpdateOutcome.SUCCESS;
}
}
class AIDrivePanicCommandHandler extends AICommandHandlerBase
{
protected editable inlined var m_outAllowSimplifiedMovement : AIArgumentMapping;
protected editable inlined var m_outIgnoreTickets : AIArgumentMapping;
protected editable inlined var m_outDisableStuckDetection : AIArgumentMapping;
protected editable inlined var m_outUseSpeedBasedLookupRange : AIArgumentMapping;
protected editable inlined var m_outTryDriveAwayFromPlayer : AIArgumentMapping;
protected override function UpdateCommand( context : ScriptExecutionContext, command : AICommand ) : AIbehaviorUpdateOutcome
{
var typedCommand : AIVehiclePanicCommand;
typedCommand = ( ( AIVehiclePanicCommand )( command ) );
if( !( typedCommand ) )
{
return AIbehaviorUpdateOutcome.FAILURE;
}
ScriptExecutionContext.SetMappingValue( context, m_outAllowSimplifiedMovement, typedCommand.allowSimplifiedMovement );
ScriptExecutionContext.SetMappingValue( context, m_outIgnoreTickets, typedCommand.ignoreTickets );
ScriptExecutionContext.SetMappingValue( context, m_outDisableStuckDetection, typedCommand.disableStuckDetection );
ScriptExecutionContext.SetMappingValue( context, m_outUseSpeedBasedLookupRange, typedCommand.useSpeedBasedLookupRange );
ScriptExecutionContext.SetMappingValue( context, m_outTryDriveAwayFromPlayer, typedCommand.tryDriveAwayFromPlayer );
return AIbehaviorUpdateOutcome.SUCCESS;
}
}
class AIDriveJoinTrafficCommandHandler extends AICommandHandlerBase
{
protected editable inlined var m_outUseKinematic : AIArgumentMapping;
protected editable inlined var m_outNeedDriver : AIArgumentMapping;
protected override function UpdateCommand( context : ScriptExecutionContext, command : AICommand ) : AIbehaviorUpdateOutcome
{
var typedCommand : AIVehicleJoinTrafficCommand;
typedCommand = ( ( AIVehicleJoinTrafficCommand )( command ) );
if( !( typedCommand ) )
{
return AIbehaviorUpdateOutcome.FAILURE;
}
ScriptExecutionContext.SetMappingValue( context, m_outUseKinematic, typedCommand.useKinematic );
ScriptExecutionContext.SetMappingValue( context, m_outNeedDriver, typedCommand.needDriver );
return AIbehaviorUpdateOutcome.SUCCESS;
}
}