]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
cheap-excuse jump fix
authorClyne Sullivan <tullivan99@gmail.com>
Mon, 14 Sep 2015 21:40:59 +0000 (17:40 -0400)
committerClyne Sullivan <tullivan99@gmail.com>
Mon, 14 Sep 2015 21:40:59 +0000 (17:40 -0400)
src/World.cpp
src/main.cpp

index 41649d9d5feee2600e87364a267c6db7ff8d95d4..bde35de3dd27264cc1676e5efdd9c7421fdee00b 100644 (file)
@@ -104,6 +104,7 @@ LOOP2:                                                                                                                              // Should be in furthest back layer once this is first rea
                }\r
        }\r
 }\r
+extern World *spawn;\r
 void World::detect(vec2 *v,vec2 *vel,const float width){\r
        unsigned int i;\r
        for(i=0;i<lineCount-10;i++){                                                                                    // For every line in world\r
@@ -117,7 +118,7 @@ void World::detect(vec2 *v,vec2 *vel,const float width){
                        }\r
                }\r
                if(v->y>line[i].start+HLINE){                                                                   // Trashy gravity handling\r
-                       vel->y-=.0000001;\r
+                       vel->y-=this==spawn?.0000001:.0000003;\r
                }\r
        }\r
 }\r
index 4d48d814e8e2558fd8c000d5733e8269a6f3e460..f3e95eea747e2625301fd51bd4b13cb1e740c11f 100644 (file)
@@ -25,6 +25,8 @@ Structures build;
 UIClass ui;                    //Yep
 World *currentWorld;//u-huh
 
+World *spawn;
+
 void logic();
 void render();
 
@@ -89,7 +91,7 @@ int main(int argc,char **argv){
        w2=new World(4,w,NULL);
        w=new World(10,NULL,w2);
        
-       currentWorld=w;
+       spawn=currentWorld=w;
        currentWorld->addLayer(3);
        currentWorld->addLayer(4);
        // shh