From e917f1ea140f474a155d94e9636842a86c5c3163 Mon Sep 17 00:00:00 2001 From: DavidWyand-GG Date: Wed, 4 Sep 2013 19:02:46 -0400 Subject: [PATCH] Allow audioData.cs.dso to execute When using only compiled scripts, the isFile( "./audioData.cs" ) would fail for audioData.cs.dso causing none of the audio data to load. The correct method is to use isScriptFile(), along with a fully qualified file path, to check for either the .dso or .cs files. --- Templates/Empty/game/scripts/client/init.cs | 2 +- Templates/Full/game/scripts/client/init.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Templates/Empty/game/scripts/client/init.cs b/Templates/Empty/game/scripts/client/init.cs index 4698b8c47..fa9a8b8f9 100644 --- a/Templates/Empty/game/scripts/client/init.cs +++ b/Templates/Empty/game/scripts/client/init.cs @@ -110,7 +110,7 @@ function initClient() setDefaultFov( $pref::Player::defaultFov ); setZoomSpeed( $pref::Player::zoomSpeed ); - if( isFile( "./audioData.cs" ) ) + if( isScriptFile( expandFilename("./audioData.cs") ) ) exec( "./audioData.cs" ); // Start up the main menu... this is separated out into a diff --git a/Templates/Full/game/scripts/client/init.cs b/Templates/Full/game/scripts/client/init.cs index 29a10976b..3f7f2d96a 100644 --- a/Templates/Full/game/scripts/client/init.cs +++ b/Templates/Full/game/scripts/client/init.cs @@ -124,7 +124,7 @@ function initClient() setDefaultFov( $pref::Player::defaultFov ); setZoomSpeed( $pref::Player::zoomSpeed ); - if( isFile( "./audioData.cs" ) ) + if( isScriptFile( expandFilename("./audioData.cs") ) ) exec( "./audioData.cs" ); // Start up the main menu... this is separated out into a