diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llhudmanager.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/newview/llhudmanager.cpp')
-rw-r--r-- | linden/indra/newview/llhudmanager.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/linden/indra/newview/llhudmanager.cpp b/linden/indra/newview/llhudmanager.cpp index 2c38943..5217893 100644 --- a/linden/indra/newview/llhudmanager.cpp +++ b/linden/indra/newview/llhudmanager.cpp | |||
@@ -42,8 +42,6 @@ | |||
42 | #include "llviewercontrol.h" | 42 | #include "llviewercontrol.h" |
43 | #include "llviewerobjectlist.h" | 43 | #include "llviewerobjectlist.h" |
44 | 44 | ||
45 | LLHUDManager *gHUDManager = NULL; | ||
46 | |||
47 | extern BOOL gNoRender; | 45 | extern BOOL gNoRender; |
48 | 46 | ||
49 | // These are loaded from saved settings. | 47 | // These are loaded from saved settings. |
@@ -60,7 +58,6 @@ LLHUDManager::LLHUDManager() | |||
60 | 58 | ||
61 | LLHUDManager::~LLHUDManager() | 59 | LLHUDManager::~LLHUDManager() |
62 | { | 60 | { |
63 | mHUDEffects.reset(); | ||
64 | } | 61 | } |
65 | 62 | ||
66 | 63 | ||
@@ -110,6 +107,12 @@ void LLHUDManager::sendEffects() | |||
110 | } | 107 | } |
111 | } | 108 | } |
112 | 109 | ||
110 | //static | ||
111 | void LLHUDManager::shutdownClass() | ||
112 | { | ||
113 | getInstance()->mHUDEffects.reset(); | ||
114 | } | ||
115 | |||
113 | void LLHUDManager::cleanupEffects() | 116 | void LLHUDManager::cleanupEffects() |
114 | { | 117 | { |
115 | S32 i = 0; | 118 | S32 i = 0; |
@@ -155,12 +158,6 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat | |||
155 | return; | 158 | return; |
156 | } | 159 | } |
157 | 160 | ||
158 | if (!gHUDManager) | ||
159 | { | ||
160 | llwarns << "No gHUDManager!" << llendl; | ||
161 | return; | ||
162 | } | ||
163 | |||
164 | LLHUDEffect *effectp = NULL; | 161 | LLHUDEffect *effectp = NULL; |
165 | LLUUID effect_id; | 162 | LLUUID effect_id; |
166 | U8 effect_type = 0; | 163 | U8 effect_type = 0; |
@@ -172,20 +169,20 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat | |||
172 | effectp = NULL; | 169 | effectp = NULL; |
173 | LLHUDEffect::getIDType(mesgsys, k, effect_id, effect_type); | 170 | LLHUDEffect::getIDType(mesgsys, k, effect_id, effect_type); |
174 | S32 i; | 171 | S32 i; |
175 | for (i = 0; i < gHUDManager->mHUDEffects.count(); i++) | 172 | for (i = 0; i < LLHUDManager::getInstance()->mHUDEffects.count(); i++) |
176 | { | 173 | { |
177 | LLHUDEffect *cur_effectp = gHUDManager->mHUDEffects[i]; | 174 | LLHUDEffect *cur_effectp = LLHUDManager::getInstance()->mHUDEffects[i]; |
178 | if (!cur_effectp) | 175 | if (!cur_effectp) |
179 | { | 176 | { |
180 | llwarns << "Null effect in effect manager, skipping" << llendl; | 177 | llwarns << "Null effect in effect manager, skipping" << llendl; |
181 | gHUDManager->mHUDEffects.remove(i); | 178 | LLHUDManager::getInstance()->mHUDEffects.remove(i); |
182 | i--; | 179 | i--; |
183 | continue; | 180 | continue; |
184 | } | 181 | } |
185 | if (cur_effectp->isDead()) | 182 | if (cur_effectp->isDead()) |
186 | { | 183 | { |
187 | // llwarns << "Dead effect in effect manager, removing" << llendl; | 184 | // llwarns << "Dead effect in effect manager, removing" << llendl; |
188 | gHUDManager->mHUDEffects.remove(i); | 185 | LLHUDManager::getInstance()->mHUDEffects.remove(i); |
189 | i--; | 186 | i--; |
190 | continue; | 187 | continue; |
191 | } | 188 | } |
@@ -204,7 +201,7 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat | |||
204 | { | 201 | { |
205 | if (!effectp) | 202 | if (!effectp) |
206 | { | 203 | { |
207 | effectp = gHUDManager->createViewerEffect(effect_type, FALSE, FALSE); | 204 | effectp = LLHUDManager::getInstance()->createViewerEffect(effect_type, FALSE, FALSE); |
208 | } | 205 | } |
209 | 206 | ||
210 | if (effectp) | 207 | if (effectp) |