aboutsummaryrefslogtreecommitdiffstats
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-12-01 08:20:31 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-12-01 08:20:31 -0500
commite02aaafad3ecef8752b538a2421c5e36fe4809c2 (patch)
tree1bcc3c138e12a6d81830b1d1ed44778e58558a69 /src/inventory.cpp
parent813f30f8d7e4db971fbb9aab429b489e884ad2e9 (diff)
Fixed gameloop timestep and updated animations
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index ff180b0..28612ae 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -98,23 +98,23 @@ void Inventory::draw(void){
//dfp[a] = 0;
a++;
}a=0;
- if(invOpening && lop % 1 == 0){
+ if(invOpening){
end = 0;
for(auto &d : dfp){
if(a != 0){
- if(dfp[a-1]>25)d+=25;
+ if(dfp[a-1]>50)d+=1.65*deltaTime;
}else{
- d += 25;
+ d += 1.65*deltaTime;
}
if(d >= range)
d = range;
a++;
}a=0;
if(end < numSlot)invOpen=true;
- }else if(!invOpening && lop % 1 == 0){
- for(auto &d : boost::adaptors::reverse(dfp)){
+ }else if(!invOpening){
+ for(auto &d : dfp){
if(d > 0){
- d-=25;
+ d-=1.65*deltaTime;
}else end++;
}
if(end >= numSlot)invOpen=false;