Ticket #3578: patch.patch
File patch.patch, 1.5 KB (added by , 9 years ago) |
---|
-
source/lib/rand.cpp
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
72 72 x = xrand(); 73 73 } 74 74 while(x >= range * inv_range); 75 x /= inv_range;75 x %= range; 76 76 77 77 x += min_inclusive; 78 78 ENSURE(x < max_exclusive); -
source/soundmanager/scripting/SoundGroup.cpp
39 39 #include "soundmanager/items/ISoundItem.h" 40 40 #include "soundmanager/SoundManager.h" 41 41 42 #include "simulation2/system/Component.h" 43 #include "simulation2/components/ICmpVisual.h" 44 42 45 #include <algorithm> 43 46 44 47 … … 203 206 hSound->SetRollOff(itemRollOff); 204 207 } 205 208 209 if (TestFlag(eRandPitch) || TestFlag(eRandGain)) { 210 CmpPtr<ICmpVisual> cmpVisual(*g_Game->GetSimulation2(), source); 211 if (cmpVisual) 212 srand(cmpVisual->GetActorSeed()); 213 } 214 206 215 if (TestFlag(eRandPitch)) 207 216 hSound->SetPitch(RandFloat(m_PitchLower, m_PitchUpper)); 208 217 else