Template:PatchDiff/October 4, 2011 Patch/update/scripts/vscripts/transitions/sp transition list.nut

From the Portal Wiki
Jump to navigation Jump to search
N/A1DBG <- 0
N/A2FORCE_GUN_AND_HALLWAY <- 0
N/A3 
N/A4FIRST_MAP_WITH_GUN <- "sp_a1_intro4"
N/A5FIRST_MAP_WITH_UPGRADE_GUN <- "sp_a2_laser_intro"
N/A6FIRST_MAP_WITH_POTATO_GUN <- "sp_a3_speed_ramp"
N/A7LAST_PLAYTEST_MAP <- "sp_a4_finale4"
N/A8 
N/A9 
N/A10CHAPTER_TITLES <-
N/A11[
N/A12 { map = "sp_a1_intro1", title_text = "#portal2_Chapter1_Title", subtitle_text = "#portal2_Chapter1_Subtitle", displayOnSpawn = false, displaydelay = 1.0 },
N/A13 { map = "sp_a2_laser_intro", title_text = "#portal2_Chapter2_Title", subtitle_text = "#portal2_Chapter2_Subtitle", displayOnSpawn = true, displaydelay = 2.5 },
N/A14 { map = "sp_a2_sphere_peek", title_text = "#portal2_Chapter3_Title", subtitle_text = "#portal2_Chapter3_Subtitle", displayOnSpawn = true, displaydelay = 2.5 },
N/A15 { map = "sp_a2_column_blocker", title_text = "#portal2_Chapter4_Title", subtitle_text = "#portal2_Chapter4_Subtitle", displayOnSpawn = true, displaydelay = 2.5 },
N/A16 { map = "sp_a2_bts3", title_text = "#portal2_Chapter5_Title", subtitle_text = "#portal2_Chapter5_Subtitle", displayOnSpawn = true, displaydelay = 1.0 },
N/A17 { map = "sp_a3_00", title_text = "#portal2_Chapter6_Title", subtitle_text = "#portal2_Chapter6_Subtitle", displayOnSpawn = true, displaydelay = 1.5 },
N/A18 { map = "sp_a3_speed_ramp", title_text = "#portal2_Chapter7_Title", subtitle_text = "#portal2_Chapter7_Subtitle", displayOnSpawn = true, displaydelay = 1.0 },
N/A19 { map = "sp_a4_intro", title_text = "#portal2_Chapter8_Title", subtitle_text = "#portal2_Chapter8_Subtitle", displayOnSpawn = true, displaydelay = 2.5 },
N/A20 { map = "sp_a4_finale1", title_text = "#portal2_Chapter9_Title", subtitle_text = "#portal2_Chapter9_Subtitle", displayOnSpawn = false, displaydelay = 1.0 },
N/A21]
N/A22 
N/A23// Display the chapter title
N/A24function DisplayChapterTitle()
N/A25{
N/A26 foreach (index, level in CHAPTER_TITLES)
N/A27 {
N/A28 if (level.map == GetMapName() )
N/A29 {
N/A30 EntFire( "@chapter_title_text", "SetTextColor", "210 210 210 128", 0.0 )
N/A31 EntFire( "@chapter_title_text", "SetTextColor2", "50 90 116 128", 0.0 )
N/A32 EntFire( "@chapter_title_text", "SetPosY", "0.32", 0.0 )
N/A33 EntFire( "@chapter_title_text", "SetText", level.title_text, 0.0 )
N/A34 EntFire( "@chapter_title_text", "display", "", level.displaydelay )
N/A35 
N/A36 EntFire( "@chapter_subtitle_text", "SetTextColor", "210 210 210 128", 0.0 )
N/A37 EntFire( "@chapter_subtitle_text", "SetTextColor2", "50 90 116 128", 0.0 )
N/A38 EntFire( "@chapter_subtitle_text", "SetPosY", "0.35", 0.0 )
N/A39 EntFire( "@chapter_subtitle_text", "settext", level.subtitle_text, 0.0 )
N/A40 EntFire( "@chapter_subtitle_text", "display", "", level.displaydelay )
N/A41 }
N/A42 }
N/A43}
N/A44 
N/A45// Display the chapter title on spawn if it is flagged to show up on spawn
N/A46function TryDisplayChapterTitle()
N/A47{
N/A48 foreach (index, level in CHAPTER_TITLES)
N/A49 {
N/A50 if (level.map == GetMapName() && level.displayOnSpawn )
N/A51 {
N/A52 DisplayChapterTitle()
N/A53 }
N/A54 }
N/A55}
N/A56 
N/A57LOOP_TIMER <- 0
N/A58 
N/A59initialized <- false
N/A60 
N/A61// This is the order to play the maps
N/A62MapPlayOrder<- [
N/A63 
N/A64// ===================================================
N/A65// ====================== ACT 1 ======================
N/A66// ===================================================
N/A67 
N/A68// ---------------------------------------------------
N/A69// Intro
N/A70// ---------------------------------------------------
N/A71"sp_a1_intro1", // motel to box-on-button
N/A72"sp_a1_intro2", // portal carousel
N/A73"sp_a1_intro3", // fall-through-floor, dioramas, portal gun
N/A74"sp_a1_intro4", // box-in-hole for placing on button
N/A75"sp_a1_intro5", // fling hinting
N/A76"sp_a1_intro6", // fling training
N/A77"sp_a1_intro7", // wheatley meetup
N/A78"sp_a1_wakeup", // glados
N/A79 "@incinerator",
N/A80 
N/A81// ===================================================
N/A82// ====================== ACT 2 ======================
N/A83// ===================================================
N/A84 
N/A85"sp_a2_intro", // upgraded portal gun track
N/A86 
N/A87// ---------------------------------------------------
N/A88// Lasers
N/A89// ---------------------------------------------------
N/A90"sp_a2_laser_intro",
N/A91"sp_a2_laser_stairs",
N/A92"sp_a2_dual_lasers",
N/A93"sp_a2_laser_over_goo",
N/A94 
N/A95// ---------------------------------------------------
N/A96// Catapult
N/A97// ---------------------------------------------------
N/A98"sp_a2_catapult_intro",
N/A99"sp_a2_trust_fling",
N/A100 
N/A101// ---------------------------------------------------
N/A102// More Lasers
N/A103// ---------------------------------------------------
N/A104"sp_a2_pit_flings",
N/A105"sp_a2_fizzler_intro",
N/A106 
N/A107// ---------------------------------------------------
N/A108// Lasers + Catapult
N/A109// ---------------------------------------------------
N/A110"sp_a2_sphere_peek",
N/A111"sp_a2_ricochet",
N/A112 
N/A113// ---------------------------------------------------
N/A114// Bridges
N/A115// ---------------------------------------------------
N/A116"sp_a2_bridge_intro",
N/A117"sp_a2_bridge_the_gap",
N/A118 
N/A119// ---------------------------------------------------
N/A120// Turrets
N/A121// ---------------------------------------------------
N/A122"sp_a2_turret_intro",
N/A123"sp_a2_laser_relays", // breather
N/A124"sp_a2_turret_blocker",
N/A125"sp_a2_laser_vs_turret", // Elevator Glados Chat - Should be removed?
N/A126 
N/A127// ---------------------------------------------------
N/A128// Graduation
N/A129// ---------------------------------------------------
N/A130"sp_a2_pull_the_rug",
N/A131"sp_a2_column_blocker", // Elevator_vista
N/A132"sp_a2_laser_chaining",
N/A133//"sp_a2_turret_tower",
N/A134"sp_a2_triple_laser",
N/A135 
N/A136// ---------------------------------------------------
N/A137// Sabotage
N/A138// ---------------------------------------------------
N/A139 
N/A140"sp_a2_bts1",
N/A141"sp_a2_bts2",
N/A142"sp_a2_bts3",
N/A143"sp_a2_bts4",
N/A144"sp_a2_bts5",
N/A145"sp_a2_bts6",
N/A146 
N/A147// ---------------------------------------------------
N/A148// Glados Chamber Sequence
N/A149// ---------------------------------------------------
N/A150"sp_a2_core",
N/A151 
N/A152 
N/A153// ===================================================
N/A154// ====================== ACT 3 ======================
N/A155// ===================================================
N/A156 
N/A157// ---------------------------------------------------
N/A158// Underground
N/A159// ---------------------------------------------------
N/A160 
N/A161 "@bottomless_pit",
N/A162"sp_a3_00",
N/A163"sp_a3_01",
N/A164"sp_a3_03",
N/A165 "@test_dome_lift",
N/A166"sp_a3_jump_intro",
N/A167 "@test_dome_lift",
N/A168"sp_a3_bomb_flings",
N/A169 "@test_dome_lift",
N/A170"sp_a3_crazy_box",
N/A171 "@test_dome_lift",
N/A172"sp_a3_transition01",
N/A173 "@test_dome_lift",
N/A174"sp_a3_speed_ramp",
N/A175 "@test_dome_lift",
N/A176"sp_a3_speed_flings",
N/A177 "@test_dome_lift",
N/A178"sp_a3_portal_intro",
N/A179 "@hallway",
N/A180"sp_a3_end",
N/A181 
N/A182// ===================================================
N/A183// ====================== ACT 4 ======================
N/A184// ===================================================
N/A185 
N/A186// ---------------------------------------------------
N/A187// Recapture
N/A188// ---------------------------------------------------
N/A189"sp_a4_intro",
N/A190 
N/A191// ---------------------------------------------------
N/A192// Tractor beam
N/A193// ---------------------------------------------------
N/A194"sp_a4_tb_intro",
N/A195"sp_a4_tb_trust_drop",
N/A196// "@hallway",
N/A197"sp_a4_tb_wall_button",
N/A198// "@hallway",
N/A199"sp_a4_tb_polarity",
N/A200// "@hallway",
N/A201"sp_a4_tb_catch", // GRAD
N/A202 
N/A203// ---------------------------------------------------
N/A204// Crushers
N/A205// ---------------------------------------------------
N/A206 
N/A207// ---------------------------------------------------
N/A208// Graduation Combos
N/A209// ---------------------------------------------------
N/A210"sp_a4_stop_the_box", // Grad?
N/A211// "@hallway",
N/A212"sp_a4_laser_catapult", // Grad
N/A213// "@hallway",
N/A214//"sp_catapult_course"
N/A215// "@hallway",
N/A216//"sp_box_over_goo", // Grad
N/A217// "@hallway",
N/A218"sp_a4_laser_platform",
N/A219 
N/A220// ---------------------------------------------------
N/A221// Tbeam + Paint
N/A222// ---------------------------------------------------
N/A223//"sp_paint_jump_tbeam",
N/A224// "@hallway",
N/A225"sp_a4_speed_tb_catch",
N/A226// "@hallway",
N/A227"sp_a4_jump_polarity", // GRAD
N/A228// "@hallway",
N/A229//"sp_paint_portal_tbeams",
N/A230 
N/A231// ---------------------------------------------------
N/A232// Wheatley Escape
N/A233// ---------------------------------------------------
N/A234 
N/A235"sp_a4_finale1",
N/A236 "@hallway",
N/A237"sp_a4_finale2",
N/A238 "@hallway",
N/A239"sp_a4_finale3",
N/A240 "@hallway",
N/A241 
N/A242// ---------------------------------------------------
N/A243// FIXME: WHEATLEY BATTLE
N/A244// ---------------------------------------------------
N/A245 
N/A246"sp_a4_finale4",
N/A247 
N/A248// ---------------------------------------------------
N/A249// Demo files
N/A250// ---------------------------------------------------
N/A251"demo_intro",
N/A252"demo_underground",
N/A253"demo_paint",
N/A254]
N/A255 
N/A256 
N/A257// --------------------------------------------------------
N/A258// OnPostTransition - we just transitioned, teleport us to the correct place.
N/A259// --------------------------------------------------------
N/A260function OnPostTransition()
N/A261{
N/A262 local foundMap = false
N/A263 
N/A264 foreach (index, map in MapPlayOrder)
N/A265 {
N/A266 if (GetMapName() == MapPlayOrder[index])
N/A267 {
N/A268 foundMap = true
N/A269 
N/A270 // hook up our entry elevator
N/A271 if( index - 1 >= 0 )
N/A272 {
N/A273 if( MapPlayOrder[index-1].find("@") == null )
N/A274 {
N/A275 printl( "Teleporting to default start pos" )
N/A276 EntFire( "@elevator_entry_teleport", "Teleport", 0, 0 )
N/A277 EntFire( "@arrival_teleport", "Teleport", 0, 0 )
N/A278 }
N/A279 else
N/A280 {
N/A281 printl( "Trying to teleport to " + MapPlayOrder[index - 1] + "_teleport" )
N/A282 EntFire( MapPlayOrder[index - 1] + "_entry_teleport", "Teleport", 0, 0.0 )
N/A283 }
N/A284 }
N/A285 break
N/A286 }
N/A287 }
N/A288 
N/A289 if (foundMap == false )
N/A290 {
N/A291 EntFire( "@elevator_entry_teleport", "Teleport", 0, 0 )
N/A292 EntFire( "@arrival_teleport", "Teleport", 0, 0 )
N/A293 }
N/A294 
N/A295 EntFire( "portal_stats_controller", "OnLevelStart", 5.0, 0 );
N/A296}
N/A297 
N/A298// --------------------------------------------------------
N/A299// EntFire_MapLoopHelper
N/A300// --------------------------------------------------------
N/A301function EntFire_MapLoopHelper( classname, suffix, command, param, delay )
N/A302{
N/A303 // This calls EntFire on an entity of a given type, named with the given suffix.
N/A304 // This deals with instance name mangling (though it doesn't guarantee uniqueness)
N/A305 local suffix_len = suffix.len()
N/A306 for ( local ent = Entities.FindByClassname( null, classname ); ent != null; ent = Entities.FindByClassname( ent, classname ) )
N/A307 {
N/A308 local ent_name = ent.GetName()
N/A309 local suffix_offset = ent_name.find( suffix )
N/A310 if ( ( suffix_offset != null ) && ( suffix_offset == ( ent_name.len() - suffix_len ) ) )
N/A311 {
N/A312 EntFire( ent_name, command, param, delay )
N/A313 return
N/A314 }
N/A315 }
N/A316 printl( "MAPLOOP: ---- ERROR! Failed to find entity " + suffix + " while initiating map transition" );
N/A317}
N/A318 
N/A319// --------------------------------------------------------
N/A320// Think
N/A321// --------------------------------------------------------
N/A322function Think()
N/A323{
N/A324 // Start the game loop if the cvar is set
N/A325 if ( initialized && LoopSinglePlayerMaps() )
N/A326 {
N/A327 // initialize the timer
N/A328 if( LOOP_TIMER == 0 )
N/A329 {
N/A330 LOOP_TIMER = Time() + 10 // restart time in seconds
N/A331 }
N/A332 
N/A333 // transition to the next map if the timer has expired
N/A334 if ( LOOP_TIMER < Time() )
N/A335 {
N/A336 // reset loop timer
N/A337 LOOP_TIMER = 0
N/A338 
N/A339 printl( "\nMAPLOOP: timer expired, moving on..." )
N/A340 
N/A341 // Ensure point_viewcontrollers are disabled
N/A342 EntFire( "point_viewcontrol", "disable", 0, 0 )
N/A343 
N/A344 // Change the level (this sequence was originally in the 'transition_without_survey' logic_relay)
N/A345 EntFire_MapLoopHelper( "trigger_once", "survey_trigger", "Disable", "", 0.0 )
N/A346 EntFire_MapLoopHelper( "env_fade", "exit_fade", "Fade", "", 0.0 )
N/A347 EntFire_MapLoopHelper( "point_teleport", "exit_teleport", "Teleport", "", 0.3 )
N/A348 EntFire_MapLoopHelper( "logic_script", "transition_script", "RunScriptCode", "TransitionFromMap()", 0.4 )
N/A349 }
N/A350 }
N/A351 
N/A352 
N/A353 if (initialized)
N/A354 {
N/A355 return
N/A356 }
N/A357 initialized = true
N/A358 
N/A359 // position fixup for sp_a3_01, in case player has fallen outside map
N/A360 
N/A361 if (GetMapName() == "sp_a3_01")
N/A362 {
N/A363 printl( "--------------- FIXING PLAYER POSITION FOR sp_a3_01" )
N/A364 
N/A365 local destination_name = "knockout-teleport" // targetname of the destination entity
N/A366 
N/A367 local player_ent = null
N/A368 
N/A369 local destination_ent = null
N/A370 
N/A371 // find the player
N/A372 player_ent = Entities.FindByClassname( player_ent, "player" )
N/A373 
N/A374 if ( player_ent == null )
N/A375 {
N/A376 printl("*** Cannot find player. Aborting!")
N/A377 return;
N/A378 }
N/A379 
N/A380 // find the destination entity
N/A381 destination_ent = Entities.FindByName( destination_ent, destination_name )
N/A382 
N/A383 if ( destination_ent == null )
N/A384 {
N/A385 printl("*** Cannot find destination entity " + destination_name + ". Aborting!")
N/A386 return;
N/A387 }
N/A388 
N/A389 // move the player to the destination
N/A390 player.SetOrigin( destination_ent.GetOrigin() )
N/A391 }
N/A392 
N/A393 DumpMapList()
N/A394 
N/A395 try
N/A396 {
N/A397 TryDLC1InstalledOrCatch()
N/A398 
N/A399 local portalGunCommand = false
N/A400 local portalGunSecondCommand = false
N/A401 local portalGunPotatoCommand = false
N/A402 local foundMap = false
N/A403 
N/A404 foreach (index, map in MapPlayOrder)
N/A405 {
N/A406 if (MapPlayOrder[index] == FIRST_MAP_WITH_GUN)
N/A407 {
N/A408 portalGunCommand = true
N/A409 }
N/A410 else if (MapPlayOrder[index] == FIRST_MAP_WITH_UPGRADE_GUN)
N/A411 {
N/A412 portalGunSecondCommand = true
N/A413 }
N/A414 else if (MapPlayOrder[index] == FIRST_MAP_WITH_POTATO_GUN)
N/A415 {
N/A416 portalGunPotatoCommand = true
N/A417 }
N/A418 
N/A419 if (GetMapName() == MapPlayOrder[index])
N/A420 {
N/A421 break
N/A422 }
N/A423 }
N/A424 
N/A425 TryDisplayChapterTitle()
N/A426 
N/A427 if (portalGunCommand && GetMapName() != "sp_a2_intro" && GetMapName() != "sp_a3_01" )
N/A428 {
N/A429 printl( "=======================Trying to GivePlayerPortalgun" )
N/A430 GivePlayerPortalgun()
N/A431 }
N/A432 
N/A433 if (portalGunSecondCommand )
N/A434 {
N/A435 printl( "=======================Trying to UpgradePlayerPortalgun" )
N/A436 UpgradePlayerPortalgun()
N/A437 }
N/A438 
N/A439 if (portalGunPotatoCommand )
N/A440 {
N/A441 printl( "=======================Trying to UpgradePlayerPotatogun" )
N/A442 UpgradePlayerPotatogun()
N/A443 }
N/A444 }
N/A445 catch (e)
N/A446 {
N/A447 printl( "=======================Giving weapon with DLC1 not installed fall through." )
N/A448 
N/A449 local portalGunCommand = ""
N/A450 local portalGunSecondCommand = ""
N/A451 local foundMap = false
N/A452 
N/A453 foreach (index, map in MapPlayOrder)
N/A454 {
N/A455 if (MapPlayOrder[index] == FIRST_MAP_WITH_GUN)
N/A456 {
N/A457 portalGunCommand = "give_portalgun"
N/A458 }
N/A459 else if (MapPlayOrder[index] == FIRST_MAP_WITH_UPGRADE_GUN)
N/A460 {
N/A461 portalGunSecondCommand = "upgrade_portalgun"
N/A462 }
N/A463 else if (MapPlayOrder[index] == FIRST_MAP_WITH_POTATO_GUN)
N/A464 {
N/A465 portalGunSecondCommand = "upgrade_potatogun"
N/A466 }
N/A467 
N/A468 if (GetMapName() == MapPlayOrder[index])
N/A469 {
N/A470 break
N/A471 }
N/A472 }
N/A473 
N/A474 TryDisplayChapterTitle()
N/A475 
N/A476 if (portalGunCommand != "" && GetMapName() != "sp_a2_intro" && GetMapName() != "sp_a3_01" )
N/A477 {
N/A478 printl( "=======================Trying to run " + portalGunCommand )
N/A479 EntFire( "command", "Command", portalGunCommand, 0.0 )
N/A480 EntFire( "@command", "Command", portalGunCommand, 0.0 )
N/A481 }
N/A482 
N/A483 if (portalGunSecondCommand != "")
N/A484 {
N/A485 printl( "=======================Trying to run " + portalGunSecondCommand )
N/A486 EntFire( "command", "Command", portalGunSecondCommand, 0.1 )
N/A487 EntFire( "@command", "Command", portalGunSecondCommand, 0.1 )
N/A488 }
N/A489 }
N/A490}
N/A491 
N/A492// --------------------------------------------------------
N/A493// TransitionFromMap
N/A494// --------------------------------------------------------
N/A495function DumpMapList()
N/A496{
N/A497 if(DBG)
N/A498 {
N/A499 local mapcount = 0
N/A500 
N/A501 printl("================DUMPING MAP PLAY ORDER")
N/A502 
N/A503 foreach( index, map in MapPlayOrder )
N/A504 {
N/A505 // weed out our transitions
N/A506 if( MapPlayOrder[index].find("@") == null )
N/A507 {
N/A508 if( GetMapName() == MapPlayOrder[index] )
N/A509 {
N/A510 printl( mapcount + " " + MapPlayOrder[index] + " <--- You Are Here" )
N/A511 }
N/A512 else
N/A513 {
N/A514 printl( mapcount + " " + MapPlayOrder[index] )
N/A515 }
N/A516 mapcount++
N/A517 }
N/A518 
N/A519 }
N/A520 printl( mapcount + " maps total." )
N/A521 
N/A522 printl("================END DUMP")
N/A523 }
N/A524}
N/A525 
N/A526 
N/A527 
N/A528// --------------------------------------------------------
N/A529// RealTransitionFromMap
N/A530// --------------------------------------------------------
N/A531function RealTransitionFromMap()
N/A532{
N/A533 local next_map = null
N/A534 foreach( index, map in MapPlayOrder )
N/A535 {
N/A536 if( GetMapName() == MapPlayOrder[index] )
N/A537 {
N/A538 // make good
N/A539 local skipIndex = index
N/A540 for(local i=0;i<2;i+=1)
N/A541 {
N/A542 if( skipIndex + 1 < MapPlayOrder.len() )
N/A543 {
N/A544 if( MapPlayOrder[skipIndex + 1].find("@") != null )
N/A545 {
N/A546 skipIndex++
N/A547 }
N/A548 else
N/A549 {
N/A550 break
N/A551 }
N/A552 }
N/A553 }
N/A554 
N/A555 if( ( skipIndex + 1 < MapPlayOrder.len() ) &&
N/A556 ( GetMapName() != LAST_PLAYTEST_MAP ) )
N/A557 {
N/A558 next_map = MapPlayOrder[ skipIndex + 1 ]
N/A559 if(DBG) printl( "Map " + GetMapName() + " connects to " + next_map )
N/A560 
N/A561 if ( Entities.FindByName( null, "@changelevel" ) == null )
N/A562 {
N/A563 if(DBG) printl( "('@changelevel' entity missing, using 'map' command instead)" )
N/A564 SendToConsole( "map " + next_map );
N/A565 }
N/A566 else
N/A567 {
N/A568 EntFire( "@changelevel", "Changelevel", next_map, 0.0 )
N/A569 }
N/A570 }
N/A571 }
N/A572 }
N/A573 
N/A574 if ( next_map == null )
N/A575 {
N/A576 if(DBG) printl( "Map " + GetMapName() + " is the last map" )
N/A577 EntFire( "end_of_playtest_text", "display", 0 )
N/A578 EntFire( "@end_of_playtest_text", "display", 0 )
N/A579 
N/A580 // If we are in the map loop and at the end of the list, start over at the beginning
N/A581 if ( LoopSinglePlayerMaps() )
N/A582 {
N/A583 printl( "MAPLOOP: No more maps, restarting loop." )
N/A584 next_map = MapPlayOrder[0]
N/A585 if ( Entities.FindByName( null, "@changelevel" ) == null )
N/A586 {
N/A587 SendToConsole( "map " + next_map );
N/A588 }
N/A589 else
N/A590 {
N/A591 EntFire( "@changelevel", "Changelevel", next_map, 0.0 )
N/A592 }
N/A593 }
N/A594 }
N/A595 
N/A596 printl( "" )
N/A597}
N/A598 
N/A599 
N/A600// --------------------------------------------------------
N/A601// TransitionFromMap
N/A602// --------------------------------------------------------
N/A603function TransitionFromMap()
N/A604{
N/A605 try
N/A606 {
N/A607 TryDLC1InstalledOrCatch()
N/A608 
N/A609 // hack hack: display portal stat UI before level transition
N/A610 EntFire( "portal_stats_controller", "OnLevelEnd", 5.0, 0 );
N/A611 }
N/A612 catch (e)
N/A613 {
N/A614 printl( "=======================Transitioning map with DLC1 not installed fall through." )
N/A615 RealTransitionFromMap()
N/A616 }
N/A617}
N/A618 
N/A619// --------------------------------------------------------
N/A620// MakeBatFile - dumps the map list in a formatted way, for easy recompilin'
N/A621// --------------------------------------------------------
N/A622function MakeBatFile()
N/A623{
N/A624 local mapcount = 0
N/A625 
N/A626 printl("================DUMPING maps formatted for batch file")
N/A627 
N/A628 foreach( index, map in MapPlayOrder )
N/A629 {
N/A630 printl( "call build " + MapPlayOrder[index] )
N/A631 }
N/A632 
N/A633 foreach( index, map in MapPlayOrder )
N/A634 {
N/A635 printl( "call p2_buildcubemaps " + MapPlayOrder[index] )
N/A636 }
N/A637}
N/A638 
N/A639// this lets the elevator know that we are ready to transition.
N/A640function TransitionReady()
N/A641{
N/A642  ::TransitionReady <- 1
N/A643}
0644 + true
1645 + true
2646 + true