1 #using scripts\shared\callbacks_shared;
2 #using scripts\shared\challenges_shared;
3 #using scripts\shared\clientfield_shared;
4 #using scripts\shared\system_shared;
5 #using scripts\shared\array_shared;
6 #using scripts\shared\util_shared;
7 #using scripts\shared\scoreevents_shared;
8 #using scripts\shared\killstreaks_shared;
9 #using scripts\shared\vehicle_ai_shared;
10 #using scripts\shared\vehicle_shared;
11 #using scripts\shared\vehicles\_raps;
12 #using scripts\shared\weapons\_smokegrenade;
14 #using scripts\mp\gametypes\_battlechatter;
15 #using scripts\mp\gametypes\_globallogic_audio;
16 #using scripts\mp\gametypes\_spawning;
17 #using scripts\mp\gametypes\_spawnlogic;
18 #using scripts\mp\teams\_teams;
19 #using scripts\mp\killstreaks\_helicopter;
20 #using scripts\mp\killstreaks\_killstreak_bundles;
21 #using scripts\mp\killstreaks\_killstreak_detect;
22 #using scripts\mp\killstreaks\_killstreak_hacking;
23 #using scripts\mp\killstreaks\_killstreakrules;
24 #using scripts\mp\killstreaks\_killstreaks;
25 #using scripts\mp\killstreaks\_airsupport;
27 #insert scripts\mp\_hacker_tool.gsh;
28 #insert scripts\mp\killstreaks\_killstreaks.gsh;
29 #insert scripts\shared\clientfields.gsh;
30 #insert scripts\shared\shared.gsh;
31 #insert scripts\shared\version.gsh;
35 #define RAPS_HURT_TRIGGER_IMMUNE_DURATION_MS 5000
36 #define RAPS_HELI_POST_DEATH_FX_GHOST_DELAY 0.1
38 #precache( "string", "KILLSTREAK_DESTROYED_RAPS_DEPLOY_SHIP");
39 #precache( "string", "KILLSTREAK_EARNED_RAPS" );
40 #precache( "string", "KILLSTREAK_RAPS_NOT_AVAILABLE" );
41 #precache( "string", "KILLSTREAK_RAPS_NOT_PLACEABLE" );
42 #precache( "string", "KILLSTREAK_RAPS_INBOUND" );
43 #precache( "string", "KILLSTREAK_RAPS_HACKED" );
44 #precache( "eventstring", "mpl_killstreak_raps" );
45 #precache( "fx", RAPS_HELI_FIRST_EXPLO_FX );
46 #precache( "fx", RAPS_HELI_DEATH_TRAIL_FX );
47 #precache( "fx", RAPS_HELI_DEATH_FX );
51 level.raps_settings = level.scriptbundles[
"vehiclecustomsettings" ][
"rapssettings_mp" ];
52 assert( isdefined( level.raps_settings ) );
55 level.raps_helicopters = [];
61 killstreaks::register_dialog(
RAPS_NAME,
"mpl_killstreak_raps",
"rapsHelicopterDialogBundle",
"rapsHelicopterPilotDialogBundle",
"friendlyRaps",
"enemyRaps",
"enemyRapsMultiple",
"friendlyRapsHacked",
"enemyRapsHacked",
"requestRaps",
"threatRaps" );
76 level.raps_helicopter_drop_tag_names = [];
77 level.raps_helicopter_drop_tag_names[0] =
"tag_raps_drop_left";
78 level.raps_helicopter_drop_tag_names[1] =
"tag_raps_drop_right";
83 self.entNum =
self getEntityNumber();
84 level.raps[
self.entNum ] = spawnstruct();
86 level.raps[
self.entNum ].raps = [];
87 level.raps[
self.entNum ].helicopter = undefined;
116 level endon(
"game_ended" );
125 if ( index_to_update >= level.raps_helicopters.size )
134 helicopterRefOrigin = ( 0, 0, 0 );
135 otherHelicopterRefOrigin = ( 0, 0, 0 );
137 ArrayRemoveValue( level.raps_helicopters, undefined );
139 if ( index_to_update >= level.raps_helicopters.size )
142 if( level.raps_helicopters.size >= 2 )
144 helicopter = level.raps_helicopters[index_to_update];
145 /# helicopter.__action_just_made =
false; #/
147 for( i = 0; i < level.raps_helicopters.size; i++ )
149 if ( i == index_to_update )
152 if ( helicopter.droppingRaps )
155 if ( !isdefined( helicopter.lastNewGoalTime ) )
156 helicopter.lastNewGoalTime = GetTime();
158 helicopterForward = AnglesToForward( helicopter GetAngles() );
160 otherHelicopterForward = AnglesToForward( level.raps_helicopters[i] GetAngles() );
162 deltaToOther = otherHelicopterRefOrigin - helicopterRefOrigin;
164 distanceSqr = Distance2DSquared( helicopterRefOrigin, otherHelicopterRefOrigin);
172 /# helicopter.__last_dynamic_avoidance_action = 20; #/
173 /# helicopter.__action_just_made =
true; #/
176 if ( helicopter.isLeaving )
179 helicopter setVehGoalPos(
self.leaveLocation, 0 );
184 helicopter setVehGoalPos(
self.targetDropLocation, 1 );
186 helicopter.lastNewGoalTime = GetTime();
196 /# helicopter.__last_dynamic_avoidance_action = 10; #/
197 /# helicopter.__action_just_made =
true; #/
207 /# helicopter.__last_dynamic_avoidance_action = 50; #/
208 /# helicopter.__action_just_made =
true; #/
210 delta = otherHelicopterRefOrigin - helicopterRefOrigin;
211 newGoalPosition = helicopter.origin -
215 helicopter setVehGoalPos( newGoalPosition, 0 );
220 /# helicopter.__last_dynamic_avoidance_action = 51; #/
222 helicopter.lastNewGoalTime = GetTime();
231 /# helicopter.__last_dynamic_avoidance_action = (( otherInFront ) ? 31 : 30); #/
232 /# helicopter.__action_just_made =
true; #/
241 /# helicopter.__last_dynamic_avoidance_action = 40; #/
242 /# helicopter.__action_just_made =
true; #/
266 if ( isdefined( helicopter ) )
270 Sphere( helicopterRefOrigin, 10, ( 0, 0, 1 ), 1,
false, 10, server_frames_to_persist );
271 Sphere( otherHelicopterRefOrigin, 10, ( 1, 0, 0 ), 1,
false, 10, server_frames_to_persist );
277 Print3d( helicopter.origin,
"Speed: " + INT( helicopter GetSpeedMPH() ), (1,1,1), 1, 2.5, server_frames_to_persist );
279 action_debug_color = ( 0.8, 0.8, 0.8 );
280 debug_action_string =
"";
281 if ( helicopter.__action_just_made )
282 action_debug_color = ( 0, 1, 0 );
284 switch ( helicopter.__last_dynamic_avoidance_action )
287 case 10: debug_action_string =
"stop";
break;
288 case 20: debug_action_string =
"new goal";
break;
289 case 30: debug_action_string =
"cautious";
break;
290 case 31: debug_action_string =
"more cautious";
break;
291 case 40: debug_action_string =
"expedient";
break;
292 case 50: debug_action_string =
"back off";
break;
293 case 51: debug_action_string =
"back off + new goal";
break;
294 default: debug_action_string =
"unknown action";
break;
298 Print3d( helicopter.origin + ( 0, 0, -50 ), debug_action_string, action_debug_color, 1, 2.5, server_frames_to_persist );
321 if( game[
"raps_helicopter_positions"].size <= 0 )
323 /# IPrintLnBold(
"RAPS helicopter position error, check NavMesh." ); #/
324 self iPrintLnBold( &
"KILLSTREAK_RAPS_NOT_AVAILABLE" );
331 player iPrintLnBold( &
"KILLSTREAK_RAPS_NOT_AVAILABLE" );
340 helicopter.killstreakId = killstreakId;
343 player AddWeaponStat( GetWeapon(
RAPS_NAME ),
"used", 1 );
347 level.raps[ player.entNum ].helicopter = helicopter;
348 ARRAY_ADD( level.raps_helicopters, level.raps[ player.entNum ].helicopter );
366 level waittill(
"raps_updated_" + ownerEntNum );
368 if( isdefined( level.raps[ ownerEntNum ].helicopter ) )
371 wait ( RandomFloatRange( 2.0, 5.0 ) );
383 level waittill(
"raps_updated_" + ownerEntNum );
385 if( isdefined( level.raps[ ownerEntNum ].helicopter ) )
397 helicopter waittill(
"death" );
399 level notify(
"raps_updated_" + ownerEntEnum );
415 level endon (
"game_ended");
417 MarkNoVehicleNavMeshFaces( mapCenter, radius, 21 );
433 if ( !isdefined( mapCenter ) )
435 startSearchPoint = ( startSearchPoint[0], startSearchPoint[1], 0 );
438 remaining_attempts = 10;
439 while ( !isdefined( mapCenter ) && remaining_attempts > 0 )
441 startSearchPoint += ( 100, 100, 0 );
443 remaining_attempts -= 1;
446 if( !isdefined( mapCenter ) )
460 if ( IsDefined( game[
"raps_helicopter_positions"] ) )
463 lots_of_height = 1024;
466 if ( randomNavMeshPoints.size == 0 )
468 mapCenter = ( 0, 0, 39 );
472 /# position_query_drop_location_count = randomNavMeshPoints.size; #/
475 if ( isdefined( level.add_raps_drop_locations ) )
477 [[ level.add_raps_drop_locations ]]( randomNavMeshPoints );
486 for( i = position_query_drop_location_count; i < randomNavMeshPoints.size; i++ )
489 Box( randomNavMeshPoints[ i ], (-boxHalfWidth, -boxHalfWidth, 0), (boxHalfWidth, boxHalfWidth, 8.88 ), 0, ( 1.0, 0.53, 0.0 ), 0.9,
false, 9999999 );
496 if ( isdefined( level.add_raps_omit_locations ) )
510 Circle( omit_location, debug_radius, ( 0.05, 0.05, 0.05 ),
false,
true, 9999999 );
511 Circle( omit_location + ( 0, 0, 4 ), debug_radius, ( 0.05, 0.05, 0.05 ),
false,
true, 9999999 );
512 Circle( omit_location + ( 0, 0, 8 ), debug_radius, ( 0.05, 0.05, 0.05 ),
false,
true, 9999999 );
521 game[
"raps_helicopter_positions"] = [];
523 test_point_radius = 12;
525 fit_radius_corner = fit_radius * 0.7071;
528 foreach( point
in randomNavMeshPoints )
531 start_water_trace = point + ( 0, 0, 6 );
532 stop_water_trace = point + ( 0, 0, 8 );
534 if(
trace[
"fraction"] < 1.0 )
543 Box( start_water_trace, ( -DebugBoxWidth, -DebugBoxWidth, 0 ), ( DebugBoxWidth, DebugBoxWidth, DebugBoxHeight ), 0, ( 0.0, 0, 1.0 ), 0.9,
false, 9999999 );
544 Box( start_water_trace, ( -2, -2, -2 ), ( 2, 2, 2 ), 0, ( 0.0, 0, 1.0 ), 0.9,
false, 9999999 );
555 if ( DistanceSquared( omit_location, point ) < ( omit_radius * omit_radius ) )
566 Box( point, ( -DebugBoxWidth, -DebugBoxWidth, 0 ), ( DebugBoxWidth, DebugBoxWidth, DebugBoxHeight ), 0, ( 0.05, 0.05, 0.05 ), 1.0,
false, 9999999 );
581 for ( i = 0; !point_added && i < max_attempts && i < randomTestPoints.size; i++ )
583 test_point = randomTestPoints[ i ];
586 can_fit_on_nav_mesh = ( IsPointOnNavMesh( test_point + ( 0, fit_radius, 0 ), 0 )
587 && IsPointOnNavMesh( test_point + ( 0, -fit_radius, 0 ), 0 )
588 && IsPointOnNavMesh( test_point + ( fit_radius, 0, 0 ), 0 )
589 && IsPointOnNavMesh( test_point + ( -fit_radius, 0, 0 ), 0 )
590 && IsPointOnNavMesh( test_point + ( fit_radius_corner, fit_radius_corner, 0 ), 0 )
591 && IsPointOnNavMesh( test_point + ( fit_radius_corner, -fit_radius_corner, 0 ), 0 )
592 && IsPointOnNavMesh( test_point + ( -fit_radius_corner, fit_radius_corner, 0 ), 0 )
593 && IsPointOnNavMesh( test_point + ( -fit_radius_corner, -fit_radius_corner, 0 ), 0 )
596 if ( can_fit_on_nav_mesh )
603 if( game[
"raps_helicopter_positions"].size == 0 )
605 /# IPrintLnBold(
"Error Finding Valid RAPS Helicopter Positions, Using Default Random NavMesh Points" ); #/
606 game[
"raps_helicopter_positions"] = randomNavMeshPoints;
610 flood_fill_start_point = undefined;
611 flood_fill_start_point_distance_squared = 9999999;
612 foreach( point
in game[
"raps_helicopter_positions"] )
614 if ( !isdefined( point ) )
617 distance_squared = DistanceSquared( point, mapCenter );
618 if ( distance_squared < flood_fill_start_point_distance_squared )
620 flood_fill_start_point_distance_squared = distance_squared;
621 flood_fill_start_point = point;
625 if ( !isdefined( flood_fill_start_point ) )
626 flood_fill_start_point = mapCenter;
638 ARRAY_ADD( game[
"raps_helicopter_positions"], spaciousPoint );
647 start = ( spaciousPoint[0], spaciouspoint[1], traceHeight );
650 trace = PhysicsTrace( start,
end, ( -traceBoxHalfWidth, -traceBoxHalfWidth, 0 ), ( traceBoxHalfWidth, traceBoxHalfWidth, traceBoxHalfWidth * 2.0 ), undefined,
PHYSICS_TRACE_MASK_PHYSICS );
656 if (
trace[
"fraction"] < 1.0 )
659 Box(
end, (-traceBoxHalfWidth, -traceBoxHalfWidth, 0), (traceBoxHalfWidth, traceBoxHalfWidth, (start[2] -
end[2]) * (1.0 -
trace[
"fraction"])), 0, ( 1.0, 0, 0.0 ), 0.6,
false, 9999999 );
664 Box(
end, (-traceBoxHalfWidth, -traceBoxHalfWidth, 0), (traceBoxHalfWidth, traceBoxHalfWidth, 8.88), 0, ( 0.0, 1.0, 0.0 ), 0.6,
false, 9999999 );
669 return (
trace[
"fraction"] == 1.0 &&
trace[
"surfacetype"] ==
"none" );
675 return best_node.origin + ( 0, 0, fly_height );
681 return best_node.origin + ( 0, 0, fly_height );
690 ArrayRemoveValue( level.raps_helicopters, undefined );
694 if ( level.raps_helicopters.size > 0 )
696 already_assigned_height = level.raps_helicopters[0].assigned_fly_height;
721 helicopter.prePickedDropLocation = prePickedDropLocation;
722 helicopter.assigned_fly_height = assigned_fly_height;
727 helicopter.droppingRaps =
false;
728 helicopter.isLeaving =
false;
729 helicopter.droppedRaps =
false;
730 helicopter.driveModeSpeedScale = 3.0;
733 helicopter.lastStopTime = 0;
737 /# helicopter.__last_dynamic_avoidance_action = 0; #/
741 helicopter.health = 99999999;
744 helicopter.extra_low_health = helicopter.lowhealth * 0.5;
747 helicopter SetCanDamage(
true );
755 Target_Set( helicopter, ( 0, 0, 100 ) );
756 helicopter SetDrawInfrared(
true );
768 helicopter waittill(
"raps_helicopter_shutdown", killed );
770 level notify(
"raps_updated_" + helicopter.ownerEntNum );
772 if ( Target_IsTarget( helicopter ) )
774 Target_Remove( helicopter );
779 wait( RandomFloatRange( 0.1, 0.2 ) );
784 helicopter thread
Spin();
785 GoalX = RandomFloatRange( 650, 700 );
786 GoalY = RandomFloatRange( 650, 700 );
788 if ( RandomIntRange ( 0, 2 ) > 0 )
791 if ( RandomIntRange ( 0, 2 ) > 0 )
794 helicopter setVehGoalPos( helicopter.origin + ( GoalX, GoalY, -RandomFloatRange( 285, 300 ) ),
false );
795 wait( RandomFloatRange( 3.0, 4.0 ) );
802 self notify(
"stop_death_spin" );
815 self notify(
"WatchOwnerDisconnect_singleton" );
816 self endon (
"WatchOwnerDisconnect_singleton" );
819 helicopter endon(
"raps_helicopter_shutdown" );
821 helicopter notify(
"raps_helicopter_shutdown",
false );
827 helicopter endon(
"raps_helicopter_shutdown" );
828 helicopter endon(
"death" );
829 level waittill(
"game_ended");
830 helicopter notify(
"raps_helicopter_shutdown",
false );
837 if ( isdefined( attacker ) && ( !isdefined( helicopter.owner ) || helicopter.owner
util::IsEnemyPlayer( attacker ) ) )
841 scoreevents::processscoreevent(
"destroyed_raps_deployship", attacker, helicopter.owner, weapon );
842 if ( isdefined( helicopter.droppedRaps ) && helicopter.droppedRaps ==
false )
844 attacker addplayerstat(
"destroy_raps_before_drop", 1 );
846 LUINotifyEvent( &
"player_callout", 2, &
"KILLSTREAK_DESTROYED_RAPS_DEPLOY_SHIP", attacker.entnum );
847 helicopter notify(
"raps_helicopter_shutdown",
true );
850 if ( helicopter.isleaving !==
true )
883 avoidRadiusSqr = -1.0;
898 while( !found && tries < game[
"raps_helicopter_positions"].size )
900 index = RandomIntRange( 0, game[
"raps_helicopter_positions"].size );
901 randomPoint = ( game[
"raps_helicopter_positions"][ index ][0], game[
"raps_helicopter_positions"][ index ][1], flyHeight );
902 found = ( ( Distance2DSquared( randomPoint, avoidPoint ) > avoidRadiusSqr ) && ( Distance2DSquared( randomPoint, otherAvoidPoint ) > avoidRadiusSqr ) );
908 avoidRadiusSqr *= 0.25;
914 Assert( found,
"Failed to find a RAPS deploy point!" );
922 bestDistanceSqr = Distance2DSquared( bestPosition, refPoint );
924 for ( i = 1; i < pickCount; i++ )
927 candidateDistanceSqr = Distance2DSquared( candidatePosition, refPoint );
929 if ( candidateDistanceSqr < bestDistanceSqr )
931 bestPosition = candidatePosition;
932 bestDistanceSqr = candidateDistanceSqr;
941 elapsedTimeStopping = GetTime() -
self.lastStopTime;
950 avoid_point = undefined;
952 ArrayRemoveValue( level.raps_helicopters, undefined );
954 foreach( heli
in level.raps_helicopters )
958 avoid_point = heli.targetDropLocation;
971 if ( isdefined( heli ) && isdefined( heli.prePickedDropLocation ) )
973 targetDropLocation = heli.prePickedDropLocation;
974 heli.prePickedDropLocation = undefined;
975 return targetDropLocation;
979 firstDropReferencePoint,
984 targetDropLocation = ( targetDropLocation[0], targetDropLocation[1], assigned_fly_height );
986 return targetDropLocation;
996 self endon(
"raps_helicopter_shutdown" );
1000 self.targetDropLocation =
PickNextDropLocation(
self, i,
self.firstDropReferencePoint,
self.assigned_fly_height,
self.lastDropLocation );
1006 self setVehGoalPos(
self.targetDropLocation, 1 );
1007 self waittill(
"goal" );
1010 if ( isdefined(
self.owner ) )
1025 if ( isdefined( enemy ) && Distance2DSquared(
self.origin, enemy.origin ) < enemyRadius * enemyRadius )
1037 self notify(
"raps_helicopter_shutdown",
false );
1043 self endon(
"death" );
1048 for( i = 0; i < 100; i++ )
1050 for( j = 0; j < game[
"raps_helicopter_positions"].size; j++ )
1052 self.targetDropLocation = ( game[
"raps_helicopter_positions"][ j ][0], game[
"raps_helicopter_positions"][ j ][1],
self.assigned_fly_height );
1058 self setVehGoalPos(
self.targetDropLocation, 1 );
1059 self waittill(
"goal" );
1068 if ( (j+1) % 3 == 0 )
1077 self setVehGoalPos(
self.targetDropLocation, 1 );
1078 self waittill(
"goal" );
1085 self notify(
"raps_helicopter_shutdown",
false );
1091 level endon(
"game_ended" );
1092 self endon(
"death" );
1094 self.droppingRaps =
true;
1095 self.lastDropLocation =
self.origin;
1098 preciseDropLocation = 0.5 * (
self GetTagOrigin( level.raps_helicopter_drop_tag_names[0] ) +
self GetTagOrigin( level.raps_helicopter_drop_tag_names[1] ) );
1099 preciseGoalLocation =
self.targetDropLocation + (
self.targetDropLocation - preciseDropLocation);
1100 preciseGoalLocation = ( preciseGoalLocation[0], preciseGoalLocation[1],
self.targetDropLocation[2] );
1101 self setVehGoalPos( preciseGoalLocation, 1 );
1102 self waittill(
"goal" );
1103 self.droppedRaps =
true;
1104 for( i = 0; i < level.raps_settings.spawn_count; i++ )
1106 spawn_tag = level.raps_helicopter_drop_tag_names[ i % level.raps_helicopter_drop_tag_names.size ];
1108 origin =
self GetTagOrigin( spawn_tag );
1109 angles =
self GetTagAngles( spawn_tag );
1111 if ( !isdefined( origin ) || !isdefined( angles ) )
1113 origin =
self.origin;
1114 angles =
self.angles;
1117 self.owner thread
SpawnRaps( origin, angles );
1118 self playsound(
"veh_raps_launch" );
1122 self.droppingRaps =
false;
1127 self endon(
"stop_death_spin" );
1129 speed = RandomIntRange( 180, 220 );
1130 self setyawspeed( speed, speed * 0.25, speed );
1132 if ( RandomIntRange ( 0, 2 ) > 0 )
1135 while ( isdefined(
self ) )
1137 self settargetyaw(
self.angles[1]+(speed*0.4) );
1145 self PlaySound( level.heli_sound[
"crash"] );
1166 self PlaySound( level.heli_sound[
"crash"] );
1171 self.isLeaving =
true;
1180 self setVehGoalPos(
self.leaveLocation, 0 );
1181 self waittill(
"goal" );
1187 if ( isdefined( driveMode ) )
1189 switch ( driveMode )
1192 self.driveModeSpeedScale = 1.0;
1209 if ( desiredspeed <
self GetSpeedMPH() )
1211 self SetSpeed( desiredSpeed,
self.driveModeDecel,
self.driveModeDecel );
1215 self SetSpeed( desiredSpeed,
self.driveModeAccel,
self.driveModeDecel );
1223 self.lastStopTime = GetTime();
1231 originalOwner =
self;
1232 originalOwnerEntNum = originalOwner.entNum;
1234 raps = SpawnVehicle(
RAPS_VEHICLE, origin, angles,
"dynamic_spawn_ai" );
1236 if ( !isdefined( raps ) )
1239 raps.forceOneMissile =
true;
1240 raps.drop_deploying =
true;
1243 ARRAY_ADD( level.raps[ originalOwnerEntNum ].raps, raps );
1248 raps.soundmod =
"raps";
1249 raps.ignore_vehicle_underneath_splash_scalar =
true;
1250 raps.detonate_sides_disabled =
true;
1251 raps.treat_owner_damage_as_friendly_fire =
true;
1252 raps.ignore_team_kills =
true;
1254 raps SetInvisibleToAll();
1278 self endon(
"death" );
1285 self SetVisibleToAll();
1295 self.selfDestruct =
true;
1301 originalOwner endon(
"raps_complete" );
1302 self endon(
"death" );
1304 if(
self.settings.max_kill_count == 0 )
1311 self waittill(
"killed", victim );
1313 if( isdefined( victim ) && IsPlayer( victim ) )
1315 if( !isdefined(
self.killCount ) )
1321 if(
self.killCount >=
self.settings.max_kill_count )
1331 owner endon(
"disconnect" );
1332 self endon(
"death" );
1339 if ( Abs(
self.angles[2] ) > 75 )
1348 originalOwnerEntNum = originalOwner.entnum;
1349 self waittill(
"death", attacker, damageFromUnderneath, weapon );
1351 attacker =
self [[ level.figure_out_attacker ]]( attacker );
1353 if( isdefined( attacker ) && isPlayer( attacker ) )
1355 if( isdefined(
self.owner ) &&
self.owner != attacker && (
self.owner.team != attacker.team ) )
1361 if( isdefined(
self.attackers ) )
1363 foreach( player
in self.attackers )
1365 if( isPlayer( player ) && ( player != attacker ) && ( player !=
self.owner ) )
1374 ArrayRemoveValue( level.raps[ originalOwnerEntNum ].raps,
self );
1379 owner endon(
"disconnect" );
1380 self endon(
"death" );
1381 self endon(
"hacked" );
1386 self SetVehicleForDropDeploy();
1391 self ResetVehicleFromDropDeploy();
1392 self SetGoal(
self.origin );
1396 self.drop_deploying = undefined;
1397 self.hurt_trigger_immune_end_time = undefined;
1401 for( i = 0; i < level.raps[ owner.entNum ].raps.size; i++ )
1403 raps = level.raps[ owner.entNum ].raps[ i ];
1404 if( isdefined( raps ) && isdefined( raps.enemy ) && isdefined(
self ) && isdefined(
self.enemy ) && ( raps !=
self ) && ( raps.enemy ==
self.enemy ) )
1406 self SetPersonalThreatBias(
self.enemy, -2000, 5.0 );
1417 #define RAPS_IWUS_WAIT_INTERVAL ( 0.2 )
1418 #define RAPS_IWUS_Z_SPEED_THRESHOLD ( 0.1 )
1419 #define RAPS_IWUS_Z_SETTLE_TIMEOUT ( 5.0 )
1420 #define RAPS_IWUS_SETTLE_ON_MESH_TIMEOUT ( RAPS_IWUS_Z_SETTLE_TIMEOUT + 5.0 )
1421 #define RAPS_IWUS_FORCE_TIMEOUT_TEST ( false )
1422 #define RAPS_IWUS_RAPS_RADIUS ( 36 )
1453 foreach( raps
in level.raps[ entNum ].raps )
1455 if( IsAlive( raps ) )
1457 raps.owner = undefined;
1458 raps.abandoned = abandoned;
1467 foreach( player
in level.players )
1471 self GetPerfectInfo( player );
1479 level endon(
"game_ended" );
1483 if ( isdefined( helicopter.influencerEnt ) )
1485 helicopter.influencerEnt Delete();
1488 influencerEnt =
spawn(
"script_model", helicopter.origin - ( 0, 0,
self.assigned_fly_height ) );
1489 helicopter.influencerEnt = influencerEnt;
1490 helicopter.influencerEnt.angles = ( 0, 0, 0 );
1491 helicopter.influencerEnt LinkTo( helicopter );
1493 preset = GetInfluencerPreset(
"helicopter" );
1494 if( !IsDefined( preset ) )
1502 helicopter waittill(
"death" );
1503 if ( isdefined( influencerEnt ) )
1505 influencerEnt
delete();
1514 if( !IsDefined( preset ) )