MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SoundObject

Method SoundObject

engine/Poseidon/Audio/DynSound.cpp:185–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185SoundObject::SoundObject(RString name, Object* source, bool looped, float maxTitlesDistance, float speed)
186{
187 _index = 0;
188 _object = source;
189 _soundName = name;
190
191 _hasObject = source != nullptr;
192 _looped = looped;
193 _paused = false;
194
195 _forceTitles = false;
196 _titlesSize = 0;
197
198 _maxTitlesDistance = maxTitlesDistance;
199 _speed = speed;
200
201 _waiting = false;
202 if (source)
203 {
204 Person* person = dyn_cast<Person>(source);
205 if (person && person->Brain())
206 {
207 _waiting = true;
208 _sender = person->Brain();
209 SpeakingObjects.Add(this);
210 }
211 }
212 if (!_waiting)
213 {
214 LoadSound();
215 }
216}
217
218bool SoundObject::Simulate(float deltaT, SimulationImportance prec)
219{

Callers

nothing calls this directly

Calls 2

BrainMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected