Minor screen shake adjustments
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
+8
-2
@@ -577,8 +577,14 @@ void Crawler::UpdateCamera(float fElapsedTime){
|
||||
lastWorldShakeAdjust=std::max(0.f,lastWorldShakeAdjust-fElapsedTime);
|
||||
if(worldShakeTime-fElapsedTime>0){
|
||||
if(lastWorldShakeAdjust==0){
|
||||
lastWorldShakeAdjust=util::random(0.2)+0.05;
|
||||
worldShakeVel={util::random(300)-150,util::random(300)-150};
|
||||
lastWorldShakeAdjust=util::random(0.04)+0.01;
|
||||
worldShakeVel={util::random(200)+100,util::random(200)+100};
|
||||
if(rand()%2==0){
|
||||
worldShakeVel.x*=-1;
|
||||
}
|
||||
if(rand()%2==0){
|
||||
worldShakeVel.y*=-1;
|
||||
}
|
||||
}
|
||||
worldShake+=worldShakeVel*fElapsedTime;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user