]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
Fixed jumping animation
authordrumsetmonkey <abelleisle@roadrunner.com>
Wed, 7 Oct 2015 16:29:55 +0000 (12:29 -0400)
committerdrumsetmonkey <abelleisle@roadrunner.com>
Wed, 7 Oct 2015 16:29:55 +0000 (12:29 -0400)
assets/house1.png
out/entities.o
out/inventory.o
out/ui.o
out/world.o
src/entities.cpp

index 2f5034bd5c1f65c7c1c71824d64cded081bf04e9..2022992a8d3acbbe925b395c8f40c2a3e3cbf587 100644 (file)
Binary files a/assets/house1.png and b/assets/house1.png differ
index db0a4aab8802f40f7f7fe1390247f907a4f626d0..69472f4d15531e3d4470b354fcd64af3aea0ebff 100644 (file)
Binary files a/out/entities.o and b/out/entities.o differ
index 559aff128d4eaf4348ee3380274fb97c7b1acf72..d88bf538b0fc06609290034c570b2ea692c14977 100644 (file)
Binary files a/out/inventory.o and b/out/inventory.o differ
index 73dddadbc4b34e348b747ac061485c215e058aa8..e4cd1fd575ce2f875686efe98a2cbf6516609b9f 100644 (file)
Binary files a/out/ui.o and b/out/ui.o differ
index 6f79983b86f957d175dc573963873dad9de3c220..4997e5b39d6d19317dcedac43dd7921cd3dccf3d 100644 (file)
Binary files a/out/world.o and b/out/world.o differ
index 13c042be615ba21a6d6e1c711796245d0c2759e8..127adaef0f937c30264166d364397ce81828e637 100644 (file)
@@ -53,7 +53,10 @@ void Entity::draw(void){             //draws the entities
                                texState-=1;
                                if(texState==0)up=true;
                        }
-               }if(vel.x != 0){
+               }if(ground == 0){
+                       glBindTexture(GL_TEXTURE_2D, texture[1]);
+               }
+               else if(vel.x != 0){
                        switch(texState){
                                case 0:
                                        glBindTexture(GL_TEXTURE_2D,texture[1]);
@@ -65,7 +68,9 @@ void Entity::draw(void){              //draws the entities
                                        glBindTexture(GL_TEXTURE_2D,texture[2]);
                                break;
                        }
-               }else glBindTexture(GL_TEXTURE_2D,texture[0]);
+               }else{
+                       glBindTexture(GL_TEXTURE_2D,texture[0]);
+               }
        }else{
                glBindTexture(GL_TEXTURE_2D,texture[0]);
        }