From 281da1f81b1eef9e05e881e12d986b6b45ce8696 Mon Sep 17 00:00:00 2001 From: drumsetmonkey Date: Wed, 7 Oct 2015 12:29:55 -0400 Subject: Fixed jumping animation --- assets/house1.png | Bin 1483 -> 788 bytes out/entities.o | Bin 93560 -> 93600 bytes out/inventory.o | Bin 3156 -> 3156 bytes out/ui.o | Bin 9844 -> 9844 bytes out/world.o | Bin 37540 -> 38716 bytes src/entities.cpp | 9 +++++++-- 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/house1.png b/assets/house1.png index 2f5034b..2022992 100644 Binary files a/assets/house1.png and b/assets/house1.png differ diff --git a/out/entities.o b/out/entities.o index db0a4aa..69472f4 100644 Binary files a/out/entities.o and b/out/entities.o differ diff --git a/out/inventory.o b/out/inventory.o index 559aff1..d88bf53 100644 Binary files a/out/inventory.o and b/out/inventory.o differ diff --git a/out/ui.o b/out/ui.o index 73dddad..e4cd1fd 100644 Binary files a/out/ui.o and b/out/ui.o differ diff --git a/out/world.o b/out/world.o index 6f79983..4997e5b 100644 Binary files a/out/world.o and b/out/world.o differ diff --git a/src/entities.cpp b/src/entities.cpp index 13c042b..127adae 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -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]); } -- cgit v1.2.3