aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/entities.cpp5
-rw-r--r--src/gameplay.cpp1
-rw-r--r--src/ui.cpp2
-rw-r--r--src/world.cpp2
4 files changed, 7 insertions, 3 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index ba0f8ef..6a2f4db 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -157,7 +157,7 @@ Mob::Mob(int sub){
tex = new Texturec(0);
case MS_DOOR:
width = HLINE * 12;
- height = HLINE * 19;
+ height = HLINE * 20;
tex = new Texturec(1,"assets/door.png");
break;
}
@@ -418,7 +418,10 @@ unsigned int Structures::spawn(_TYPE t, BUILD_SUB sub, float x, float y){
* with type NPC.
*/
+ //((World*)(inWorld))->addNPC(loc.x + i * HLINE ,100);
+ //inWorld->addNPC(loc.x + i * HLINE, 100);
currentWorld->addNPC(loc.x + i * HLINE ,100);
+
}
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index 35abca4..d439814 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -143,6 +143,7 @@ void initEverything(void){
currentWorld = worldSpawnHill1;
worldSpawnHill2->addStructure(STRUCTURET,HOUSE,(rand()%120*HLINE),100,worldSpawnHill1,worldSpawnHill2);
+ worldSpawnHill2->addStructure(STRUCTURET,HOUSE,(rand()%120*HLINE),100,worldSpawnHill1,worldSpawnHill2);
player = new Player();
player->spawn(200,100);
diff --git a/src/ui.cpp b/src/ui.cpp
index 08f503f..b759012 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -556,7 +556,7 @@ namespace ui {
hub.y-=fontSize*1.15;
glRectf(hub.x,
hub.y,
- hub.x+(player->health/player->maxHealth)*130,
+ hub.x+(player->health/player->maxHealth?player->maxHealth:1)*130,
hub.y+12);
}
diff --git a/src/world.cpp b/src/world.cpp
index d542f2a..7f4d6f6 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -908,7 +908,7 @@ void World::addStructure(_TYPE t,BUILD_SUB sub, float x,float y,World *outside,W
build.push_back(new Structures());
build.back()->spawn(t,sub,x,y);
build.back()->inWorld=outside;
- build.back()->inside=(void *)inside;
+ build.back()->inside=inside;
entity.push_back(build.back());
}