// IW6 GSC SOURCE
// Generated by https://github.com/xensik/gsc-tool

main()
{
    if ( getdvar( "mapname" ) == "mp_background" )
        return;

    maps\mp\gametypes\_globallogic::init();
    maps\mp\gametypes\_callbacksetup::setupcallbacks();
    maps\mp\gametypes\_globallogic::setupcallbacks();

    if ( isusingmatchrulesdata() )
    {
        level.initializematchrules = ::initializematchrules;
        [[ level.initializematchrules ]]();
        level thread maps\mp\_utility::reinitializematchrulesonmigration();
    }
    else
    {
        maps\mp\_utility::registerroundswitchdvar( level.gametype, 0, 0, 9 );
        maps\mp\_utility::registertimelimitdvar( level.gametype, 7 );
        maps\mp\_utility::registerscorelimitdvar( level.gametype, 2500 );
        maps\mp\_utility::registerroundlimitdvar( level.gametype, 1 );
        maps\mp\_utility::registerwinlimitdvar( level.gametype, 1 );
        maps\mp\_utility::registernumlivesdvar( level.gametype, 0 );
        maps\mp\_utility::registerhalftimedvar( level.gametype, 0 );
        level.matchrules_damagemultiplier = 0;
        level.matchrules_vampirism = 0;
        level.mugger_bank_limit = getdvarint( "scr_mugger_bank_limit", 10 );
    }

    setteammode( "ffa" );
    level.onprecachegametype = ::onprecachegametype;
    level.onstartgametype = ::onstartgametype;
    level.onspawnplayer = ::onspawnplayer;
    level.getspawnpoint = ::getspawnpoint;
    level.onnormaldeath = ::onnormaldeath;
    level.onplayerscore = ::onplayerscore;
    level.ontimelimit = ::ontimelimit;
    level.onxpevent = ::onxpevent;
    level.customcratefunc = ::createmuggercrates;
    level.assists_disabled = 1;

    if ( level.matchrules_damagemultiplier || level.matchrules_vampirism )
        level.modifyplayerdamage = maps\mp\gametypes\_damage::gamemodemodifyplayerdamage;

    level.mugger_fx["vanish"] = loadfx( "impacts/small_snowhit" );
    level.mugger_fx["smoke"] = loadfx( "smoke/airdrop_flare_mp_effect_now" );
    level.mugger_targetfxid = loadfx( "misc/ui_flagbase_red" );
    level thread onplayerconnect();
}

initializematchrules()
{
    maps\mp\_utility::setcommonrulesfrommatchrulesdata();
    setdynamicdvar( "scr_mugger_roundswitch", 0 );
    maps\mp\_utility::registerroundswitchdvar( "mugger", 0, 0, 9 );
    setdynamicdvar( "scr_mugger_roundlimit", 1 );
    maps\mp\_utility::registerroundlimitdvar( "mugger", 1 );
    setdynamicdvar( "scr_mugger_winlimit", 1 );
    maps\mp\_utility::registerwinlimitdvar( "mugger", 1 );
    setdynamicdvar( "scr_mugger_halftime", 0 );
    maps\mp\_utility::registerhalftimedvar( "mugger", 0 );
    setdynamicdvar( "scr_mugger_promode", 0 );
    level.mugger_bank_limit = getmatchrulesdata( "muggerData", "bankLimit" );
    setdynamicdvar( "scr_mugger_bank_limit", level.mugger_bank_limit );
    level.mugger_jackpot_limit = getmatchrulesdata( "muggerData", "jackpotLimit" );
    setdynamicdvar( "scr_mugger_jackpot_limit", level.mugger_jackpot_limit );
    level.mugger_throwing_knife_mug_frac = getmatchrulesdata( "muggerData", "throwKnifeFrac" );
    setdynamicdvar( "scr_mugger_throwing_knife_mug_frac", level.mugger_throwing_knife_mug_frac );
}

onprecachegametype()
{
    precachemodel( "prop_dogtags_foe_iw6" );
    precachemodel( "weapon_us_smoke_grenade_burnt2" );
    precachempanim( "mp_dogtag_spin" );
    precacheshader( "waypoint_dogtags2" );
    precacheshader( "waypoint_dogtag_pile" );
    precacheshader( "waypoint_jackpot" );
    precacheshader( "hud_tagcount" );
    precachesound( "mugger_mugging" );
    precachesound( "mugger_mega_mugging" );
    precachesound( "mugger_you_mugged" );
    precachesound( "mugger_got_mugged" );
    precachesound( "mugger_mega_drop" );
    precachesound( "mugger_muggernaut" );
    precachesound( "mugger_tags_banked" );
    precachestring( &"MPUI_MUGGER_JACKPOT" );
}

onstartgametype()
{
    setclientnamemode( "auto_change" );
    maps\mp\_utility::setobjectivetext( "allies", &"OBJECTIVES_MUGGER" );
    maps\mp\_utility::setobjectivetext( "axis", &"OBJECTIVES_MUGGER" );

    if ( level.splitscreen )
    {
        maps\mp\_utility::setobjectivescoretext( "allies", &"OBJECTIVES_MUGGER" );
        maps\mp\_utility::setobjectivescoretext( "axis", &"OBJECTIVES_MUGGER" );
    }
    else
    {
        maps\mp\_utility::setobjectivescoretext( "allies", &"OBJECTIVES_MUGGER_SCORE" );
        maps\mp\_utility::setobjectivescoretext( "axis", &"OBJECTIVES_MUGGER_SCORE" );
    }

    maps\mp\_utility::setobjectivehinttext( "allies", &"OBJECTIVES_MUGGER_HINT" );
    maps\mp\_utility::setobjectivehinttext( "axis", &"OBJECTIVES_MUGGER_HINT" );
    level.spawnmins = ( 0, 0, 0 );
    level.spawnmaxs = ( 0, 0, 0 );
    maps\mp\gametypes\_spawnlogic::addspawnpoints( "allies", "mp_dm_spawn" );
    maps\mp\gametypes\_spawnlogic::addspawnpoints( "axis", "mp_dm_spawn" );
    level.mapcenter = maps\mp\gametypes\_spawnlogic::findboxcenter( level.spawnmins, level.spawnmaxs );
    setmapcenter( level.mapcenter );
    level.dogtags = [];
    var_0[0] = level.gametype;
    var_0[1] = "dm";
    maps\mp\gametypes\_gameobjects::main( var_0 );
    level.mugger_timelimit = getdvarint( "scr_mugger_timelimit", 7 );
    setdynamicdvar( "scr_mugger_timeLimit", level.mugger_timelimit );
    maps\mp\_utility::registertimelimitdvar( "mugger", level.mugger_timelimit );
    level.mugger_scorelimit = getdvarint( "scr_mugger_scorelimit", 2500 );

    if ( level.mugger_scorelimit == 0 )
        level.mugger_scorelimit = 2500;

    setdynamicdvar( "scr_mugger_scoreLimit", level.mugger_scorelimit );
    maps\mp\_utility::registerscorelimitdvar( "mugger", level.mugger_scorelimit );
    level.mugger_bank_limit = getdvarint( "scr_mugger_bank_limit", 10 );
    level.mugger_muggernaut_window = getdvarint( "scr_mugger_muggernaut_window", 3000 );
    level.mugger_muggernaut_muggings_needed = getdvarint( "scr_mugger_muggernaut_muggings_needed", 3 );
    level.mugger_min_spawn_dist_sq = squared( getdvarfloat( "mugger_min_spawn_dist", 350 ) );
    level.mugger_jackpot_limit = getdvarint( "scr_mugger_jackpot_limit", 0 );
    level.mugger_jackpot_wait_sec = getdvarfloat( "scr_mugger_jackpot_wait_sec", 10 );
    level.mugger_throwing_knife_mug_frac = getdvarfloat( "scr_mugger_throwing_knife_mug_frac", 1.0 );
    level mugger_init_tags();
    level thread mugger_monitor_tank_pickups();
    level thread mugger_monitor_remote_uav_pickups();
    createdropzones();
    level.jackpot_zone = spawn( "script_model", ( 0, 0, 0 ) );
    level.jackpot_zone.origin = ( 0, 0, 0 );
    level.jackpot_zone.angles = ( 90, 0, 0 );
    level.jackpot_zone setmodel( "weapon_us_smoke_grenade_burnt2" );
    level.jackpot_zone hide();
    level.jackpot_zone.mugger_fx_playing = 0;
    level thread mugger_jackpot_watch();
}

onplayerconnect()
{
    for (;;)
    {
        level waittill( "connected", var_0 );
        var_0.tags_carried = 0;
        var_0.total_tags_banked = 0;
        var_0.assists = var_0.total_tags_banked;
        var_0.pers["assists"] = var_0.total_tags_banked;
        var_0.game_extrainfo = var_0.tags_carried;
        var_0.muggings = [];

        if ( isplayer( var_0 ) && !isbot( var_0 ) )
        {
            var_0.dogtagsicon = var_0 maps\mp\gametypes\_hud_util::createicon( "hud_tagcount", 48, 48 );
            var_0.dogtagsicon maps\mp\gametypes\_hud_util::setpoint( "TOP LEFT", "TOP LEFT", 200, 0 );
            var_0.dogtagsicon.alpha = 1;
            var_0.dogtagsicon.hidewheninmenu = 1;
            var_0.dogtagsicon.archived = 1;
            level thread hidehudelementongameend( var_0.dogtagsicon );
            var_0.dogtagstext = var_0 maps\mp\gametypes\_hud_util::createfontstring( "bigfixed", 1.0 );
            var_0.dogtagstext maps\mp\gametypes\_hud_util::setparent( var_0.dogtagsicon );
            var_0.dogtagstext maps\mp\gametypes\_hud_util::setpoint( "CENTER", "CENTER", -24 );
            var_0.dogtagstext setvalue( var_0.tags_carried );
            var_0.dogtagstext.alpha = 1;
            var_0.dogtagstext.color = ( 1, 1, 0.5 );
            var_0.dogtagstext.glowalpha = 1;
            var_0.dogtagstext.sort = 1;
            var_0.dogtagstext.hidewheninmenu = 1;
            var_0.dogtagstext.archived = 1;
            var_0.dogtagstext maps\mp\gametypes\_hud::fontpulseinit( 3.0 );
            level thread hidehudelementongameend( var_0.dogtagstext );
        }
    }
}

onspawnplayer()
{
    self.muggings = [];

    if ( !isagent( self ) )
        thread waitreplaysmokefxfornewplayer();
}

hidehudelementongameend( var_0 )
{
    level waittill( "game_ended" );

    if ( isdefined( var_0 ) )
        var_0.alpha = 0;
}

getspawnpoint()
{
    var_0 = maps\mp\gametypes\_spawnlogic::getteamspawnpoints( self.pers["team"] );
    var_1 = maps\mp\gametypes\_spawnscoring::getspawnpoint_freeforall( var_0 );
    return var_1;
    return var_1;
}

onxpevent( var_0 )
{
    if ( isdefined( var_0 ) && var_0 == "suicide" )
        level thread spawndogtags( self, self );

    maps\mp\gametypes\_globallogic::onxpevent( var_0 );
}

onnormaldeath( var_0, var_1, var_2 )
{
    level thread spawndogtags( var_0, var_1 );

    if ( game["state"] == "postgame" && game["teamScores"][var_1.team] > game["teamScores"][level.otherteam[var_1.team]] )
        var_1.finalkill = 1;
}

mugger_init_tags()
{
    level.mugger_max_extra_tags = getdvarint( "scr_mugger_max_extra_tags", 50 );
    level.mugger_extra_tags = [];
}

spawndogtags( var_0, var_1 )
{
    if ( isagent( var_1 ) )
        var_1 = var_1.owner;

    var_2 = 0;
    var_3 = 0;

    if ( isdefined( var_1 ) )
    {
        if ( var_0 == var_1 )
        {
            if ( var_0.tags_carried > 0 )
            {
                var_2 = var_0.tags_carried;
                var_0.tags_carried = 0;
                var_0.game_extrainfo = 0;

                if ( isplayer( var_0 ) && !isbot( var_0 ) )
                {
                    var_0.dogtagstext setvalue( var_0.tags_carried );
                    var_0.dogtagstext thread maps\mp\gametypes\_hud::fontpulse( var_0 );
                    var_0 thread maps\mp\gametypes\_hud_message::splashnotifyurgent( "mugger_suicide", var_2 );
                }
            }
        }
        else if ( isdefined( var_0.attackerdata ) && var_0.attackerdata.size > 0 )
        {
            if ( isplayer( var_1 ) && isdefined( var_0.attackerdata ) && isdefined( var_1.guid ) && isdefined( var_0.attackerdata[var_1.guid] ) )
            {
                var_4 = var_0.attackerdata[var_1.guid];

                if ( isdefined( var_4 ) && isdefined( var_4.attackerent ) && var_4.attackerent == var_1 )
                {
                    if ( isdefined( var_4.smeansofdeath ) && ( var_4.smeansofdeath == "MOD_MELEE" || ( var_4.weapon == "throwingknife_mp" || var_4.weapon == "throwingknifejugg_mp" ) && level.mugger_throwing_knife_mug_frac > 0.0 ) )
                    {
                        var_3 = 1;

                        if ( var_0.tags_carried > 0 )
                        {
                            var_2 = var_0.tags_carried;

                            if ( ( var_4.weapon == "throwingknife_mp" || var_4.weapon == "throwingknifejugg_mp" ) && level.mugger_throwing_knife_mug_frac < 1.0 )
                                var_2 = int( ceil( var_0.tags_carried * level.mugger_throwing_knife_mug_frac ) );

                            var_0.tags_carried = var_0.tags_carried - var_2;
                            var_0.game_extrainfo = var_0.tags_carried;

                            if ( isplayer( var_0 ) && !isbot( var_0 ) )
                            {
                                var_0.dogtagstext setvalue( var_0.tags_carried );
                                var_0.dogtagstext thread maps\mp\gametypes\_hud::fontpulse( var_0 );
                                var_0 thread maps\mp\gametypes\_hud_message::splashnotifyurgent( "callout_mugged", var_2 );
                                var_0 playlocalsound( "mugger_got_mugged" );
                            }

                            playsoundatpos( var_0.origin, "mugger_mugging" );
                            var_1 thread maps\mp\gametypes\_hud_message::splashnotifyurgent( "callout_mugger", var_2 );

                            if ( var_4.weapon == "throwingknife_mp" || var_4.weapon == "throwingknifejugg_mp" )
                                var_1 playlocalsound( "mugger_you_mugged" );
                        }

                        var_1.muggings[var_1.muggings.size] = gettime();
                        var_1 thread mugger_check_muggernaut();
                    }
                }
            }
        }
    }

    if ( isagent( var_0 ) )
    {
        var_5 = var_0.origin + ( 0, 0, 14 );
        playsoundatpos( var_5, "mp_killconfirm_tags_drop" );
        level notify( "mugger_jackpot_increment" );
        var_6 = mugger_tag_temp_spawn( var_0.origin, 40, 160 );
        var_6.victim = var_0.owner;

        if ( isdefined( var_1 ) && var_0 != var_1 )
            var_6.attacker = var_1;
        else
            var_6.attacker = undefined;

        return;
    }
    else if ( isdefined( level.dogtags[var_0.guid] ) )
    {
        playfx( level.mugger_fx["vanish"], level.dogtags[var_0.guid].curorigin );
        level.dogtags[var_0.guid] notify( "reset" );
    }
    else
    {
        var_7[0] = spawn( "script_model", ( 0, 0, 0 ) );
        var_7[0] setmodel( "prop_dogtags_foe_iw6" );
        var_8 = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 32, 32 );
        var_8.targetname = "trigger_dogtag";
        var_8 hide();
        level.dogtags[var_0.guid] = maps\mp\gametypes\_gameobjects::createuseobject( "any", var_8, var_7, ( 0, 0, 16 ) );
        maps\mp\gametypes\_objpoints::deleteobjpoint( level.dogtags[var_0.guid].objpoints["allies"] );
        maps\mp\gametypes\_objpoints::deleteobjpoint( level.dogtags[var_0.guid].objpoints["axis"] );
        level.dogtags[var_0.guid] maps\mp\gametypes\_gameobjects::setusetime( 0 );
        level.dogtags[var_0.guid].onuse = ::onuse;
        var_8.dogtag = level.dogtags[var_0.guid];
        level.dogtags[var_0.guid].victim = var_0;
        level.dogtags[var_0.guid].objid = maps\mp\gametypes\_gameobjects::getnextobjid();
        objective_add( level.dogtags[var_0.guid].objid, "invisible", ( 0, 0, 0 ) );
        objective_icon( level.dogtags[var_0.guid].objid, "waypoint_dogtags2" );
        level.dogtags[var_0.guid].visuals[0] scriptmodelplayanim( "mp_dogtag_spin" );
        level thread clearonvictimdisconnect( var_0 );
    }

    var_5 = var_0.origin + ( 0, 0, 14 );
    level.dogtags[var_0.guid].curorigin = var_5;
    level.dogtags[var_0.guid].trigger.origin = var_5;
    level.dogtags[var_0.guid].visuals[0].origin = var_5;
    level.dogtags[var_0.guid] maps\mp\gametypes\_gameobjects::initializetagpathvariables();
    level.dogtags[var_0.guid] maps\mp\gametypes\_gameobjects::allowuse( "any" );
    level.dogtags[var_0.guid].visuals[0] show();

    if ( isdefined( var_1 ) && var_0 != var_1 )
        level.dogtags[var_0.guid].attacker = var_1;
    else
        level.dogtags[var_0.guid].attacker = undefined;

    level.dogtags[var_0.guid] thread timeout();

    if ( var_2 < 5 )
    {
        objective_position( level.dogtags[var_0.guid].objid, var_5 );
        objective_state( level.dogtags[var_0.guid].objid, "active" );
    }
    else
        mugger_tag_pile_notify( var_5, "mugger_megadrop", var_2, var_0, var_1 );

    playsoundatpos( var_5, "mp_killconfirm_tags_drop" );
    level.dogtags[var_0.guid].temp_tag = 0;

    if ( var_2 == 0 )
        level notify( "mugger_jackpot_increment" );

    for ( var_9 = 0; var_9 < var_2; var_9++ )
    {
        var_6 = mugger_tag_temp_spawn( var_0.origin, 40, 160 );
        var_6.victim = var_0;

        if ( isdefined( var_1 ) && var_0 != var_1 )
        {
            var_6.attacker = var_1;
            continue;
        }

        var_6.attacker = undefined;
    }
}

mugger_tag_pickup_wait()
{
    level endon( "game_ended" );
    self endon( "reset" );
    self endon( "reused" );
    self endon( "deleted" );

    for (;;)
    {
        self.trigger waittill( "trigger", var_0 );

        if ( !maps\mp\_utility::isreallyalive( var_0 ) )
            continue;

        if ( var_0 maps\mp\_utility::isusingremote() || isdefined( var_0.spawningafterremotedeath ) )
            continue;

        if ( isdefined( var_0.classname ) && var_0.classname == "script_vehicle" )
            continue;

        thread onuse( var_0 );
        return;
    }
}

mugger_add_extra_tag( var_0 )
{
    var_1[0] = spawn( "script_model", ( 0, 0, 0 ) );
    var_1[0] setmodel( "prop_dogtags_foe_iw6" );
    var_2 = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 32, 32 );
    var_2.targetname = "trigger_dogtag";
    var_2 hide();
    level.mugger_extra_tags[var_0] = spawnstruct();
    var_3 = level.mugger_extra_tags[var_0];
    var_3.type = "useObject";
    var_3.curorigin = var_2.origin;
    var_3.entnum = var_2 getentitynumber();
    var_3.trigger = var_2;
    var_3.triggertype = "proximity";
    var_3 maps\mp\gametypes\_gameobjects::allowuse( "any" );
    var_1[0].baseorigin = var_1[0].origin;
    var_3.visuals = var_1;
    var_3.offset3d = ( 0, 0, 16 );
    var_3.temp_tag = 1;
    var_3.last_used_time = 0;
    var_3.visuals[0] scriptmodelplayanim( "mp_dogtag_spin" );
    var_3 thread mugger_tag_pickup_wait();
    return var_3;
}

mugger_first_unused_or_oldest_extra_tag()
{
    var_0 = undefined;
    var_1 = -1;

    foreach ( var_3 in level.mugger_extra_tags )
    {
        if ( var_3.interactteam == "none" )
        {
            var_3.last_used_time = gettime();
            var_3.visuals[0] show();
            return var_3;
        }

        if ( !isdefined( var_0 ) || var_3.last_used_time < var_1 )
        {
            var_1 = var_3.last_used_time;
            var_0 = var_3;
        }
    }

    if ( level.mugger_extra_tags.size < level.mugger_max_extra_tags )
    {
        var_5 = mugger_add_extra_tag( level.mugger_extra_tags.size );

        if ( isdefined( var_5 ) )
        {
            var_5.last_used_time = gettime();
            return var_5;
        }
    }

    var_0.last_used_time = gettime();
    var_0 notify( "reused" );
    playfx( level.mugger_fx["vanish"], var_0.curorigin );
    return var_0;
}

mugger_tag_temp_spawn( var_0, var_1, var_2 )
{
    var_3 = mugger_first_unused_or_oldest_extra_tag();
    var_4 = var_0 + ( 0, 0, 14 );
    var_5 = ( 0, randomfloat( 360 ), 0 );
    var_6 = anglestoforward( var_5 );
    var_7 = randomfloatrange( 40, 160 );
    var_8 = var_4 + var_7 * var_6;
    var_8 = var_8 + ( 0, 0, 40 );
    var_9 = playerphysicstrace( var_4, var_8 );
    var_4 = var_9;
    var_8 = var_4 + ( 0, 0, -100 );
    var_9 = playerphysicstrace( var_4, var_8 );

    if ( var_9[2] != var_8[2] )
        var_9 = var_9 + ( 0, 0, 14 );

    var_3.curorigin = var_9;
    var_3.trigger.origin = var_9;
    var_3.visuals[0].origin = var_9;
    var_3 maps\mp\gametypes\_gameobjects::initializetagpathvariables();
    var_3 maps\mp\gametypes\_gameobjects::allowuse( "any" );
    var_3 thread mugger_tag_pickup_wait();
    var_3 thread timeout();
    return var_3;
}

mugger_tag_pile_notify( var_0, var_1, var_2, var_3, var_4 )
{
    level notify( "mugger_tag_pile", var_0 );
    var_5 = maps\mp\gametypes\_gameobjects::getnextobjid();
    objective_add( var_5, "active", var_0 );
    objective_icon( var_5, "waypoint_dogtag_pile" );
    level maps\mp\_utility::delaythread( 5, ::mugger_pile_icon_remove, var_5 );

    if ( var_2 >= 10 )
    {
        level.mugger_last_mega_drop = gettime();
        level.mugger_jackpot_num_tags = 0;

        foreach ( var_7 in level.players )
        {
            var_7 playsoundtoplayer( "mp_defcon_one", var_7 );

            if ( isdefined( var_3 ) && var_7 == var_3 )
                continue;

            if ( isdefined( var_4 ) && var_7 == var_4 )
                continue;

            var_7 thread maps\mp\gametypes\_hud_message::splashnotify( var_1, var_2 );
        }

        var_9 = newhudelem();
        var_9 setshader( "waypoint_dogtag_pile", 10, 10 );
        var_9 setwaypoint( 0, 1, 0, 0 );
        var_9.x = var_0[0];
        var_9.y = var_0[1];
        var_9.z = var_0[2] + 32;
        var_9.alpha = 1;
        var_9 fadeovertime( 5 );
        var_9.alpha = 0;
        var_9 maps\mp\_utility::delaythread( 5, ::hudelemdestroy );
    }
}

hudelemdestroy()
{
    if ( isdefined( self ) )
        self destroy();
}

mugger_monitor_tank_pickups()
{
    level endon( "game_ended" );

    for (;;)
    {
        var_0 = getentarray( "remote_tank", "targetname" );
        var_1 = getentarray( "trigger_dogtag", "targetname" );

        foreach ( var_3 in level.players )
        {
            if ( isdefined( var_3.using_remote_tank ) && var_3.using_remote_tank == 1 )
            {
                foreach ( var_5 in var_0 )
                {
                    if ( isdefined( var_5 ) && isdefined( var_5.owner ) && var_5.owner == var_3 )
                    {
                        foreach ( var_7 in var_1 )
                        {
                            if ( isdefined( var_7 ) && isdefined( var_7.dogtag ) )
                            {
                                if ( isdefined( var_7.dogtag.interactteam ) && var_7.dogtag.interactteam != "none" )
                                {
                                    if ( var_5 istouching( var_7 ) )
                                        var_7.dogtag onuse( var_5.owner );
                                }
                            }
                        }
                    }
                }
            }
        }

        wait 0.2;
    }
}

mugger_monitor_remote_uav_pickups()
{
    level endon( "game_ended" );

    for (;;)
    {
        var_0 = getentarray( "trigger_dogtag", "targetname" );

        foreach ( var_2 in level.players )
        {
            if ( isdefined( var_2 ) && isdefined( var_2.remoteuav ) )
            {
                foreach ( var_4 in var_0 )
                {
                    if ( isdefined( var_4 ) && isdefined( var_4.dogtag ) )
                    {
                        if ( isdefined( var_4.dogtag.interactteam ) && var_4.dogtag.interactteam != "none" )
                        {
                            if ( var_2.remoteuav istouching( var_4 ) )
                                var_4.dogtag onuse( var_2 );
                        }
                    }
                }
            }
        }

        wait 0.2;
    }
}

mugger_check_muggernaut()
{
    level endon( "game_ended" );
    self endon( "disconnect" );
    self notify( "checking_muggernaut" );
    self endon( "checking_muggernaut" );
    wait 2;

    if ( self.muggings.size < level.mugger_muggernaut_muggings_needed )
        return;

    var_0 = self.muggings[self.muggings.size - 1];
    var_1 = var_0 - level.mugger_muggernaut_window;
    var_2 = [];

    foreach ( var_4 in self.muggings )
    {
        if ( var_4 >= var_1 )
            var_2[var_2.size] = var_4;
    }

    if ( var_2.size >= level.mugger_muggernaut_muggings_needed )
    {
        thread maps\mp\gametypes\_hud_message::splashnotifyurgent( "muggernaut", self.tags_carried );
        thread maps\mp\gametypes\_rank::giverankxp( "muggernaut" );
        mugger_bank_tags( 1, 1 );
        self.muggings = [];
    }
    else
        self.muggings = var_2;
}

mugger_pile_icon_remove( var_0 )
{
    objective_delete( var_0 );
}

hidefromplayer( var_0 )
{
    self hide();

    foreach ( var_2 in level.players )
    {
        if ( var_2 != var_0 )
            self showtoplayer( var_2 );
    }
}

onuse( var_0 )
{
    if ( isdefined( var_0.owner ) )
        var_0 = var_0.owner;

    if ( self.temp_tag )
        self.trigger playsound( "mp_killconfirm_tags_deny" );
    else if ( isdefined( self.attacker ) && var_0 == self.attacker )
    {
        self.trigger playsound( "mp_killconfirm_tags_pickup" );
        var_0 maps\mp\_utility::incplayerstat( "killsconfirmed", 1 );
        var_0 maps\mp\_utility::incpersstat( "confirmed", 1 );
        var_0 maps\mp\gametypes\_persistence::statsetchild( "round", "confirmed", var_0.pers["confirmed"] );
    }
    else
    {
        self.trigger playsound( "mp_killconfirm_tags_deny" );
        var_0 maps\mp\_utility::incplayerstat( "killsdenied", 1 );
        var_0 maps\mp\_utility::incpersstat( "denied", 1 );
        var_0 maps\mp\gametypes\_persistence::statsetchild( "round", "denied", var_0.pers["denied"] );
    }

    var_0 thread onpickup();
    resettags( 1 );
}

onpickup()
{
    level endon( "game_ended" );
    self endon( "disconnect" );

    while ( !isdefined( self.pers ) )
        wait 0.05;

    thread mugger_delayed_banking();
}

mugger_delayed_banking()
{
    self notify( "banking" );
    self endon( "banking" );
    level endon( "banking_all" );
    self.tags_carried++;
    self.game_extrainfo = self.tags_carried;

    if ( isplayer( self ) && !isbot( self ) )
    {
        self.dogtagstext setvalue( self.tags_carried );
        self.dogtagstext thread maps\mp\gametypes\_hud::fontpulse( self );
    }

    wait 1.5;
    var_0 = level.mugger_bank_limit - self.tags_carried;

    if ( var_0 > 0 && var_0 <= 5 )
    {
        var_1 = undefined;

        switch ( var_0 )
        {
            case 1:
                var_1 = "mugger_1more";
                break;
            case 2:
                var_1 = "mugger_2more";
                break;
            case 3:
                var_1 = "mugger_3more";
                break;
            case 4:
                var_1 = "mugger_4more";
                break;
            case 5:
                var_1 = "mugger_5more";
                break;
        }

        if ( isdefined( var_1 ) )
            self playsoundtoplayer( var_1, self );
    }

    wait 0.5;
    mugger_bank_tags( 0 );
}

mugger_bank_tags( var_0, var_1 )
{
    var_2 = 0;

    if ( var_0 == 1 )
        var_2 = self.tags_carried;
    else
    {
        var_3 = self.tags_carried % level.mugger_bank_limit;
        var_2 = self.tags_carried - var_3;
    }

    if ( var_2 > 0 )
    {
        self.tags_to_bank = var_2;

        if ( !isdefined( var_1 ) )
            thread maps\mp\gametypes\_hud_message::splashnotifyurgent( "callout_tags_banked", var_2 );

        thread maps\mp\gametypes\_rank::giverankxp( "tags_banked", self.tags_to_bank * maps\mp\gametypes\_rank::getscoreinfovalue( "kill_confirmed" ) );
        level thread maps\mp\gametypes\_gamescore::giveplayerscore( "tags_banked", self, undefined, 1 );
        self.total_tags_banked = self.total_tags_banked + var_2;
        self.tags_carried = self.tags_carried - var_2;
        self.game_extrainfo = self.tags_carried;

        if ( isplayer( self ) && !isbot( self ) )
        {
            self.dogtagstext setvalue( self.tags_carried );
            self.dogtagstext thread maps\mp\gametypes\_hud::fontpulse( self );
        }

        self.assists = self.total_tags_banked;
        self.pers["assists"] = self.total_tags_banked;
        self updatescores();
    }
}

onplayerscore( var_0, var_1, var_2 )
{
    if ( var_0 == "tags_banked" && isdefined( var_1 ) && isdefined( var_1.tags_to_bank ) && var_1.tags_to_bank > 0 )
    {
        var_3 = var_1.tags_to_bank * maps\mp\gametypes\_rank::getscoreinfovalue( "kill_confirmed" );
        var_1.tags_to_bank = 0;
        return var_3;
    }

    return 0;
}

resettags( var_0 )
{
    if ( !var_0 )
        level notify( "mugger_jackpot_increment" );

    self.attacker = undefined;
    self notify( "reset" );
    self.visuals[0] hide();
    self.curorigin = ( 0, 0, 1000 );
    self.trigger.origin = ( 0, 0, 1000 );
    self.visuals[0].origin = ( 0, 0, 1000 );
    maps\mp\gametypes\_gameobjects::allowuse( "none" );

    if ( isdefined( self.jackpot_tag ) && self.jackpot_tag == 1 )
        level.mugger_jackpot_tags_spawned--;

    if ( !self.temp_tag )
        objective_state( self.objid, "invisible" );
}

timeout()
{
    level endon( "game_ended" );
    self endon( "death" );
    self endon( "deleted" );
    self endon( "reset" );
    self endon( "reused" );
    self notify( "timeout_start" );
    self endon( "timeout_start" );
    level maps\mp\gametypes\_hostmigration::waitlongdurationwithhostmigrationpause( 27.0 );

    for ( var_0 = 3.0; var_0 > 0.0; var_0 = var_0 - 0.5 )
    {
        self.visuals[0] hide();
        wait 0.25;
        self.visuals[0] show();
        wait 0.25;
    }

    playfx( level.mugger_fx["vanish"], self.curorigin );
    thread resettags( 0 );
}

clearonvictimdisconnect( var_0 )
{
    level endon( "game_ended" );
    var_1 = var_0.guid;
    var_0 waittill( "disconnect" );

    if ( isdefined( level.dogtags[var_1] ) )
    {
        level.dogtags[var_1] maps\mp\gametypes\_gameobjects::allowuse( "none" );
        playfx( level.mugger_fx["vanish"], level.dogtags[var_1].curorigin );
        level.dogtags[var_1] notify( "reset" );
        wait 0.05;

        if ( isdefined( level.dogtags[var_1] ) )
        {
            objective_delete( level.dogtags[var_1].objid );
            level.dogtags[var_1].trigger delete();

            for ( var_2 = 0; var_2 < level.dogtags[var_1].visuals.size; var_2++ )
                level.dogtags[var_1].visuals[var_2] delete();

            level.dogtags[var_1] notify( "deleted" );
            level.dogtags[var_1] = undefined;
        }
    }
}

ontimelimit()
{
    level notify( "banking_all" );

    foreach ( var_1 in level.players )
        var_1 mugger_bank_tags( 1 );

    wait 0.1;
    maps\mp\gametypes\_gamelogic::default_ontimelimit();
}

mugger_jackpot_watch()
{
    level endon( "game_ended" );
    level endon( "jackpot_stop" );

    if ( level.mugger_jackpot_limit <= 0 )
        return;

    level.mugger_jackpot_num_tags = 0;
    level.mugger_jackpot_tags_unspawned = 0;
    level.mugger_jackpot_num_tags = 0;
    level thread mugger_jackpot_timer();

    for (;;)
    {
        level waittill( "mugger_jackpot_increment" );
        var_0 = 1;

        if ( var_0 )
        {
            level.mugger_jackpot_num_tags++;
            var_1 = clamp( float( level.mugger_jackpot_num_tags / level.mugger_jackpot_limit ), 0.0, 1.0 );

            if ( level.mugger_jackpot_num_tags >= level.mugger_jackpot_limit )
            {
                if ( isdefined( level.mugger_jackpot_text ) )
                    level.mugger_jackpot_text thread maps\mp\gametypes\_hud::fontpulse( level.players[0] );

                level.mugger_jackpot_num_tags = 15 + randomintrange( 0, 3 ) * 5;
                level thread mugger_jackpot_drop();
                break;
            }
        }
    }
}

mugger_jackpot_timer()
{
    level endon( "game_ended" );
    level endon( "jackpot_stop" );
    maps\mp\_utility::gameflagwait( "prematch_done" );

    for (;;)
    {
        wait( level.mugger_jackpot_wait_sec );
        level notify( "mugger_jackpot_increment" );
    }
}

mugger_jackpot_drop()
{
    level endon( "game_ended" );
    level notify( "reset_airdrop" );
    level endon( "reset_airdrop" );
    var_0 = level.mugger_dropzones[level.script][randomint( level.mugger_dropzones[level.script].size )];
    var_0 = var_0 + ( randomintrange( -50, 50 ), randomintrange( -50, 50 ), 0 );

    for (;;)
    {
        var_1 = level.players[0];
        var_2 = 1;

        if ( isdefined( var_1 ) && maps\mp\_utility::currentactivevehiclecount() < maps\mp\_utility::maxvehiclesallowed() && level.fauxvehiclecount + var_2 < maps\mp\_utility::maxvehiclesallowed() && level.numdropcrates < 8 )
        {
            foreach ( var_4 in level.players )
                var_4 thread maps\mp\gametypes\_hud_message::splashnotify( "mugger_jackpot_incoming" );

            maps\mp\_utility::incrementfauxvehiclecount();
            level thread maps\mp\killstreaks\_airdrop::doflyby( var_1, var_0, randomfloat( 360 ), "airdrop_mugger", 0, "airdrop_jackpot" );
            break;
        }
        else
        {
            wait 0.5;
            continue;
        }
    }

    level.mugger_jackpot_tags_unspawned = level.mugger_jackpot_num_tags;
    level thread mugger_jackpot_run( var_0 );
}

mugger_jackpot_pile_notify( var_0, var_1, var_2 )
{
    if ( !isdefined( level.jackpotpileobjid ) )
    {
        level.jackpotpileobjid = maps\mp\gametypes\_gameobjects::getnextobjid();
        objective_add( level.jackpotpileobjid, "active", var_0 );
        objective_icon( level.jackpotpileobjid, "waypoint_jackpot" );
    }
    else
        objective_position( level.jackpotpileobjid, var_0 );

    if ( var_2 >= 10 )
    {
        foreach ( var_4 in level.players )
            var_4 playlocalsound( game["music"]["victory_" + var_4.pers["team"]] );

        if ( !isdefined( level.jackpotpileicon ) )
        {
            level.jackpotpileicon = newhudelem();
            level.jackpotpileicon setshader( "waypoint_jackpot", 64, 64 );
            level.jackpotpileicon setwaypoint( 0, 1, 0, 0 );
        }

        level.jackpotpileicon.x = var_0[0];
        level.jackpotpileicon.y = var_0[1];
        level.jackpotpileicon.z = var_0[2] + 12;
        level.jackpotpileicon.alpha = 0.75;
    }
}

mugger_jackpot_pile_notify_cleanup()
{
    objective_state( level.jackpotpileobjid, "invisible" );
    level.jackpotpileicon fadeovertime( 2 );
    level.jackpotpileicon.alpha = 0;
    level.jackpotpileicon maps\mp\_utility::delaythread( 2, ::hudelemdestroy );
}

mugger_jackpot_fx( var_0 )
{
    mugger_jackpot_fx_cleanup();
    var_1 = var_0 + ( 0, 0, 30 );
    var_2 = var_0 + ( 0, 0, -1000 );
    var_3 = bullettrace( var_1, var_2, 0, undefined );
    level.jackpot_zone.origin = var_3["position"] + ( 0, 0, 1 );
    level.jackpot_zone show();
    var_4 = vectortoangles( var_3["normal"] );
    var_5 = anglestoforward( var_4 );
    var_6 = anglestoright( var_4 );
    thread spawnfxdelay( var_3["position"], var_5, var_6, 0.5 );
    wait 0.1;
    playfxontag( level.mugger_fx["smoke"], level.jackpot_zone, "tag_fx" );

    foreach ( var_8 in level.players )
        var_8.mugger_fx_playing = 1;

    level.jackpot_zone.mugger_fx_playing = 1;
}

mugger_jackpot_fx_cleanup()
{
    stopfxontag( level.mugger_fx["smoke"], level.jackpot_zone, "tag_fx" );
    level.jackpot_zone hide();

    if ( isdefined( level.jackpot_targetfx ) )
        level.jackpot_targetfx delete();

    if ( level.jackpot_zone.mugger_fx_playing )
    {
        level.jackpot_zone.mugger_fx_playing = 0;
        stopfxontag( level.mugger_fx["smoke"], level.jackpot_zone, "tag_fx" );
        wait 0.05;
    }
}

spawnfxdelay( var_0, var_1, var_2, var_3 )
{
    if ( isdefined( level.jackpot_targetfx ) )
        level.jackpot_targetfx delete();

    wait( var_3 );
    level.jackpot_targetfx = spawnfx( level.mugger_targetfxid, var_0, var_1, var_2 );
    triggerfx( level.jackpot_targetfx );
}

waitreplaysmokefxfornewplayer()
{
    level endon( "game_ended" );
    self endon( "disconnect" );
    maps\mp\_utility::gameflagwait( "prematch_done" );
    wait 0.5;

    if ( level.jackpot_zone.mugger_fx_playing == 1 && !isdefined( self.mugger_fx_playing ) )
    {
        playfxontagforclients( level.mugger_fx["smoke"], level.jackpot_zone, "tag_fx", self );
        self.mugger_fx_playing = 1;
    }
}

mugger_jackpot_run( var_0 )
{
    level endon( "game_ended" );
    level endon( "jackpot_timeout" );
    level notify( "jackpot_stop" );
    mugger_jackpot_pile_notify( var_0, "mugger_jackpot", level.mugger_jackpot_tags_unspawned );
    level thread mugger_jackpot_fx( var_0 );
    level thread mugger_jackpot_abort_after_time( 30 );
    level waittill( "airdrop_jackpot_landed", var_0 );
    objective_position( level.jackpotpileobjid, var_0 );
    level.jackpotpileicon.x = var_0[0];
    level.jackpotpileicon.y = var_0[1];
    level.jackpotpileicon.z = var_0[2] + 32;

    foreach ( var_2 in level.players )
    {
        var_2 playsoundtoplayer( "mp_defcon_one", var_2 );
        var_2 thread maps\mp\gametypes\_hud_message::splashnotify( "mugger_jackpot", level.mugger_jackpot_tags_unspawned );
    }

    level.mugger_jackpot_tags_spawned = 0;

    while ( level.mugger_jackpot_tags_unspawned > 0 )
    {
        if ( level.mugger_jackpot_tags_spawned < 10 )
        {
            level.mugger_jackpot_tags_unspawned--;
            var_4 = mugger_tag_temp_spawn( var_0, 0, 400 );
            var_4.jackpot_tag = 1;
            level.mugger_jackpot_tags_spawned++;
            level thread mugger_jackpot_abort_after_time( 90 );
            wait 0.1;
            continue;
        }

        wait 0.5;
    }

    level.mugger_jackpot_num_tags = 0;

    while ( level.mugger_jackpot_tags_spawned > 0 )
        wait 1;

    mugger_jackpot_cleanup();
}

mugger_jackpot_cleanup()
{
    level notify( "jackpot_cleanup" );
    mugger_jackpot_pile_notify_cleanup();
    mugger_jackpot_fx_cleanup();
    level thread mugger_jackpot_watch();
}

mugger_jackpot_abort_after_time( var_0 )
{
    level endon( "jackpot_cleanup" );
    level notify( "jackpot_abort_after_time" );
    level endon( "jackpot_abort_after_time" );
    wait( var_0 );
    level notify( "jackpot_timeout" );
}

createmuggercrates( var_0, var_1 )
{
    maps\mp\killstreaks\_airdrop::addcratetype( "airdrop_mugger", "airdrop_jackpot", 1, ::muggercratethink );
}

muggercratethink( var_0 )
{
    self endon( "death" );
    level notify( "airdrop_jackpot_landed", self.origin );
    wait 0.5;
    maps\mp\killstreaks\_airdrop::deletecrate();
}

createdropzones()
{
    level.mugger_dropzones = [];
    var_0 = common_scripts\utility::getstructarray( "horde_drop", "targetname" );

    if ( isdefined( var_0 ) && var_0.size )
    {
        var_1 = 0;

        foreach ( var_3 in var_0 )
        {
            level.mugger_dropzones[level.script][var_1] = var_3.origin;
            var_1++;
        }
    }
    else
    {
        level.mugger_dropzones["mp_seatown"][0] = ( -665, -209, 226 );
        level.mugger_dropzones["mp_seatown"][1] = ( -2225, 1573, 260 );
        level.mugger_dropzones["mp_seatown"][2] = ( 1275, -747, 292 );
        level.mugger_dropzones["mp_seatown"][3] = ( 1210, 963, 225 );
        level.mugger_dropzones["mp_seatown"][4] = ( -2343, -811, 226 );
        level.mugger_dropzones["mp_seatown"][5] = ( -1125, -1610, 184 );
        level.mugger_dropzones["mp_dome"][0] = ( 649, 1096, -250 );
        level.mugger_dropzones["mp_dome"][1] = ( 953, -501, -328 );
        level.mugger_dropzones["mp_dome"][2] = ( -37, 2099, -231 );
        level.mugger_dropzones["mp_dome"][3] = ( -716, 1100, -296 );
        level.mugger_dropzones["mp_dome"][4] = ( -683, -51, -352 );
        level.mugger_dropzones["mp_plaza2"][0] = ( 266, -212, 708 );
        level.mugger_dropzones["mp_plaza2"][1] = ( 295, 1842, 668 );
        level.mugger_dropzones["mp_plaza2"][2] = ( -1449, 1833, 692 );
        level.mugger_dropzones["mp_plaza2"][3] = ( 835, -1815, 668 );
        level.mugger_dropzones["mp_plaza2"][4] = ( -1116, 76, 729 );
        level.mugger_dropzones["mp_plaza2"][5] = ( -399, 951, 676 );
        level.mugger_dropzones["mp_mogadishu"][0] = ( 552, 1315, 8 );
        level.mugger_dropzones["mp_mogadishu"][1] = ( 990, 3248, 144 );
        level.mugger_dropzones["mp_mogadishu"][2] = ( -879, 2643, 135 );
        level.mugger_dropzones["mp_mogadishu"][3] = ( -68, -995, 16 );
        level.mugger_dropzones["mp_mogadishu"][4] = ( 1499, -1206, 15 );
        level.mugger_dropzones["mp_mogadishu"][5] = ( 2387, 1786, 61 );
        level.mugger_dropzones["mp_paris"][0] = ( -150, -80, 63 );
        level.mugger_dropzones["mp_paris"][1] = ( -947, -1088, 107 );
        level.mugger_dropzones["mp_paris"][2] = ( 1052, -614, 50 );
        level.mugger_dropzones["mp_paris"][3] = ( 1886, 648, 24 );
        level.mugger_dropzones["mp_paris"][4] = ( 628, 2096, 30 );
        level.mugger_dropzones["mp_paris"][5] = ( -2033, 1082, 308 );
        level.mugger_dropzones["mp_paris"][6] = ( -1230, 1836, 295 );
        level.mugger_dropzones["mp_exchange"][0] = ( 904, 441, -77 );
        level.mugger_dropzones["mp_exchange"][1] = ( -1056, 1435, 141 );
        level.mugger_dropzones["mp_exchange"][2] = ( 800, 1543, 148 );
        level.mugger_dropzones["mp_exchange"][3] = ( 2423, 1368, 141 );
        level.mugger_dropzones["mp_exchange"][4] = ( 596, -1870, 89 );
        level.mugger_dropzones["mp_exchange"][5] = ( -1241, -821, 30 );
        level.mugger_dropzones["mp_bootleg"][0] = ( -444, -114, -8 );
        level.mugger_dropzones["mp_bootleg"][1] = ( 1053, -1051, -13 );
        level.mugger_dropzones["mp_bootleg"][2] = ( 889, 1184, -28 );
        level.mugger_dropzones["mp_bootleg"][3] = ( -994, 1877, -41 );
        level.mugger_dropzones["mp_bootleg"][4] = ( -1707, -1333, 63 );
        level.mugger_dropzones["mp_bootleg"][5] = ( -334, -2155, 61 );
        level.mugger_dropzones["mp_carbon"][0] = ( -1791, -3892, 3813 );
        level.mugger_dropzones["mp_carbon"][1] = ( -338, -4978, 3964 );
        level.mugger_dropzones["mp_carbon"][2] = ( -82, -2941, 3990 );
        level.mugger_dropzones["mp_carbon"][3] = ( -3198, -2829, 3809 );
        level.mugger_dropzones["mp_carbon"][4] = ( -3673, -3893, 3610 );
        level.mugger_dropzones["mp_carbon"][5] = ( -2986, -4863, 3648 );
        level.mugger_dropzones["mp_hardhat"][0] = ( 1187, -322, 238 );
        level.mugger_dropzones["mp_hardhat"][1] = ( 2010, -1379, 357 );
        level.mugger_dropzones["mp_hardhat"][2] = ( 1615, 1245, 366 );
        level.mugger_dropzones["mp_hardhat"][3] = ( -371, 825, 436 );
        level.mugger_dropzones["mp_hardhat"][4] = ( -820, -927, 348 );
        level.mugger_dropzones["mp_alpha"][0] = ( -239, 1315, 52 );
        level.mugger_dropzones["mp_alpha"][1] = ( -1678, -219, 55 );
        level.mugger_dropzones["mp_alpha"][2] = ( 235, -369, 60 );
        level.mugger_dropzones["mp_alpha"][3] = ( -201, 2138, 60 );
        level.mugger_dropzones["mp_alpha"][4] = ( -1903, 2433, 198 );
        level.mugger_dropzones["mp_village"][0] = ( 990, -821, 331 );
        level.mugger_dropzones["mp_village"][1] = ( 658, 2155, 337 );
        level.mugger_dropzones["mp_village"][2] = ( -559, 1882, 310 );
        level.mugger_dropzones["mp_village"][3] = ( -1999, 1184, 343 );
        level.mugger_dropzones["mp_village"][4] = ( 215, -2875, 384 );
        level.mugger_dropzones["mp_village"][5] = ( 1731, -483, 290 );
        level.mugger_dropzones["mp_lambeth"][0] = ( 712, 217, -196 );
        level.mugger_dropzones["mp_lambeth"][1] = ( 1719, -1095, -196 );
        level.mugger_dropzones["mp_lambeth"][2] = ( 2843, 1034, -269 );
        level.mugger_dropzones["mp_lambeth"][3] = ( 1251, 2645, -213 );
        level.mugger_dropzones["mp_lambeth"][4] = ( -1114, 1301, -200 );
        level.mugger_dropzones["mp_lambeth"][5] = ( -693, -823, -132 );
        level.mugger_dropzones["mp_radar"][0] = ( -5052, 2371, 1223 );
        level.mugger_dropzones["mp_radar"][1] = ( -4550, 4199, 1268 );
        level.mugger_dropzones["mp_radar"][2] = ( -7149, 4449, 1376 );
        level.mugger_dropzones["mp_radar"][3] = ( -6350, 1528, 1302 );
        level.mugger_dropzones["mp_radar"][4] = ( -3333, 992, 1222 );
        level.mugger_dropzones["mp_radar"][5] = ( -4040, -361, 1222 );
        level.mugger_dropzones["mp_interchange"][0] = ( 662, -513, 142 );
        level.mugger_dropzones["mp_interchange"][1] = ( 674, 1724, 112 );
        level.mugger_dropzones["mp_interchange"][2] = ( -1003, 1103, 30 );
        level.mugger_dropzones["mp_interchange"][3] = ( 385, -2910, 209 );
        level.mugger_dropzones["mp_interchange"][4] = ( 2004, -1760, 144 );
        level.mugger_dropzones["mp_interchange"][5] = ( 2458, -300, 147 );
        level.mugger_dropzones["mp_underground"][0] = ( 31, 1319, -196 );
        level.mugger_dropzones["mp_underground"][1] = ( 165, -940, 60 );
        level.mugger_dropzones["mp_underground"][2] = ( -747, 143, 4 );
        level.mugger_dropzones["mp_underground"][3] = ( -1671, 1666, -216 );
        level.mugger_dropzones["mp_underground"][4] = ( -631, 3158, -68 );
        level.mugger_dropzones["mp_underground"][5] = ( 500, 2865, -89 );
        level.mugger_dropzones["mp_bravo"][0] = ( -39, -119, 1280 );
        level.mugger_dropzones["mp_bravo"][1] = ( 1861, -563, 1229 );
        level.mugger_dropzones["mp_bravo"][2] = ( -1548, -366, 1007 );
        level.mugger_dropzones["mp_bravo"][3] = ( -678, 1272, 1273 );
        level.mugger_dropzones["mp_bravo"][4] = ( 1438, 842, 1272 );
    }
}
