aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/World.cpp3
-rw-r--r--src/main.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 41649d9..bde35de 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -104,6 +104,7 @@ LOOP2: // Should be in furthest back layer once this is first rea
}
}
}
+extern World *spawn;
void World::detect(vec2 *v,vec2 *vel,const float width){
unsigned int i;
for(i=0;i<lineCount-10;i++){ // For every line in world
@@ -117,7 +118,7 @@ void World::detect(vec2 *v,vec2 *vel,const float width){
}
}
if(v->y>line[i].start+HLINE){ // Trashy gravity handling
- vel->y-=.0000001;
+ vel->y-=this==spawn?.0000001:.0000003;
}
}
}
diff --git a/src/main.cpp b/src/main.cpp
index 4d48d81..f3e95ee 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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