diff options
author | McCabe Maxsted | 2010-04-10 03:15:15 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-04-10 03:15:15 -0700 |
commit | c8f102fe1c2adf26864d4c92031edfdd49aa360d (patch) | |
tree | a2af73d3b6a10d3c90888244e3edfd3256fd4b30 /linden/indra/newview | |
parent | Fixed spacing on AO first use notification (diff) | |
download | meta-impy-c8f102fe1c2adf26864d4c92031edfdd49aa360d.zip meta-impy-c8f102fe1c2adf26864d4c92031edfdd49aa360d.tar.gz meta-impy-c8f102fe1c2adf26864d4c92031edfdd49aa360d.tar.bz2 meta-impy-c8f102fe1c2adf26864d4c92031edfdd49aa360d.tar.xz |
Add text for teleporting while DisableTeleportScreens set to TRUE (doesn't display in the console for some reason)
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/llviewerdisplay.cpp | 63 |
1 files changed, 58 insertions, 5 deletions
diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index 6f7de25..070e38f 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "llglheaders.h" | 39 | #include "llglheaders.h" |
40 | #include "llagent.h" | 40 | #include "llagent.h" |
41 | #include "llviewercontrol.h" | 41 | #include "llviewercontrol.h" |
42 | #include "llconsole.h" | ||
42 | #include "llcoord.h" | 43 | #include "llcoord.h" |
43 | #include "llcriticaldamp.h" | 44 | #include "llcriticaldamp.h" |
44 | #include "lldir.h" | 45 | #include "lldir.h" |
@@ -46,6 +47,7 @@ | |||
46 | #include "lldrawpoolalpha.h" | 47 | #include "lldrawpoolalpha.h" |
47 | #include "llfeaturemanager.h" | 48 | #include "llfeaturemanager.h" |
48 | #include "llfirstuse.h" | 49 | #include "llfirstuse.h" |
50 | #include "llfloaterchat.h" | ||
49 | #include "llframestats.h" | 51 | #include "llframestats.h" |
50 | #include "llhudmanager.h" | 52 | #include "llhudmanager.h" |
51 | #include "llimagebmp.h" | 53 | #include "llimagebmp.h" |
@@ -116,6 +118,8 @@ void render_ui_2d(); | |||
116 | void render_disconnected_background(); | 118 | void render_disconnected_background(); |
117 | void render_hud_elements(); | 119 | void render_hud_elements(); |
118 | 120 | ||
121 | void display_teleport_chat(const LLAgent::ETeleportState tp_state, const std::string& msg); | ||
122 | |||
119 | void display_startup() | 123 | void display_startup() |
120 | { | 124 | { |
121 | if ( !gViewerWindow->getActive() | 125 | if ( !gViewerWindow->getActive() |
@@ -348,7 +352,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
348 | // Transition to REQUESTED. Viewer has sent some kind | 352 | // Transition to REQUESTED. Viewer has sent some kind |
349 | // of TeleportRequest to the source simulator | 353 | // of TeleportRequest to the source simulator |
350 | gTeleportDisplayTimer.reset(); | 354 | gTeleportDisplayTimer.reset(); |
351 | if(!gSavedSettings.getBOOL("DisableTeleportScreens"))gViewerWindow->setShowProgress(TRUE); | 355 | if (!gSavedSettings.getBOOL("DisableTeleportScreens")) |
356 | { | ||
357 | gViewerWindow->setShowProgress(TRUE); | ||
358 | } | ||
352 | gViewerWindow->setProgressPercent(0); | 359 | gViewerWindow->setProgressPercent(0); |
353 | gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED ); | 360 | gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED ); |
354 | gAgent.setTeleportMessage( | 361 | gAgent.setTeleportMessage( |
@@ -358,13 +365,28 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
358 | case LLAgent::TELEPORT_REQUESTED: | 365 | case LLAgent::TELEPORT_REQUESTED: |
359 | // Waiting for source simulator to respond | 366 | // Waiting for source simulator to respond |
360 | gViewerWindow->setProgressPercent( llmin(teleport_percent, 37.5f) ); | 367 | gViewerWindow->setProgressPercent( llmin(teleport_percent, 37.5f) ); |
361 | gViewerWindow->setProgressString(message); | 368 | gTeleportDisplayTimer.reset(); |
369 | if (!gSavedSettings.getBOOL("DisableTeleportScreens")) | ||
370 | { | ||
371 | gViewerWindow->setProgressString(message); | ||
372 | } | ||
373 | else | ||
374 | { | ||
375 | display_teleport_chat(LLAgent::TELEPORT_REQUESTED, message); | ||
376 | } | ||
362 | break; | 377 | break; |
363 | 378 | ||
364 | case LLAgent::TELEPORT_MOVING: | 379 | case LLAgent::TELEPORT_MOVING: |
365 | // Viewer has received destination location from source simulator | 380 | // Viewer has received destination location from source simulator |
366 | gViewerWindow->setProgressPercent( llmin(teleport_percent, 75.f) ); | 381 | gViewerWindow->setProgressPercent( llmin(teleport_percent, 75.f) ); |
367 | gViewerWindow->setProgressString(message); | 382 | if (!gSavedSettings.getBOOL("DisableTeleportScreens")) |
383 | { | ||
384 | gViewerWindow->setProgressString(message); | ||
385 | } | ||
386 | else | ||
387 | { | ||
388 | display_teleport_chat(LLAgent::TELEPORT_MOVING, message); | ||
389 | } | ||
368 | break; | 390 | break; |
369 | 391 | ||
370 | case LLAgent::TELEPORT_START_ARRIVAL: | 392 | case LLAgent::TELEPORT_START_ARRIVAL: |
@@ -376,7 +398,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
376 | gAgent.setTeleportMessage( | 398 | gAgent.setTeleportMessage( |
377 | LLAgent::sTeleportProgressMessages["arriving"]); | 399 | LLAgent::sTeleportProgressMessages["arriving"]); |
378 | gImageList.mForceResetTextureStats = TRUE; | 400 | gImageList.mForceResetTextureStats = TRUE; |
379 | if(!gSavedSettings.getBOOL("DisableTeleportScreens"))gAgent.resetView(TRUE, TRUE); | 401 | if (!gSavedSettings.getBOOL("DisableTeleportScreens")) |
402 | { | ||
403 | gAgent.resetView(TRUE, TRUE); | ||
404 | } | ||
405 | else | ||
406 | { | ||
407 | display_teleport_chat(LLAgent::TELEPORT_MOVING, LLAgent::sTeleportProgressMessages["arriving"]); | ||
408 | } | ||
380 | break; | 409 | break; |
381 | 410 | ||
382 | case LLAgent::TELEPORT_ARRIVING: | 411 | case LLAgent::TELEPORT_ARRIVING: |
@@ -391,7 +420,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
391 | } | 420 | } |
392 | gViewerWindow->setProgressCancelButtonVisible(FALSE, std::string("Cancel")); //TODO: Translate | 421 | gViewerWindow->setProgressCancelButtonVisible(FALSE, std::string("Cancel")); //TODO: Translate |
393 | gViewerWindow->setProgressPercent( arrival_fraction * 25.f + 75.f); | 422 | gViewerWindow->setProgressPercent( arrival_fraction * 25.f + 75.f); |
394 | gViewerWindow->setProgressString(message); | 423 | if ( !gSavedSettings.getBOOL("DisableTeleportScreens") ) |
424 | { | ||
425 | gViewerWindow->setProgressString(message); | ||
426 | } | ||
427 | else | ||
428 | { | ||
429 | display_teleport_chat(LLAgent::TELEPORT_ARRIVING, message); | ||
430 | } | ||
395 | } | 431 | } |
396 | break; | 432 | break; |
397 | 433 | ||
@@ -1358,3 +1394,20 @@ void display_cleanup() | |||
1358 | { | 1394 | { |
1359 | gDisconnectedImagep = NULL; | 1395 | gDisconnectedImagep = NULL; |
1360 | } | 1396 | } |
1397 | |||
1398 | static LLAgent::ETeleportState old_tp_state = LLAgent::TELEPORT_NONE; | ||
1399 | void display_teleport_chat(const LLAgent::ETeleportState tp_state, const std::string& msg) | ||
1400 | { | ||
1401 | // Display different messages as the teleport progresses. | ||
1402 | // Some are fetched from the sim, others are hardcoded -- MC | ||
1403 | gConsole->setVisible(TRUE); | ||
1404 | |||
1405 | LLAgent::ETeleportState new_tp_state = tp_state; | ||
1406 | if (old_tp_state != new_tp_state) | ||
1407 | { | ||
1408 | LLChat chat (msg); | ||
1409 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
1410 | LLFloaterChat::addChatHistory(chat); | ||
1411 | old_tp_state = new_tp_state; | ||
1412 | } | ||
1413 | } | ||