Template:PatchDiff/May 08, 2012 Patch/portal2 dlc2/scripts/vscripts/videos/video splitter.nut

N/A 1 //  N/A 2 // StartVideo   N/A 3 //   N/A 4    N/A 5 RandomVideos <-   N/A 6 [   N/A 7        "animalking.bik",   N/A 8        "aperture_appear_horiz.bik",   N/A 9        "bluescreen.bik",   N/A 10        "coop_bluebot_load.bik",   N/A 11        "coop_bots_load.bik",   N/A 12        "coop_bots_load_wave.bik",   N/A 13        "coop_orangebot_load.bik",   N/A 14        "exercises_horiz.bik",   N/A 15        "faithplate.bik",   N/A 16        "fizzler.bik",   N/A 17        "hard_light.bik",   N/A 18        "laser_danger_horiz.bik",   N/A 19        "laser_portal.bik",   N/A 20        "plc_blue_horiz.bik",   N/A 21        "turret_colours_type.bik",   N/A 22        "turret_dropin.bik",   N/A 23        "turret_exploded_grey.bik",   N/A 24        "community_bg1.bik"   N/A 25 ]   N/A 26    N/A 27 ElevatorVideos <-   N/A 28 [   N/A 29        { map = "sp_a1_intro1", arrival = "", departure = "" },   N/A 30        { map = "sp_a1_intro2", arrival = "", departure = "" },   N/A 31        { map = "sp_a1_intro3", arrival = "animalking.bik", departure = "animalking.bik", typeOverride = 11  },   N/A 32        { map = "sp_a1_intro4", arrival = "exercises_horiz.bik", departure = "exercises_horiz.bik", typeOverride = 10 },   N/A 33        { map = "sp_a1_intro5", arrival = "exercises_vert.bik", departure = "exercises_vert.bik", typeOverride = 9 },   N/A 34        { map = "sp_a1_intro6", arrival = "plc_blue_vert.bik", departure = "plc_blue_vert.bik", typeOverride = 9 },   N/A 35        { map = "sp_a1_intro7", arrival = "plc_blue_horiz.bik", departure = "", typeOverride = 4 },   N/A 36        { map = "sp_a2_intro", arrival = "", departure = "plc_blue_horiz.bik", typeOverride = 1 },   N/A 37        { map = "sp_a2_laser_intro",        arrival = "laser_portal.bik", departure = "laser_portal.bik", typeOverride = 12  },   N/A 38        { map = "sp_a2_laser_stairs",        arrival = "laser_portal.bik", departure = "laser_portal.bik", typeOverride = 12 },   N/A 39        { map = "sp_a2_dual_lasers",        arrival = "laser_portal.bik", departure = "laser_portal.bik", typeOverride = 12 },   N/A 40        { map = "sp_a2_laser_over_goo", arrival = "aperture_appear_vert.bik", departure = "aperture_appear_vert.bik", typeOverride = 9 },   N/A 41        { map = "sp_a2_catapult_intro", arrival = "faithplate.bik", departure = "faithplate.bik", typeOverride = 6 },   N/A 42        { map = "sp_a2_trust_fling",        arrival = "faithplate.bik", departure = "faithplate.bik", typeOverride = 6 },   N/A 43        { map = "sp_a2_pit_flings",        arrival = "aperture_appear_vert.bik", departure = "aperture_appear_vert.bik", typeOverride = 9 },   N/A 44        { map = "sp_a2_fizzler_intro",        arrival = "fizzler.bik", departure = "fizzler.bik", typeOverride = 6 },   N/A 45        { map = "sp_a2_sphere_peek",        arrival = "aperture_appear_vert.bik", departure = "aperture_appear_vert.bik", typeOverride = 9 },   N/A 46        { map = "sp_a2_ricochet",        arrival = "aperture_appear_vert.bik", departure = "aperture_appear_vert.bik", typeOverride = 9 },   N/A 47        { map = "sp_a2_bridge_intro",        arrival = "hard_light.bik", departure = "hard_light.bik", typeOverride = 12 },   N/A 48        { map = "sp_a2_bridge_the_gap", arrival = "hard_light.bik", departure = "hard_light.bik", typeOverride = 6 },   N/A 49        { map = "sp_a2_turret_intro",        arrival = "turret_exploded_grey.bik", departure = "", typeOverride = 6 },   N/A 50        { map = "sp_a2_laser_relays",        arrival = "", departure = "aperture_appear_vert.bik", typeOverride = 9 },   N/A 51        { map = "sp_a2_turret_blocker",        arrival = "turret_exploded_grey.bik", departure = "turret_exploded_grey.bik", typeOverride = 6 },   N/A 52        { map = "sp_a2_laser_vs_turret",arrival = "turret_colours_type.bik", departure = "turret_colours_type.bik", typeOverride = 6 },   N/A 53        { map = "sp_a2_pull_the_rug",        arrival = "aperture_appear_vert.bik", departure = "aperture_appear_vert.bik", typeOverride = 9 },   N/A 54        { map = "sp_a2_column_blocker", arrival = "turret_dropin.bik", departure = "turret_dropin.bik", typeOverride = 6 },   N/A 55        { map = "sp_a2_laser_chaining", arrival = "turret_colours_type.bik", departure = "turret_colours_type.bik", typeOverride = 6 },   N/A 56        { map = "sp_a2_triple_laser",        arrival = "aperture_appear_vert.bik", departure = "aperture_appear_vert.bik", typeOverride = 9 },   N/A 57        { map = "sp_a2_bts1",                        arrival = "aperture_appear_vert.bik", departure = "", typeOverride = 9 },   N/A 58        { map = "sp_a4_intro",                        arrival = "", departure = "plc_blue_horiz.bik", typeOverride = 6 },   N/A 59        { map = "sp_a4_tb_intro",                arrival = "exercises_horiz.bik", departure = "exercises_horiz.bik", typeOverride = 6 },   N/A 60        { map = "sp_a4_tb_trust_drop",        arrival = "plc_blue_horiz.bik", departure = "plc_blue_horiz.bik", typeOverride = 6 },   N/A 61        { map = "sp_a4_tb_wall_button",        arrival = "", departure = "" },   N/A 62        { map = "sp_a4_tb_polarity",        arrival = "exercises_horiz.bik", departure = "exercises_horiz.bik", typeOverride = 6 },   N/A 63        { map = "sp_a4_tb_catch",                arrival = "plc_blue_horiz.bik", departure = "plc_blue_horiz.bik", typeOverride = 6 },   N/A 64        { map = "sp_a4_stop_the_box",        arrival = "bluescreen.bik", departure = "bluescreen.bik", typeOverride = 14 },   N/A 65        { map = "sp_a4_laser_catapult",        arrival = "bluescreen.bik", departure = "bluescreen.bik", typeOverride = 14 },   N/A 66        { map = "sp_a4_laser_platform",        arrival = "bluescreen.bik", departure = "", typeOverride = 14 },   N/A 67        { map = "sp_a4_speed_tb_catch",        arrival = "", departure = "bluescreen.bik", typeOverride = 14 },   N/A 68        { map = "sp_a4_jump_polarity",        arrival = "bluescreen.bik", departure = "bluescreen.bik", typeOverride = 14 },   N/A 69        { map = "sp_a4_finale1",                arrival = "bluescreen.bik", departure = "" },   N/A 70 ]   N/A 71    N/A 72 ARRIVAL_VIDEO <- 0   N/A 73 DEPARTURE_VIDEO <- 1   N/A 74 ARRIVAL_DESTRUCTED_VIDEO <- 2   N/A 75 DEPARTURE_DESTRUCTED_VIDEO <- 3   N/A 76    N/A 77 OVERRIDE_VIDEOS <- 0   N/A 78    N/A 79 FIRST_CLEAN_MAP <- "sp_a2_catapult_intro"   N/A 80    N/A 81 function Precache   N/A 82 {   N/A 83        if( "PrecachedVideos" in this )   N/A 84        {   N/A 85                // don't do anything   N/A 86        }   N/A 87        else   N/A 88        {   N/A 89                // If we're in a community map, pick a random one   N/A 90                local communityMapIndex = GetMapIndexInPlayOrder;   N/A 91                if ( communityMapIndex != -2 )   N/A 92                {   N/A 93                        if ( communityMapIndex == -1 )   N/A 94                        {   N/A 95                                communityMapIndex = GetNumMapsPlayed   N/A 96                        }   N/A 97    N/A 98                        local movieName = "media\\" + RandomVideos[communityMapIndex % RandomVideos.len];   N/A 99                        printl( "Preching movie: " + movieName )   N/A 100                        PrecacheMovie( movieName )                  N/A 101                }   N/A 102                else   N/A 103                {   N/A 104                        // Commenting this line out because it prevents properly re-precaching movies after loading a save game. N/A 105                       // The cost is that we end up running this code below about 2x too often, but it's fairly cheap and not realtime code anyways...   N/A 106                        //::PrecachedVideos <- 1   N/A 107    N/A 108                        local mapName = GetMapName   N/A 109                        foreach (index, level in ElevatorVideos)   N/A 110                        {   N/A 111                                if (level.map == mapName)   N/A 112                                {   N/A 113                                        local movieName   N/A 114                                        if ("additional" in level && level.additional != "" )          N/A 115                                        {   N/A 116                                                movieName = "media\\" + level.additional   N/A 117                                                //printl( "Preching movie: " + movieName )   N/A 118                                                PrecacheMovie( movieName )   N/A 119                                        }   N/A 120    N/A 121                                        if ("arrival" in level && level.arrival != "" )          N/A 122                                        {   N/A 123                                                movieName = "media\\"   N/A 124                                                if( OVERRIDE_VIDEOS == 1 )   N/A 125                                                        movieName += "entry_emergency.bik"   N/A 126                                                else   N/A 127                                                        movieName += level.arrival   N/A 128    N/A 129                                                //printl( "Preching movie: " + movieName )   N/A 130                                                PrecacheMovie( movieName )   N/A 131                                        }   N/A 132    N/A 133                                        if ("departure" in level && level.departure != "" )          N/A 134                                        {   N/A 135                                                movieName = "media\\"   N/A 136                                                if( OVERRIDE_VIDEOS == 1 )   N/A 137                                                        movieName += "exit_emergency.bik"   N/A 138                                                else   N/A 139                                                        movieName += level.departure   N/A 140    N/A 141                                                //printl( "Preching movie: " + movieName )   N/A 142                                                PrecacheMovie( movieName )   N/A 143                                        }   N/A 144                                }   N/A 145                        }   N/A 146                }   N/A 147        }   N/A 148 }   N/A 149    N/A 150 // stubs to supress error - will delete these soon. N/A 151 function StopEntryVideo(width,height)  N/A 152 {   N/A 153 }   N/A 154    N/A 155 function StopExitVideo(width,height)   N/A 156 {   N/A 157 }   N/A 158    N/A 159 function StartEntryVideo(width,height)   N/A 160 {   N/A 161 }   N/A 162    N/A 163 function StartExitVideo(width,height)   N/A 164 {   N/A 165 }   N/A 166    N/A 167 function StartDestructedEntryVideo(width,height)   N/A 168 {   N/A 169 }   N/A 170    N/A 171 function StartDestructedExitVideo(width,height)   N/A 172 {   N/A 173 }   N/A 174    N/A 175 //============================   N/A 176    N/A 177 function StopArrivalVideo(width,height)   N/A 178 {   N/A 179        EntFire("@arrival_video_master", "Disable", "", 0)   N/A 180        EntFire("@arrival_video_master", "killhierarchy", "", 1.0)   N/A 181        StopVideo(ARRIVAL_VIDEO,width,height)   N/A 182 }   N/A 183    N/A 184 function StopDepartureVideo(width,height)   N/A 185 {   N/A 186        EntFire("@departure_video_master", "Disable", "", 0)   N/A 187        EntFire("@departure_video_master", "killhierarchy", "", 1.0)   N/A 188        StopVideo(DEPARTURE_VIDEO,width,height)   N/A 189 }   N/A 190    N/A 191 function StopVideo(videoType,width,height)   N/A 192 {   N/A 193        for(local i=0;i<width;i+=1)   N/A 194        {   N/A 195                for(local j=0;j<height;j+=1)   N/A 196                {   N/A 197                        local panelNum = 1 + width*j + i   N/A 198                        local signName   N/A 199    N/A 200                        if (videoType == DEPARTURE_VIDEO || videoType == DEPARTURE_DESTRUCTED_VIDEO )   N/A 201                        {   N/A 202                                signName = "@departure_sign_" + panelNum   N/A 203                        }   N/A 204                        else   N/A 205                        {   N/A 206                                signName = "@arrival_sign_" + panelNum   N/A 207                        }   N/A 208    N/A 209                        EntFire(signName, "Disable", "", 0)   N/A 210                        EntFire(signName, "killhierarchy", "", 1.0)   N/A 211                }   N/A 212        }   N/A 213 }   N/A 214    N/A 215 function StartArrivalVideo(width,height)   N/A 216 {   N/A 217        StartDestructedArrivalVideo(width,height)   N/A 218    N/A 219 //        EntFire("@arrival_video_master", "Enable", "", 0)   N/A 220 //        StartVideo(ENTRANCE_VIDEO,width,height)   N/A 221 }   N/A 222    N/A 223 function StartDepartureVideo(width,height)   N/A 224 {   N/A 225        StartDestructedDepartureVideo(width,height)   N/A 226    N/A 227 //        EntFire("@departure_video_master", "Enable", "", 0)   N/A 228 //        StartVideo(DEPARTURE_VIDEO,width,height)   N/A 229 }   N/A 230    N/A 231 function StartDestructedArrivalVideo(width,height)   N/A 232 {   N/A 233        local videoName = ""   N/A 234        local playDestructed = true   N/A 235    N/A 236        // If we're in a community map, pick a random one   N/A 237        local communityMapIndex = GetMapIndexInPlayOrder   N/A 238        if ( communityMapIndex != -2 )   N/A 239        {          N/A 240                if ( communityMapIndex == -1 )   N/A 241                {   N/A 242                        communityMapIndex = GetNumMapsPlayed   N/A 243                }   N/A 244    N/A 245                playDestructed = false   N/A 246                videoName = "media\\" + RandomVideos[communityMapIndex % RandomVideos.len]   N/A 247                // reprintl("Setting arrival movie to " + videoName )   N/A 248        }   N/A 249        else   N/A 250        {   N/A 251                local mapName = GetMapName   N/A 252    N/A 253                foreach (index, level in ElevatorVideos)   N/A 254                {   N/A 255                        if (FIRST_CLEAN_MAP == level.map )   N/A 256                        {   N/A 257                                playDestructed = false   N/A 258                        }   N/A 259    N/A 260                        if (level.map == mapName && ("arrival" in level) )   N/A 261                        {   N/A 262                                if( level.arrival == "" )   N/A 263                                        return   N/A 264    N/A 265                                videoName = "media\\"   N/A 266    N/A 267                                if( OVERRIDE_VIDEOS == 1 )   N/A 268                                        videoName += "entry_emergency.bik"   N/A 269                                else   N/A 270                                        videoName += level.arrival                                          N/A 271    N/A 272                                break   N/A 273                        }   N/A 274                }   N/A 275        }          N/A 276    N/A 277        // If we have something to play, do so   N/A 278        if ( videoName != "" )   N/A 279        {   N/A 280                printl("Setting arrival movie to " + videoName )   N/A 281                EntFire("@arrival_video_master", "SetMovie", videoName, 0)   N/A 282    N/A 283                EntFire("@arrival_video_master", "Enable", "", 0.1)   N/A 284                StartVideo(playDestructed ? ARRIVAL_DESTRUCTED_VIDEO : ARRIVAL_VIDEO, width, height)  N/A 285        }   N/A 286 }   N/A 287    N/A 288 function StartDestructedDepartureVideo(width,height)   N/A 289 {   N/A 290        local playDestructed = true   N/A 291        local videoName = "";   N/A 292    N/A 293        // If we're in a community map, pick a random one   N/A 294        local communityMapIndex = GetMapIndexInPlayOrder   N/A 295        if ( communityMapIndex != -2 )   N/A 296        {          N/A 297                if ( communityMapIndex == -1 )   N/A 298                {   N/A 299                        communityMapIndex = GetNumMapsPlayed   N/A 300                }   N/A 301    N/A 302                playDestructed = false;   N/A 303                videoName = "media\\" + RandomVideos[communityMapIndex % RandomVideos.len]   N/A 304                // reprintl("Setting arrival movie to " + videoName )   N/A 305        }   N/A 306        else   N/A 307        {   N/A 308                local mapName = GetMapName   N/A 309                foreach (index, level in ElevatorVideos)   N/A 310                {   N/A 311                        if (FIRST_CLEAN_MAP == level.map )   N/A 312                        {   N/A 313                                playDestructed = false   N/A 314                        }   N/A 315    N/A 316                        if (level.map == mapName && ("departure" in level) )   N/A 317                        {   N/A 318                                if( level.departure == "" )   N/A 319                                        return   N/A 320    N/A 321                                local videoName = "media\\"   N/A 322                                if( OVERRIDE_VIDEOS == 1 )   N/A 323                                        videoName += "exit_emergency.bik"   N/A 324                                else   N/A 325                                        videoName += level.departure   N/A 326    N/A 327                                break   N/A 328                        }   N/A 329                }   N/A 330        }   N/A 331    N/A 332        if ( videoName != "" )   N/A 333        {   N/A 334                //printl("Setting departure movie to " + videoName )   N/A 335                EntFire("@departure_video_master", "SetMovie", videoName, 0)   N/A 336    N/A 337                EntFire("@departure_video_master", "Enable", "", 0.1)   N/A 338                StartVideo(playDestructed ? DEPARTURE_DESTRUCTED_VIDEO : DEPARTURE_VIDEO, width, height)  N/A 339        }   N/A 340 }   N/A 341    N/A 342 function StartVideo(videoType,width,height)   N/A 343 {   N/A 344        local videoScaleType = 0   N/A 345        local randomDestructChance = 0   N/A 346    N/A 347        if( videoType == ARRIVAL_DESTRUCTED_VIDEO || videoType == DEPARTURE_DESTRUCTED_VIDEO )   N/A 348        {   N/A 349                videoScaleType = RandomInt(1,5)   N/A 350        }   N/A 351        else   N/A 352        {   N/A 353                videoScaleType = RandomInt(6,7)   N/A 354        }   N/A 355    N/A 356        local mapName = GetMapName   N/A 357        foreach (index, level in ElevatorVideos)   N/A 358        {   N/A 359                if (level.map == mapName)   N/A 360                {   N/A 361                        if ("typeOverride" in level)   N/A 362                        {   N/A 363                                videoScaleType = level.typeOverride   N/A 364                        }   N/A 365    N/A 366                        if ("destructChance" in level)   N/A 367                        {   N/A 368                                randomDestructChance = level.destructChance   N/A 369                        }   N/A 370                }   N/A 371        }   N/A 372    N/A 373        for(local i=0;i<width;i+=1)   N/A 374        {   N/A 375                for(local j=0;j<height;j+=1)   N/A 376                {   N/A 377                        local panelNum = 1 + width*j + i   N/A 378                        local signName   N/A 379    N/A 380                        if (videoType == DEPARTURE_VIDEO || videoType == DEPARTURE_DESTRUCTED_VIDEO )   N/A 381                        {   N/A 382                                signName = "@departure_sign_" + panelNum   N/A 383                        }   N/A 384                        else   N/A 385                        {   N/A 386                                signName = "@arrival_sign_" + panelNum   N/A 387                        }                  N/A 388    N/A 389                        {   N/A 390                                if( randomDestructChance > RandomInt(0,100) )   N/A 391                                {   N/A 392                                        EntFire(signName, "Kill", "", 0)   N/A 393                                        continue   N/A 394                                }   N/A 395    N/A 396                                EntFire(signName, "SetUseCustomUVs", 1, 0)   N/A 397    N/A 398                                local uMin = (i+0.0001)/(width)   N/A 399                                local uMax = (i+1.0001)/(width)   N/A 400                                local vMin = (j+0.0001)/(height)   N/A 401                                local vMax = (j+1.0001)/(height)   N/A 402    N/A 403                                if( videoScaleType == 0 /*full elevator*/ )                                   N/A 404                                {   N/A 405    N/A 406                                }                                  N/A 407                                else if( videoScaleType == 1 /*stretch*/ )   N/A 408                                {   N/A 409                                        uMin = 1.0 - (1.0-uMin)*(1.0-uMin)*(1.0-uMin)   N/A 410                                        uMax = 1.0 - (1.0-uMax)*(1.0-uMax)*(1.0-uMax)   N/A 411                                }                                  N/A 412    N/A 413                                else if( videoScaleType == 2 /*Mirror*/ )   N/A 414                                {                                          N/A 415                                        uMin = 4*(1.0-uMin)*uMin   N/A 416                                        uMax = 4*(1.0-uMax)*uMax                                          N/A 417                                }                                  N/A 418    N/A 419                                else if( videoScaleType == 3 /*Ouroboros*/ )   N/A 420                                {   N/A 421                                        uMin = ((i%12)+0.0001)/12   N/A 422                                        uMax = ((i%12)+1.0001)/12   N/A 423    N/A 424                                        if( ((i)%2) == 1 )   N/A 425                                        {   N/A 426                                                local temp = uMin   N/A 427                                                uMin = uMax   N/A 428                                                uMax = temp   N/A 429                                        }   N/A 430                                }   N/A 431    N/A 432                                else if( videoScaleType == 4 /*Upside down*/ )   N/A 433                                {   N/A 434                                        vMin = 0.99999   N/A 435                                        vMax = 0.00001   N/A 436    N/A 437                                        uMin = ((i%3)+0.0001)/3   N/A 438                                        uMax = ((i%3)+1.0001)/3                                          N/A 439                                }   N/A 440    N/A 441                                else if( videoScaleType == 5 /*Tiled*/ )   N/A 442                                {   N/A 443                                        vMin = 0.00001   N/A 444                                        vMax = 0.99999   N/A 445    N/A 446                                        uMin = ((i%3)+0.0001)/3   N/A 447                                        uMax = ((i%3)+1.0001)/3   N/A 448                                }   N/A 449    N/A 450                                else if( videoScaleType == 6 /*Tiled Really Big*/ )   N/A 451                                {   N/A 452                                        uMin = ((i%8)+0.0001)/8   N/A 453                                        uMax = ((i%8)+1.0001)/8   N/A 454                                }   N/A 455    N/A 456                                else if( videoScaleType == 7 /*Tiled Big*/ )   N/A 457                                {   N/A 458                                        uMin = ((i%12)+0.0001)/12   N/A 459                                        uMax = ((i%12)+1.0001)/12   N/A 460                                }   N/A 461    N/A 462                                else if( videoScaleType == 8 /*Tiled Single*/ )   N/A 463                                {   N/A 464                                        uMin = 0.0001   N/A 465                                        uMax = 0.9999   N/A 466                                        vMin = 0.0001   N/A 467                                        vMax = 0.9999   N/A 468                                }   N/A 469    N/A 470                                else if( videoScaleType == 9 /*Tiled Double*/ )   N/A 471                                {   N/A 472                                        uMin = ((i%2)+0.0001)/2   N/A 473                                        uMax = ((i%2)+1.0001)/2   N/A 474                                }   N/A 475    N/A 476                                else if( videoScaleType == 10 /*Two by two*/ )   N/A 477                                {   N/A 478                                        vMin = 0.00001   N/A 479                                        vMax = 0.99999   N/A 480    N/A 481                                        uMin = ((i%2)+0.0001)/2   N/A 482                                        uMax = ((i%2)+1.0001)/2   N/A 483                                }   N/A 484    N/A 485                                else if( videoScaleType == 11 /*Tiled off 1*/ )   N/A 486                                {   N/A 487                                        vMin = 0.00001   N/A 488                                        vMax = 0.99999   N/A 489    N/A 490                                        uMin = (((i+1)%3)+0.0001)/3   N/A 491                                        uMax = (((i+1)%3)+1.0001)/3   N/A 492                                }   N/A 493    N/A 494                                else if( videoScaleType == 12 /*Tiled 2x4*/ )   N/A 495                                {   N/A 496                                        uMin = ((i%6)+0.0001)/6   N/A 497                                        uMax = ((i%6)+1.0001)/6   N/A 498                                }   N/A 499    N/A 500                                else if( videoScaleType == 13 /*Tiled Double - with two blank*/ )   N/A 501                                {   N/A 502                                        if( ((i)%4) < 2 )   N/A 503                                        {   N/A 504                                                uMin = ((i%2)+0.0001)/2   N/A 505                                                uMax = ((i%2)+1.0001)/2   N/A 506                                        }   N/A 507                                        else   N/A 508                                        {   N/A 509                                                uMin = 0.97   N/A 510                                                uMax = 0.97   N/A 511                                        }   N/A 512                                }   N/A 513    N/A 514                                else if( videoScaleType == 14 /*bluescreen*/ )   N/A 515                                {   N/A 516                                        if( (i%8) >= 1 &&    N/A 517                                                (i%8) < 7 )   N/A 518                                        {   N/A 519                                                uMin = (((i-1)%8)+0.0001)/6   N/A 520                                                uMax = (((i-1)%8)+1.0001)/6   N/A 521                                        }   N/A 522                                        else   N/A 523                                        {   N/A 524                                                uMin = 0.97   N/A 525                                                uMax = 0.97   N/A 526                                        }   N/A 527                                }   N/A 528    N/A 529                                EntFire(signName, "SetUMin", uMin, 0)   N/A 530                                EntFire(signName, "SetUMax", uMax, 0)   N/A 531                                EntFire(signName, "SetVMin", vMin, 0)   N/A 532                                EntFire(signName, "SetVMax", vMax, 0)   N/A 533    N/A 534                                EntFire(signName, "Enable", "", 0.1)   N/A 535    N/A 536 //                                printl(signName + " " + uMin + " " + uMax + " " + vMin + " " + vMax )   N/A 537                        }   N/A 538                }   N/A 539        }   N/A 540 }