aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/viewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/viewer.cpp')
-rw-r--r--linden/indra/newview/viewer.cpp36
1 files changed, 29 insertions, 7 deletions
diff --git a/linden/indra/newview/viewer.cpp b/linden/indra/newview/viewer.cpp
index c42ac69..b71c6f2 100644
--- a/linden/indra/newview/viewer.cpp
+++ b/linden/indra/newview/viewer.cpp
@@ -27,6 +27,9 @@
27 */ 27 */
28 28
29#include "llviewerprecompiledheaders.h" 29#include "llviewerprecompiledheaders.h"
30
31#include "viewer.h"
32
30#include "llparcel.h" 33#include "llparcel.h"
31#include "llviewerparcelmgr.h" 34#include "llviewerparcelmgr.h"
32#include "llviewerjoystick.h" 35#include "llviewerjoystick.h"
@@ -104,8 +107,6 @@
104//#define LL_SEND_CRASH_REPORTS 0 107//#define LL_SEND_CRASH_REPORTS 0
105 108
106 109
107#include "viewer.h"
108
109// 110//
110// Linden library headers 111// Linden library headers
111// 112//
@@ -411,8 +412,6 @@ LLFrameTimer gRestoreGLTimer;
411BOOL gRestoreGL = FALSE; 412BOOL gRestoreGL = FALSE;
412 413
413 414
414LLGlobalEconomy *gGlobalEconomy = NULL;
415
416// VFS globals - see viewer.h 415// VFS globals - see viewer.h
417LLVFS* gStaticVFS = NULL; 416LLVFS* gStaticVFS = NULL;
418 417
@@ -485,6 +484,7 @@ static const char USAGE[] = "\n"
485"usage:\tviewer [options]\n" 484"usage:\tviewer [options]\n"
486"options:\n" 485"options:\n"
487" -login <first> <last> <password> log in as a user\n" 486" -login <first> <last> <password> log in as a user\n"
487" -autologin log in as last saved user\n"
488" -loginuri <URI> login server and CGI script to use\n" 488" -loginuri <URI> login server and CGI script to use\n"
489" -helperuri <URI> helper web CGI prefix to use\n" 489" -helperuri <URI> helper web CGI prefix to use\n"
490" -settings <filename> specify the filename of a\n" 490" -settings <filename> specify the filename of a\n"
@@ -515,6 +515,8 @@ static const char USAGE[] = "\n"
515#if LL_WINDOWS 515#if LL_WINDOWS
516" -noprobe disable hardware probe\n" 516" -noprobe disable hardware probe\n"
517#endif 517#endif
518" -noquicktime disable QuickTime movies, speeds startup\n"
519" -nopreload don't preload UI images or sounds, speeds startup\n"
518// these seem to be unused 520// these seem to be unused
519//" -noenv turn off environmental effects\n" 521//" -noenv turn off environmental effects\n"
520//" -proxy <proxy_ip> specify the proxy ip address\n" 522//" -proxy <proxy_ip> specify the proxy ip address\n"
@@ -536,6 +538,8 @@ std::string gChannelName = "Second Life Release";
536 538
537LLUUID gInventoryLibraryOwner; 539LLUUID gInventoryLibraryOwner;
538LLUUID gInventoryLibraryRoot; 540LLUUID gInventoryLibraryRoot;
541bool gPreloadImages = true;
542bool gPreloadSounds = true;
539 543
540LLString gCmdLineFirstName; 544LLString gCmdLineFirstName;
541LLString gCmdLineLastName; 545LLString gCmdLineLastName;
@@ -4035,7 +4039,7 @@ void init_audio()
4035 4039
4036 BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); 4040 BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio");
4037 4041
4038 if (!mute_audio) 4042 if (!mute_audio && gPreloadSounds)
4039 { 4043 {
4040 gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndAlert"))); 4044 gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndAlert")));
4041 gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndBadKeystroke"))); 4045 gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndBadKeystroke")));
@@ -4198,8 +4202,13 @@ BOOL add_object( LLPCode pcode, S32 x, S32 y, U8 use_physics )
4198 return FALSE; 4202 return FALSE;
4199 } 4203 }
4200 4204
4201 if (regionp 4205 if (NULL == regionp)
4202 && (regionp->getRegionFlags() & REGION_FLAGS_SANDBOX)) 4206 {
4207 llwarns << "regionp was NULL; aborting function." << llendl;
4208 return FALSE;
4209 }
4210
4211 if (regionp->getRegionFlags() & REGION_FLAGS_SANDBOX)
4203 { 4212 {
4204 LLFirstUse::useSandbox(); 4213 LLFirstUse::useSandbox();
4205 } 4214 }
@@ -5692,6 +5701,19 @@ int parse_args(int argc, char **argv)
5692 { 5701 {
5693 gProbeHardware = FALSE; 5702 gProbeHardware = FALSE;
5694 } 5703 }
5704 else if (!strcmp(argv[j], "-noquicktime"))
5705 {
5706 // Developers can log in faster if they don't load all the
5707 // quicktime dlls.
5708 gUseQuickTime = false;
5709 }
5710 else if (!strcmp(argv[j], "-nopreload"))
5711 {
5712 // Developers can log in faster if they don't decode sounds
5713 // or images on startup, ~5 seconds faster.
5714 gPreloadSounds = false;
5715 gPreloadImages = false;
5716 }
5695 else if (!strcmp(argv[j], "-purge")) 5717 else if (!strcmp(argv[j], "-purge"))
5696 { 5718 {
5697 purge_cache(); 5719 purge_cache();