commit 12ac62a9565338ed32c3860d769ebedaed7953fc Author: diamante0018 Date: Wed Dec 11 11:28:08 2024 +0100 init diff --git a/codescripts/character.gsc b/codescripts/character.gsc new file mode 100644 index 0000000..eea5402 --- /dev/null +++ b/codescripts/character.gsc @@ -0,0 +1,270 @@ +setModelFromArray( a ) +{ + self setModel( a[ randomint( a.size ) ] ); +} + +precacheModelArray( a ) +{ + for ( i = 0; i < a.size; i++ ) + precacheModel( a[ i ] ); +} + +attachHead( headAlias, headArray ) +{ +/# + // For test map purposes only!! - IW5_Characters uses this. + if ( IsDefined( level.store_characterinfo ) ) + { + if ( !IsDefined( self.characterinfo ) ) + { + self.characterinfo = SpawnStruct(); + self.characterinfo.headalias = headAlias; + self.characterinfo.headarray = headarray; + } + } +#/ + + if ( !isdefined( level.character_head_index ) ) + level.character_head_index = []; + + if ( !isdefined( level.character_head_index[ headAlias ] ) ) + level.character_head_index[ headAlias ] = randomint( headArray.size ); + + assert( level.character_head_index[ headAlias ] < headArray.size ); + + index = ( level.character_head_index[ headAlias ] + 1 ) % headArray.size; + + // the designer can overwrite the character + if ( isdefined( self.script_char_index ) ) + { + index = self.script_char_index % headArray.size; + } + + level.character_head_index[ headAlias ] = index; + + self attach( headArray[ index ], "", true ); + self.headModel = headArray[ index ]; +} + +attachHat( hatAlias, hatArray ) +{ + if ( !isdefined( level.character_hat_index ) ) + level.character_hat_index = []; + + if ( !isdefined( level.character_hat_index[ hatAlias ] ) ) + level.character_hat_index[ hatAlias ] = randomint( hatArray.size ); + + assert( level.character_hat_index[ hatAlias ] < hatArray.size ); + + index = ( level.character_hat_index[ hatAlias ] + 1 ) % hatArray.size; + + level.character_hat_index[ hatAlias ] = index; + + self attach( hatArray[ index ] ); + self.hatModel = hatArray[ index ]; +} + +new() +{ + self detachAll(); + oldGunHand = self.anim_gunHand; + if ( !isdefined( oldGunHand ) ) + return; + self.anim_gunHand = "none"; + self [[ anim.PutGunInHand ]]( oldGunHand ); +} + +save() +{ + info[ "gunHand" ] = self.anim_gunHand; + info[ "gunInHand" ] = self.anim_gunInHand; + info[ "model" ] = self.model; + info[ "hatModel" ] = self.hatModel; + if ( isdefined( self.name ) ) + { + info[ "name" ] = self.name; + println( "Save: Guy has name ", self.name ); + } + else + println( "save: Guy had no name!" ); + + attachSize = self getAttachSize(); + for ( i = 0; i < attachSize; i++ ) + { + info[ "attach" ][ i ][ "model" ] = self getAttachModelName( i ); + info[ "attach" ][ i ][ "tag" ] = self getAttachTagName( i ); + } + return info; +} + +load( info ) +{ + self detachAll(); + self.anim_gunHand = info[ "gunHand" ]; + self.anim_gunInHand = info[ "gunInHand" ]; + self setModel( info[ "model" ] ); + self.hatModel = info[ "hatModel" ]; + if ( isdefined( info[ "name" ] ) ) + { + self.name = info[ "name" ]; + println( "Load: Guy has name ", self.name ); + } + else + println( "Load: Guy had no name!" ); + + attachInfo = info[ "attach" ]; + attachSize = attachInfo.size; + for ( i = 0; i < attachSize; i++ ) + self attach( attachInfo[ i ][ "model" ], attachInfo[ i ][ "tag" ] ); +} + +precache( info ) +{ + if ( isdefined( info[ "name" ] ) ) + println( "Precache: Guy has name ", info[ "name" ] ); + else + println( "Precache: Guy had no name!" ); + + precacheModel( info[ "model" ] ); + + attachInfo = info[ "attach" ]; + attachSize = attachInfo.size; + for ( i = 0; i < attachSize; i++ ) + precacheModel( attachInfo[ i ][ "model" ] ); +} + +/* +sample save / precache / load usage( precache is only required if there are any waits in the level script before load ): + +save: + info = foley codescripts\character::save(); + game[ "foley" ] = info; + changelevel( "burnville", 0, true ); + +precache: + codescripts\character::precache( game[ "foley" ] ); + +load: + foley codescripts\character::load( game[ "foley" ] ); + +*/ + +get_random_character( amount ) +{ + self_info = strtok( self.classname, "_" ); + if ( !common_scripts\utility::isSP() ) + { + if ( isDefined( self.pers["modelIndex"] ) && self.pers["modelIndex"] < amount ) + return self.pers["modelIndex"]; + + index = randomInt( amount ); + self.pers["modelIndex"] = index; + + return index; + } + else if ( self_info.size <= 2 ) + { + // some custom guy that doesn't use standard naming convention + return randomint( amount ); + } + + group = "auto"; // by default the type is an auto-selected character + index = undefined; + prefix = self_info[ 2 ]; // merc, marine, etc + + // the designer can overwrite the character + if ( isdefined( self.script_char_index ) ) + { + index = self.script_char_index; + } + + // the designer can hint that this guy is a member of a group of like - spawned guys, so he should use a different index + if ( isdefined( self.script_char_group ) ) + { + type = "grouped"; + group = "group_" + self.script_char_group; + } + + if ( !isdefined( level.character_index_cache ) ) + { + // separately store script grouped guys and auto guys so that they dont influence each other + level.character_index_cache = []; + } + + if ( !isdefined( level.character_index_cache[ prefix ] ) ) + { + // separately store script grouped guys and auto guys so that they dont influence each other + level.character_index_cache[ prefix ] = []; + } + + if ( !isdefined( level.character_index_cache[ prefix ][ group ] ) ) + { + initialize_character_group( prefix, group, amount ); + } + + if ( !isdefined( index ) ) + { + index = get_least_used_index( prefix, group ); + + if ( !isdefined( index ) ) + { + // fail safe + index = randomint( 5000 ); + } + } + + + while ( index >= amount ) + { + index -= amount; + } + + level.character_index_cache[ prefix ][ group ][ index ]++; + + return index; +} + +get_least_used_index( prefix, group ) +{ + lowest_indices = []; + lowest_use = level.character_index_cache[ prefix ][ group ][ 0 ]; + lowest_indices[ 0 ] = 0; + + for ( i = 1; i < level.character_index_cache[ prefix ][ group ].size; i++ ) + { + if ( level.character_index_cache[ prefix ][ group ][ i ] > lowest_use ) + { + continue; + } + + if ( level.character_index_cache[ prefix ][ group ][ i ] < lowest_use ) + { + // if its the new lowest, start over on the array + lowest_indices = []; + lowest_use = level.character_index_cache[ prefix ][ group ][ i ]; + } + + // the equal amounts end up in the array + lowest_indices[ lowest_indices.size ] = i; + } + assertex( lowest_indices.size, "Tried to spawn a character but the lowest indices didn't exist" ); + return random( lowest_indices ); +} + +initialize_character_group( prefix, group, amount ) +{ + for ( i = 0; i < amount; i++ ) + { + level.character_index_cache[ prefix ][ group ][ i ] = 0; + } +} + +get_random_weapon( amount ) +{ + return randomint( amount ); +} + +random( array ) +{ + return array [ randomint( array.size ) ]; +} \ No newline at end of file diff --git a/codescripts/delete.gsc b/codescripts/delete.gsc new file mode 100644 index 0000000..5303470 --- /dev/null +++ b/codescripts/delete.gsc @@ -0,0 +1,7 @@ +main() +{ + assert(isdefined(self)); + wait 0; + if (isdefined(self)) + self delete(); +} diff --git a/codescripts/struct.gsc b/codescripts/struct.gsc new file mode 100644 index 0000000..f524456 --- /dev/null +++ b/codescripts/struct.gsc @@ -0,0 +1,11 @@ +InitStructs() +{ + level.struct = []; +} + +CreateStruct() +{ + struct = spawnstruct(); + level.struct[level.struct.size] = struct; + return struct; +} diff --git a/common_scripts/_artcommon.gsc b/common_scripts/_artcommon.gsc new file mode 100644 index 0000000..9cbda05 --- /dev/null +++ b/common_scripts/_artcommon.gsc @@ -0,0 +1,286 @@ +#include common_scripts\utility; + +setfogsliders() +{ +/# + // The read-only vars are set each time a call to SetExpFog is made, so they should contain the 'fog dest' params + SetDevDvar( "scr_fog_exp_halfplane", GetDvar( "g_fogHalfDistReadOnly", 0.0 ) ); + SetDevDvar( "scr_fog_nearplane", GetDvar( "g_fogStartDistReadOnly", 0.1 ) ); + SetDevDvar( "scr_fog_color", GetDvarVector( "g_fogColorReadOnly", ( 1, 0, 0 ) ) ); + SetDevDvar( "scr_fog_color_intensity", GetDvar( "g_fogColorIntensityReadOnly", 1.0 ) ); + SetDevDvar( "scr_fog_max_opacity", GetDvar( "g_fogMaxOpacityReadOnly", 1.0 ) ); + + SetDevDvar( "scr_sunFogEnabled", GetDvar( "g_sunFogEnabledReadOnly", 0 ) ); + SetDevDvar( "scr_sunFogColor", GetDvarVector( "g_sunFogColorReadOnly", ( 1, 0, 0 ) ) ); + SetDevDvar( "scr_sunfogColorIntensity", GetDvar( "g_sunFogColorIntensityReadOnly", 1.0 ) ); + SetDevDvar( "scr_sunFogDir", GetDvarVector( "g_sunFogDirReadOnly", ( 1, 0, 0 ) ) ); + SetDevDvar( "scr_sunFogBeginFadeAngle", GetDvar( "g_sunFogBeginFadeAngleReadOnly", 0.0 ) ); + SetDevDvar( "scr_sunFogEndFadeAngle", GetDvar( "g_sunFogEndFadeAngleReadOnly", 180.0 ) ); + SetDevDvar( "scr_sunFogScale", GetDvar( "g_sunFogScaleReadOnly", 1.0 ) ); + + // The r_sky_fog vars are only active if tweaks on them are enabled, which is a little strange... + SetDevDvar( "scr_skyFogIntensity", GetDvar( "r_sky_fog_intensity" ), 0.0 ); + SetDevDvar( "scr_skyFogMinAngle", GetDvar( "r_sky_fog_min_angle" ), 0.0 ); + SetDevDvar( "scr_skyFogMaxAngle", GetDvar( "r_sky_fog_max_angle" ), 90.0 ); +#/ +} + +/# +translateFogSlidersToScript() +{ + level.fogexphalfplane = limit( GetDvarFloat( "scr_fog_exp_halfplane" ) ); + level.fognearplane = limit( GetDvarFloat( "scr_fog_nearplane" ) ); + level.fogHDRColorIntensity = limit( GetDvarFloat( "scr_fog_color_intensity" ) ); + level.fogmaxopacity = limit( GetDvarFloat( "scr_fog_max_opacity" ) ); + + level.sunFogEnabled = GetDvarInt( "scr_sunFogEnabled" ); + level.sunFogHDRColorIntensity = limit( GetDvarFloat( "scr_sunFogColorIntensity" ) ); + level.sunFogBeginFadeAngle = limit( GetDvarFloat( "scr_sunFogBeginFadeAngle" ) ); + level.sunFogEndFadeAngle = limit( GetDvarFloat( "scr_sunFogEndFadeAngle" ) ); + level.sunFogScale = limit( GetDvarFloat( "scr_sunFogScale" ) ); + + level.skyFogIntensity = limit( GetDvarFloat( "scr_skyFogIntensity" ) ); + level.skyFogMinAngle = limit( GetDvarFloat( "scr_skyFogMinAngle" ) ); + level.skyFogMaxAngle = limit( GetDvarFloat( "scr_skyFogMaxAngle" ) ); + + fogColor = GetDvarVector( "scr_fog_color" ); + r = limit( fogColor[0] ); + g = limit( fogColor[1] ); + b = limit( fogColor[2] ); + level.fogcolor = ( r, g , b ); + + sunFogColor = GetDvarVector( "scr_sunFogColor" ); + r = limit( sunFogColor[0] ); + g = limit( sunFogColor[1] ); + b = limit( sunFogColor[2] ); + level.sunFogColor =( r, g , b ); + + sunFogDir = GetDvarVector( "scr_sunFogDir" ); + x = limit( sunFogDir[0]); + y = limit( sunFogDir[1]); + z = limit( sunFogDir[2]); + level.sunFogDir = ( x, y, z ); +} + +limit( i ) +{ + limit = 0.001; + if ( ( i < limit ) && ( i > ( limit * -1 ) ) ) + i = 0; + return i; +} + +fogslidercheck() +{ + // catch all those cases where a slider can be pushed to a place of conflict + if ( level.sunFogBeginFadeAngle >= level.sunFogEndFadeAngle ) + { + level.sunFogBeginFadeAngle = level.sunFogEndFadeAngle - 1; + SetDvar( "scr_sunFogBeginFadeAngle", level.sunFogBeginFadeAngle ); + } + + if ( level.sunFogEndFadeAngle <= level.sunFogBeginFadeAngle ) + { + level.sunFogEndFadeAngle = level.sunFogBeginFadeAngle + 1; + SetDvar( "scr_sunFogEndFadeAngle", level.sunFogEndFadeAngle ); + } +} + +add_vision_set_to_list( vision_set_name ) +{ + assert( IsDefined( level.vision_set_names ) ); + + found = array_find( level.vision_set_names, vision_set_name ); + if ( IsDefined( found ) ) + return; + + level.vision_set_names = array_add( level.vision_set_names, vision_set_name ); +} + +print_vision( vision_set ) +{ + found = array_find( level.vision_set_names, vision_set ); + if ( !IsDefined( found ) ) + return; + + fileprint_launcher_start_file(); + + // Glow + fileprint_launcher( "r_glow \"" + GetDvar( "r_glowTweakEnable" ) + "\"" ); + fileprint_launcher( "r_glowRadius0 \"" + GetDvar( "r_glowTweakRadius0" ) + "\"" ); + fileprint_launcher( "r_glowBloomPinch \"" + GetDvar( "r_glowTweakBloomPinch" ) + "\"" ); + fileprint_launcher( "r_glowBloomCutoff \"" + GetDvar( "r_glowTweakBloomCutoff" ) + "\"" ); + fileprint_launcher( "r_glowBloomDesaturation \"" + GetDvar( "r_glowTweakBloomDesaturation" ) + "\"" ); + fileprint_launcher( "r_glowBloomIntensity0 \"" + GetDvar( "r_glowTweakBloomIntensity0" ) + "\"" ); + fileprint_launcher( "r_glowUseAltCutoff \"" + GetDvar( "r_glowTweakUseAltCutoff" ) + "\"" ); + fileprint_launcher( " " ); + + // Film + fileprint_launcher( "r_filmEnable \"" + GetDvar( "r_filmTweakEnable" ) + "\"" ); + fileprint_launcher( "r_filmContrast \"" + GetDvar( "r_filmTweakContrast" ) + "\"" ); + fileprint_launcher( "r_filmBrightness \"" + GetDvar( "r_filmTweakBrightness" ) + "\"" ); + fileprint_launcher( "r_filmDesaturation \"" + GetDvar( "r_filmTweakDesaturation" ) + "\"" ); + fileprint_launcher( "r_filmDesaturationDark \"" + GetDvar( "r_filmTweakDesaturationDark" ) + "\"" ); + fileprint_launcher( "r_filmInvert \"" + GetDvar( "r_filmTweakInvert" ) + "\"" ); + fileprint_launcher( "r_filmLightTint \"" + GetDvar( "r_filmTweakLightTint" ) + "\"" ); + fileprint_launcher( "r_filmMediumTint \"" + GetDvar( "r_filmTweakMediumTint" ) + "\"" ); + fileprint_launcher( "r_filmDarkTint \"" + GetDvar( "r_filmTweakDarkTint" ) + "\"" ); + fileprint_launcher( " " ); + + // Character Light + fileprint_launcher( "r_primaryLightUseTweaks \"" + GetDvar( "r_primaryLightUseTweaks" ) + "\"" ); + fileprint_launcher( "r_primaryLightTweakDiffuseStrength \"" + GetDvar( "r_primaryLightTweakDiffuseStrength" ) + "\"" ); + fileprint_launcher( "r_primaryLightTweakSpecularStrength \"" + GetDvar( "r_primaryLightTweakSpecularStrength" ) + "\"" ); + fileprint_launcher( "r_charLightAmbient \"" + GetDvar( "r_charLightAmbient" ) + "\"" ); + fileprint_launcher( "r_primaryLightUseTweaks_NG \"" + GetDvar( "r_primaryLightUseTweaks_NG" ) + "\"" ); + fileprint_launcher( "r_primaryLightTweakDiffuseStrength_NG \"" + GetDvar( "r_primaryLightTweakDiffuseStrength_NG" ) + "\"" ); + fileprint_launcher( "r_primaryLightTweakSpecularStrength_NG \"" + GetDvar( "r_primaryLightTweakSpecularStrength_NG" ) + "\"" ); + fileprint_launcher( "r_charLightAmbient_NG \"" + GetDvar( "r_charLightAmbient_NG" ) + "\"" ); + fileprint_launcher( " " ); + + // Viewmodel Light + fileprint_launcher( "r_viewModelPrimaryLightUseTweaks \"" + GetDvar( "r_viewModelPrimaryLightUseTweaks" ) + "\"" ); + fileprint_launcher( "r_viewModelPrimaryLightTweakDiffuseStrength \"" + GetDvar( "r_viewModelPrimaryLightTweakDiffuseStrength" ) + "\"" ); + fileprint_launcher( "r_viewModelPrimaryLightTweakSpecularStrength \"" + GetDvar( "r_viewModelPrimaryLightTweakSpecularStrength" ) + "\"" ); + fileprint_launcher( "r_viewModelLightAmbient \"" + GetDvar( "r_viewModelLightAmbient" ) + "\"" ); + fileprint_launcher( "r_viewModelPrimaryLightUseTweaks_NG \"" + GetDvar( "r_viewModelPrimaryLightUseTweaks_NG" ) + "\"" ); + fileprint_launcher( "r_viewModelPrimaryLightTweakDiffuseStrength_NG \"" + GetDvar( "r_viewModelPrimaryLightTweakDiffuseStrength_NG" ) + "\"" ); + fileprint_launcher( "r_viewModelPrimaryLightTweakSpecularStrength_NG \"" + GetDvar( "r_viewModelPrimaryLightTweakSpecularStrength_NG" ) + "\"" ); + fileprint_launcher( "r_viewModelLightAmbient_NG \"" + GetDvar( "r_viewModelLightAmbient_NG" ) + "\"" ); + fileprint_launcher( " " ); + + // Material Bloom + fileprint_launcher( "r_materialBloomRadius \"" + GetDvar( "r_materialBloomRadius" ) + "\"" ); + fileprint_launcher( "r_materialBloomPinch \"" + GetDvar( "r_materialBloomPinch" ) + "\"" ); + fileprint_launcher( "r_materialBloomIntensity \"" + GetDvar( "r_materialBloomIntensity" ) + "\"" ); + fileprint_launcher( "r_materialBloomLuminanceCutoff \"" + GetDvar( "r_materialBloomLuminanceCutoff" ) + "\"" ); + fileprint_launcher( "r_materialBloomDesaturation \"" + GetDvar( "r_materialBloomDesaturation" ) + "\"" ); + fileprint_launcher( " " ); + + // Volume Light Scatter + fileprint_launcher( "r_volumeLightScatter \"" + GetDvar( "r_volumeLightScatterUseTweaks" ) + "\"" ); + fileprint_launcher( "r_volumeLightScatterLinearAtten \"" + GetDvar( "r_volumeLightScatterLinearAtten" ) + "\"" ); + fileprint_launcher( "r_volumeLightScatterQuadraticAtten \"" + GetDvar( "r_volumeLightScatterQuadraticAtten" ) + "\"" ); + fileprint_launcher( "r_volumeLightScatterAngularAtten \"" + GetDvar( "r_volumeLightScatterAngularAtten" ) + "\"" ); + fileprint_launcher( "r_volumeLightScatterDepthAttenNear \"" + GetDvar( "r_volumeLightScatterDepthAttenNear" ) + "\"" ); + fileprint_launcher( "r_volumeLightScatterDepthAttenFar \"" + GetDvar( "r_volumeLightScatterDepthAttenFar" ) + "\"" ); + fileprint_launcher( "r_volumeLightScatterBackgroundDistance \"" + GetDvar( "r_volumeLightScatterBackgroundDistance" ) + "\"" ); + fileprint_launcher( "r_volumeLightScatterColor \"" + GetDvar( "r_volumeLightScatterColor" ) + "\"" ); + fileprint_launcher( " " ); + + // SSAO + fileprint_launcher( "r_ssaoStrength \"" + GetDvar( "r_ssaoStrength" ) + "\"" ); + fileprint_launcher( "r_ssaoPower \"" + GetDvar( "r_ssaoPower" ) + "\"" ); + fileprint_launcher( " " ); + + // Rim Light + fileprint_launcher( "r_rimLight0Pitch \"" + GetDvar( "r_rimLight0Pitch" ) + "\"" ); + fileprint_launcher( "r_rimLight0Heading \"" + GetDvar( "r_rimLight0Heading" ) + "\"" ); + fileprint_launcher( "r_rimLightDiffuseIntensity \"" + GetDvar( "r_rimLightDiffuseIntensity" ) + "\"" ); + fileprint_launcher( "r_rimLightSpecIntensity \"" + GetDvar( "r_rimLightSpecIntensity" ) + "\"" ); + fileprint_launcher( "r_rimLightBias \"" + GetDvar( "r_rimLightBias" ) + "\"" ); + fileprint_launcher( "r_rimLightPower \"" + GetDvar( "r_rimLightPower" ) + "\"" ); + fileprint_launcher( "r_rimLight0Color \"" + GetDvar( "r_rimLight0Color" ) + "\"" ); + fileprint_launcher( "r_rimLight0Pitch_NG \"" + GetDvar( "r_rimLight0Pitch_NG" ) + "\"" ); + fileprint_launcher( "r_rimLight0Heading_NG \"" + GetDvar( "r_rimLight0Heading_NG" ) + "\"" ); + fileprint_launcher( "r_rimLightDiffuseIntensity_NG \"" + GetDvar( "r_rimLightDiffuseIntensity_NG" ) + "\"" ); + fileprint_launcher( "r_rimLightSpecIntensity_NG \"" + GetDvar( "r_rimLightSpecIntensity_NG" ) + "\"" ); + fileprint_launcher( "r_rimLightBias_NG \"" + GetDvar( "r_rimLightBias_NG" ) + "\"" ); + fileprint_launcher( "r_rimLightPower_NG \"" + GetDvar( "r_rimLightPower_NG" ) + "\"" ); + fileprint_launcher( "r_rimLight0Color_NG \"" + GetDvar( "r_rimLight0Color_NG" ) + "\"" ); + fileprint_launcher( " " ); + + // Unlit Surface + fileprint_launcher( "r_unlitSurfaceHDRScalar \"" + GetDvar( "r_unlitSurfaceHDRScalar" ) + "\"" ); + fileprint_launcher( " " ); + + // Colorization + colorizationName = GetDvar( "r_colorizationTweakName" ); + toneMappingName = GetDvar( "r_toneMappingTweakName" ); + clutMaterialName = GetDvar( "r_clutMaterialTweakName" ); + if ( colorizationName != "" ) + fileprint_launcher( "colorizationSet \"" + colorizationName + "\"" ); + if ( toneMappingName != "" ) + fileprint_launcher( "toneMapping \"" + toneMappingName + "\"" ); + if ( clutMaterialName != "" ) + fileprint_launcher( "clutMaterial \"" + clutMaterialName + "\"" ); + + return fileprint_launcher_end_file( "\\share\\raw\\vision\\" + vision_set + ".vision", true ); +} + +print_fog_ents( forMP ) +{ + foreach( ent in level.vision_set_fog ) + { + if( !isdefined( ent.name ) ) + continue; + + if ( forMP ) + fileprint_launcher( "\tent = maps\\mp\\_art::create_vision_set_fog( \"" + ent.name + "\" );"); + else + fileprint_launcher( "\tent = maps\\_utility::create_vision_set_fog( \"" + ent.name + "\" );"); + + fileprint_launcher( "\tent.startDist = " + ent.startDist + ";" ); + fileprint_launcher( "\tent.halfwayDist = " + ent.halfwayDist + ";" ); + fileprint_launcher( "\tent.red = " + ent.red + ";" ); + fileprint_launcher( "\tent.green = " + ent.green + ";" ); + fileprint_launcher( "\tent.blue = " + ent.blue + ";" ); + fileprint_launcher( "\tent.HDRColorIntensity = " + ent.HDRColorIntensity + ";" ); + fileprint_launcher( "\tent.maxOpacity = " + ent.maxOpacity + ";" ); + fileprint_launcher( "\tent.transitionTime = " + ent.transitionTime + ";" ); + fileprint_launcher( "\tent.sunFogEnabled = " + ent.sunFogEnabled + ";" ); + fileprint_launcher( "\tent.sunRed = " + ent.sunRed + ";" ); + fileprint_launcher( "\tent.sunGreen = " + ent.sunGreen + ";" ); + fileprint_launcher( "\tent.sunBlue = " + ent.sunBlue + ";" ); + fileprint_launcher( "\tent.HDRSunColorIntensity = " + ent.HDRSunColorIntensity + ";" ); + fileprint_launcher( "\tent.sunDir = " + ent.sunDir + ";" ); + fileprint_launcher( "\tent.sunBeginFadeAngle = " + ent.sunBeginFadeAngle + ";" ); + fileprint_launcher( "\tent.sunEndFadeAngle = " + ent.sunEndFadeAngle + ";" ); + fileprint_launcher( "\tent.normalFogScale = " + ent.normalFogScale + ";" ); + fileprint_launcher( "\tent.skyFogIntensity = " + ent.skyFogIntensity + ";" ); + fileprint_launcher( "\tent.skyFogMinAngle = " + ent.skyFogMinAngle + ";" ); + fileprint_launcher( "\tent.skyFogMaxAngle = " + ent.skyFogMaxAngle + ";" ); + + if ( IsDefined( ent.HDROverride ) ) + fileprint_launcher( "\tent.HDROverride = \"" + ent.HDROverride + "\";" ); + + if( isDefined( ent.stagedVisionSets ) ) + { + string = " "; + for( i = 0; i < ent.stagedVisionSets.size; i++ ) + { + string = string + "\""+ ent.stagedVisionSets[i] + "\""; + if ( i < ent.stagedVisionSets.size - 1 ) + string = string + ","; + string = string + " "; + } + + fileprint_launcher( "\tent.stagedVisionSets = [" + string + "];" ); + } + + fileprint_launcher ( " " ); + } +} + +print_fog_ents_csv() +{ + foreach( ent in level.vision_set_fog ) + { + if( !isdefined( ent.name ) ) + continue; + + targettedByHDROverride = false; + foreach( ent2 in level.vision_set_fog ) + { + if ( isdefined(ent2.HDROverride) && ent2.HDROverride == ent.name ) + { + targettedByHDROverride = true; + break; + } + } + + if ( !targettedByHDROverride ) + fileprint_launcher( "rawfile,vision/"+ent.name+".vision"); + } +} +#/ diff --git a/common_scripts/_bcs_location_trigs.gsc b/common_scripts/_bcs_location_trigs.gsc new file mode 100644 index 0000000..62188f7 --- /dev/null +++ b/common_scripts/_bcs_location_trigs.gsc @@ -0,0 +1,3799 @@ +#include common_scripts\utility; + +bcs_location_trigs_init() +{ + ASSERT( !IsDefined( level.bcs_location_mappings ) ); + level.bcs_location_mappings = []; + + bcs_location_trigger_mapping(); + bcs_trigs_assign_aliases(); + + // now that the trigger ents have their aliases set on them, clear out our big array + // so we can save on script variables + level.bcs_location_mappings = undefined; + + anim.locationLastCalloutTimes = []; +} + +bcs_trigs_assign_aliases() +{ + ASSERT( !IsDefined( anim.bcs_locations ) ); + anim.bcs_locations = []; + + ents = GetEntArray(); + trigs = []; + foreach( trig in ents ) + { + if( IsDefined( trig.classname ) && IsSubStr( trig.classname, "trigger_multiple_bcs" ) ) + { + trigs[ trigs.size ] = trig; + } + } + + foreach( trig in trigs ) + { + if ( !IsDefined( level.bcs_location_mappings[ trig.classname ] ) ) + { + /# + // iPrintln( "^2" + "WARNING: Couldn't find bcs location mapping for battlechatter trigger with classname " + trig.classname ); + // do nothing since too many prints kills the command buffer + #/ + } + else + { + aliases = ParseLocationAliases( level.bcs_location_mappings[ trig.classname ] ); + if( aliases.size > 1 ) + { + aliases = array_randomize( aliases ); + } + + trig.locationAliases = aliases; + } + } + + anim.bcs_locations = trigs; +} + +// parses locationStr using a space as a token and returns an array of the data in that field +ParseLocationAliases( locationStr ) +{ + locationAliases = StrTok( locationStr, " " ); + return locationAliases; +} + +add_bcs_location_mapping( classname, alias ) +{ + // see if we have to add to an existing entry + if( IsDefined( level.bcs_location_mappings[ classname ] ) ) + { + existing = level.bcs_location_mappings[ classname ]; + existingArr = ParseLocationAliases( existing ); + aliases = ParseLocationAliases( alias ); + + foreach( a in aliases ) + { + foreach( e in existingArr ) + { + if( a == e ) + { + return; + } + } + } + + existing += " " + alias; + level.bcs_location_mappings[ classname ] = existing; + + return; + } + + // otherwise make a new entry + level.bcs_location_mappings[ classname ] = alias; +} + + +// here's where we set up each kind of trigger and map them to their (partial) soundaliases +bcs_location_trigger_mapping() +{ + if ( isSP() ) + { + generic_locations(); + + // SP levels + blackice_locations(); + carrier_locations(); + clockwork_locations(); + cornered_locations(); + enemyhq_locations(); + factory_locations(); + flood_locations(); + homecoming_locations(); + jungleghosts_locations(); + nml_locations(); + oilrocks_locations(); + vegas_locations(); + } + else + { + prisonbreak(); + chasm(); + dart(); + farenheit(); + flooded(); + frag(); + hashima(); + lonestar(); + skeleton(); + snow(); + sovereign(); + strikezone(); + warhawk(); + zebra(); + + red_river(); + rumble(); + swamp(); + boneyard(); + + dome(); + impact(); + behemoth(); + battery(); + + favela(); + pirate(); + zulu(); + dig(); + + shipment(); + conflict(); + zerosub(); + mine(); + } +} + +generic_locations() +{ +/*QUAKED trigger_multiple_bcs_generic_doorway_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="doorway_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_generic_doorway_generic", "doorway_generic" ); + +/*QUAKED trigger_multiple_bcs_generic_window_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="window_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_generic_window_generic", "window_generic" ); + +/*QUAKED trigger_multiple_bcs_generic_1stfloor_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="1stfloor_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_generic_1stfloor_generic", "1stfloor_generic" ); + +/*QUAKED trigger_multiple_bcs_generic_1stfloor_doorway (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="1stfloor_doorway" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_generic_1stfloor_doorway", "1stfloor_doorway" ); + +/*QUAKED trigger_multiple_bcs_generic_1stfloor_window (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="1stfloor_window" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_generic_1stfloor_window", "1stfloor_window" ); + +/*QUAKED trigger_multiple_bcs_generic_2ndfloor_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="2ndfloor_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_generic_2ndfloor_generic", "2ndfloor_generic" ); + +/*QUAKED trigger_multiple_bcs_generic_2ndfloor_window (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="2ndfloor_window" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_generic_2ndfloor_window", "2ndfloor_window" ); + +/*QUAKED trigger_multiple_bcs_generic_rooftop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rooftop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_generic_rooftop", "rooftop" ); + +/*QUAKED trigger_multiple_bcs_generic_2ndfloor_balcony (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="2ndfloor_balcony" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_generic_2ndfloor_balcony", "2ndfloor_balcony" ); +} + +blackice_locations() +{ +/*QUAKED trigger_multiple_bcs_blackice_airconditioner_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="airconditioner_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_airconditioner_generic", "airconditioner_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_crate_ammo (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crate_ammo" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_crate_ammo", "crate_ammo" ); + +/*QUAKED trigger_multiple_bcs_blackice_bar_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_bar_generic", "bar_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_barrels_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="barrels_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_barrels_generic", "barrels_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_bookshelf_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bookshelf_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_bookshelf_generic", "bookshelf_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_bridge_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_bridge_generic", "bridge_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_cart_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cart_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_cart_generic", "cart_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_couch_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="couch_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_couch_generic", "couch_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_crates_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crates_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_crates_generic", "crates_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_engine_left (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="engine_left" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_engine_left", "engine_left" ); + +/*QUAKED trigger_multiple_bcs_blackice_engine_right (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="engine_right" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_engine_right", "engine_right" ); + +/*QUAKED trigger_multiple_bcs_blackice_fence_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fence_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_fence_generic", "fence_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_forklift_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="forklift_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_forklift_generic", "forklift_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_generator_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="generator_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_generator_generic", "generator_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_loadingbay_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="loadingbay_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_loadingbay_generic", "loadingbay_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_pipes_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pipes_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_pipes_generic", "pipes_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_platform_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="platform_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_platform_generic", "platform_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_pooltable_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pooltable_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_pooltable_generic", "pooltable_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_porch_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="porch_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_porch_generic", "porch_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_ramp_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="ramp_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_ramp_generic", "ramp_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_building_red (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="building_red" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_building_red", "building_red" ); + +/*QUAKED trigger_multiple_bcs_blackice_snowbank_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="snowbank_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_snowbank_generic", "snowbank_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_snowmobile_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="snowmobile_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_snowmobile_generic", "snowmobile_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_tank_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tank_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_tank_generic", "tank_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_tent_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tent_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_tent_generic", "tent_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_tires_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tires_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_tires_generic", "tires_generic" ); + +/*QUAKED trigger_multiple_bcs_blackice_catwalk_upper (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="catwalk_upper" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_catwalk_upper", "catwalk_upper" ); + +/*QUAKED trigger_multiple_bcs_blackice_deck_upper (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="deck_upper" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_blackice_deck_upper", "deck_upper" ); +} + +carrier_locations() +{ +/*QUAKED trigger_multiple_bcs_carrier_plane_jet (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="plane_jet" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_carrier_plane_jet", "plane_jet" ); + +/*QUAKED trigger_multiple_bcs_carrier_plane_f18 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="plane_f18" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_carrier_plane_f18", "plane_f18" ); + +/*QUAKED trigger_multiple_bcs_carrier_towcart_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="towcart_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_carrier_towcart_generic", "towcart_generic" ); + +/*QUAKED trigger_multiple_bcs_carrier_forklift_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="forklift_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_carrier_forklift_generic", "forklift_generic" ); + +/*QUAKED trigger_multiple_bcs_carrier_ohelo_osprey (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="ohelo_osprey" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_carrier_ohelo_osprey", "ohelo_osprey" ); + +/*QUAKED trigger_multiple_bcs_carrier_plane_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="plane_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_carrier_plane_generic", "plane_generic" ); + +/*QUAKED trigger_multiple_bcs_carrier_deck_outer (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="deck_outer" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_carrier_deck_outer", "deck_outer" ); + +/*QUAKED trigger_multiple_bcs_carrier_railing_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="railing_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_carrier_railing_generic", "railing_generic" ); +} + +clockwork_locations() +{ +/*QUAKED trigger_multiple_bcs_clockwork_pillar_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pillar_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_pillar_generic", "pillar_generic" ); + +/*QUAKED trigger_multiple_bcs_clockwork_pool_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pool_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_pool_generic", "pool_generic" ); + +/*QUAKED trigger_multiple_bcs_clockwork_tram_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tram_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_tram_generic", "tram_generic" ); + +/*QUAKED trigger_multiple_bcs_clockwork_platform_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="platform_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_platform_generic", "platform_generic" ); + +/*QUAKED trigger_multiple_bcs_clockwork_platform_left (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="platform_left" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_platform_left", "platform_left" ); + +/*QUAKED trigger_multiple_bcs_clockwork_platform_right (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="platform_right" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_platform_right", "platform_right" ); + +/*QUAKED trigger_multiple_bcs_clockwork_stairs_left (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="stairs_left" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_stairs_left", "stairs_left" ); + +/*QUAKED trigger_multiple_bcs_clockwork_stairs_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="stairs_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_stairs_generic", "stairs_generic" ); + +/*QUAKED trigger_multiple_bcs_clockwork_stairs_right (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="stairs_right" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_stairs_right", "stairs_right" ); + +/*QUAKED trigger_multiple_bcs_clockwork_walkway_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="walkway_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_walkway_generic", "walkway_generic" ); + +/*QUAKED trigger_multiple_bcs_clockwork_walkway_left (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="walkway_left" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_walkway_left", "walkway_left" ); + +/*QUAKED trigger_multiple_bcs_clockwork_walkway_right (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="walkway_right" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_walkway_right", "walkway_right" ); + +/*QUAKED trigger_multiple_bcs_clockwork_ramp_main (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="ramp_main" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_ramp_main", "ramp_main" ); + +/*QUAKED trigger_multiple_bcs_clockwork_catwalk_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="catwalk_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_catwalk_generic", "catwalk_generic" ); + +/*QUAKED trigger_multiple_bcs_clockwork_pool_below (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pool_below" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_clockwork_pool_below", "pool_below" ); + + +} + +cornered_locations() +{ +/*QUAKED trigger_multiple_bcs_cornered_balcony_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="balcony_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_cornered_balcony_generic", "balcony_generic" ); + +/*QUAKED trigger_multiple_bcs_cornered_windows_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="windows_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_cornered_windows_generic", "windows_generic" ); + +/*QUAKED trigger_multiple_bcs_cornered_planter_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="planter_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_cornered_planter_generic", "planter_generic" ); + +/*QUAKED trigger_multiple_bcs_cornered_wall_back (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="wall_back" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_cornered_wall_back", "wall_back" ); + +/*QUAKED trigger_multiple_bcs_cornered_tree_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tree_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_cornered_tree_generic", "tree_generic" ); + +/*QUAKED trigger_multiple_bcs_cornered_rocks_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rocks_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_cornered_rocks_generic", "rocks_generic" ); + +/*QUAKED trigger_multiple_bcs_cornered_aquarium_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="aquarium_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_cornered_aquarium_generic", "aquarium_generic" ); +} + +enemyhq_locations() +{ +/*QUAKED trigger_multiple_bcs_enemyhq_conession_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="conession_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_conession_generic", "conession_generic" ); + +/*QUAKED trigger_multiple_bcs_enemyhq_counter_burgertown (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="counter_burgertown" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_counter_burgertown", "counter_burgertown" ); + +/*QUAKED trigger_multiple_bcs_enemyhq_concession_nate (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="concession_nate" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_concession_nate", "concession_nate" ); + +/*QUAKED trigger_multiple_bcs_enemyhq_stairs_top (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="stairs_top" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_stairs_top", "stairs_top" ); + +/*QUAKED trigger_multiple_bcs_enemyhq_walkway_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="walkway_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_walkway_generic", "walkway_generic" ); + +/*QUAKED trigger_multiple_bcs_enemyhq_rubble_pile (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rubble_pile" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_rubble_pile", "rubble_pile" ); + +/*QUAKED trigger_multiple_bcs_enemyhq_statue_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="statue_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_statue_generic", "statue_generic" ); + +/*QUAKED trigger_multiple_bcs_enemyhq_counter_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="counter_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_counter_generic", "counter_generic" ); + +/*QUAKED trigger_multiple_bcs_enemyhq_pillar_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pillar_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_pillar_generic", "pillar_generic" ); + +/*QUAKED trigger_multiple_bcs_enemyhq_cart_trash (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cart_trash" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_enemyhq_cart_trash", "cart_trash" ); +} + +factory_locations() +{ +/*QUAKED trigger_multiple_bcs_factory_lockerroom_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="lockerroom_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_factory_lockerroom_generic", "lockerroom_generic" ); + +/*QUAKED trigger_multiple_bcs_factory_server_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="server_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_factory_server_generic", "server_generic" ); + +/*QUAKED trigger_multiple_bcs_factory_secondfloor_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="secondfloor_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_factory_secondfloor_generic", "secondfloor_generic" ); + +/*QUAKED trigger_multiple_bcs_factory_catwalk_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="catwalk_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_factory_catwalk_generic", "catwalk_generic" ); + +/*QUAKED trigger_multiple_bcs_factory_acunit_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="acunit_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_factory_acunit_generic", "acunit_generic" ); + +/*QUAKED trigger_multiple_bcs_factory_airduct_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="airduct_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_factory_airduct_generic", "airduct_generic" ); + +} + +flood_locations() +{ +/*QUAKED trigger_multiple_bcs_flood_tank_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tank_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_tank_generic", "tank_generic" ); + +/*QUAKED trigger_multiple_bcs_flood_barrier_hesco (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="barrier_hesco" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_barrier_hesco", "barrier_hesco" ); + +/*QUAKED trigger_multiple_bcs_flood_planter_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="planter_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_planter_generic", "planter_generic" ); + +/*QUAKED trigger_multiple_bcs_flood_pillar_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pillar_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_pillar_generic", "pillar_generic" ); + +/*QUAKED trigger_multiple_bcs_flood_truck_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="truck_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_truck_generic", "truck_generic" ); + +/*QUAKED trigger_multiple_bcs_flood_crates_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crates_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_crates_generic", "crates_generic" ); + +/*QUAKED trigger_multiple_bcs_flood_duct_air (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="duct_air" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_duct_air", "duct_air" ); + +/*QUAKED trigger_multiple_bcs_flood_unit_ac (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="unit_ac" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_unit_ac", "unit_ac" ); + +/*QUAKED trigger_multiple_bcs_flood_walkway_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="walkway_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_walkway_generic", "walkway_generic" ); + +/*QUAKED trigger_multiple_bcs_flood_pit_rubble (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pit_rubble" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_pit_rubble", "pit_rubble" ); + +/*QUAKED trigger_multiple_bcs_flood_car_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="car_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_car_generic", "car_generic" ); + +/*QUAKED trigger_multiple_bcs_flood_van_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="van_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_flood_van_generic", "van_generic" ); +} + +homecoming_locations() +{ +/*QUAKED trigger_multiple_bcs_homecoming_crate_ammo (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crate_ammo" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_crate_ammo", "crate_ammo" ); + +/*QUAKED trigger_multiple_bcs_homecoming_barrier_hesco (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="barrier_hesco" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_barrier_hesco", "barrier_hesco" ); + +/*QUAKED trigger_multiple_bcs_homecoming_shack_blue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="shack_blue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_shack_blue", "shack_blue" ); + +/*QUAKED trigger_multiple_bcs_homecoming_barrier_concrete (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="barrier_concrete" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_barrier_concrete", "barrier_concrete" ); + +/*QUAKED trigger_multiple_bcs_homecoming_statue_artemis (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="statue_artemis" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_statue_artemis", "statue_artemis" ); + +/*QUAKED trigger_multiple_bcs_homecoming_barrels_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="barrels_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_barrels_generic", "barrels_generic" ); + +/*QUAKED trigger_multiple_bcs_homecoming_crate_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crate_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_crate_generic", "crate_generic" ); + +/*QUAKED trigger_multiple_bcs_homecoming_bulldozer_geenric (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bulldozer_geenric" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_bulldozer_geenric", "bulldozer_geenric" ); + +/*QUAKED trigger_multiple_bcs_homecoming_towers_hesco (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="towers_hesco" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_towers_hesco", "towers_hesco" ); + +/*QUAKED trigger_multiple_bcs_homecoming_sandbags_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="sandbags_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_sandbags_generic", "sandbags_generic" ); + +/*QUAKED trigger_multiple_bcs_homecoming_pillar_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pillar_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_homecoming_pillar_generic", "pillar_generic" ); +} + +jungleghosts_locations() +{ +/*QUAKED trigger_multiple_bcs_jungleghosts_rocks_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rocks_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_jungleghosts_rocks_generic", "rocks_generic" ); + +/*QUAKED trigger_multiple_bcs_jungleghosts_bridge_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_jungleghosts_bridge_generic", "bridge_generic" ); + +/*QUAKED trigger_multiple_bcs_jungleghosts_fern_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fern_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_jungleghosts_fern_generic", "fern_generic" ); + +/*QUAKED trigger_multiple_bcs_jungleghosts_stream_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="stream_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_jungleghosts_stream_generic", "stream_generic" ); + +/*QUAKED trigger_multiple_bcs_jungleghosts_log_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="log_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_jungleghosts_log_generic", "log_generic" ); + +/*QUAKED trigger_multiple_bcs_jungleghosts_rock_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rock_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_jungleghosts_rock_generic", "rock_generic" ); + +/*QUAKED trigger_multiple_bcs_jungleghosts_stump_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="stump_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_jungleghosts_stump_generic", "stump_generic" ); + +/*QUAKED trigger_multiple_bcs_jungleghosts_tree_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tree_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_jungleghosts_tree_generic", "tree_generic" ); +} + +nml_locations() +{ +/*QUAKED trigger_multiple_bcs_nml_dirt_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dirt_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_nml_dirt_generic", "dirt_generic" ); + +/*QUAKED trigger_multiple_bcs_nml_trailer_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="trailer_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_nml_trailer_generic", "trailer_generic" ); + +/*QUAKED trigger_multiple_bcs_nml_building_blue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="building_blue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_nml_building_blue", "building_blue" ); + +/*QUAKED trigger_multiple_bcs_nml_bridge_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_nml_bridge_generic", "bridge_generic" ); + +/*QUAKED trigger_multiple_bcs_nml_garage_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="garage_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_nml_garage_generic", "garage_generic" ); + +/*QUAKED trigger_multiple_bcs_nml_sandbags_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="sandbags_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_nml_sandbags_generic", "sandbags_generic" ); +} + +oilrocks_locations() +{ +/*QUAKED trigger_multiple_bcs_oilrocks_garage_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="garage_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_garage_generic", "garage_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_rooftop_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rooftop_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_rooftop_generic", "rooftop_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_catwalk_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="catwalk_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_catwalk_generic", "catwalk_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_trailer_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="trailer_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_trailer_generic", "trailer_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_stairway_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="stairway_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_stairway_generic", "stairway_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_barrels_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="barrels_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_barrels_generic", "barrels_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_crate_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crate_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_crate_generic", "crate_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_can_trash (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="can_trash" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_can_trash", "can_trash" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_roadblock_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="roadblock_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_roadblock_generic", "roadblock_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_pillar_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pillar_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_pillar_generic", "pillar_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_hallway_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hallway_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_hallway_generic", "hallway_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_forklift_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="forklift_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_forklift_generic", "forklift_generic" ); + +/*QUAKED trigger_multiple_bcs_oilrocks_can_oxygen (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="can_oxygen" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_oilrocks_can_oxygen", "can_oxygen" ); +} + +vegas_locations() +{ +/*QUAKED trigger_multiple_bcs_vegas_planter_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="planter_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_planter_generic", "planter_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_fountain_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fountain_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_fountain_generic", "fountain_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_kiosk_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="kiosk_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_kiosk_generic", "kiosk_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_slotmachines_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="slotmachines_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_slotmachines_generic", "slotmachines_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_rubble_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rubble_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_rubble_generic", "rubble_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_pokertable_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pokertable_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_pokertable_generic", "pokertable_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_debris_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="debris_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_debris_generic", "debris_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_escalator_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="escalator_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_escalator_generic", "escalator_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_couch_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="couch_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_couch_generic", "couch_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_statue_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="statue_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_statue_generic", "statue_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_statue_left (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="statue_left" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_statue_left", "statue_left" ); + +/*QUAKED trigger_multiple_bcs_vegas_statue_right (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="statue_right" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_statue_right", "statue_right" ); + +/*QUAKED trigger_multiple_bcs_vegas_tram_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tram_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_tram_generic", "tram_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_wall_left (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="wall_left" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_wall_left", "wall_left" ); + +/*QUAKED trigger_multiple_bcs_vegas_wall_right (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="wall_right" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_wall_right", "wall_right" ); + +/*QUAKED trigger_multiple_bcs_vegas_tree_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tree_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_tree_generic", "tree_generic" ); + +/*QUAKED trigger_multiple_bcs_vegas_car_police (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="car_police" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_car_police", "car_police" ); + +/*QUAKED trigger_multiple_bcs_vegas_car_taxi (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="car_taxi" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_car_taxi", "car_taxi" ); + +/*QUAKED trigger_multiple_bcs_vegas_car_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="car_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_vegas_car_generic", "car_generic" ); +} + +//--------------------------------------------------------- +// MP +//--------------------------------------------------------- +prisonbreak() +{ +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_ridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="ridge" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_ridge", "ridge" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_constructionyard (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="constructionyard" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_constructionyard", "constructionyard" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_guardtower_generic (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="guardtower_generic" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_guardtower_generic", "guardtower_generic" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_guardtower_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="guardtower_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_guardtower_2ndfloor", "guardtower_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_pipes_blue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pipes_blue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_pipes_blue", "pipes_blue" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_securitystation (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="securitystation" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_securitystation", "securitystation" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_trailer_red (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="trailer_red" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_trailer_red", "trailer_red" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_trailer_blue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="trailer_blue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_trailer_blue", "trailer_blue" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_road (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="road" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_road", "road" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_river (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="river" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_river", "river" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_loggingcamp (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="loggingcamp" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_loggingcamp", "loggingcamp" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_catwalk (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="catwalk" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_catwalk", "catwalk" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_logstack (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="logstack" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_logstack", "logstack" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_tirestack (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tirestack" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_tirestack", "tirestack" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_loggingtruck (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="loggingtruck" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_loggingtruck", "loggingtruck" ); + +/*QUAKED trigger_multiple_bcs_mp_prisonbreak_bridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_prisonbreak_bridge", "bridge" ); + + +} + +chasm() +{ +/*QUAKED trigger_multiple_bcs_mp_chasm_garage_parking (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="garage_parking" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_garage_parking", "garage_parking" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_cubicles (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cubicles" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_cubicles", "cubicles" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_kitchen (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="kitchen" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_kitchen", "kitchen" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_elevator (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="elevator" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_elevator", "elevator" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_stairway (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="stairway" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_stairway", "stairway" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_skybridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="skybridge" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_skybridge", "skybridge" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_diner (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="diner" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_diner", "diner" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_road_main (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="road_main" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_road_main", "road_main" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_rubble_pit (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rubble_pit" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_rubble_pit", "rubble_pit" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_restaurant (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="restaurant" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_restaurant", "restaurant" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_hotel (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hotel" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_hotel", "hotel" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_bar_hotel (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar_hotel" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_bar_hotel", "bar_hotel" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_underground (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="underground" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_underground", "underground" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_subway (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="subway" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_subway", "subway" ); + +/*QUAKED trigger_multiple_bcs_mp_chasm_waterpump (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="waterpump" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_chasm_waterpump", "waterpump" ); +} + +dart() +{ +/*QUAKED trigger_multiple_bcs_mp_dart_gasstation (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="gasstation" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_gasstation", "gasstation" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_autoshop_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="autoshop_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_autoshop_2ndfloor", "autoshop_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_autoshop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="autoshop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_autoshop", "autoshop" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_pinkeez (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pinkeez" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_pinkeez", "pinkeez" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_pinkeez_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pinkeez_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_pinkeez_2ndfloor", "pinkeez_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_alley_stripclub (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="alley_stripclub" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_alley_stripclub", "alley_stripclub" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_pawnshop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pawnshop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_pawnshop", "pawnshop" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_shed_blue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="shed_blue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_shed_blue", "shed_blue" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_motel (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="motel" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_motel", "motel" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_bus_stripclub (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bus_stripclub" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_bus_stripclub", "bus_stripclub" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_bus_motel (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bus_motel" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_bus_motel", "bus_motel" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_diner (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="diner" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_diner", "diner" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_alley_convenience (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="alley_convenience" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_alley_convenience", "alley_convenience" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_intersection (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="intersection" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_intersection", "intersection" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_tank_gasstation (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tank_gasstation" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_tank_gasstation", "tank_gasstation" ); + +/*QUAKED trigger_multiple_bcs_mp_dart_tank_motel (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tank_motel" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dart_tank_motel", "tank_motel" ); +} + +farenheit() +{ +/*QUAKED trigger_multiple_bcs_mp_farenheit_road_main (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="road_main" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_road_main", "road_main" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_library (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="library" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_library", "library" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_grass_tall (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="grass_tall" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_grass_tall", "grass_tall" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_monument (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="monument" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_monument", "monument" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_trailer_red (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="trailer_red" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_trailer_red", "trailer_red" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_restaurant (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="restaurant" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_restaurant", "restaurant" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_underground (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="underground" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_underground", "underground" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_garage_parking (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="garage_parking" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_garage_parking", "garage_parking" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_bar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_bar", "bar" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_escalators (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="escalators" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_escalators", "escalators" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_bridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_bridge", "bridge" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_bridge_under (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge_under" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_bridge_under", "bridge_under" ); + +/*QUAKED trigger_multiple_bcs_mp_farenheit_reception (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="reception" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_farenheit_reception", "reception" ); +} + +flooded() +{ +/*QUAKED trigger_multiple_bcs_mp_flooded_garage_lower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="garage_lower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_garage_lower", "garage_lower" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_garage_upper (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="garage_upper" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_garage_upper", "garage_upper" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_courtyard (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="courtyard" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_courtyard", "courtyard" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_patio (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="patio" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_patio", "patio" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_restaurant (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="restaurant" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_restaurant", "restaurant" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_bar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_bar", "bar" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_kitchen (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="kitchen" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_kitchen", "kitchen" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_skybridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="skybridge" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_skybridge", "skybridge" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_storage_downstairs (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="storage_downstairs" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_storage_downstairs", "storage_downstairs" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_building_office (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="building_office" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_building_office", "building_office" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_breakroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="breakroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_breakroom", "breakroom" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_lobby (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="lobby" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_lobby", "lobby" ); + +/*QUAKED trigger_multiple_bcs_mp_flooded_newsstation (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="newsstation" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_flooded_newsstation", "newsstation" ); +} + +frag() +{ +/*QUAKED trigger_multiple_bcs_mp_frag_lumberyard (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="lumberyard" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_lumberyard", "lumberyard" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_containers (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="containers" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_containers", "containers" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_traintracks (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="traintracks" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_traintracks", "traintracks" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_distillery (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="distillery" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_distillery", "distillery" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_distillery_south (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="distillery_south" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_distillery_south", "distillery_south" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_distillery_north (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="distillery_north" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_distillery_north", "distillery_north" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_distillery_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="distillery_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_distillery_2ndfloor", "distillery_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_sign_porter (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="sign_porter" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_sign_porter", "sign_porter" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_owens (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="owens" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_owens", "owens" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_owens_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="owens_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_owens_2ndfloor", "owens_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_owens_3rdfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="owens_3rdfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_owens_3rdfloor", "owens_3rdfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_pipes_high (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pipes_high" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_pipes_high", "pipes_high" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_junkyard (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="junkyard" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_junkyard", "junkyard" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_warehouse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="warehouse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_warehouse", "warehouse" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_warehouse_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="warehouse_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_warehouse_2ndfloor", "warehouse_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_warehouse_3rdfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="warehouse_3rdfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_warehouse_3rdfloor", "warehouse_3rdfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_roof_broken (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="roof_broken" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_roof_broken", "roof_broken" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_wall_broken (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="wall_broken" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_wall_broken", "wall_broken" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_dumpster_blue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dumpster_blue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_dumpster_blue", "dumpster_blue" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_dumpster_red (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dumpster_red" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_dumpster_red", "dumpster_red" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_fence_metal (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fence_metal" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_fence_metal", "fence_metal" ); + +/*QUAKED trigger_multiple_bcs_mp_frag_window_broken (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="window_broken" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_frag_window_broken", "window_broken" ); + +} + +hashima() +{ +/*QUAKED trigger_multiple_bcs_mp_hashima_playground (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="playground" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_playground", "playground" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_hangar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hangar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_hangar", "hangar" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_sam (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="sam" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_sam", "sam" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_mine (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="mine" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_mine", "mine" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_controlroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="controlroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_controlroom", "controlroom" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_traintracks (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="traintracks" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_traintracks", "traintracks" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_waterfall (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="waterfall" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_waterfall", "waterfall" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_docks (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="docks" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_docks", "docks" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_basement (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="basement" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_basement", "basement" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_tower_water (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tower_water" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_tower_water", "tower_water" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_tower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_tower", "tower" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_building_redbrick (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="building_redbrick" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_building_redbrick", "building_redbrick" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_building_redbrick_2ndflr (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="building_redbrick_2ndflr" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_building_redbrick_2ndflr", "building_redbrick_2ndflr" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_apartment (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="apartment" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_apartment", "apartment" ); + +/*QUAKED trigger_multiple_bcs_mp_hashima_apartment_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="apartment_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_hashima_apartment_2ndfloor", "apartment_2ndfloor" ); + +} + +lonestar() +{ +/*QUAKED trigger_multiple_bcs_mp_lonestar_helicopter_crashed (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="helicopter_crashed" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_helicopter_crashed", "helicopter_crashed" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_tent_fema (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tent_fema" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_tent_fema", "tent_fema" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_carwash (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="carwash" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_carwash", "carwash" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_gasmain (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="gasmain" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_gasmain", "gasmain" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_kiosk (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="kiosk" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_kiosk", "kiosk" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_parking_garage (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="parking_garage" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_parking_garage", "parking_garage" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_burned_building (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="burned_building" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_burned_building", "burned_building" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_gasstation (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="gasstation" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_gasstation", "gasstation" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_rehab (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rehab" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_rehab", "rehab" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_rehab_roof (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rehab_roof" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_rehab_roof", "rehab_roof" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_skybridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="skybridge" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_skybridge", "skybridge" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_office_1stfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="office_1stfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_office_1stfloor", "office_1stfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_office_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="office_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_office_2ndfloor", "office_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_office_roof (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="office_roof" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_office_roof", "office_roof" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_ambulance_service_1stfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="ambulance_service_1stfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_ambulance_service_1stfloor", "ambulance_service_1stfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_ambulance_service_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="ambulance_service_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_ambulance_service_2ndfloor", "ambulance_service_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_hospital_collapsed (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hospital_collapsed" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_hospital_collapsed", "hospital_collapsed" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_solarpanels (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="solarpanels" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_solarpanels", "solarpanels" ); + +/*QUAKED trigger_multiple_bcs_mp_lonestar_garage_blue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="garage_blue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_lonestar_garage_blue", "garage_blue" ); + +} + +skeleton() +{ +/*QUAKED trigger_multiple_bcs_mp_skeleton_castle (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="castle" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_skeleton_castle", "castle" ); + +/*QUAKED trigger_multiple_bcs_mp_skeleton_mansion (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="mansion" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_skeleton_mansion", "mansion" ); + +/*QUAKED trigger_multiple_bcs_mp_skeleton_well (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="well" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_skeleton_well", "well" ); + +/*QUAKED trigger_multiple_bcs_mp_skeleton_hill (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hill" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_skeleton_hill", "hill" ); + +} + +snow() +{ +/*QUAKED trigger_multiple_bcs_mp_snow_crashsite (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crashsite" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_crashsite", "crashsite" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_canyon (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="canyon" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_canyon", "canyon" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_sawmill (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="sawmill" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_sawmill", "sawmill" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_waterwheel (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="waterwheel" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_waterwheel", "waterwheel" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_helicopter (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="helicopter" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_helicopter", "helicopter" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_shipwreck (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="shipwreck" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_shipwreck", "shipwreck" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_shipwreck_bow (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="shipwreck_bow" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_shipwreck_bow", "shipwreck_bow" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_ridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="ridge" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_ridge", "ridge" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_road_main (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="road_main" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_road_main", "road_main" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_totempole (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="totempole" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_totempole", "totempole" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_cabin (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cabin" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_cabin", "cabin" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_boathouse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="boathouse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_boathouse", "boathouse" ); + +/*QUAKED trigger_multiple_bcs_mp_snow_dock_fishing (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dock_fishing" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_snow_dock_fishing", "dock_fishing" ); + +} + +sovereign() +{ +/*QUAKED trigger_multiple_bcs_mp_sovereign_catwalk_blue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="catwalk_blue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_catwalk_blue", "catwalk_blue" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_catwalk_yellow (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="catwalk_yellow" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_catwalk_yellow", "catwalk_yellow" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_centralcommand (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="centralcommand" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_centralcommand", "centralcommand" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_cleanroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cleanroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_cleanroom", "cleanroom" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_warehouse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="warehouse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_warehouse", "warehouse" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_hologram (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hologram" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_hologram", "hologram" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_assemblyline (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="assemblyline" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_assemblyline", "assemblyline" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_commanddeck (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="commanddeck" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_commanddeck", "commanddeck" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_serverroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="serverroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_serverroom", "serverroom" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_breakroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="breakroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_breakroom", "breakroom" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_shaft (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="shaft" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_shaft", "shaft" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_research (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="research" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_research", "research" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_office_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="office_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_office_2ndfloor", "office_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_warehouse_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="warehouse_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_warehouse_2ndfloor", "warehouse_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_crate (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crate" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_crate", "crate" ); + +/*QUAKED trigger_multiple_bcs_mp_sovereign_halogen (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="halogen" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_sovereign_halogen", "halogen" ); + +} + +strikezone() +{ +/*QUAKED trigger_multiple_bcs_mp_strikezone_bar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_bar", "bar" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_bar_behind (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar_behind" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_bar_behind", "bar_behind" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_backentrance (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="backentrance" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_backentrance", "backentrance" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_Ronnies_01 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="Ronnies_01" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_Ronnies_01", "Ronnies_01" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_proshop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="proshop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_proshop", "proshop" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_statue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="statue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_statue", "statue" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_skywalk (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="skywalk" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_skywalk", "skywalk" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_concessions (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="concessions" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_concessions", "concessions" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_atrium (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="atrium" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_atrium", "atrium" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_concourse_upper (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="concourse_upper" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_concourse_upper", "concourse_upper" ); + +/*QUAKED trigger_multiple_bcs_mp_strikezone_concourse_lower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="concourse_lower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_strikezone_concourse_lower", "concourse_lower" ); + +} + +warhawk() +{ +/*QUAKED trigger_multiple_bcs_mp_warhawk_ambulancebay (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="ambulancebay" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_ambulancebay", "ambulancebay" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_bar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_bar", "bar" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_bakery (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bakery" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_bakery", "bakery" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_loadingdock (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="loadingdock" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_loadingdock", "loadingdock" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_granary (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="granary" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_granary", "granary" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_icecream (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="icecream" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_icecream", "icecream" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_apartment (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="apartment" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_apartment", "apartment" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_loft (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="loft" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_loft", "loft" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_cityhall (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cityhall" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_cityhall", "cityhall" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_postoffice (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="postoffice" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_postoffice", "postoffice" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_alley_fence (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="alley_fence" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_alley_fence", "alley_fence" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_backlot (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="backlot" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_backlot", "backlot" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_carport (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="carport" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_carport", "carport" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_hardwarestore (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hardwarestore" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_hardwarestore", "hardwarestore" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_drugstore (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="drugstore" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_drugstore", "drugstore" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_trailer (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="trailer" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_trailer", "trailer" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_watertower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="watertower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_watertower", "watertower" ); + +/*QUAKED trigger_multiple_bcs_mp_warhawk_repairshop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="repairshop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_warhawk_repairshop", "repairshop" ); + +} + +zebra() +{ +/*QUAKED trigger_multiple_bcs_mp_zebra_sciencelab (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="sciencelab" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zebra_sciencelab", "sciencelab" ); + +/*QUAKED trigger_multiple_bcs_mp_zebra_radiostation (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="radiostation" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zebra_radiostation", "radiostation" ); + +/*QUAKED trigger_multiple_bcs_mp_zebra_hangar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hangar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zebra_hangar", "hangar" ); + +/*QUAKED trigger_multiple_bcs_mp_zebra_guardtower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="guardtower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zebra_guardtower", "guardtower" ); + +/*QUAKED trigger_multiple_bcs_mp_zebra_bunker (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bunker" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zebra_bunker", "bunker" ); + +/*QUAKED trigger_multiple_bcs_mp_zebra_solarpanels (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="solarpanels" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zebra_solarpanels", "solarpanels" ); + +/*QUAKED trigger_multiple_bcs_mp_zebra_hill (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hill" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zebra_hill", "hill" ); + +} + +/* * + * DLC * + * */ + +red_river() +{ +/*QUAKED trigger_multiple_bcs_mp_red_river_church (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="church" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_red_river_church", "church" ); + +/*QUAKED trigger_multiple_bcs_mp_red_river_church_tower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="church_tower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_red_river_church_tower", "church_tower" ); + +/*QUAKED trigger_multiple_bcs_mp_red_river_pooltables (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pooltables" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_red_river_pooltables", "pooltables" ); + +/*QUAKED trigger_multiple_bcs_mp_red_river_bar_inside (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar_inside" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_red_river_bar_inside", "bar_inside" ); + +/*QUAKED trigger_multiple_bcs_mp_red_river_autoshop_near (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="autoshop_near" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_red_river_autoshop_near", "autoshop_near" ); + +/*QUAKED trigger_multiple_bcs_mp_red_river_autoshop_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="autoshop_2ndfloor_dlc1" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_red_river_autoshop_2ndfloor", "autoshop_2ndfloor_dlc1" ); + +/*QUAKED trigger_multiple_bcs_mp_red_river_grocery (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="grocery" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_red_river_grocery", "grocery" ); + +/*QUAKED trigger_multiple_bcs_mp_red_river_roof_bar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="roof_bar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_red_river_roof_bar", "roof_bar" ); + +/*QUAKED trigger_multiple_bcs_mp_red_river_parkinglot (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="parkinglot" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_red_river_parkinglot", "parkinglot" ); +} + +rumble() +{ +/*QUAKED trigger_multiple_bcs_mp_rumble_giftshop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="giftshop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_giftshop", "giftshop" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_coffeeshop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="coffeeshop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_coffeeshop", "coffeeshop" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_coffeeshop_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="coffeeshop_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_coffeeshop_2ndfloor", "coffeeshop_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_lighthouse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="lighthouse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_lighthouse", "lighthouse" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_lighthouse_roof (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="lighthouse_roof" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_lighthouse_roof", "lighthouse_roof" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_pier_north (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pier_north" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_pier_north", "pier_north" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_pier_south (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pier_south" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_pier_south", "pier_south" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_aquarium (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="aquarium" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_aquarium", "aquarium" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_fishtank (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fishtank" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_fishtank", "fishtank" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_infocenter (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="infocenter" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_infocenter", "infocenter" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_museum (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="museum" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_museum", "museum" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_fountain (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fountain" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_fountain", "fountain" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_bakery_near (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bakery_near" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_bakery_near", "bakery_near" ); + +/*QUAKED trigger_multiple_bcs_mp_rumble_cablecar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cablecar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_rumble_cablecar", "cablecar" ); +} + +swamp() +{ +/*QUAKED trigger_multiple_bcs_mp_swamp_campsite (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="campsite" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_campsite", "campsite" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_ruinedhouse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="ruinedhouse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_ruinedhouse", "ruinedhouse" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_hovercraft (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hovercraft" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_hovercraft", "hovercraft" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_cave (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cave" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_cave", "cave" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_granary (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="granary_dlc1" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_granary", "granary_dlc1" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_granary_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="granary_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_granary_2ndfloor", "granary_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_treeroots (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="treeroots" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_treeroots", "treeroots" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_camper (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="camper" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_camper", "camper" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_camper_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="camper_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_camper_2ndfloor", "camper_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_backshed (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="backshed" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_backshed", "backshed" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_marina (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="marina" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_marina", "marina" ); + +/*QUAKED trigger_multiple_bcs_mp_swamp_gaspumps (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="gaspumps" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_swamp_gaspumps", "gaspumps" ); +} + +dome() +{ +/*QUAKED trigger_multiple_bcs_mp_dome_digger (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="digger" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dome_digger", "digger" ); + +/*QUAKED trigger_multiple_bcs_mp_dome_dig_site (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dig_site" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dome_dig_site", "dig_site" ); + +/*QUAKED trigger_multiple_bcs_mp_dome_crane (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crane" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dome_crane", "crane" ); + +/*QUAKED trigger_multiple_bcs_mp_dome_meteor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="meteor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dome_meteor", "meteor" ); + +/*QUAKED trigger_multiple_bcs_mp_dome_commandcenter (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="commandcenter" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dome_commandcenter", "commandcenter" ); + +/*QUAKED trigger_multiple_bcs_mp_dome_lockerroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="lockerroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dome_lockerroom", "lockerroom" ); + +/*QUAKED trigger_multiple_bcs_mp_dome_fabrictunnel (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fabrictunnel" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dome_fabrictunnel", "fabrictunnel" ); + + /*QUAKED trigger_multiple_bcs_mp_dome_spotlight (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="spotlight" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dome_spotlight", "spotlight" ); + +/*QUAKED trigger_multiple_bcs_mp_dome_scaffolding (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="scaffolding" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dome_scaffolding", "scaffolding" ); + + +} + +boneyard() +{ +/*QUAKED trigger_multiple_bcs_mp_boneyard_launchpad (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="launchpad" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_launchpad", "launchpad" ); + +/*QUAKED trigger_multiple_bcs_mp_boneyard_missioncontrol (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="missioncontrol" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_missioncontrol", "missioncontrol" ); + +/*QUAKED trigger_multiple_bcs_mp_boneyard_missioncontrol_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="missioncontrol_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_missioncontrol_2ndfloor", "missioncontrol_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_boneyard_countdown (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="countdown" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_countdown", "countdown" ); + +/*QUAKED trigger_multiple_bcs_mp_boneyard_fueltank_large (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fueltank_large" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_fueltank_large", "fueltank_large" ); + +/*QUAKED trigger_multiple_bcs_mp_boneyard_crawler (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crawler" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_crawler", "crawler" ); + +/*QUAKED trigger_multiple_bcs_mp_boneyard_crawler_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crawler_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_crawler_2ndfloor", "crawler_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_boneyard_crawler_3rdfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crawler_3rdfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_crawler_3rdfloor", "crawler_3rdfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_boneyard_testplatform (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="testplatform" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_testplatform", "testplatform" ); + +/*QUAKED trigger_multiple_bcs_mp_boneyard_rockettest (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rockettest" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_boneyard_rockettest", "rockettest" ); +} + +impact() +{ +/*QUAKED trigger_multiple_bcs_mp_impact_bunkroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bunkroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_bunkroom", "bunkroom" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_kitchen (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="kitchen2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_kitchen", "kitchen2" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_breakroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="breakroom2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_breakroom", "breakroom2" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_bridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_bridge", "bridge2" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_infirmary (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="infirmary" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_infirmary", "infirmary" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_crane (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crane2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_crane", "crane2" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_bridge_under (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge_under2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_bridge_under", "bridge_under2" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_lowerhold (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="lowerhold" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_lowerhold", "lowerhold" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_bathroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bathroom2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_bathroom", "bathroom2" ); + + +/*QUAKED trigger_multiple_bcs_mp_impact_portside (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="portside" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_portside", "portside" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_starboardside (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="starboardside" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_starboardside", "starboardside" ); + +/*QUAKED trigger_multiple_bcs_mp_impact_bridge_brooklyn (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge_brooklyn" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_impact_bridge_brooklyn", "bridge_brooklyn" ); + +} + +behemoth() +{ +/*QUAKED trigger_multiple_bcs_mp_behemoth_controltower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="controltower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_controltower", "controltower" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_commandroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="commandroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_commandroom", "commandroom" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_conveyor_upper (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="conveyor_upper" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_conveyor_upper", "conveyor_upper" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_conveyor_lower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="conveyor_lower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_conveyor_lower", "conveyor_lower" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_breakroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="breakroom2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_breakroom", "breakroom2" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_engineroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="engineroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_engineroom", "engineroom" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_fueltank (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fueltank" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_fueltank", "fueltank" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_cargocrates (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cargocrates" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_cargocrates", "cargocrates" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_bucketwheel (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bucketwheel" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_bucketwheel", "bucketwheel" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_conveyorcontrol (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="conveyorcontrol" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_conveyorcontrol", "conveyorcontrol" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_doghouse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="doghouse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_doghouse", "doghouse" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_generators (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="generators" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_generators", "generators" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_turntable_west (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="turntable_west" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_turntable_west", "turntable_west" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_turntable_east (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="turntable_east" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_turntable_east", "turntable_east" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_side_north (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="side_north" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_side_north", "side_north" ); + +/*QUAKED trigger_multiple_bcs_mp_behemoth_side_south (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="side_south" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_behemoth_side_south", "side_south" ); + +} + +battery() +{ +/*QUAKED trigger_multiple_bcs_mp_battery_scaffolding (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="scaffolding2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_scaffolding", "scaffolding2" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_sundial (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="sundial" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_sundial", "sundial" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_statue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="statue2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_statue", "statue2" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_stonehead (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="stonehead" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_stonehead", "stonehead" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_truck (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="truck" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_truck", "truck" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_tower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tower2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_tower", "tower2" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_courtyard (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="courtyard2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_courtyard", "courtyard2" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_pyramid (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pyramid" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_pyramid", "pyramid" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_crypt (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crypt" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_crypt", "crypt" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_altar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="altar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_altar", "altar" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_bridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bridge2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_bridge", "bridge2" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_aqueduct (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="aqueduct" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_aqueduct", "aqueduct" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_waterfall (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="waterfall2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_waterfall", "waterfall2" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_bathhouse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bathhouse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_bathhouse", "bathhouse" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_fountain (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fountain2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_fountain", "fountain2" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_woods (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="woods" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_woods", "woods" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_cliff (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cliff" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_cliff", "cliff" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_tunnels (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tunnels" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_tunnels", "tunnels" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_trophyroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="trophyroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_trophyroom", "trophyroom" ); + +/*QUAKED trigger_multiple_bcs_mp_battery_armory (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="armory" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_battery_armory", "armory" ); + +} + +favela() +{ +/*QUAKED trigger_multiple_bcs_mp_favela_barber_shop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="barber_shop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_barber_shop", "barber_shop" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_bus_stop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bus_stop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_bus_stop", "bus_stop" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_graveyard (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="graveyard" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_graveyard", "graveyard" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_bar2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_bar2", "bar2" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_bar_rooftop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar_rooftop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_bar_rooftop", "bar_rooftop" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_soccer_field (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="soccer_field" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_soccer_field", "soccer_field" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_playground2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="playground2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_playground2", "playground2" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_icecream_shop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="icecream_shop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_icecream_shop", "icecream_shop" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_icecream_shop_2ndfloor (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="icecream_shop_2ndfloor" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_icecream_shop_2ndfloor", "icecream_shop_2ndfloor" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_market (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="market" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_market", "market" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_market_rooftop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="market_rooftop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_market_rooftop", "market_rooftop" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_rooftop_garden (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="rooftop_garden" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_rooftop_garden", "rooftop_garden" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_sodashop (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="sodashop" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_sodashop", "sodashop" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_safe_house (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="safe_house" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_safe_house", "safe_house" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_shanties (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="shanties" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_shanties", "shanties" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_dump_site (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dump_site" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_dump_site", "dump_site" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_checkpoint (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="checkpoint" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_checkpoint", "checkpoint" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_abandoned_apartments (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="abandoned_apartments" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_abandoned_apartments", "abandoned_apartments" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_greenapartment (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="greenapartment" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_greenapartment", "greenapartment" ); + +/*QUAKED trigger_multiple_bcs_mp_favela_greenapartment_roof (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="greenapartment_roof" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_favela_greenapartment_roof", "greenapartment_roof" ); +} + +dig() +{ +/*QUAKED trigger_multiple_bcs_mp_dig_shrine (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="shrine" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_shrine", "shrine" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_kingstomb (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="kingstomb" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_kingstomb", "kingstomb" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_balcony (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="balcony" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_balcony", "balcony" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_mummytomb (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="mummytomb" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_mummytomb", "mummytomb" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_anubishall (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="anubishall" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_anubishall", "anubishall" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_digsite (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="digsite" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_digsite", "digsite" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_platform (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="platform" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_platform", "platform" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_dogstatues (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dogstatues" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_dogstatues", "dogstatues" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_courtyard3 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="courtyard3" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_courtyard3", "courtyard3" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_pharaohsgate (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="pharaohsgate" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_pharaohsgate", "pharaohsgate" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_burialchamber (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="burialchamber" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_burialchamber", "burialchamber" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_sphinxhead (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="sphinxhead" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_sphinxhead", "sphinxhead" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_queenstomb (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="queenstomb" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_queenstomb", "queenstomb" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_treasureroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="treasureroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_treasureroom", "treasureroom" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_heiroglyphhall (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="heiroglyphhall" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_heiroglyphhall", "heiroglyphhall" ); + +/*QUAKED trigger_multiple_bcs_mp_dig_oasis (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="oasis" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_dig_oasis", "oasis" ); +} + +pirate() +{ +/*QUAKED trigger_multiple_bcs_mp_pirate_overlook (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="overlook" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_overlook", "overlook" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_captainsquarters (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="captainsquarters" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_captainsquarters", "captainsquarters" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_shipprow (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="shipprow" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_shipprow", "shipprow" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_tavern (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tavern" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_tavern", "tavern" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_cellar (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cellar" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_cellar", "cellar" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_drawbridge (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="drawbridge" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_drawbridge", "drawbridge" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_inn (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="inn" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_inn", "inn" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_voodoohouse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="voodoohouse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_voodoohouse", "voodoohouse" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_courtyard3 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="courtyard3" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_courtyard3", "courtyard3" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_prisoncells (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="prisoncells" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_prisoncells", "prisoncells" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_undertakers (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="undertakers" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_undertakers", "undertakers" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_gallows (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="gallows" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_gallows", "gallows" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_brothel (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="brothel" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_brothel", "brothel" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_loadingdock2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="loadingdock2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_loadingdock2", "loadingdock2" ); + +/*QUAKED trigger_multiple_bcs_mp_pirate_watchtower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="watchtower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_pirate_watchtower", "watchtower" ); +} + +zulu() +{ +/*QUAKED trigger_multiple_bcs_mp_zulu_cemetery (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cemetery" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_cemetery", "cemetery" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_statue3 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="statue3" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_statue3", "statue3" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_market (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="market" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_market", "market" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_apartments (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="apartments" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_apartments", "apartments" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_bar2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bar2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_bar2", "bar2" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_church2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="church2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_church2", "church2" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_tire_stack (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tire_stack" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_tire_stack", "tire_stack" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_loading_dock (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="loading_dock" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_loading_dock", "loading_dock" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_float (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="float" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_float", "float" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_scaffolding3 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="scaffolding3" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_scaffolding3", "scaffolding3" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_hotel2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hotel2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_hotel2", "hotel2" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_florist (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="florist" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_florist", "florist" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_hearse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hearse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_hearse", "hearse" ); + +/*QUAKED trigger_multiple_bcs_mp_zulu_butcher (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="butcher" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zulu_butcher", "butcher" ); +} + + +shipment() +{ +/*QUAKED trigger_multiple_bcs_mp_shipment_winnersstage (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="winnersstage" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_winnersstage", "winnersstage" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_broadcasterbooth (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="broadcasterbooth" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_broadcasterbooth", "broadcasterbooth" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_armory (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="armory" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_armory", "armory" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_bettingwindow (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="bettingwindow" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_bettingwindow", "bettingwindow" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_arena_red (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="arena_red" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_arena_red", "arena_red" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_arena_blue (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="arena_blue" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_arena_blue", "arena_blue" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_puzzlebox (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="puzzlebox" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_puzzlebox", "puzzlebox" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_walkoffame (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="walkoffame" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_walkoffame", "walkoffame" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_walkoffame_near (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="walkoffame_near" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_walkoffame_near", "walkoffame_near" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_tower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_tower", "tower" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_display (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="display" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_display", "display" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_car_green (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="car_green" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_car_green", "car_green" ); + +/*QUAKED trigger_multiple_bcs_mp_shipment_car_yellow (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="car_yellow" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_shipment_car_yellow", "car_yellow" ); + + +} + +conflict() +{ +/*QUAKED trigger_multiple_bcs_mp_conflict_market_old (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="market_old" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_market_old", "market_old" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_market_new (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="market_new" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_market_new", "market_new" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_market_east (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="market_east" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_market_east", "market_east" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_market_west (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="market_west" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_market_west", "market_west" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_communityhall (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="communityhall" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_communityhall", "communityhall" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_fishingpier (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fishingpier" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_fishingpier", "fishingpier" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_dock (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dock" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_dock", "dock" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_waterside (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="waterside" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_waterside", "waterside" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_cliffside (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cliffside" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_cliffside", "cliffside" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_garden (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="garden" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_garden", "garden" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_temple (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="temple" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_temple", "temple" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_mansion2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="mansion2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_mansion2", "mansion2" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_fishinghuts (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fishinghuts" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_fishinghuts", "fishinghuts" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_alley (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="alley" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_alley", "alley" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_dragonstatues (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dragonstatues" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_dragonstatues", "dragonstatues" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_restaurant2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="restaurant2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_restaurant2", "restaurant2" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_kitchen3 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="kitchen3" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_kitchen3", "kitchen3" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_dojo (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="dojo" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_dojo", "dojo" ); + +/*QUAKED trigger_multiple_bcs_mp_conflict_greenhouse (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="greenhouse" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_conflict_greenhouse", "greenhouse" ); + + +} + + +mine() +{ +/*QUAKED trigger_multiple_bcs_mp_mine_train (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="train" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_train", "train" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_trainstation (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="trainstation" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_trainstation", "trainstation" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_watertower2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="watertower2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_watertower2", "watertower2" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_platform (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="platform" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_platform", "platform" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_elevator2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="elevator2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_elevator2", "elevator2" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_refinery (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="refinery" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_refinery", "refinery" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_cliffs (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="cliffs" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_cliffs", "cliffs" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_mine2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="mine2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_mine2", "mine2" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_refinerystairs (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="refinerystairs" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_refinerystairs", "refinerystairs" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_waterfall3 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="waterfall3" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_waterfall3", "waterfall3" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_staircase (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="staircase" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_staircase", "staircase" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_tunnels2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tunnels2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_tunnels2", "tunnels2" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_hotsprings (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hotsprings" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_hotsprings", "hotsprings" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_car_rusty (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="car_rusty" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_car_rusty", "car_rusty" ); + +/*QUAKED trigger_multiple_bcs_mp_mine_redbuilding (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="redbuilding" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_mine_redbuilding", "redbuilding" ); + + +} + +zerosub() +{ +/*QUAKED trigger_multiple_bcs_mp_zerosub_vents (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="vents" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_vents", "vents" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_missilefactory (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="missilefactory" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_missilefactory", "missilefactory" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_offices (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="offices" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_offices", "offices" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_hallway (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hallway" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_hallway", "hallway" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_controlroom2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="controlroom2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_controlroom2", "controlroom2" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_messhall (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="messhall" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_messhall", "messhall" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_hockeyrink (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="hockeyrink" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_hockeyrink", "hockeyrink" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_missilestorage (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="missilestorage" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_missilestorage", "missilestorage" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_snowbank (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="snowbank" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_snowbank", "snowbank" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_utilityroom (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="utilityroom" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_utilityroom", "utilityroom" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_lab (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="lab" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_lab", "lab" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_tent (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="tent" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_tent", "tent" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_submarine (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="submarine" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_submarine", "submarine" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_securitytower (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="securitytower" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_securitytower", "securitytower" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_crane2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="crane2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_crane2", "crane2" ); + +/*QUAKED trigger_multiple_bcs_mp_zerosub_fueltank2 (0 0.25 0.5) ? +defaulttexture="bcs" +soundalias="fueltank2" +*/ + add_bcs_location_mapping( "trigger_multiple_bcs_mp_zerosub_fueltank2", "fueltank2" ); + + +} \ No newline at end of file diff --git a/common_scripts/_createfx.gsc b/common_scripts/_createfx.gsc new file mode 100644 index 0000000..a59f10f --- /dev/null +++ b/common_scripts/_createfx.gsc @@ -0,0 +1,2578 @@ +#include common_scripts\utility; +#include common_scripts\_fx; +#include common_scripts\_createfxMenu; + +createEffect( type, fxid ) +{ + ent = spawnStruct(); + if ( !IsDefined( level.createFXent ) ) + { + level.createFXent = []; + } + + level.createFXent[ level.createFXent.size ] = ent; + ent.v = []; + ent.v[ "type" ] = type; + ent.v[ "fxid" ] = fxid; + ent.v[ "angles" ] = ( 0, 0, 0 ); + ent.v[ "origin" ] = ( 0, 0, 0 ); + ent.drawn = true; + + if ( IsDefined( fxid ) && IsDefined( level.createFXbyFXID ) ) + { // if we're using the optimized lookup, add it in the proper place + ary = level.createFXbyFXID[ fxid ]; + if ( !IsDefined( ary ) ) + { + ary = []; + } + + ary[ ary.size ] = ent; + level.createFXbyFXID[ fxid ] = ary; + } + return ent; +} + +// the following "get" functions are used to centralize the default values for some of the createFX options. +// This is so that we don't have to write the options into the createfx file if they are the same as the default. + +getLoopEffectDelayDefault() +{ + return 0.5; +} + +getOneshotEffectDelayDefault() +{ + return -15; +} + +getExploderDelayDefault() +{ + return 0; +} + +getIntervalSoundDelayMinDefault() +{ + return .75; +} + +getIntervalSoundDelayMaxDefault() +{ + return 2; +} + +createLoopSound() +{ + ent = spawnStruct(); + if ( !IsDefined( level.createFXent ) ) + level.createFXent = []; + + level.createFXent[ level.createFXent.size ] = ent; + ent.v = []; + ent.v[ "type" ] = "soundfx"; + ent.v[ "fxid" ] = "No FX"; + ent.v[ "soundalias" ] = "nil"; + ent.v[ "angles" ] = ( 0, 0, 0 ); + ent.v[ "origin" ] = ( 0, 0, 0 ); + ent.v[ "server_culled" ] = 1; + if ( getdvar( "serverCulledSounds" ) != "1" ) + ent.v[ "server_culled" ] = 0; + ent.drawn = true; + return ent; +} + +createIntervalSound() +{ + ent = createLoopSound(); + ent.v[ "type" ] = "soundfx_interval"; + ent.v[ "delay_min" ] = getIntervalSoundDelayMinDefault(); + ent.v[ "delay_max" ] = getIntervalSoundDelayMaxDefault(); + return ent; +} + +createNewExploder() +{ + ent = spawnStruct(); + if ( !IsDefined( level.createFXent ) ) + level.createFXent = []; + + level.createFXent[ level.createFXent.size ] = ent; + ent.v = []; + ent.v[ "type" ] = "exploder"; + ent.v[ "fxid" ] = "No FX"; + ent.v[ "soundalias" ] = "nil"; + ent.v[ "loopsound" ] = "nil"; + ent.v[ "angles" ] = ( 0, 0, 0 ); + ent.v[ "origin" ] = ( 0, 0, 0 ); + ent.v[ "exploder" ] = 1; + ent.v[ "flag" ] = "nil"; + ent.v[ "exploder_type" ] = "normal"; + ent.drawn = true; + return ent; +} + +createExploderEx( fxid, exploderID ) +{ + ent = createExploder( fxid ); + ent.v[ "exploder" ] = exploderID; + return ent; +} + +createReactiveEnt() +{ + ent = SpawnStruct(); + level.createFXent[ level.createFXent.size ] = ent; + ent.v = []; + ent.v[ "origin" ] = ( 0, 0, 0 ); + ent.v[ "reactive_radius" ] = 200; + ent.v[ "fxid" ] = "No FX"; + ent.v[ "type" ] = "reactive_fx"; + ent.v[ "soundalias" ] = "nil"; + + return ent; +} + +set_origin_and_angles( origin, angles ) +{ + // Use this if your level mapfile is offset in the main map. + if( isDefined( level.createFX_offset )) + { + origin = ( origin + level.createFX_offset ); + } + self.v[ "origin" ] = origin; + self.v[ "angles" ] = angles; +} + +set_forward_and_up_vectors() +{ + self.v[ "up" ] = AnglesToUp( self.v[ "angles" ] ); + self.v[ "forward" ] = AnglesToForward( self.v[ "angles" ] ); +} + +createfx_common() +{ + precacheShader( "black" ); + + level._createfx = SpawnStruct(); + level._createfx.grenade = Spawn( "script_origin", ( 0, 0, 0 ) ); + level._createfx.grenade.fx = LoadFX("fx/explosions/grenadeexp_default"); + level._createfx.grenade.sound = "grenade_explode_default"; + level._createfx.grenade.radius = 256; + + if ( level.mp_createfx ) + { + hack_start( "painter_mp" ); + } + else + { + hack_start( "painter" ); + } + + flag_init( "createfx_saving" ); + flag_init( "createfx_started" ); + + // Effects placing tool + if ( !IsDefined( level.createFX ) ) + { + level.createFX = []; + } + + level.createfx_loopcounter = 0; + +// NOT MP FRIENDLY +// array_call( GetSpawnerArray(), ::Delete ); +// +// ents = GetEntArray( "trigger_multiple", "code_classname" ); +// ents = array_combine( ents, GetEntArray( "trigger_radius", "code_classname" ) ); +// ents = array_combine( ents, GetEntArray( "trigger_once", "code_classname" ) ); + +// array_call( ents, ::Delete ); + + level notify( "createfx_common_done" ); +} + +//--------------------------------------------------------- +// CreateFx Logic Initialization Section +//--------------------------------------------------------- +init_level_variables() +{ + // gets cumulatively added to to create digital accelleration + level._createfx.selectedMove_up = 0; + level._createfx.selectedMove_forward = 0; + level._createfx.selectedMove_right = 0; + level._createfx.selectedRotate_pitch = 0; + level._createfx.selectedRotate_roll = 0; + level._createfx.selectedRotate_yaw = 0; + level._createfx.selected_fx = []; + level._createfx.selected_fx_ents = []; + + // Selected Ent Settings + level._createfx.rate = 1; + level._createfx.snap2normal = 0; + level._createfx.axismode = 0; + + // Select By Name + level._createfx.select_by_name = false; // unhighlights current ent + + level._createfx.player_speed = GetDvarFloat( "g_speed" ); + set_player_speed_hud(); +} + +init_locked_list() +{ + level._createfx.lockedList = []; + level._createfx.lockedList[ "escape" ] = true; + level._createfx.lockedList[ "BUTTON_LSHLDR" ] = true; + level._createfx.lockedList[ "BUTTON_RSHLDR" ] = true; + level._createfx.lockedList[ "mouse1" ] = true; + level._createfx.lockedList[ "ctrl" ] = true; +} + +init_colors() +{ + colors = []; + colors[ "loopfx" ][ "selected" ] = ( 1.0, 1.0, 0.2 ); + colors[ "loopfx" ][ "highlighted" ] = ( 0.4, 0.95, 1.0 ); + colors[ "loopfx" ][ "default" ] = ( 0.3, 0.8, 1.0 ); + + colors[ "oneshotfx" ][ "selected" ] = ( 1.0, 1.0, 0.2 ); + colors[ "oneshotfx" ][ "highlighted" ] = ( 0.4, 0.95, 1.0 ); + colors[ "oneshotfx" ][ "default" ] = ( 0.3, 0.8, 1.0 ); + + colors[ "exploder" ][ "selected" ] = ( 1.0, 1.0, 0.2 ); + colors[ "exploder" ][ "highlighted" ] = ( 1.0, 0.2, 0.2 ); + colors[ "exploder" ][ "default" ] = ( 1.0, 0.1, 0.1 ); + + colors[ "rainfx" ][ "selected" ] = ( 1.0, 1.0, 0.2 ); + colors[ "rainfx" ][ "highlighted" ] = ( .95, 0.4, 0.95 ); + colors[ "rainfx" ][ "default" ] = ( .78, 0.0, 0.73 ); + + colors[ "soundfx" ][ "selected" ] = ( 1.0, 1.0, 0.2 ); + colors[ "soundfx" ][ "highlighted" ] = ( .5, 1.0, 0.75 ); + colors[ "soundfx" ][ "default" ] = ( .2, 0.9, 0.2 ); + + colors[ "soundfx_interval" ][ "selected" ] = ( 1.0, 1.0, 0.2 ); + colors[ "soundfx_interval" ][ "highlighted" ] = ( .5, 1.0, 0.75 ); + colors[ "soundfx_interval" ][ "default" ] = ( .2, 0.9, 0.2 ); + + colors[ "reactive_fx" ][ "selected" ] = ( 1.0, 1.0, 0.2 ); + colors[ "reactive_fx" ][ "highlighted" ] = ( .5, 1.0, 0.75 ); + colors[ "reactive_fx" ][ "default" ] = ( .2, 0.9, 0.2 ); + + level._createfx.colors = colors; +} + +//--------------------------------------------------------- +// CreateFx Logic Section +//--------------------------------------------------------- +createFxLogic() +{ + waittillframeend;// let _load run first + wait( 0.05 ); + + if ( !IsDefined( level._effect ) ) + { + level._effect = []; + } + + if ( GetDvar( "createfx_map" ) == "" ) + { + SetDevDvar( "createfx_map", get_template_level() ); + } + else if ( GetDvar( "createfx_map" ) == get_template_level() ) + { + [[ level.func_position_player ]](); + } + + init_crosshair(); + init_menu(); + init_huds(); + init_tool_hud(); + init_crosshair(); + init_level_variables(); + init_locked_list(); + init_colors(); + + SetDevDvar( "fx", "nil" ); + SetDevDvar( "select_by_substring", "" ); + + if ( GetDvar( "createfx_use_f4" ) == "" ) + SetDevDvar( "createfx_use_f4", "0" ); + + if ( GetDvar( "createfx_no_autosave" ) == "" ) + SetDevDvar( "createfx_no_autosave", "0" ); + + level.createfx_draw_enabled = true; + level.last_displayed_ent = undefined; + + level.buttonIsHeld = []; + lastPlayerOrigin = (0,0,0); + + flag_set( "createfx_started" ); + if ( !level.mp_createfx ) + { + lastPlayerOrigin = level.player.origin; + } + + lastHighlightedEnt = undefined; + level.fx_rotating = false; + setMenu( "none" ); + level.createfx_selecting = false; + + // black background for text + black = newHudElem(); + black.x = -120; + black.y = 200; + black.foreground = 0; + black setShader( "black", 250, 160 ); + black.alpha = 0;// 0.6; + + level.createfx_inputlocked = false; + + foreach ( ent in level.createFXent ) + { + ent post_entity_creation_function(); + } + + thread draw_distance(); + lastSelectEntity = undefined; + thread createfx_autosave(); + + for ( ;; ) + { + changedSelectedEnts = false; + + // calculate the "cursor" + right = anglestoright( level.player getplayerangles() ); + forward = anglestoforward( level.player getplayerangles() ); + up = anglestoup( level.player getplayerangles() ); + dot = 0.85; + + placeEnt_vector = ( forward * 750 ); + level.createfxCursor = bullettrace( level.player geteye(), level.player geteye() + placeEnt_vector, false, undefined ); + highlightedEnt = undefined; + + // ************************************************************ + // + // General input + // + // ************************************************************ + + level.buttonClick = []; + level.button_is_kb = []; + process_button_held_and_clicked(); + ctrlHeld = button_is_held( "ctrl", "BUTTON_LSHLDR" ); + leftClick = button_is_clicked( "mouse1", "BUTTON_A" ); + leftHeld = button_is_held( "mouse1", "BUTTON_A" ); + + create_fx_menu(); + + //changing to allow devgui item + // FOR PC Debugging purposes + btn = "F5"; + if ( GetDvarInt( "createfx_use_f4" ) ) + { + btn = "F4"; + } + + if ( button_is_clicked( btn ) ) + SetDevDvar( "scr_createfx_dump", 1 ); + + if( GetDvarInt( "scr_createfx_dump" ) ) + { + SetDevDvar( "scr_createfx_dump", 0 ); + generate_fx_log(); + } + + if ( button_is_clicked( "F2" ) ) + toggle_createfx_drawing(); + + if ( button_is_clicked( "ins" ) ) + insert_effect(); + + if ( button_is_clicked( "del" ) ) + delete_pressed(); + + if ( button_is_clicked( "escape" ) ) + clear_settable_fx(); + + if ( button_is_clicked( "space" ) ) + set_off_exploders(); + +// if (button_is_clicked("j")) +// setmenu("jump_to_effect"); + + if ( button_is_clicked( "u" ) ) + select_by_name_list(); + + modify_player_speed(); + + if ( !ctrlHeld && button_is_clicked( "g" ) ) + { + select_all_exploders_of_currently_selected( "exploder" ); + select_all_exploders_of_currently_selected( "flag" ); + } + + if ( button_is_held( "h", "F1" ) ) + { + show_help(); + wait( 0.05 ); + continue; + } + + if ( button_is_clicked( "BUTTON_LSTICK" ) ) + copy_ents(); + if ( button_is_clicked( "BUTTON_RSTICK" ) ) + paste_ents(); + + if ( ctrlHeld ) + { + if ( button_is_clicked( "c" ) ) + copy_ents(); + + if ( button_is_clicked( "v" ) ) + paste_ents(); + + if ( button_is_clicked( "g" ) ) + spawn_grenade(); // for testing reactive ents + } + + if ( isdefined( level._createfx.selected_fx_option_index ) ) + menu_fx_option_set(); + + //------------------------------------------------- + // Highlighted Entity Handling + //------------------------------------------------- + for ( i = 0; i < level.createFXent.size; i++ ) + { + ent = level.createFXent[ i ]; + + difference = VectorNormalize( ent.v[ "origin" ] - ( level.player.origin + ( 0, 0, 55 ) ) ); + newdot = vectordot( forward, difference ); + if ( newdot < dot ) + { + continue; + } + + dot = newdot; + highlightedEnt = ent; + } + + level.fx_highLightedEnt = highLightedEnt; + + if ( IsDefined( highLightedEnt ) ) + { + if ( IsDefined( lastHighlightedEnt ) ) + { + if ( lastHighlightedEnt != highlightedEnt ) + { + // a highlighted ent is no longer highlighted so scale down the text size +// lastHighlightedEnt.text = "."; +// lastHighlightedEnt.textsize = 2; + if ( !ent_is_selected( lastHighlightedEnt ) ) + lastHighlightedEnt thread entity_highlight_disable(); + + // an ent became highlighted for the first time so scale up the text size on the new ent +// highlightedEnt.text = HighlightedEnt.v["fxid"]; +// highlightedEnt.textsize = 1; + if ( !ent_is_selected( highlightedEnt ) ) + highlightedEnt thread entity_highlight_enable(); + } + } + else + { + // an ent became highlighted for the first time so scale up the text size on the new ent +// HighlightedEnt.text = HighlightedEnt.v["fxid"]; +// HighlightedEnt.textsize = 1; + if ( !ent_is_selected( highlightedEnt ) ) + highlightedEnt thread entity_highlight_enable(); + } + } + + manipulate_createfx_ents( highlightedEnt, leftClick, leftHeld, ctrlHeld, right ); + + //------------------------------------------------- + // Handle Selected Entities + //------------------------------------------------- + changedSelectedEnts = handle_selected_ents( changedSelectedEnts ); + wait( 0.05 ); + + if ( changedSelectedEnts ) + update_selected_entities(); + + if( !level.mp_createfx ) + lastPlayerOrigin = [[ level.func_position_player_get ]]( lastPlayerOrigin ); + + lastHighlightedEnt = highlightedEnt; + + // if the last selected entity changes then reset the options offset + if ( last_selected_entity_has_changed( lastSelectEntity ) ) + { + level.effect_list_offset = 0; + clear_settable_fx(); + setmenu( "none" ); + } + + if ( level._createfx.selected_fx_ents.size ) + lastSelectEntity = level._createfx.selected_fx_ents[ level._createfx.selected_fx_ents.size - 1 ]; + else + lastSelectEntity = undefined; + } +} + +modify_player_speed() +{ + modify_speed = false; + + ctrl_held = button_is_held( "ctrl" ); + if ( button_is_held( "." ) ) + { + if ( ctrl_held ) + { + if ( level._createfx.player_speed < 190 ) + { + level._createfx.player_speed = 190; + } + else + { + level._createfx.player_speed += 10; + } + } + else + { + level._createfx.player_speed += 5; + } + modify_speed = true; + } + else if ( button_is_held( "," ) ) + { + if ( ctrl_held ) + { + if ( level._createfx.player_speed > 190 ) + { + level._createfx.player_speed = 190; + } + else + { + level._createfx.player_speed -= 10; + } + } + else + { + level._createfx.player_speed -= 5; + } + modify_speed = true; + } + + if ( modify_speed ) + { + level._createfx.player_speed = Clamp( level._createfx.player_speed, 5, 500 ); + + [[ level.func_player_speed ]](); + + set_player_speed_hud(); + } +} + +set_player_speed_hud() +{ + if ( !IsDefined( level._createfx.player_speed_hud ) ) + { + hud = newHudElem(); + hud.alignX = "right"; + hud.foreground = 1; + hud.fontScale = 1.2; + hud.alpha = 0.2; + hud.x = 320; + hud.y = 420; + hud SetDevText( "Speed: " ); + + hud_value = newHudElem(); + hud_value.alignX = "left"; + hud_value.foreground = 1; + hud_value.fontScale = 1.2; + hud_value.alpha = 0.2; + hud_value.x = 320; + hud_value.y = 420; + + hud.hud_value = hud_value; + + level._createfx.player_speed_hud = hud; + } + + level._createfx.player_speed_hud.hud_value SetValue( level._createfx.player_speed ); +} + +toggle_createfx_drawing() +{ + level.createfx_draw_enabled = !level.createfx_draw_enabled; +} + +insert_effect() +{ + setMenu( "creation" ); + level.effect_list_offset = 0; + clear_fx_hudElements(); + set_fx_hudElement( "Pick effect type to create:" ); + set_fx_hudElement( "1. One Shot FX" ); + set_fx_hudElement( "2. Looping sound" ); + set_fx_hudElement( "3. Exploder" ); + set_fx_hudElement( "4. One Shot Sound" ); + set_fx_hudElement( "5. Reactive Sound" ); + set_fx_hudElement( "(c) Cancel >" ); + set_fx_hudElement( "(x) Exit >" ); + /* + set_fx_hudElement("Pick an effect:"); + set_fx_hudElement("In the console, type"); + set_fx_hudElement("/fx name"); + set_fx_hudElement("Where name is the name of the sound alias"); + */ +} + +manipulate_createfx_ents( highlightedEnt, leftClick, leftHeld, ctrlHeld, right ) +{ + if ( !level.createfx_draw_enabled ) + return; + + if ( level._createfx.select_by_name ) + { + level._createfx.select_by_name = false; + highlightedEnt = undefined; + } + else if ( select_by_substring() ) + { + highlightedEnt = undefined; + } + + for ( i = 0; i < level.createFXent.size; i++ ) + { + ent = level.createFXent[ i ]; + + if ( !ent.drawn ) + continue; + + scale = GetDvarFloat( "createfx_scaleid" ); + + if ( IsDefined( highlightedEnt ) && ent == highlightedEnt ) + { + if ( !entities_are_selected() ) + display_fx_info( ent ); + + if ( leftClick ) + { + entWasSelected = index_is_selected( i ); + level.createfx_selecting = !entWasSelected;// used for drag select / deselect + if ( !ctrlHeld ) + { + selectedSize = level._createfx.selected_fx_ents.size; + clear_entity_selection(); + if ( entWasSelected && selectedSize == 1 ) + select_entity( i, ent ); + } + toggle_entity_selection( i, ent ); + } + else + if ( leftHeld ) + { + if ( ctrlHeld ) + { + if ( level.createfx_selecting ) + select_entity( i, ent ); + + if ( !level.createfx_selecting ) + deselect_entity( i, ent ); + } + } + + colorIndex = "highlighted"; + } + else + { + colorIndex = "default"; + } + + if ( index_is_selected( i ) ) + colorIndex = "selected"; + + ent createfx_print3d( colorIndex, scale, right ); + } +} + +createfx_print3d( colorIndex, scale, right ) +{ +// Line( level.player.origin, ( 0, 0, 0 ) ); + print3d( self.v[ "origin" ], ".", level._createfx.colors[ self.v[ "type" ] ][ colorIndex ], 1, scale ); + if ( self.textalpha > 0 ) + { + text = self get_print3d_text(); + printRight = ( right * ( text.size * -2.93 ) ); + color = level._createfx.colors[ self.v[ "type" ] ][ colorIndex ]; + + if ( IsDefineD( self.is_playing ) ) + color = ( 1, 0.5, 0 ); + + print3d( self.v[ "origin" ] + printRight + ( 0, 0, 15 ), text, color, self.textalpha, scale ); + + if ( IsDefined( self.v[ "reactive_radius" ] ) ) + { + Sphere( self.v[ "origin" ], self.v[ "reactive_radius" ], color ); + } + } +} + +get_print3d_text() +{ + switch ( self.v[ "type" ] ) + { + case "reactive_fx": + return "reactive: " + self.v[ "soundalias" ]; + default: + return self.v[ "fxid" ]; + } +} + +select_by_name_list() +{ + level.effect_list_offset = 0; + clear_fx_hudElements(); + setmenu( "select_by_name" ); + draw_effects_list(); +} + +//--------------------------------------------------------- +// Selected Ent Section +//--------------------------------------------------------- +handle_selected_ents( changedSelectedEnts ) +{ + if ( level._createfx.selected_fx_ents.size > 0 ) + { + changedSelectedEnts = selected_ent_buttons( changedSelectedEnts ); + + if ( !current_mode_hud( "selected_ents" ) ) + { + new_tool_hud( "selected_ents" ); + set_tool_hudelem( "Selected Ent Mode" ); + set_tool_hudelem( "Mode:", "move" ); + set_tool_hudelem( "Rate:", level._createfx.rate ); + set_tool_hudelem( "Snap2Normal:", level._createfx.snap2normal ); + } + + if ( level._createfx.axismode && level._createfx.selected_fx_ents.size > 0 ) + { + set_tool_hudelem( "Mode:", "rotate" ); + // draw axis and do rotation if shift is held + thread [[ level.func_process_fx_rotater ]](); + if ( button_is_clicked( "enter", "p" ) ) + reset_axis_of_selected_ents(); + + if ( button_is_clicked( "v" ) ) + copy_angles_of_selected_ents(); + + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + level._createfx.selected_fx_ents[ i ] draw_axis(); + + if ( level.selectedRotate_pitch != 0 || level.selectedRotate_yaw != 0 || level.selectedRotate_roll != 0 ) + changedSelectedEnts = true; + /* + for ( i=0; i < level._createfx.selected_fx_ents.size; i++) + { + ent = level._createfx.selected_fx_ents[i]; + ent.angles = ent.angles + (level.selectedRotate_pitch, level.selectedRotate_yaw, 0); + ent set_forward_and_up_vectors(); + } + + if (level.selectedRotate_pitch != 0 || level.selectedRotate_yaw != 0) + changedSelectedEnts = true; + */ + } + else + { + set_tool_hudelem( "Mode:", "move" ); + selectedMove_vector = get_selected_move_vector(); + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + if ( IsDefined( ent.model ) )// ents with brushmodels are from radiant and dont get moved + continue; + + ent draw_cross(); + ent.v[ "origin" ] = ent.v[ "origin" ] + selectedMove_vector; + } + + if ( distance( ( 0, 0, 0 ), selectedMove_vector ) > 0 ) + changedSelectedEnts = true; + } + } + else + { + clear_tool_hud(); + } + + return changedSelectedEnts; +} + +selected_ent_buttons( changedSelectedEnts ) +{ + if ( button_is_clicked( "shift", "BUTTON_X" ) ) + { + toggle_axismode(); + } + + modify_rate(); + + if ( button_is_clicked( "s" ) ) + { + toggle_snap2normal(); + } + + if ( button_is_clicked( "end", "l" ) ) + { + drop_selection_to_ground(); + changedSelectedEnts = true; + } + + if ( button_is_clicked( "tab", "BUTTON_RSHLDR" ) ) + { + move_selection_to_cursor(); + changedSelectedEnts = true; + } + + return changedSelectedEnts; +} + +modify_rate() +{ + shift_held = button_is_held( "shift" ); + ctrl_held = button_is_held( "ctrl" ); + + if ( button_is_clicked( "=" ) ) + { + if ( shift_held ) + { + level._createfx.rate += 1; + } + else if ( ctrl_held ) + { + if ( level._createfx.rate < 1 ) + { + level._createfx.rate = 1; + } + else + { + level._createfx.rate += 10; + } + } + else + { + level._createfx.rate += 0.1; + } + + } + else if ( button_is_clicked( "-" ) ) + { + if ( shift_held ) + { + level._createfx.rate -= 1; + } + else if ( ctrl_held ) + { + if ( level._createfx.rate > 1 ) + { + level._createfx.rate = 1; + } + else + { + level._createfx.rate = 0.1; + } + } + else + { + level._createfx.rate -= 0.1; + } + } + + level._createfx.rate = Clamp( level._createfx.rate, 0.1, 100 ); + + set_tool_hudelem( "Rate:", level._createfx.rate ); +} + +toggle_axismode() +{ + level._createfx.axismode = !level._createfx.axismode; +} + +toggle_snap2normal() +{ + level._createfx.snap2normal = !level._createfx.snap2normal; + set_tool_hudelem( "Snap2Normal:", level._createfx.snap2normal ); +} + +copy_angles_of_selected_ents() +{ + // so it stops rotating them over time + level notify( "new_ent_selection" ); + + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + ent.v[ "angles" ] = level._createfx.selected_fx_ents[ level._createfx.selected_fx_ents.size - 1 ].v[ "angles" ]; + ent set_forward_and_up_vectors(); + } + + update_selected_entities(); +} + +reset_axis_of_selected_ents() +{ + // so it stops rotating them over time + level notify( "new_ent_selection" ); + + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + ent.v[ "angles" ] = ( 0, 0, 0 ); + ent set_forward_and_up_vectors(); + } + + update_selected_entities(); +} + +last_selected_entity_has_changed( lastSelectEntity ) +{ + if ( IsDefined( lastSelectEntity ) ) + { + if ( !entities_are_selected() ) + return true; + } + else + return entities_are_selected(); + + return( lastSelectEntity != level._createfx.selected_fx_ents[ level._createfx.selected_fx_ents.size - 1 ] ); +} + +drop_selection_to_ground() +{ + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + trace = BulletTrace( ent.v[ "origin" ], ent.v[ "origin" ] + ( 0, 0, -2048 ), false, undefined ); + ent.v[ "origin" ] = trace[ "position" ]; + } +} + +set_off_exploders() +{ + level notify( "createfx_exploder_reset" ); + exploders = []; + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + if ( IsDefined( ent.v[ "exploder" ] ) ) + exploders[ ent.v[ "exploder" ] ] = true; + } + + keys = getarraykeys( exploders ); + for ( i = 0; i < keys.size; i++ ) + exploder( keys[ i ] ); +} + +draw_distance() +{ + count = 0; + if ( GetDvarInt( "createfx_drawdist" ) == 0 ) + { + SetDevDvar( "createfx_drawdist", "500" ); + } + + for ( ;; ) + { + maxDist = GetDvarInt( "createfx_drawdist" ); + maxDist *= maxDist; + for ( i = 0; i < level.createFXent.size; i++ ) + { + ent = level.createFXent[ i ]; + ent.drawn = DistanceSquared( level.player.origin, ent.v[ "origin" ] ) <= maxDist; + + count++ ; + if ( count > 100 ) + { + count = 0; + wait( 0.05 ); + } + } + + if ( level.createFXent.size == 0 ) + { + wait( 0.05 ); + } + } +} + +createfx_autosave() +{ + SetDvarIfUninitialized( "createfx_autosave_time", "300" ); + + for ( ;; ) + { + wait( GetDvarInt( "createfx_autosave_time" ) ); + flag_waitopen( "createfx_saving" ); + + if ( GetDvarInt( "createfx_no_autosave" ) ) + { + continue; + } + + generate_fx_log( true ); + } +} + +rotate_over_time( org, rotater ) +{ + level endon( "new_ent_selection" ); + timer = 0.1; + for ( p = 0; p < timer * 20; p++ ) + { + if ( level.selectedRotate_pitch != 0 ) + org AddPitch( level.selectedRotate_pitch ); + else + if ( level.selectedRotate_yaw != 0 ) + org AddYaw( level.selectedRotate_yaw ); + else + org AddRoll( level.selectedRotate_roll ); + + wait( 0.05 ); + org draw_axis(); + + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + if ( IsDefined( ent.model ) )// ents with brushmodels are from radiant and dont get moved + continue; + + ent.v[ "origin" ] = rotater[ i ].origin; + ent.v[ "angles" ] = rotater[ i ].angles; + } + } +} + +delete_pressed() +{ + if ( level.createfx_inputlocked ) + { + remove_selected_option(); + return; + } + + delete_selection(); +} + +remove_selected_option() +{ + if ( !IsDefined( level._createfx.selected_fx_option_index ) ) + { + return; + } + + name = level._createfx.options[ level._createfx.selected_fx_option_index ][ "name" ]; + for ( i = 0; i < level.createFXent.size; i++ ) + { + ent = level.createFXent[ i ]; + if ( !ent_is_selected( ent ) ) + continue; + + ent remove_option( name ); + } + + update_selected_entities(); + clear_settable_fx(); +} + +remove_option( name ) +{ + self.v[ name ] = undefined; +} + +delete_selection() +{ + newArray = []; + + for ( i = 0; i < level.createFXent.size; i++ ) + { + ent = level.createFXent[ i ]; + if ( ent_is_selected( ent ) ) + { + if ( IsDefined( ent.looper ) ) + ent.looper delete(); + + ent notify( "stop_loop" ); + } + else + newArray[ newArray.size ] = ent; + } + + level.createFXent = newArray; + + level._createfx.selected_fx = []; + level._createfx.selected_fx_ents = []; + clear_fx_hudElements(); +} + +move_selection_to_cursor() +{ + origin = level.createfxCursor[ "position" ]; + if ( level._createfx.selected_fx_ents.size <= 0 ) + { + return; + } + + center = get_center_of_array( level._createfx.selected_fx_ents ); + difference = center - origin; + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + if ( IsDefined( ent.model ) )// ents with brushmodels are from radiant and dont get moved + { + continue; + } + + ent.v[ "origin" ] -= difference; + + if ( level._createfx.snap2normal ) + { + if ( IsDefined( level.createfxCursor[ "normal" ] ) ) + { + ent.v[ "angles" ] = VectorToAngles( level.createfxCursor[ "normal" ] );; + } + } + } +} + +select_last_entity() +{ + select_entity( level.createFXent.size - 1, level.createFXent[ level.createFXent.size - 1 ] ); +} + +select_all_exploders_of_currently_selected( key ) +{ + selected_exploders = []; + foreach ( ent in level._createfx.selected_fx_ents ) + { + if ( !IsDefined( ent.v[ key ] ) ) + continue; + + value = ent.v[ key ]; + selected_exploders[ value ] = true; + } + + foreach ( value, _ in selected_exploders ) + { + foreach ( index, ent in level.createFXent ) + { + if ( index_is_selected( index ) ) + continue; + if ( !IsDefined( ent.v[ key ] ) ) + continue; + if ( ent.v[ key ] != value ) + continue; + + select_entity( index, ent ); + } + } + + update_selected_entities(); +} + +copy_ents() +{ + if ( level._createfx.selected_fx_ents.size <= 0 ) + return; + + array = []; + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + newent = spawnstruct(); + + newent.v = ent.v; + newent post_entity_creation_function(); + array[ array.size ] = newent; + } + + level.stored_ents = array; +} + +post_entity_creation_function() +{ + self.textAlpha = 0; + self.drawn = true; +} + +paste_ents() +{ + if ( !IsDefined( level.stored_ents ) ) + return; + + clear_entity_selection(); + + for ( i = 0;i < level.stored_ents.size;i++ ) + add_and_select_entity( level.stored_ents[ i ] ); + + move_selection_to_cursor(); + update_selected_entities(); + level.stored_ents = []; + copy_ents();// roundabout way to put new entities in the copy queue +} + +add_and_select_entity( ent ) +{ + level.createFXent[ level.createFXent.size ] = ent; + select_last_entity(); +} + +get_center_of_array( array ) +{ + center = ( 0, 0, 0 ); + for ( i = 0; i < array.size; i++ ) + center = ( center[ 0 ] + array[ i ].v[ "origin" ][ 0 ], center[ 1 ] + array[ i ].v[ "origin" ][ 1 ], center[ 2 ] + array[ i ].v[ "origin" ][ 2 ] ); + + return( center[ 0 ] / array.size, center[ 1 ] / array.size, center[ 2 ] / array.size ); +} + +ent_draw_axis() +{ + self endon( "death" ); + for ( ;; ) + { + draw_axis(); + wait( 0.05 ); + } +} + +rotation_is_occuring() +{ + if ( level.selectedRotate_roll != 0 ) + return true; + if ( level.selectedRotate_pitch != 0 ) + return true; + return level.selectedRotate_yaw != 0; +} + +print_fx_options( ent, tab, autosave ) +{ + for ( i = 0; i < level._createfx.options.size; i++ ) + { + option = level._createfx.options[ i ]; + optionName = option[ "name" ]; + if ( !IsDefined( ent.v[ optionName ] ) ) + continue; + if ( !mask( option[ "mask" ], ent.v[ "type" ] ) ) + continue; + + if( !level.mp_createfx ) + { + if ( mask( "fx", ent.v[ "type" ] ) && optionName == "fxid" ) + continue; // fxid is already set in the create functions + if ( ent.v[ "type" ] == "exploder" && optionName == "exploder" ) + continue; // exploder is set in createExploderEx() + + key = ent.v[ "type" ] + "/" + optionName; + + if ( IsDefined( level._createfx.defaults[ key ] ) && ( level._createfx.defaults[ key ] == ent.v[ optionName ] ) ) + continue; + } + + if ( option[ "type" ] == "string" ) + { + stringValue = ent.v[ optionName ] + ""; + if ( stringValue == "nil" ) // nil is treated the same as !defined - so why print it out? + continue; +// if ( !autosave ) +// println( " ent.v[ \"" + optionName + "\" ] = \"" + ent.v[ optionName ] + "\";" ); + cfxprintln( tab + "ent.v[ \"" + optionName + "\" ] = \"" + ent.v[ optionName ] + "\";" ); + continue; + } + + // int or float +// if ( !autosave ) +// println( " ent.v[ \"" + optionName + "\" ] = " + ent.v[ optionName ] + ";" ); + cfxprintln( tab + "ent.v[ \"" + optionName + "\" ] = " + ent.v[ optionName ] + ";" ); + } +} + +entity_highlight_disable() +{ + self notify( "highlight change" ); + self endon( "highlight change" ); + + for ( ;; ) + { + self.textalpha = self.textalpha * 0.85; + self.textalpha = self.textalpha - 0.05; + if ( self.textalpha < 0 ) + break; + wait( 0.05 ); + } + + self.textalpha = 0; +} + +entity_highlight_enable() +{ + self notify( "highlight change" ); + self endon( "highlight change" ); + + for ( ;; ) + { +// self.textalpha = sin(gettime()) * 0.5 + 0.5; + self.textalpha = self.textalpha + 0.05; + self.textalpha = self.textalpha * 1.25; + if ( self.textalpha > 1 ) + break; + wait( 0.05 ); + } + + self.textalpha = 1; + +} + +clear_settable_fx() +{ + level.createfx_inputlocked = false; + SetDevDvar( "fx", "nil" ); + // in case we were modifying an option + level._createfx.selected_fx_option_index = undefined; + reset_fx_hud_colors(); +} + +reset_fx_hud_colors() +{ + for ( i = 0;i < level._createfx.hudelem_count; i++ ) + level._createfx.hudelems[ i ][ 0 ].color = ( 1, 1, 1 ); +} + +toggle_entity_selection( index, ent ) +{ + if ( IsDefined( level._createfx.selected_fx[ index ] ) ) + deselect_entity( index, ent ); + else + select_entity( index, ent ); +} + +select_entity( index, ent ) +{ + if ( IsDefined( level._createfx.selected_fx[ index ] ) ) + return; + clear_settable_fx(); + level notify( "new_ent_selection" ); + + ent thread entity_highlight_enable(); + + level._createfx.selected_fx[ index ] = true; + level._createfx.selected_fx_ents[ level._createfx.selected_fx_ents.size ] = ent; +} + +ent_is_highlighted( ent ) +{ + if ( !IsDefined( level.fx_highLightedEnt ) ) + return false; + return ent == level.fx_highLightedEnt; +} + +deselect_entity( index, ent ) +{ + if ( !IsDefined( level._createfx.selected_fx[ index ] ) ) + return; + + clear_settable_fx(); + level notify( "new_ent_selection" ); + + level._createfx.selected_fx[ index ] = undefined; + + if ( !ent_is_highlighted( ent ) ) + ent thread entity_highlight_disable(); + + // remove the entity from the array of selected entities + newArray = []; + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + if ( level._createfx.selected_fx_ents[ i ] != ent ) + newArray[ newArray.size ] = level._createfx.selected_fx_ents[ i ]; + } + level._createfx.selected_fx_ents = newArray; +} + +index_is_selected( index ) +{ + return IsDefined( level._createfx.selected_fx[ index ] ); +} + +ent_is_selected( ent ) +{ + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + if ( level._createfx.selected_fx_ents[ i ] == ent ) + return true; + } + return false; +} + +clear_entity_selection() +{ + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + if ( !ent_is_highlighted( level._createfx.selected_fx_ents[ i ] ) ) + level._createfx.selected_fx_ents[ i ] thread entity_highlight_disable(); + } + level._createfx.selected_fx = []; + level._createfx.selected_fx_ents = []; +} + +draw_axis() +{ +/# + range = 25 * GetDvarFloat( "createfx_scaleid" ); + +// range = 25; + forward = AnglesToForward( self.v[ "angles" ] ); + forward *= range; + right = AnglesToRight( self.v[ "angles" ] ); + right *= range; + up = AnglesToUp( self.v[ "angles" ] ); + up *= range ; + line( self.v[ "origin" ], self.v[ "origin" ] + forward, ( 1, 0, 0 ), 1 ); + line( self.v[ "origin" ], self.v[ "origin" ] + up, ( 0, 1, 0 ), 1 ); + line( self.v[ "origin" ], self.v[ "origin" ] + right, ( 0, 0, 1 ), 1 ); + + if ( IsDefined( self.v[ "soundalias" ] ) ) + { + DrawSoundShape( self.v[ "origin" ], self.v[ "angles" ], self.v[ "soundalias" ], ( 1, 0, 1 ), 1 ); + } +#/ +} + +draw_cross() +{ +/# + range = 4; + + Line( self.v[ "origin" ] - ( 0, 0, range ), self.v[ "origin" ] + ( 0, 0, range ) ); + Line( self.v[ "origin" ] - ( 0, range, 0 ), self.v[ "origin" ] + ( 0, range, 0 ) ); + Line( self.v[ "origin" ] - ( range, 0, 0 ), self.v[ "origin" ] + ( range, 0, 0 ) ); +#/ +} + + +createfx_centerprint( text ) +{ + thread createfx_centerprint_thread( text ); +} + +createfx_centerprint_thread( text ) +{ + level notify( "new_createfx_centerprint" ); + level endon( "new_createfx_centerprint" ); + for ( p = 0;p < 5;p++ ) + level.createFX_centerPrint[ p ] setDevText( text ); + wait( 4.5 ); + for ( p = 0;p < 5;p++ ) + level.createFX_centerPrint[ p ] setDevText( "" ); +} + +get_selected_move_vector() +{ + yaw = level.player GetPlayerAngles()[ 1 ]; + angles = ( 0, yaw, 0 ); + right = AnglesToRight( angles ); + forward = AnglesToForward( angles ); + up = AnglesToUp( angles ); + + keypressed = false; + rate = level._createfx.rate; + + if ( buttonDown( "kp_uparrow", "DPAD_UP" ) ) + { + if ( level.selectedMove_forward < 0 ) + level.selectedMove_forward = 0; + + level.selectedMove_forward = level.selectedMove_forward + rate; + } + else + if ( buttonDown( "kp_downarrow", "DPAD_DOWN" ) ) + { + if ( level.selectedMove_forward > 0 ) + level.selectedMove_forward = 0; + level.selectedMove_forward = level.selectedMove_forward - rate; + } + else + level.selectedMove_forward = 0; + + if ( buttonDown( "kp_rightarrow", "DPAD_RIGHT" ) ) + { + if ( level.selectedMove_right < 0 ) + level.selectedMove_right = 0; + + level.selectedMove_right = level.selectedMove_right + rate; + } + else + if ( buttonDown( "kp_leftarrow", "DPAD_LEFT" ) ) + { + if ( level.selectedMove_right > 0 ) + level.selectedMove_right = 0; + level.selectedMove_right = level.selectedMove_right - rate; + } + else + level.selectedMove_right = 0; + + if ( buttonDown( "BUTTON_Y" ) ) + { + if ( level.selectedMove_up < 0 ) + level.selectedMove_up = 0; + + level.selectedMove_up = level.selectedMove_up + rate; + } + else + if ( buttonDown( "BUTTON_B" ) ) + { + if ( level.selectedMove_up > 0 ) + level.selectedMove_up = 0; + level.selectedMove_up = level.selectedMove_up - rate; + } + else + level.selectedMove_up = 0; + +// vector = (level.selectedMove_right, level.selectedMove_forward, level.selectedMove_up); + vector = ( 0, 0, 0 ); + vector += ( forward * level.selectedMove_forward ); + vector += ( right * level.selectedMove_right ); + vector += ( up * level.selectedMove_up ); + + return vector; +} + + + +set_anglemod_move_vector() +{ + rate = level._createfx.rate; + + if ( buttonDown( "kp_uparrow", "DPAD_UP" ) ) + { + if ( level.selectedRotate_pitch < 0 ) + level.selectedRotate_pitch = 0; + + level.selectedRotate_pitch = level.selectedRotate_pitch + rate; + } + else + if ( buttonDown( "kp_downarrow", "DPAD_DOWN" ) ) + { + if ( level.selectedRotate_pitch > 0 ) + level.selectedRotate_pitch = 0; + level.selectedRotate_pitch = level.selectedRotate_pitch - rate; + } + else + level.selectedRotate_pitch = 0; + + if ( buttonDown( "kp_leftarrow", "DPAD_LEFT" ) ) + { + if ( level.selectedRotate_yaw < 0 ) + level.selectedRotate_yaw = 0; + + level.selectedRotate_yaw = level.selectedRotate_yaw + rate; + } + else + if ( buttonDown( "kp_rightarrow", "DPAD_RIGHT" ) ) + { + if ( level.selectedRotate_yaw > 0 ) + level.selectedRotate_yaw = 0; + level.selectedRotate_yaw = level.selectedRotate_yaw - rate; + } + else + level.selectedRotate_yaw = 0; + + if ( buttonDown( "BUTTON_Y" ) ) + { + if ( level.selectedRotate_roll < 0 ) + level.selectedRotate_roll = 0; + + level.selectedRotate_roll = level.selectedRotate_roll + rate; + } + else + if ( buttonDown( "BUTTON_B" ) ) + { + if ( level.selectedRotate_roll > 0 ) + level.selectedRotate_roll = 0; + level.selectedRotate_roll = level.selectedRotate_roll - rate; + } + else + level.selectedRotate_roll = 0; + +} + +update_selected_entities() +{ + has_reactive_ents = false; + foreach ( ent in level._createfx.selected_fx_ents ) + { + if ( ent.v[ "type" ] == "reactive_fx" ) + has_reactive_ents = true; + + ent [[ level.func_updatefx ]](); + } + + if ( has_reactive_ents ) + refresh_reactive_fx_ents(); +} + +hack_start( painter_spmp ) +{ + if ( !IsDefined( painter_spmp ) ) + painter_spmp = "painter_mp"; + precachemenu( painter_spmp ); + wait .05; // make sure this wait stays above the return, since there is some logic in the calling code that assumes hack_start takes a frame. + if( painter_spmp == "painter_mp" ) + return; + + level.player openpopupmenu( painter_spmp );// painter.menu execs some console commands( ufo mode ).. sneaky hacks. + level.player closepopupmenu( painter_spmp ); +} + +stop_fx_looper() +{ + if ( IsDefined( self.looper ) ) + self.looper delete(); + self stop_loopsound(); +} + +stop_loopsound() +{ + self notify( "stop_loop" ); +} + +func_get_level_fx() +{ + AssertEx( IsDefined( level._effect ), "No effect aliases defined!" ); + + if ( !IsDefined( level._effect_keys ) ) + { + keys = GetArrayKeys( level._effect ); + } + else + { + keys = GetArrayKeys( level._effect ); + if ( keys.size == level._effect_keys.size ) + { + return level._effect_keys; + } + } + + println( "alphabetizing fx" ); + keys = alphabetize( keys ); + level._effect_keys = keys; + return keys; +} + +restart_fx_looper() +{ + stop_fx_looper(); + + //!!! new entities from copy/paste wont have a looper + + self set_forward_and_up_vectors(); + switch ( self.v[ "type" ] ) + { + case "oneshotfx": + self create_triggerfx(); + break; + case "soundfx": + self create_loopsound(); + break; + case "soundfx_interval": + self create_interval_sound(); + break; + } +} + +refresh_reactive_fx_ents() +{ + level._fx.reactive_fx_ents = undefined; + foreach ( ent in level.createFXent ) + { + if ( ent.v[ "type" ] == "reactive_fx" ) + { + ent set_forward_and_up_vectors(); + ent add_reactive_fx(); + } + } +} + +process_fx_rotater() +{ + if ( level.fx_rotating ) + { + return; + } + + set_anglemod_move_vector(); + + if ( !rotation_is_occuring() ) + { + return; + } + + level.fx_rotating = true; + + if ( level._createfx.selected_fx_ents.size > 1 ) + { + center = get_center_of_array( level._createfx.selected_fx_ents ); + org = spawn( "script_origin", center ); + org.v[ "angles" ] = level._createfx.selected_fx_ents[ 0 ].v[ "angles" ]; + org.v[ "origin" ] = center; + + rotater = []; + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + rotater[ i ] = spawn( "script_origin", level._createfx.selected_fx_ents[ i ].v[ "origin" ] ); + rotater[ i ].angles = level._createfx.selected_fx_ents[ i ].v[ "angles" ]; + rotater[ i ] linkto( org ); + } + + // println ("pitch " + level.selectedRotate_pitch + " yaw " + level.selectedRotate_yaw); + + rotate_over_time( org, rotater ); + + org delete(); + + for ( i = 0; i < rotater.size; i++ ) + rotater[ i ] delete(); + } + else if ( level._createfx.selected_fx_ents.size == 1 ) + { + ent = level._createfx.selected_fx_ents[ 0 ]; + rotater = spawn( "script_origin", ( 0, 0, 0 ) ); + rotater.angles = ent.v[ "angles" ]; + if ( level.selectedRotate_pitch != 0 ) + rotater AddPitch( level.selectedRotate_pitch ); + else + if ( level.selectedRotate_yaw != 0 ) + rotater AddYaw( level.selectedRotate_yaw ); + else + rotater AddRoll( level.selectedRotate_roll ); + ent.v[ "angles" ] = rotater.angles; + rotater delete(); + wait( 0.05 ); + } + + level.fx_rotating = false; +} + +spawn_grenade() +{ +// if ( isSP() ) +// noself_func( "magicgrenade", level.createfxCursor[ "position" ] + ( 0, 0, 10 ), level.createfxCursor[ "position" ] ); +// else +// noself_func( "magicbullet", "frag_createfx_mp", level.createfxCursor[ "position" ] + ( 0, 0, 10 ), level.createfxCursor[ "position" ] ); + + // Fake nade + PlayFX( level._createfx.grenade.fx, level.createfxCursor[ "position" ] ); + level._createfx.grenade PlaySound( level._createfx.grenade.sound ); + RadiusDamage( level.createfxCursor[ "position" ], level._createfx.grenade.radius, 50, 5, undefined, "MOD_EXPLOSIVE" ); + level notify( "code_damageradius", undefined, level._createfx.grenade.radius, level.createfxCursor[ "position" ] ); +} + +//--------------------------------------------------------- +// Help Section +//--------------------------------------------------------- +show_help() +{ + clear_fx_hudElements(); + set_fx_hudElement( "Help:" ); + set_fx_hudElement( "Insert Insert entity" ); + set_fx_hudElement( "L Drop selected entities to the ground" ); + set_fx_hudElement( "A Add option to the selected entities" ); + set_fx_hudElement( "P Reset the rotation of the selected entities" ); + set_fx_hudElement( "V Copy the angles from the most recently selected fx onto all selected fx." ); + set_fx_hudElement( "Delete Kill the selected entities" ); + set_fx_hudElement( "ESCAPE Cancel out of option-modify-mode, must have console open" ); + set_fx_hudElement( "Ctrl-C Copy" ); + set_fx_hudElement( "Ctrl-V Paste" ); + set_fx_hudElement( "F2 Toggle createfx dot and text drawing" ); + set_fx_hudElement( "F5 SAVES your work" ); + set_fx_hudElement( "Dpad Move selected entitise on X/Y or rotate pitch/yaw" ); + set_fx_hudElement( "A button Toggle the selection of the current entity" ); + set_fx_hudElement( "X button Toggle entity rotation mode" ); + set_fx_hudElement( "Y button Move selected entites up or rotate roll" ); + set_fx_hudElement( "B button Move selected entites down or rotate roll" ); + set_fx_hudElement( "R Shoulder Move selected entities to the cursor" ); + set_fx_hudElement( "L Shoulder Hold to select multiple entites" ); + set_fx_hudElement( "L JoyClick Copy" ); + set_fx_hudElement( "R JoyClick Paste" ); + set_fx_hudElement( "N UFO" ); + set_fx_hudElement( "T Toggle Timescale FAST" ); + set_fx_hudElement( "Y Toggle Timescale SLOW" ); + set_fx_hudElement( "[ Toggle FX Visibility" ); + set_fx_hudElement( "] Toggle ShowTris" ); + set_fx_hudElement( "F11 Toggle FX Profile" ); +} + +//--------------------------------------------------------- +// Write CreateFX Section +//--------------------------------------------------------- +generate_fx_log( autosave ) +{ + // first lets fix all the really small numbers so they dont cause errors because the game will print out + // 4.2343-7e or whatever but cant accept it back in from script + + /# + check_createfx_limit(); + + flag_waitopen( "createfx_saving" ); + flag_set( "createfx_saving" ); + autosave = IsDefined( autosave ); + tab = "\t"; + + radiant_exploder_add_string = ""; + if( GetDvarInt( "scr_map_exploder_dump" ) ) + { + radiant_exploder_add_string = "_radiant_exploders"; + } + + createfx_filter_types(); + createfx_adjust_array(); + + // filename is deprecated +// filename = "createfx/" + get_template_level() + radiant_exploder_add_string + "_fx.gsc"; + +// if ( autosave ) +// { +// filename = "createfx/backup.gsc"; +// } + +// file = openfile( filename, "write" ); +// assertex( file != -1, "File not writeable (maybe you should check it out): " + filename ); + file = -1; + + +// func_cap = 700;// 700 is approximately 3500 lines in a function +// total_functions = level.createFXEnt.size / func_cap; +// for( i = 0; i < total_functions; i++ ) +// { +// cfxprintln( tab + "fx_" + ( i + 1 ) + "();" ); +// } + + // creates default values. This is to stop createfx files from being filled with redundant settings. + level._createfx.defaults = []; + level._createfx.defaults[ "exploder/delay" ] = getExploderDelayDefault(); + level._createfx.defaults[ "oneshotfx/delay" ] = getOneshotEffectDelayDefault(); + level._createfx.defaults[ "soundfx_interval/delay_min" ] = getIntervalSoundDelayMinDefault(); + level._createfx.defaults[ "soundfx_interval/delay_max" ] = getIntervalSoundDelayMaxDefault(); + + + if ( isSP() ) + { + type = "fx"; + array = get_createfx_array( type ); + write_log( array, type, autosave, radiant_exploder_add_string ); + + type = "sound"; + array = get_createfx_array( type ); + write_log( array, type, autosave, radiant_exploder_add_string ); + } + else // MP, For now + { + write_log( level.createFXEnt, "fx", autosave, radiant_exploder_add_string ); + } + +// saved = closefile( file ); +// assertex( saved == 1, "File not saved (see above message?): " + filename ); + flag_clear( "createfx_saving" ); + +// println( "CreateFX entities placed: " + level.createFxEnt.size ); + #/ +} + +write_log( array, type, autosave, radiant_exploder_add_string ) +{ + tab = "\t"; + + cfxprintlnStart(); + cfxprintln( "//_createfx generated. Do not touch!!" ); + cfxprintln( "#include common_scripts\\utility;" ); + cfxprintln( "#include common_scripts\\_createfx;\n" ); + cfxprintln( "" ); + + cfxprintln( "main()" ); + cfxprintln( "{" ); + cfxprintln( tab + "// CreateFX " + type + " entities placed: " + array.size ); + + foreach ( e in array ) + { + if ( level.createfx_loopcounter > 16 ) + { + level.createfx_loopcounter = 0; + wait .1; // give IWLauncher a chance to keep up + } + level.createfx_loopcounter++; + + assertEX( IsDefined( e.v[ "type" ] ), "effect at origin " + e.v[ "origin" ] + " has no type" ); + + // don't post .map effects in the script. +// if (e.v["worldfx"]) +// continue; + + // when scr_map_exploder_dump is set just output the exploders from radiant. could output two scripts but keeping it simple. + if( GetDvarInt("scr_map_exploder_dump") ) + { + if ( !IsDefined( e.model ) ) + continue; + } + else if ( IsDefined( e.model ) ) + { + continue; // entities with models are from radiant and don't get reported + } + + if ( e.v[ "type" ] == "oneshotfx" ) + { + cfxprintln( tab + "ent = createOneshotEffect( \"" + e.v[ "fxid" ] + "\" );" ); + } + + if ( e.v[ "type" ] == "exploder" ) + { + if( IsDefined( e.v[ "exploder" ] ) && !level.mp_createfx ) + { + cfxprintln( tab + "ent = createExploderEx( \"" + e.v[ "fxid" ] + "\", \"" + e.v[ "exploder" ] + "\" );" ); + } + else + { + cfxprintln( tab + "ent = createExploder( \"" + e.v[ "fxid" ] + "\" );" ); + } + } + + if ( e.v[ "type" ] == "soundfx" ) + { + cfxprintln( tab + "ent = createLoopSound();" ); + } + + if ( e.v[ "type" ] == "soundfx_interval" ) + { + cfxprintln( tab + "ent = createIntervalSound();" ); + } + + if ( e.v[ "type" ] == "reactive_fx" ) + { + cfxprintln( tab + "ent = createReactiveEnt();" ); + } + + cfxprintln( tab + "ent set_origin_and_angles( " + e.v[ "origin" ] + ", " + e.v[ "angles" ] + " );" ); + + print_fx_options( e, tab, autosave ); + cfxprintln( "" ); + } + + cfxprintln( "}" ); + cfxprintln( " " ); + cfxprintlnEnd( autosave, radiant_exploder_add_string, type ); +} + +createfx_adjust_array() +{ + limit = 0.1; + foreach ( ent in level.createFXent ) + { + origin = []; + angles = []; + for ( i = 0;i < 3;i++ ) + { + origin[ i ] = ent.v[ "origin" ][ i ]; + angles[ i ] = ent.v[ "angles" ][ i ]; + + if ( origin[ i ] < limit && origin[ i ] > limit * - 1 ) + { + origin[ i ] = 0; + } + + if ( angles[ i ] < limit && angles[ i ] > limit * - 1 ) + { + angles[ i ] = 0; + } + } + + ent.v[ "origin" ] = ( origin[ 0 ], origin[ 1 ], origin[ 2 ] ); + ent.v[ "angles" ] = ( angles[ 0 ], angles[ 1 ], angles[ 2 ] ); + } +} + +get_createfx_array( type ) +{ + types = get_createfx_types( type ); + + array = []; + foreach ( index, _ in types ) + { + array[ index ] = []; + } + + foreach ( ent in level.createFXent ) + { + found_type = false; + foreach ( index, type in types ) + { + if ( ent.v[ "type" ] != type ) + continue; + + found_type = true; + array[ index ][ array[ index ].size ] = ent; + break; + } + } + + new_array = []; + for ( i = 0; i < types.size; i++ ) + { + foreach ( ent in array[ i ] ) + { + new_array[ new_array.size ] = ent; + } + } + + return new_array; +} + +get_createfx_types( type ) +{ + types = []; + if ( type == "fx" ) + { + types[ 0 ] = "oneshotfx"; + types[ 1 ] = "exploder"; + } + else // sound + { + types[ 0 ] = "soundfx"; + types[ 1 ] = "soundfx_interval"; + types[ 2 ] = "reactive_fx"; + } + + return types; +} + +is_createfx_type( ent, type ) +{ + types = get_createfx_types( type ); + + foreach ( t in types ) + { + if ( ent.v[ "type" ] == t ) + { + return true; + } + } + + return false; +} + +createfx_filter_types() +{ + types = []; + types[ 0 ] = "soundfx"; + types[ 1 ] = "oneshotfx"; + types[ 2 ] = "exploder"; + types[ 3 ] = "soundfx_interval"; + types[ 4 ] = "reactive_fx"; + + array = []; + foreach ( index, _ in types ) + { + array[ index ] = []; + } + + foreach ( ent in level.createFXent ) + { + found_type = false; + foreach ( index, type in types ) + { + if ( ent.v[ "type" ] != type ) + continue; + + found_type = true; + array[ index ][ array[ index ].size ] = ent; + break; + } + + assertex( found_type, "Didnt understand createfx type " + ent.v[ "type" ] ); + } + + new_array = []; + for ( i = 0; i < types.size; i++ ) + { + foreach ( ent in array[ i ] ) + { + new_array[ new_array.size ] = ent; + } + } + + level.createFXent = new_array; +} + +cfxprintlnStart() +{ + fileprint_launcher_start_file(); +} + +cfxprintln( string ) +{ + fileprint_launcher( string ); +} + +cfxprintlnEnd( autosave, radiant_exploder_add_string, type ) +{ + bP4add = true; + + if( radiant_exploder_add_string != "" || autosave ) + { + bP4add = false; + } + + if ( isSP() ) + { + scriptname = get_template_level() + radiant_exploder_add_string + "_" + type + ".gsc"; + if ( autosave ) + { + scriptname = "backup" + "_" + type + ".gsc"; + } + } + else // MP, for now + { + scriptname = get_template_level() + radiant_exploder_add_string + "_" + type + ".gsc"; + if ( autosave ) + { + scriptname = "backup.gsc"; + } + } + + fileprint_launcher_end_file( "/share/raw/maps/createfx/" + scriptname, bP4add ); +} + +//--------------------------------------------------------- +// Button Section +//--------------------------------------------------------- +process_button_held_and_clicked() +{ + add_button( "mouse1" ); + add_button( "BUTTON_RSHLDR" ); + add_button( "BUTTON_LSHLDR" ); + add_button( "BUTTON_RSTICK" ); + add_button( "BUTTON_LSTICK" ); + add_button( "BUTTON_A" ); + add_button( "BUTTON_B" ); + add_button( "BUTTON_X" ); + add_button( "BUTTON_Y" ); + add_button( "DPAD_UP" ); + add_button( "DPAD_LEFT" ); + add_button( "DPAD_RIGHT" ); + add_button( "DPAD_DOWN" ); + + + add_kb_button( "shift" ); + add_kb_button( "ctrl" ); + add_kb_button( "escape" ); + add_kb_button( "F1" ); + add_kb_button( "F5" ); + add_kb_button( "F4" ); + add_kb_button( "F2" ); + add_kb_button( "a" ); + add_kb_button( "g" ); + add_kb_button( "c" ); + add_kb_button( "h" ); + add_kb_button( "i" ); + add_kb_button( "k" ); + add_kb_button( "l" ); + add_kb_button( "m" ); + add_kb_button( "p" ); + add_kb_button( "s" ); + add_kb_button( "u" ); + add_kb_button( "v" ); + add_kb_button( "x" ); + add_kb_button( "del" );// DEL is allowed to be pressed while in select mode + add_kb_button( "end" ); + add_kb_button( "tab" ); + add_kb_button( "ins" ); + add_kb_button( "add" ); + add_kb_button( "space" ); + add_kb_button( "enter" ); + add_kb_button( "1" ); + add_kb_button( "2" ); + add_kb_button( "3" ); + add_kb_button( "4" ); + add_kb_button( "5" ); + add_kb_button( "6" ); + add_kb_button( "7" ); + add_kb_button( "8" ); + add_kb_button( "9" ); + add_kb_button( "0" ); + add_kb_button( "-" ); + add_kb_button( "=" ); + add_kb_button( "," ); + add_kb_button( "." ); + add_kb_button( "[" ); + add_kb_button( "]" ); + add_kb_button( "leftarrow" ); + add_kb_button( "rightarrow" ); + add_kb_button( "uparrow" ); + add_kb_button( "downarrow" ); +} + + +locked( name ) +{ + if ( IsDefined( level._createfx.lockedList[ name ] ) ) + return false; + + return kb_locked( name ); +} + +kb_locked( name ) +{ + return level.createfx_inputlocked && IsDefined( level.button_is_kb[ name ] ); +} + + +add_button( name ) +{ + if ( locked( name ) ) + return; + + if ( !IsDefined( level.buttonIsHeld[ name ] ) ) + { + if ( level.player buttonPressed( name ) ) + { + level.buttonIsHeld[ name ] = true; + level.buttonClick[ name ] = true; +// println("Button: " + name); + } + } + else + { + if ( !level.player buttonPressed( name ) ) + { + level.buttonIsHeld[ name ] = undefined; + } + } +} + +add_kb_button( name ) +{ + level.button_is_kb[ name ] = true; + add_button( name ); +} + +buttonDown( button, button2 ) +{ + return buttonPressed_internal( button ) || buttonPressed_internal( button2 ); +} + +buttonPressed_internal( button ) +{ + if ( !IsDefined( button ) ) + return false; + + // keyboard buttons can be locked so you can type in the fx info on the keyboard without + // accidentally activating features + if ( kb_locked( button ) ) + return false; + + return level.player buttonPressed( button ); +} + +button_is_held( name, name2 ) +{ + if ( IsDefined( name2 ) ) + { + if ( IsDefined( level.buttonIsHeld[ name2 ] ) ) + return true; + } + return IsDefined( level.buttonIsHeld[ name ] ); +} + +button_is_clicked( name, name2 ) +{ + if ( IsDefined( name2 ) ) + { + if ( IsDefined( level.buttonClick[ name2 ] ) ) + return true; + } + return IsDefined( level.buttonClick[ name ] ); +} + +//--------------------------------------------------------- +// HUD Section +//--------------------------------------------------------- + +init_huds() +{ + level._createfx.hudelems = []; + level._createfx.hudElem_count = 30; + // all this offset stuff lets us duplicate the text which puts an outline around + // it and makes it more legible + strOffsetX = []; + strOffsetY = []; + strOffsetX[ 0 ] = 0; + strOffsetY[ 0 ] = 0; + strOffsetX[ 1 ] = 1; + strOffsetY[ 1 ] = 1; + strOffsetX[ 2 ] = -2; + strOffsetY[ 2 ] = 1; + strOffsetX[ 3 ] = 1; + strOffsetY[ 3 ] = -1; + strOffsetX[ 4 ] = -2; + strOffsetY[ 4 ] = -1; + + // setup the free text marker to allow some permanent strings + level.clearTextMarker = newHudElem(); + level.clearTextMarker.alpha = 0; + level.clearTextMarker setDevText( "marker" ); + + for ( i = 0;i < level._createfx.hudelem_count;i++ ) + { + newStrArray = []; + for ( p = 0;p < 1;p++ ) + { + newStr = newHudElem(); + newStr.alignX = "left"; + newStr.location = 0; + newStr.foreground = 1; + newStr.fontScale = 1.40; + newStr.sort = 20 - p; + newStr.alpha = 1; + newStr.x = 0 + strOffsetX[ p ]; + newStr.y = 60 + strOffsetY[ p ] + i * 15; + + if ( p > 0 ) + { + newStr.color = ( 0, 0, 0 ); + } + + newStrArray[ newStrArray.size ] = newStr; + } + + level._createfx.hudelems[ i ] = newStrArray; + } + + newStrArray = []; + for ( p = 0; p < 5; p++ ) + { + // setup instructional text + newStr = newHudElem(); + newStr.alignX = "center"; + newStr.location = 0; + newStr.foreground = 1; + newStr.fontScale = 1.40; + newStr.sort = 20 - p; + newStr.alpha = 1; + newStr.x = 320 + strOffsetX[ p ]; + newStr.y = 80 + strOffsetY[ p ]; + if ( p > 0 ) + { + newStr.color = ( 0, 0, 0 ); + } + + newStrArray[ newStrArray.size ] = newStr; + } + + level.createFX_centerPrint = newStrArray; +} + +init_crosshair() +{ + // setup "crosshair" + crossHair = newHudElem(); + crossHair.location = 0; + crossHair.alignX = "center"; + crossHair.alignY = "middle"; + crossHair.foreground = 1; + crossHair.fontScale = 2; + crossHair.sort = 20; + crossHair.alpha = 1; + crossHair.x = 320; + crossHair.y = 233; + crossHair setDevText( "." ); +} + +clear_fx_hudElements() +{ + level.clearTextMarker ClearAllTextAfterHudElem(); + + for ( i = 0;i < level._createfx.hudelem_count;i++ ) + { + for ( p = 0; p < 1; p++ ) + level._createfx.hudelems[ i ][ p ] setDevText( "" ); + } + + level.fxHudElements = 0; +} + +set_fx_hudElement( text ) +{ + for ( p = 0;p < 1;p++ ) + level._createfx.hudelems[ level.fxHudElements ][ p ] setDevText( text ); + + level.fxHudElements++; + assert( level.fxHudElements < level._createfx.hudelem_count ); +} + +init_tool_hud() +{ + if ( !IsDefined( level._createfx.tool_hudelems ) ) + { + level._createfx.tool_hudelems = []; + } + + if ( !IsDefined( level._createfx.tool_hud_visible ) ) + { + level._createfx.tool_hud_visible = true; + } + + if ( !IsDefined( level._createfx.tool_hud ) ) + { + level._createfx.tool_hud = ""; + } +} + +new_tool_hud( name ) +{ + foreach ( idx, hud in level._createfx.tool_hudelems ) + { + if ( IsDefined( hud.value_hudelem ) ) + { + hud.value_hudelem Destroy(); + } + + hud Destroy(); + + level._createfx.tool_hudelems[ idx ] = undefined; + } + + level._createfx.tool_hud = name; +} + +current_mode_hud( name ) +{ + return level._createfx.tool_hud == name; +} + +clear_tool_hud() +{ + new_tool_hud( "" ); +} + +new_tool_hudelem( n ) +{ + hud = newHudElem(); + hud.alignX = "left"; + hud.location = 0; + hud.foreground = 1; + hud.fontScale = 1.2; + hud.alpha = 1; + hud.x = 0; + hud.y = 320 + ( n * 15 ); + return hud; +} + +get_tool_hudelem( name ) +{ + if ( IsDefined( level._createfx.tool_hudelems[ name ] ) ) + { + return level._createfx.tool_hudelems[ name ]; + } + + return undefined; +} + +set_tool_hudelem( var, value ) +{ + hud = get_tool_hudelem( var ); + + if ( !IsDefined( hud ) ) + { + hud = new_tool_hudelem( level._createfx.tool_hudelems.size ); + level._createfx.tool_hudelems[ var ] = hud; + hud SetDevText( var ); + hud.text = var; + } + + if ( IsDefined( value ) ) + { + if ( IsDefined( hud.value_hudelem ) ) + { + value_hud = hud.value_hudelem; + } + else + { + value_hud = new_tool_hudelem( level._createfx.tool_hudelems.size ); + value_hud.x += 80; + value_hud.y = hud.y; + hud.value_hudelem = value_hud; + } + + if ( IsDefined( value_hud.text ) && value_hud.text == value ) + { + return; + } + + value_hud SetDevText( value ); + value_hud.text = value; + } +} + +select_by_substring() +{ + substring = GetDvar( "select_by_substring" ); + if ( substring == "" ) + { + return false; + } + + SetDvar( "select_by_substring", "" ); + + index_array = []; + foreach ( i, ent in level.createFXent ) + { + if ( IsSubStr( ent.v[ "fxid" ], substring ) ) + { + index_array[ index_array.size ] = i; + } + } + + if ( index_array.size == 0 ) + { + PrintLn( "^1select_by_substring could not find \"" + substring + "\"" ); + return false; + } + + deselect_all_ents(); + select_index_array( index_array ); + + foreach ( index in index_array ) + { + ent = level.createFXent[ index ]; + select_entity( index, ent ); + } + + PrintLn( "select_by_substring found \"" + substring + "\" [" + index_array.size + "]" ); + return true; +} + +select_index_array( index_array ) +{ + foreach ( index in index_array ) + { + ent = level.createFXent[ index ]; + select_entity( index, ent ); + } +} + +deselect_all_ents() +{ + foreach ( i, ent in level._createfx.selected_fx_ents ) + { + deselect_entity( i, ent ); + } +} \ No newline at end of file diff --git a/common_scripts/_createfxmenu.gsc b/common_scripts/_createfxmenu.gsc new file mode 100644 index 0000000..36b1178 --- /dev/null +++ b/common_scripts/_createfxmenu.gsc @@ -0,0 +1,755 @@ +#include common_scripts\utility; +#include common_scripts\_createfx; + + +//--------------------------------------------------------- +// Menu init/loop section +//--------------------------------------------------------- +init_menu() +{ + level._createfx.options = []; + // each option has a type, a name its stored under, a description, a default, and a mask it uses to determine + // which types of fx can have this option + addOption( "string", "fxid", "FX id", "nil", "fx" ); + addOption( "float", "delay", "Repeat rate/start delay", 0.5, "fx" ); + addOption( "string", "flag", "Flag", "nil", "exploder" ); + + if( !level.mp_createfx ) + { + addOption( "string", "firefx", "2nd FX id", "nil", "exploder" ); + addOption( "float", "firefxdelay", "2nd FX id repeat rate", 0.5, "exploder" ); + addOption( "float", "firefxtimeout", "2nd FX timeout", 5, "exploder" ); + addOption( "string", "firefxsound", "2nd FX soundalias", "nil", "exploder" ); + addOption( "float", "damage", "Radius damage", 150, "exploder" ); + addOption( "float", "damage_radius", "Radius of radius damage", 250, "exploder" ); + addOption( "string", "earthquake", "Earthquake", "nil", "exploder" ); + addOption( "string", "ender", "Level notify for ending 2nd FX", "nil", "exploder" ); + } + + addOption( "float", "delay_min", "Minimimum time between repeats", 1, "soundfx_interval" ); + addOption( "float", "delay_max", "Maximum time between repeats", 2, "soundfx_interval" ); + addOption( "int", "repeat", "Number of times to repeat", 5, "exploder" ); + addOption( "string", "exploder", "Exploder", "1", "exploder" ); + + addOption( "string", "soundalias", "Soundalias", "nil", "all" ); + addOption( "string", "loopsound", "Loopsound", "nil", "exploder" ); + + addOption( "int", "reactive_radius", "Reactive Radius", 100, "reactive_fx", ::input_reactive_radius ); + + if( !level.mp_createfx ) + { + addOption( "string", "rumble", "Rumble", "nil", "exploder" ); + addOption( "int", "stoppable", "Can be stopped from script", "1", "all" ); + } + + level.effect_list_offset = 0; + level.effect_list_offset_max = 10; + + + // creates mask groups. For example if the above says its mask is "fx", then all the types under "fx" can use the option + level.createfxMasks = []; + level.createfxMasks[ "all" ] = []; + level.createfxMasks[ "all" ][ "exploder" ] = true; + level.createfxMasks[ "all" ][ "oneshotfx" ] = true; + level.createfxMasks[ "all" ][ "loopfx" ] = true; + level.createfxMasks[ "all" ][ "soundfx" ] = true; + level.createfxMasks[ "all" ][ "soundfx_interval" ] = true; + level.createfxMasks[ "all" ][ "reactive_fx" ] = true; + + level.createfxMasks[ "fx" ] = []; + level.createfxMasks[ "fx" ][ "exploder" ] = true; + level.createfxMasks[ "fx" ][ "oneshotfx" ] = true; + level.createfxMasks[ "fx" ][ "loopfx" ] = true; + + level.createfxMasks[ "exploder" ] = []; + level.createfxMasks[ "exploder" ][ "exploder" ] = true; + + level.createfxMasks[ "loopfx" ] = []; + level.createfxMasks[ "loopfx" ][ "loopfx" ] = true; + + level.createfxMasks[ "oneshotfx" ] = []; + level.createfxMasks[ "oneshotfx" ][ "oneshotfx" ] = true; + + level.createfxMasks[ "soundfx" ] = []; + level.createfxMasks[ "soundfx" ][ "soundalias" ] = true; + + level.createfxMasks[ "soundfx_interval" ] = []; + level.createfxMasks[ "soundfx_interval" ][ "soundfx_interval" ] = true; + + level.createfxMasks[ "reactive_fx" ] = []; + level.createfxMasks[ "reactive_fx" ][ "reactive_fx" ] = true; + + // Mainly used for input of a menu + menus = []; + menus[ "creation" ] = ::menu_create_select; + menus[ "create_oneshot" ] = ::menu_create; + menus[ "create_loopfx" ] = ::menu_create; + menus[ "change_fxid" ] = ::menu_create; + menus[ "none" ] = ::menu_none; + menus[ "add_options" ] = ::menu_add_options; + menus[ "select_by_name" ] = ::menu_select_by_name; + + level._createfx.menus = menus; +} + +menu( name ) +{ + return level.create_fx_menu == name; +} + +setmenu( name ) +{ + level.create_fx_menu = name; +} + +create_fx_menu() +{ + if ( button_is_clicked( "escape", "x" ) ) + { + _exit_menu(); + return; + } + + if ( IsDefined( level._createfx.menus[ level.create_fx_menu ] ) ) + { + [[ level._createfx.menus[ level.create_fx_menu ] ]](); + } +} + +menu_create_select() +{ + if ( button_is_clicked( "1" ) ) + { + setmenu( "create_oneshot" ); + draw_effects_list(); + return; + } + else if ( button_is_clicked( "2" ) ) + { + setmenu( "create_loopsound" ); + ent = createLoopSound(); + finish_creating_entity( ent ); + return; + } + else if ( button_is_clicked( "3" ) ) + { + setmenu( "create_exploder" ); + ent = createNewExploder(); + finish_creating_entity( ent ); + return; + } + else if ( button_is_clicked( "4" ) ) + { + setmenu( "create_interval_sound" ); + ent = createIntervalSound(); + finish_creating_entity( ent ); + return; + } + else if ( button_is_clicked( "5" ) ) + { + ent = createReactiveEnt(); + finish_creating_entity( ent ); + return; + } +} + +menu_create() +{ + if ( next_button() ) + { + increment_list_offset(); + draw_effects_list(); + } + else if ( previous_button() ) + { + decrement_list_offset(); + draw_effects_list(); + } + + menu_fx_creation(); +} + +menu_none() +{ + if ( button_is_clicked( "m" ) ) + increment_list_offset(); + + // change selected entities + menu_change_selected_fx(); + + // if there's a selected ent then display the info on the last one to be selected + if ( entities_are_selected() ) + { + last_selected_ent = get_last_selected_ent(); + + // only update hudelems when we have new info + if ( !IsDefined( level.last_displayed_ent ) || last_selected_ent != level.last_displayed_ent ) + { + display_fx_info( last_selected_ent ); + level.last_displayed_ent = last_selected_ent; + } + + if ( button_is_clicked( "a" ) ) + { + clear_settable_fx(); + setMenu( "add_options" ); + } + } + else + { + level.last_displayed_ent = undefined; + } +} + +menu_add_options() +{ + if ( !entities_are_selected() ) + { + clear_fx_hudElements(); + setMenu( "none" ); + return; + } + + display_fx_add_options( get_last_selected_ent() ); + if ( next_button() ) + { + increment_list_offset(); +// draw_effects_list(); + } +} + +menu_select_by_name() +{ + if ( next_button() ) + { + increment_list_offset(); + draw_effects_list( "Select by name" ); + } + else if ( previous_button() ) + { + decrement_list_offset(); + draw_effects_list( "Select by name" ); + } + + select_by_name(); +} + +next_button() +{ + return button_is_clicked( "rightarrow" ); +} + +previous_button() +{ + return button_is_clicked( "leftarrow" ); +} + +_exit_menu() +{ + clear_fx_hudElements(); + clear_entity_selection(); + update_selected_entities(); + setmenu( "none" ); +} + +//--------------------------------------------------------- +// Create FX Section (button presses) +//--------------------------------------------------------- +menu_fx_creation() +{ + count = 0; + picked_fx = undefined; + keys = func_get_level_fx(); + + for ( i = level.effect_list_offset; i < keys.size; i++ ) + { + count = count + 1; + button_to_check = count; + if ( button_to_check == 10 ) + button_to_check = 0; + if ( button_is_clicked( button_to_check + "" ) ) + { + picked_fx = keys[ i ]; + break; + } + + if ( count > level.effect_list_offset_max ) + break; + } + + if ( !isdefined( picked_fx ) ) + return; + + if ( menu( "change_fxid" ) ) + { + apply_option_to_selected_fx( get_option( "fxid" ), picked_fx ); + level.effect_list_offset = 0; + clear_fx_hudElements(); + setMenu( "none" ); + return; + } + + + ent = undefined; + if ( menu( "create_loopfx" ) ) + ent = createLoopEffect( picked_fx ); + if ( menu( "create_oneshot" ) ) + ent = createOneshotEffect( picked_fx ); + + finish_creating_entity( ent ); +} + +finish_creating_entity( ent ) +{ + assert( isdefined( ent ) ); + ent.v[ "angles" ] = vectortoangles( ( ent.v[ "origin" ] + ( 0, 0, 100 ) ) - ent.v[ "origin" ] ); + ent post_entity_creation_function();// for createfx dev purposes + clear_entity_selection(); + select_last_entity(); + move_selection_to_cursor(); + update_selected_entities(); + setMenu( "none" ); +} + +entities_are_selected() +{ + return level._createfx.selected_fx_ents.size > 0; +} + +menu_change_selected_fx() +{ + if ( !level._createfx.selected_fx_ents.size ) + { + return; + } + + count = 0; + drawnCount = 0; + ent = get_last_selected_ent(); + + for ( i = 0; i < level._createfx.options.size; i++ ) + { + option = level._createfx.options[ i ]; + if ( !isdefined( ent.v[ option[ "name" ] ] ) ) + continue; + count++ ; + if ( count < level.effect_list_offset ) + continue; + + drawnCount++ ; + button_to_check = drawnCount; + if ( button_to_check == 10 ) + button_to_check = 0; + + if ( button_is_clicked( button_to_check + "" ) ) + { + prepare_option_for_change( option, drawnCount ); + break; + } + + if ( drawnCount > level.effect_list_offset_max ) + { + more = true; + break; + } + } +} + +prepare_option_for_change( option, drawnCount ) +{ + if ( option[ "name" ] == "fxid" ) + { + setMenu( "change_fxid" ); + draw_effects_list(); + return; + } + + level.createfx_inputlocked = true; + level._createfx.hudelems[ drawnCount + 3 ][ 0 ].color = ( 1, 1, 0 ); + + if ( IsDefined( option[ "input_func" ] ) ) + { + thread [[ option[ "input_func" ] ]]( drawnCount + 3 ); + } + else + { + createfx_centerprint( "To change " + option[ "description" ] + " on selected entities, type /fx newvalue" ); + } + + set_option_index( option[ "name" ] ); + setdvar( "fx", "nil" ); +} + +menu_fx_option_set() +{ + if ( getdvar( "fx" ) == "nil" ) + return; + + option = get_selected_option(); + setting = undefined; + if ( option[ "type" ] == "string" ) + setting = getdvar( "fx" ); + if ( option[ "type" ] == "int" ) + setting = getdvarint( "fx" ); + if ( option[ "type" ] == "float" ) + setting = getdvarfloat( "fx" ); + + apply_option_to_selected_fx( option, setting ); +} + +apply_option_to_selected_fx( option, setting ) +{ + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + + if ( mask( option[ "mask" ], ent.v[ "type" ] ) ) + ent.v[ option[ "name" ] ] = setting; + } + + level.last_displayed_ent = undefined; // needed to force a redraw of the last display ent + update_selected_entities(); + clear_settable_fx(); +} + +set_option_index( name ) +{ + for ( i = 0; i < level._createfx.options.size; i++ ) + { + if ( level._createfx.options[ i ][ "name" ] != name ) + continue; + + level._createfx.selected_fx_option_index = i; + return; + } +} + +get_selected_option() +{ + return level._createfx.options[ level._createfx.selected_fx_option_index ]; +} + +mask( type, name ) +{ + return isdefined( level.createfxMasks[ type ][ name ] ); +} + +addOption( type, name, description, defaultSetting, mask, input_func ) +{ + option = []; + option[ "type" ] = type; + option[ "name" ] = name; + option[ "description" ] = description; + option[ "default" ] = defaultSetting; + option[ "mask" ] = mask; + + if ( IsDefined( input_func ) ) + { + option[ "input_func" ] = input_func; + } + + level._createfx.options[ level._createfx.options.size ] = option; +} + +get_option( name ) +{ + for ( i = 0; i < level._createfx.options.size; i++ ) + { + if ( level._createfx.options[ i ][ "name" ] == name ) + return level._createfx.options[ i ]; + } +} + +//--------------------------------------------------------- +// Reactive Radius +//--------------------------------------------------------- +input_reactive_radius( menu_index ) +{ + level._createfx.hudelems[ menu_index ][ 0 ] SetDevText( "Reactive Radius, Press: + OR -" ); + + while ( 1 ) + { + wait( 0.05 ); + if ( level.player ButtonPressed( "escape" ) || level.player ButtonPressed( "x" ) ) + break; + + val = 0; + if ( level.player ButtonPressed( "-" ) ) + val = -10; + else if ( level.player ButtonPressed( "=" ) ) + val = 10; + + + if ( val != 0 ) + { + foreach ( ent in level._createfx.selected_fx_ents ) + { + if ( IsDefined( ent.v[ "reactive_radius" ] ) ) + { + ent.v[ "reactive_radius" ] += val; + ent.v[ "reactive_radius" ] = Clamp( ent.v[ "reactive_radius" ], 10, 1000 ); + } + } + } + } + + level.last_displayed_ent = undefined; // needed to force a redraw of the last display ent + update_selected_entities(); + clear_settable_fx(); +} + +//--------------------------------------------------------- +// Display FX Add Options +//--------------------------------------------------------- +display_fx_add_options( ent ) +{ + // are we doing the create fx menu right now? + assert( menu( "add_options" ) ); + assert( entities_are_selected() ); + + clear_fx_hudElements(); + set_fx_hudElement( "Name: " + ent.v[ "fxid" ] ); + set_fx_hudElement( "Type: " + ent.v[ "type" ] ); + set_fx_hudElement( "Origin: " + ent.v[ "origin" ] ); + set_fx_hudElement( "Angles: " + ent.v[ "angles" ] ); + + // if entities are selected then we make the entity stats modifiable + count = 0; + drawnCount = 0; + more = false; + + if ( level.effect_list_offset >= level._createfx.options.size ) + level.effect_list_offset = 0; + + for ( i = 0; i < level._createfx.options.size; i++ ) + { + option = level._createfx.options[ i ]; + if ( isdefined( ent.v[ option[ "name" ] ] ) ) + continue; + + // does this type of effect get this kind of option? + if ( !mask( option[ "mask" ], ent.v[ "type" ] ) ) + continue; + + count++ ; + if ( count < level.effect_list_offset ) + continue; + if ( drawnCount >= level.effect_list_offset_max ) + continue; + + drawnCount++ ; + button_to_check = drawnCount; + if ( button_to_check == 10 ) + button_to_check = 0; + if ( button_is_clicked( button_to_check + "" ) ) + { + add_option_to_selected_entities( option ); +// prepare_option_for_change( option, drawnCount ); + menuNone(); + level.last_displayed_ent = undefined; // needed to force a redraw of the last display ent + return; + } + + set_fx_hudElement( button_to_check + ". " + option[ "description" ] ); + } + + if ( count > level.effect_list_offset_max ) + set_fx_hudElement( "(->) More >" ); + + set_fx_hudElement( "(x) Exit >" ); +} + +add_option_to_selected_entities( option ) +{ + setting = undefined; + for ( i = 0; i < level._createfx.selected_fx_ents.size; i++ ) + { + ent = level._createfx.selected_fx_ents[ i ]; + + if ( mask( option[ "mask" ], ent.v[ "type" ] ) ) + ent.v[ option[ "name" ] ] = option[ "default" ]; + } +} + +menuNone() +{ + level.effect_list_offset = 0; + clear_fx_hudElements(); + setMenu( "none" ); +} + +//--------------------------------------------------------- +// Display FX info +//--------------------------------------------------------- +display_fx_info( ent ) +{ + // are we doing the create fx menu right now? + if ( !menu( "none" ) ) + return; + + clear_fx_hudElements(); + set_fx_hudElement( "Name: " + ent.v[ "fxid" ] ); + set_fx_hudElement( "Type: " + ent.v[ "type" ] ); + set_fx_hudElement( "Origin: " + ent.v[ "origin" ] ); + set_fx_hudElement( "Angles: " + ent.v[ "angles" ] ); + + if ( entities_are_selected() ) + { + // if entities are selected then we make the entity stats modifiable + count = 0; + drawnCount = 0; + more = false; + for ( i = 0; i < level._createfx.options.size; i++ ) + { + option = level._createfx.options[ i ]; + if ( !isdefined( ent.v[ option[ "name" ] ] ) ) + continue; + count++ ; + if ( count < level.effect_list_offset ) + continue; + + drawnCount++ ; + set_fx_hudElement( drawnCount + ". " + option[ "description" ] + ": " + ent.v[ option[ "name" ] ] ); + if ( drawnCount > level.effect_list_offset_max ) + { + more = true; + break; + } + } + if ( count > level.effect_list_offset_max ) + set_fx_hudElement( "(->) More >" ); + set_fx_hudElement( "(a) Add >" ); + set_fx_hudElement( "(x) Exit >" ); + } + else + { + count = 0; + more = false; + for ( i = 0; i < level._createfx.options.size; i++ ) + { + option = level._createfx.options[ i ]; + if ( !isdefined( ent.v[ option[ "name" ] ] ) ) + continue; + count++ ; + set_fx_hudElement( option[ "description" ] + ": " + ent.v[ option[ "name" ] ] ); + if ( count > level._createfx.hudelem_count ) + break; + } + } +} + +//--------------------------------------------------------- +// Draw Effects Section +//--------------------------------------------------------- +draw_effects_list( title ) +{ + clear_fx_hudElements(); + + count = 0; + more = false; + + keys = func_get_level_fx(); + + if( !IsDefined( title ) ) + { + title = "Pick an effect"; + } + + set_fx_hudElement( title + " [" + level.effect_list_offset + " - " + keys.size + "]:" ); + +// if ( level.effect_list_offset >= keys.size ) +// level.effect_list_offset = 0; + + for ( i = level.effect_list_offset; i < keys.size; i++ ) + { + count = count + 1; + set_fx_hudElement( count + ". " + keys[ i ] ); + if ( count >= level.effect_list_offset_max ) + { + more = true; + break; + } + } + + if ( keys.size > level.effect_list_offset_max ) + { + set_fx_hudElement( "(->) More >" ); + set_fx_hudElement( "(<-) Previous >" ); + } +} + +increment_list_offset() +{ + keys = func_get_level_fx(); + + if ( level.effect_list_offset >= keys.size - level.effect_list_offset_max ) + { + level.effect_list_offset = 0; + } + else + { + level.effect_list_offset += level.effect_list_offset_max; + } +} + +decrement_list_offset() +{ + level.effect_list_offset -= level.effect_list_offset_max; + + if ( level.effect_list_offset < 0 ) + { + keys = func_get_level_fx(); + level.effect_list_offset = keys.size - level.effect_list_offset_max; + } +} + +//--------------------------------------------------------- +// Select by Name Section +//--------------------------------------------------------- +select_by_name() +{ + count = 0; + picked_fx = undefined; + keys = func_get_level_fx(); + + for ( i = level.effect_list_offset; i < keys.size; i++ ) + { + count = count + 1; + button_to_check = count; + if ( button_to_check == 10 ) + button_to_check = 0; + if ( button_is_clicked( button_to_check + "" ) ) + { + picked_fx = keys[ i ]; + break; + } + + if ( count > level.effect_list_offset_max ) + break; + } + + if ( !IsDefined( picked_fx ) ) + return; + + index_array = []; + foreach ( i, ent in level.createFXent ) + { + if ( IsSubStr( ent.v[ "fxid" ], picked_fx ) ) + { + index_array[ index_array.size ] = i; + } + } + + deselect_all_ents(); + select_index_array( index_array ); + + level._createfx.select_by_name = true; +} + +//--------------------------------------------------------- +// Utility Section +//--------------------------------------------------------- +get_last_selected_ent() +{ + return level._createfx.selected_fx_ents[ level._createfx.selected_fx_ents.size - 1 ]; +} \ No newline at end of file diff --git a/common_scripts/_csplines.gsc b/common_scripts/_csplines.gsc new file mode 100644 index 0000000..745c782 --- /dev/null +++ b/common_scripts/_csplines.gsc @@ -0,0 +1,1226 @@ +/* ====== CUBIC HERMITE SPLINES ======= + +The difference between Hermite splines and Bezier curves is that Hermite splines go through all their nodes. +Bezier splines touch their end points but use the other nodes to create tangents without actually going through them. + +Vehicle splines aren't bezier, but they cut corners too. + +The advantage of these hermite cubic splines is that it's easy to know precisely how long it will take to travel the path. + +Hermite spline code, from +http://www.siggraph.org/education/materials/HyperGraph/modeling/splines/hermite.htm +and +http://cubic.org/docs/hermite.htm +Given : Points P1, P4 Tangent vectors R1, R4 on the interval n = 0 to 1. +We want to make a cubic curve that goes through the two points with the correct direction at each point. +Consider each dimension separately. Here's just the x component: x(n) = axn^3 + bxn^2 + cxn + dx +x(n) = P1x(2n^3 - 3n^2 + 1) + P4x(-2n^3 + 3n^2) + R1x(n^3 - 2n^2 + n) + R4x(n^3 - n^2) + +So here's the matrix in a form that is easily usable to precompute coefficients +x(n) = ( 2*P1x - 2*P4x + R1x + R4x ) * n^3 + + ( -3*P1x + 3*P4x - 2*R1x - R4x ) * n^2 + + ( R1x ) * n + + ( P1x ) + +------------------------------- + +Tangents +Since we're only given the points, we need to decide on some tangents. For the end points, I'll set them so the +acceleration is 0. For the others, I'll use Cardinal splines: +R[i] = (1-tension) * ( P[i+1] - P[i-1] ) + +It's not that simple though, since the time between points is variable. +R[i] = R[i] * ( 2L[i-1] / ( L[i-1] + L[i] ) ) where L[i] is the length of the segment after R[i] + +------------------------------- +*/ + +#include common_scripts\utility; + +/* ====== Cubic Hermite Spline - Calculate Cardinal Tangent. ====== + * Given the points before and after and the length of the segments before and after, return the tangent at this point. + * Set tension to 0.5 for a Catmull-Rom spline. + * nb Returns an "incoming" and an "outgoing" tangent. They are the same tangent really, but scaled by the lengths so + * that when they are used with a normalized length in csplineSeg_calcCoeffs, they give a consistent result. */ +cspline_calcTangent(P1, P3, Length1, Length2, tension) +{ + incoming = []; + outgoing = []; + for (i=0; i<3; i++) + { + incoming[i] = ( 1 - tension ) * ( P3[i] - P1[i] ); + outgoing[i] = incoming[i]; + incoming[i] *= ( 2*Length1 / ( Length1 + Length2 ) ); + outgoing[i] *= ( 2*Length2 / ( Length1 + Length2 ) ); + } + R = []; + R["incoming"] = ( incoming[0], incoming[1], incoming[2] ); + R["outgoing"] = ( outgoing[0], outgoing[1], outgoing[2] ); + return R; +} + +/* ====== Cubic Hermite Spline - Calculate Kochanek-Bartels Tangent. ====== + * Given the points before and after and the length of the segments before and after, return the tangent at this point. + * nb Returns an "incoming" and an "outgoing" tangent. They are the same tangent really, but scaled by the lengths so + * that when they are used with a normalized length in csplineSeg_calcCoeffs, they give a consistent result. */ +cspline_calcTangentTCB(P1, P2, P3, Length1, Length2, t, c, b) +{ + incoming = []; + outgoing = []; + for (i=0; i<3; i++) + { + incoming[i] = ( 1 - t ) * ( 1 - c ) * ( 1 + b) * 0.5 * ( P2[i] - P1[i] ); + incoming[i] += ( 1 - t ) * ( 1 + c ) * ( 1 - b) * 0.5 * ( P3[i] - P2[i] ); + incoming[i] *= ( 2*Length1 / ( Length1 + Length2 ) ); + outgoing[i] = ( 1 - t ) * ( 1 + c ) * ( 1 + b) * 0.5 * ( P2[i] - P1[i] ); + outgoing[i] += ( 1 - t ) * ( 1 - c ) * ( 1 - b) * 0.5 * ( P3[i] - P2[i] ); + outgoing[i] *= ( 2*Length2 / ( Length1 + Length2 ) ); + } + R = []; + R["incoming"] = ( incoming[0], incoming[1], incoming[2] ); + R["outgoing"] = ( outgoing[0], outgoing[1], outgoing[2] ); + return R; +} + +/* ====== Cubic Hermite Spline - Calculate Natural Tangent ====== + * Given two points and a tangent at one of them, returns a tangent for the other that will result in 0 acceleration at + * that point. Note that: + * - it doesn't matter if tangent is for the start or end of the segment; the result is the same + * - the return value is an array with identical components "incoming" and "outgoing". */ +cspline_calcTangentNatural(P1, P2, R1) +{ + // As I understand it, natural splines are those which have constant velocity at the endpoints. + // For no accn at P1, we need + // -3P1 + 3P2 - 2R1 - R2 = 0 + // R1[i] = ( -3*P1[i] + 3*P2[i] - R2[i] ) / 2 + // For no accn at P2, we need ( -3*P1[i] + 3*P2[i] - 2*R1[i] - R2[i] ) + 3*( 2*P1[i] - 2*P2[i] + R1[i] + R2[i] ) = 0 + // -3P1 + 3P2 - 2R1 - R2 + 6P1 - 6P2 + 3R1 + 3R2 = 0 + // 3P1 - 3P2 + R1 + 2R2 = 0 + // R2[i] = ( -3*P1[i] + 3*P2[i] - R1[i] ) / 2 + numDimensions = 3; + incoming = []; + outgoing = []; + if ( IsDefined( R1 ) ) + { + for (i=0; i 1 ) + { + segLength *= topSpeed; + R1 /= topSpeed; // Keep the tangents the same. We already know they're not too fast. This isn't mathematically + R2 /= topSpeed; // correct but it produces a nice curve. + // And we need to recalculate the segment + csSeg = csplineSeg_calcCoeffs( P1, P2, R1, R2 ); + } + //prof_end("csplines_topspeed"); + csSeg.endAt = segLength; + return csSeg; +} + +// Returns the positions, velocities and accelerations of the node points along the spline path. +cspline_getNodes(csPath) +{ + array = []; + segLength = csPath.Segments[0].endAt; + array[0] = csplineSeg_getPoint( csPath.Segments[0], 0, segLength, csPath.Segments[0].speedStart ); + array[0]["time"] = 0; + startDist = 0; + for (segNum=0; segNum < csPath.Segments.size; segNum++) + { + segLength = csPath.Segments[segNum].endAt - startDist; + array[segNum+1] = csplineSeg_getPoint( csPath.Segments[segNum], 1, segLength, csPath.Segments[segNum].speedEnd ); + posVelStart = csplineSeg_getPoint( csPath.Segments[segNum], 0, segLength, csPath.Segments[segNum].speedStart ); + array[segNum]["acc_out"] = posVelStart["acc"]; + array[segNum+1]["time"] = csPath.Segments[segNum].endTime; + startDist = csPath.Segments[segNum].endAt; + } + array[csPath.Segments.size]["acc_out"] = array[csPath.Segments.size]["acc"]; + return array; +} +/* +============= +///ScriptDocBegin +"Name: csplineSeg_getPoint( , , , )" +"Summary: Given a Hermite Spline segment and a normalized distance along the segment, return position, velocity and acceleration vectors." +"Module: CSplines" +"CallOn: nothing" +"MandatoryArg: : a cubic Hermite spline segment - a struct containing n3, n2, n and c, each of which is an array of 3 floats." +"MandatoryArg: : The distance along the segment. 0 <= x <= 1." +"OptionalArg: : The length of this segment, used for calculating the correct velocity and acceleration." +"OptionalArg: : The current rate of movement along the path, also used for correcting the velocity and acceleration." +"Example: posVelArray = csplineSeg_getPoint( csPath.Segments[segNum], normalizedDistance );" +"SPMP: both" +///ScriptDocEnd +============= +*/ +csplineSeg_getPoint(csplineSeg, x, segLength, speedMult ) +{ + numDimensions = 3;//csplineSeg.n3.size; + posArray = []; + velArray = []; + accArray = []; + returnArray = []; + for (i=0; i 0 && cubicRoots[0] < 1 ) + { + slope = (2*b*cubicRoots[0]) + c; + if ( slope < 0 ) + values[values.size] = cubicRoots[0]; + } + if ( IsDefined( cubicRoots[1] ) && cubicRoots[1] > 0 && cubicRoots[1] < 1 ) + { + slope = (2*b*cubicRoots[0]) + c; + if ( slope < 0 ) + values[values.size] = cubicRoots[1]; + } + } + else + { + // Divide the interval up into sub-intervals based on roots of the cubic's derivative. + // Within each sub-interval, we know the cubic is constantly increasing or constantly decreasing, so there can only be one + // root at most. Then within those intervals that are decreasing we can quickly check whether or not there is a root, and only + // then do we have to actually find it. + quadRoots = maps\interactive_models\_interactive_utility::rootsOfQuadratic( 3*a, 2*b, c ); + i = 0; + points[0] = 0; + for ( i=0; i< quadRoots.size; i++ ) + { + if ( quadRoots[i] > 0 && quadRoots[i] < 1 ) + { + points[points.size] = quadRoots[i]; + } + } + points[points.size] = 1; + for ( i=1; i 0 ) && (endVal < 0) ) + { + // There's a cubic root in the interval that corresponds to a maximum of the quartic. + values[values.size] = maps\interactive_models\_interactive_utility::newtonsMethod( x0, x1, a, b, c, d, 0.02 ); + } + } + } + values[values.size] = 1; + + // Now check through the contenders we have and see which has the highest speed. + // Switch our variables over to the quartic that represents the square of the speed + a = 9*n3_n3; + b = 12*n3_n2; + c = 6*n3_n + 4*n2_n2; + d = 4*n2_n; + e = n_n; + + maxSpeedSq = 0; + foreach ( x in values ) + { + speedSq = ( a*x*x*x*x ) + ( b*x*x*X ) + ( c*x*x ) + ( d*x ) + e; + if ( speedSq > maxSpeedSq ) + maxSpeedSq = speedSq; + /*/# + // Check my math. + actualPoint = csplineSeg_getPoint( csplineSeg, x ); + actualSpeedSq = LengthSquared( actualPoint["vel"] ); + actualSpeedSq *= 1; // Just so I can get a breakpoint here. + #/*/ + } + + return ( sqrt( maxSpeedSq ) / segLength ); +} + +csplineSeg_calcLengthByStepping( csplineSeg, numSteps ) +{ + oldPos = csplineSeg_getPoint( csplineSeg, 0 ); + distance = 0; + for ( i=1; i <= numSteps; i++ ) + { + n = i / numSteps; + newPos = csplineSeg_getPoint( csplineSeg, n ); + distance += Length( oldPos["pos"] - newPos["pos"] ); + oldPos = newPos; + } + return distance; +} + +csplineSeg_calcTopSpeedByStepping( csplineSeg, numSteps, segLength ) +{ + oldPos = csplineSeg_getPoint( csplineSeg, 0 ); + topSpeed = 0; + for ( i=1; i <= numSteps; i++ ) + { + n = i / numSteps; + newPos = csplineSeg_getPoint( csplineSeg, n ); + distance = Length( oldPos["pos"] - newPos["pos"] ); + if ( distance > topSpeed ) topSpeed = distance; + oldPos = newPos; + } + topSpeed *= numSteps / segLength ; + return topSpeed; +} + + +/* Take a targetname for the first node in a path and return an array with positions for all nodes */ +/* +============= +///ScriptDocBegin +"Name: cspline_findPathnodes( )" +"Summary: Take a targetname for the first node in a path and return an array of nodes." +"Module: CSplines" +"CallOn: nothing" +"MandatoryArg: : The targetname of the first node in the path. Currently requires a path of vehicle nodes." +"Example: csPath = cspline_findPathnodes( targetname );" +"SPMP: both" +///ScriptDocEnd +============= +*/ + +cspline_findPathnodes( first_node ) // Adapted from waterball_get_pathnodes in flood_flooding.gsc +{ + next_node = first_node; + array = []; + + for( node_num = 0; IsDefined( next_node.target ); node_num++ ) + { + array[node_num] = next_node; + targetname = next_node.target; + next_node = GetNode( targetname, "targetname" ); + if ( !IsDefined( next_node ) ) + { + next_node = GetVehicleNode( targetname, "targetname" ); + if ( !IsDefined( next_node ) ) + { + next_node = GetEnt( targetname, "targetname" ); + if ( !IsDefined( next_node ) ) + { + next_node = getstruct( targetname, "targetname" ); + } + } + } + + AssertEx( IsDefined(next_node), "cspline_findPathnodes: Couldn't find targetted node with targetname "+targetname+"." ); + } + array[node_num] = next_node; + return( array ); +} + +/* +============= +///ScriptDocBegin +"Name: cspline_makePath1Seg( , , , )" +"Summary: Take two points and returns a data structure with a single-piece hermite spline path defined in it. +"Module: CSplines" +"CallOn: nothing" +"MandatoryArg: : Point to start from." +"MandatoryArg: : Point to end at." +"OptionalArg: : Velocity vector for the beginning of the spline; indicates movement in one frame. Will use natural (ie zero acceleration) if not supplied." +"OptionalArg: : Velocity vector for the end of the spline; indicates movement in one frame. Will use natural (ie zero acceleration) if not supplied." +"Example: csPath = cspline_makePath1Seg( self.origin, targetPoint, currentVelocity );" +"SPMP: both" +///ScriptDocEnd +============= +*/ +cspline_makePath1Seg(startOrg, endOrg, startVel, endVel) +{ + nodes = []; + nodes[0] = SpawnStruct(); + nodes[0].origin = startOrg; + if ( IsDefined(startVel) ) { + nodes[0].speed = Length( startVel ); + startVel /= nodes[0].speed; + nodes[0].speed *= 20; // Speeds of real nodes are inches per second; velocity is per frame. + } else { + nodes[0].speed = 20; + } + nodes[1] = SpawnStruct(); + nodes[1].origin = endOrg; + if ( IsDefined(endVel) ) { + nodes[1].speed = Length( endVel ); + endVel /= nodes[1].speed; + nodes[1].speed *= 20; + } else { + nodes[1].speed = 20; + } + return cspline_makePath( nodes, true, startVel, endVel ); +} + +/* +============= +///ScriptDocBegin +"Name: cspline_makePathToPoint( , , , )" +"Summary: Take two end points and returns a data structure with a fairly smooth hermite spline path defined in it. +"Module: CSplines" +"CallOn: nothing" +"MandatoryArg: : Point to start from." +"MandatoryArg: : Point to end at." +"OptionalArg: : Velocity vector for the beginning of the spline; indicates movement in one frame. Will use natural (ie zero acceleration) if not supplied." +"OptionalArg: : Velocity vector for the end of the spline; indicates movement in one frame. Will use natural (ie zero acceleration) if not supplied." +"OptionalArg: : forces the creation of two intermediate nodes, making a 3-segment path. These nodes are normally created only if the velocities do not line up with the direction of the path." +"Example: csPath = cspline_makePathToPoint( self.origin, targetOrigin, currentVelocity );" +"SPMP: both" +///ScriptDocEnd +============= +*/ +cspline_makePathToPoint(startOrg, endOrg, startVel, endVel, forceCreateIntermediateNodes) +{ + dirs = []; + if ( !IsDefined( forceCreateIntermediateNodes ) ) forceCreateIntermediateNodes = false; + if ( IsDefined(startVel) ) { + startSpeed = Length( startVel ); + dirs[0] = startVel / startSpeed; + startSpeed *= 20; // Speeds of real nodes are inches per second; velocity is per frame. + } else { + startSpeed = 20; + } + if ( IsDefined(endVel) ) { + endSpeed = Length( endVel ); + dirs[1] = endVel / endSpeed; + endSpeed *= 20; // Speeds of real nodes are inches per second; velocity is per frame. + } else { + endSpeed = 20; + } + if ( ( startSpeed / endSpeed > 1.2 ) || ( endSpeed / startSpeed > 1.2 ) || ( forceCreateIntermediateNodes ) ) { + if ( !IsDefined( dirs[0] ) ) + dirs[0] = (0,0,0); + if ( !IsDefined( dirs[1] ) ) { + dirs[1] = (0,0,0); + } + } + pathVec = endOrg - startOrg; + pathLength = Length( pathVec ); + pathDir = pathVec / pathLength; + + nodes = []; + nodes[0] = SpawnStruct(); + nodes[0].origin = startOrg; + nodes[0].speed = startSpeed; + + // Find an offset based on the start/end velocity, and make sure it's a good distance from the straight line path + offsetLengths = []; + midSpeed = max( startSpeed, endSpeed ); + if ( IsDefined( dirs[0] ) ) + { + offsetLengths[0] = ( startSpeed + midSpeed ) / ( 2 * 20 ); + } + if ( IsDefined( dirs[1] ) ) + { + offsetLengths[1] = ( endSpeed + midSpeed ) / ( 2 * 20 ); + } + for (i=0; i<2; i++) + { + if ( IsDefined( dirs[i]) ) + { + sign = ( 0.5 - i ) * 2; // 1 or -1 + offsetVec = dirs[i]; + offsetVec *= sign; + offsetDotPath = VectorDot( offsetVec, pathDir ); + // Only create a new node if the direction doesn't line up with the straight line path, or if there is a significant speed difference. + if ( ( offsetDotPath * sign < 0.3 ) || ( startSpeed / endSpeed > 1.2 ) || ( endSpeed / startSpeed > 1.2 ) || forceCreateIntermediateNodes ) + { + // If the velocity goes against the direction of the path, make sure the new point is out wide + if ( offsetDotPath * sign < 0 ) + { + offsetAlongPath = offsetDotPath * pathDir; + offsetVec -= offsetAlongPath; + AssertEx( VectorDot( offsetVec, pathDir ) == 0, "Dot result should be 0: "+VectorDot( offsetVec, pathDir ) ); + offsetVec = VectorNormalize( offsetVec ); + offsetVec += offsetAlongPath; + } + // Now move the new point along the path a bit + offsetVec += pathDir * sign; + offsetVec = offsetVec * offsetLengths[i]; + offsetVec *= sqrt(pathLength) * 2; + nodes[nodes.size ] = SpawnStruct(); + if ( i==0 ) { + nodes[nodes.size-1].origin = startOrg + offsetVec; + } + else { + nodes[nodes.size-1].origin = endOrg + offsetVec; + } + nodes[nodes.size-1].speed = midSpeed ; + } + } + } + n = nodes.size; + nodes[n] = SpawnStruct(); + nodes[n].origin = endOrg; + nodes[n].speed = endSpeed; + /# + if ( GetDvarInt( "interactives_debug" ) ) + { + thread draw_line_for_time ( startOrg, endOrg, 0, .7, .7, 1 ); + for ( n=1; n, , )" +"Summary: Take an array of nodes in a path and return a data structure with the hermite spline path defined in it." +"Module: CSplines" +"CallOn: nothing" +"MandatoryArg: : An array of nodes (or any structs with .origin fields)." +"OptionalArg: : Use the speed keypairs from the nodes." +"OptionalArg: : Velocity (or tangent) vector for the beginning of the spline. Will use natural (ie zero acceleration) if not supplied." +"OptionalArg: : Velocity (or tangent) vector for the end of the spline. Will use natural (ie zero acceleration) if not supplied." +"OptionalArg: : Can be set to false to avoid the expensive speed capping calculation. If false, speed between nodes will exceed the speed set at the nodes." +"Example: csPath = cspline_makePath( targetname );" +"SPMP: both" +///ScriptDocEnd +============= +*/ +cspline_makePath(nodes, useNodeSpeeds, startVel, endVel, capSpeed) +{ + //prof_begin("cspline_makePath"); + csPath = SpawnStruct(); + csPath.Segments = []; + if (!IsDefined( useNodeSpeeds ) ) useNodeSpeeds = false; + AssertEx( !useNodeSpeeds || IsDefined( nodes[0].speed ), "cspline_makePath: Speed keypair required for first node in path (node at "+nodes[0].origin+")" ); + if (!IsDefined( capSpeed ) ) capSpeed = true; + + AssertEx( IsDefined( nodes[0] ), "cspline_makePath: No nodes supplied" ); + AssertEx( IsDefined( nodes[1] ), "cspline_makePath: Only one node supplied" ); + path_length = 0; + nextTangent = []; + nextSegLength = Distance( nodes[0].origin, nodes[1].origin ); + + while ( IsDefined( nodes[csPath.Segments.size+2] ) ) + { + i = csPath.Segments.size; + prevPoint = nodes[i].origin; + nextPoint = nodes[i+1].origin; + nextNextPoint = nodes[i+2].origin; + thisSegLength = nextSegLength; + nextSegLength = Distance( nodes[i+1].origin, nodes[i+2].origin ); + prevTangent = nextTangent; + nextTangent = cspline_calcTangent( prevPoint, nextNextPoint, thisSegLength, nextSegLength, 0.5 ); + AssertEx( abs( Length( nextTangent["incoming"] ) ) <= thisSegLength, "cspline_makePath: Tangent slope is > 1. This shouldn't be possible." ); + AssertEx( abs( Length( nextTangent["outgoing"] ) ) <= nextSegLength, "cspline_makePath: Tangent slope is > 1. This shouldn't be possible." ); + if (i==0) + { + if ( IsDefined( startVel ) ) { + prevTangent["outgoing"] = startVel * thisSegLength; + } + else { + prevTangent = cspline_calcTangentNatural( prevPoint, nextPoint, nextTangent["incoming"] ); + } + } + if ( capSpeed ) + { + csPath.Segments[i] = csplineSeg_calcCoeffsCapSpeed( prevPoint, nextPoint, prevTangent["outgoing"], nextTangent["incoming"], thisSegLength ); + path_length += csPath.Segments[i].endAt; + } + else + { + csPath.Segments[i] = csplineSeg_calcCoeffs( prevPoint, nextPoint, prevTangent["outgoing"], nextTangent["incoming"] ); + path_length += thisSegLength; + } + csPath.Segments[i].endAt = path_length; + } + i = csPath.Segments.size; + prevPoint = nodes[i].origin; + nextPoint = nodes[i+1].origin; + thisSegLength = nextSegLength; + prevTangent = nextTangent; + if ( i==0 && IsDefined( startVel ) ) { + prevTangent["outgoing"] = startVel * thisSegLength; + } + if ( IsDefined( endVel ) ) { + nextTangent["incoming"] = endVel * thisSegLength; + } + else { + nextTangent = cspline_calcTangentNatural(prevPoint, nextPoint, prevTangent["outgoing"]); + } + if ( i==0 && !IsDefined( startVel ) ) { + prevTangent = cspline_calcTangentNatural( prevPoint, nextPoint, nextTangent["incoming"] ); + } + if ( capSpeed ) + { + csPath.Segments[i] = csplineSeg_calcCoeffsCapSpeed( prevPoint, nextPoint, prevTangent["outgoing"], nextTangent["incoming"], thisSegLength ); + path_length += csPath.Segments[i].endAt; + } + else + { + csPath.Segments[i] = csplineSeg_calcCoeffs( prevPoint, nextPoint, prevTangent["outgoing"], nextTangent["incoming"] ); + path_length += thisSegLength; + } + csPath.Segments[i].endAt = path_length; + + // We keep the speed separate from the tangents because otherwise a low speed causes pinching in + // the path (which can be achieved with the "tension" parameter in a TCB tangent if you really want it). + if ( useNodeSpeeds ) { + pathTime = 0; + prevEndAt = 0; + for ( i = 0; i < csPath.Segments.size; i++ ) + { + if ( !IsDefined( nodes[i+1].speed ) ) + nodes[i+1].speed = nodes[i].speed; + thisSegLength = csPath.Segments[i].endAt - prevEndAt; + segTime = 2 * thisSegLength / ( ( nodes[i].speed + nodes[i+1].speed ) / 20 ); // /20 to convert from per second to per frame. + pathTime += segTime; + csPath.Segments[i].endTime = pathTime; + prevEndAt = csPath.Segments[i].endAt; + csPath.Segments[i].speedStart = nodes[i ].speed / 20; + csPath.Segments[i].speedEnd = nodes[i+1].speed / 20; + } + } + else { + for ( i = 0; i < csPath.Segments.size; i++ ) + { + csPath.Segments[i].endTime = csPath.Segments[i].endAt; + csPath.Segments[i].speedStart = 1; + csPath.Segments[i].speedEnd = 1; + } + } + + //prof_end("cspline_makePath"); + return csPath; +} + +/* +============= +///ScriptDocBegin +"Name: cspline_moveFirstPoint( , , )" +"Summary: Moves the start point of the first segment of a path." +"Module: CSplines" +"CallOn: nothing" +"MandatoryArg: : A cubic Hermite spline path as returned from cspline_makePath()" +"MandatoryArg: : New position for the beginning of the path" +"MandatoryArg: : New velocity (or tangent) for the beginning of the path. Currently mandatory because I haven't had a need to make it optional." +"Example: newPath = cspline_moveFirstPoint( nextPath, currentPos, currentVel );" +"SPMP: both" +///ScriptDocEnd +============= +*/ +cspline_moveFirstPoint(csPath, newStartPos, newStartVel) +{ + + newPath = SpawnStruct(); + newPath.Segments = []; + posVel = csplineSeg_getPoint( csPath.Segments[0], 1 ); + segLength3D = posVel["pos"] - newStartPos; + segLength = Length(segLength3D); + newPath.Segments[0] = csplineSeg_calcCoeffs( newStartPos, posVel["pos"], newStartVel * segLength, posVel["vel"] ); + newPath.Segments[0].endTime = csPath.Segments[0].endTime * segLength / csPath.Segments[0].endAt; + newPath.Segments[0].endAt = segLength; + lengthDiff = segLength - csPath.Segments[0].endAt; + timeDiff = newPath.Segments[0].endTime - csPath.Segments[0].endTime; + + for ( seg=1; seg , )" +"Summary: Take a cubic Hermite spline path and a distance along that path, and returns a position vector and velocity vector." +"Module: CSplines" +"CallOn: nothing" +"MandatoryArg: : A cubic Hermite spline path as returned from cspline_makePath()" +"MandatoryArg: : Distance along the path, in inches. The length of the path csPath can be found by cspline_length()" +"Example: testModel.origin = cspline_getPointAtDistance( csPath, distance );" +"SPMP: both" +///ScriptDocEnd +============= +*/ +cspline_getPointAtDistance(csPath, distance, speedIsImportant) +{ + if (distance <= 0) + { + segLength = csPath.Segments[0].endAt; + posVel = csplineSeg_getPoint( csPath.Segments[0], 0, segLength, csPath.Segments[0].speedStart ); + return posVel; + } + else if (distance >= csPath.Segments[csPath.Segments.size-1].endAt) + { + if ( csPath.Segments.size > 1 ) + segLength = csPath.Segments[csPath.Segments.size-1].endAt - csPath.Segments[csPath.Segments.size-2].endAt; + else + segLength = csPath.Segments[csPath.Segments.size-1].endAt; + posVel = csplineSeg_getPoint( csPath.Segments[csPath.Segments.size-1], 1, segLength, csPath.Segments[csPath.Segments.size-1].speedEnd ); + return posVel; + } + else + { + // Find the segment we want (brute force way). + segNum=0; + while (csPath.Segments[segNum].endAt < distance) + { + segNum++; + } + if (segNum>0) { + startAt = csPath.Segments[segNum-1].endAt; + } else { + startAt = 0; + } + segLength = csPath.Segments[segNum].endAt - startAt; + normalized = ( distance - startAt ) / segLength; + speed = undefined; + if ( IsDefined( speedIsImportant ) && speedIsImportant ) + speed = cspline_speedFromDistance( csPath.Segments[segNum].speedStart, csPath.Segments[segNum].speedEnd, normalized ); + posVel = csplineSeg_getPoint( csPath.Segments[segNum], normalized, segLength, speed ); + return posVel; + } +} + +/* +============= +///ScriptDocBegin +"Name: cspline_getPointAtTime( ,