Merge branch 'master' of http://sig.projectdivar.com/sigonasr2/Crawler
This commit is contained in:
+12
-2
@@ -10,6 +10,7 @@
|
||||
#include "TSXParser.h"
|
||||
#include "Map.h"
|
||||
#include "DEFINES.h"
|
||||
#include "utils.h"
|
||||
|
||||
INCLUDE_CLASS_DATA
|
||||
|
||||
@@ -576,8 +577,14 @@ void Crawler::UpdateCamera(float fElapsedTime){
|
||||
lastWorldShakeAdjust=std::max(0.f,lastWorldShakeAdjust-fElapsedTime);
|
||||
if(worldShakeTime-fElapsedTime>0){
|
||||
if(lastWorldShakeAdjust==0){
|
||||
lastWorldShakeAdjust=float(rand()%int(WORLD_SHAKE_ADJUST_MAX_TIME*1000))/1000+0.05;
|
||||
worldShakeVel={float(rand()%1000)/1000*100-50,float(rand()%1000)/1000*100-50};
|
||||
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 {
|
||||
@@ -827,6 +834,9 @@ void Crawler::RenderHud(){
|
||||
FillRectDecal(vf2d{11,ScreenHeight()-21.f}-vf2d{0,float(offset)},{62,4},DARK_GREY);
|
||||
GradientFillRectDecal(vf2d{10,ScreenHeight()-22.f}-vf2d{0,float(offset)},{(a.cooldown/a.COOLDOWN_TIME)*64,6},a.barColor1,a.barColor1,a.barColor2,a.barColor2);
|
||||
DrawRotatedShadowStringPropDecal(vf2d{8,ScreenHeight()-20.f}+vf2d{1,1}-vf2d{0,float(offset)},capitalize(a.name),-PI/64,{0,0},WHITE,BLACK,{0.4,0.4},0.5);
|
||||
std::stringstream cooldownTimeDisplay;
|
||||
cooldownTimeDisplay<<std::fixed<<std::setprecision(1)<<a.cooldown;
|
||||
DrawShadowStringPropDecal(vf2d{74,ScreenHeight()-22.f+1}-vf2d{float(GetTextSizeProp(cooldownTimeDisplay.str()).x*0.5),float(offset)},cooldownTimeDisplay.str(),WHITE,BLACK,{0.5,0.5});
|
||||
}
|
||||
offset-=6;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user