diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-12-17 09:25:22 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-12-17 09:25:22 -0500 |
commit | d9d66652af66fc824588176e5ce1136ea9965925 (patch) | |
tree | 0dd6d54ff2d63cd35e4c34e2e2f267573fb0d655 /src/entities.cpp | |
parent | 15889a45b8ee37d43e248cec351e9f6882c21ff3 (diff) |
indoors, fixed npcs
Diffstat (limited to 'src/entities.cpp')
-rw-r--r-- | src/entities.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index ba0f8ef..7cd413c 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -77,7 +77,7 @@ void Entity::spawn(float x, float y){ //spawns the entity you pass to it based o Player::Player(){ //sets all of the player specific traits on object creation width = HLINE * 10; - height = HLINE * 16; + height = HLINE * 15; type = PLAYERT; //set type to player subtype = 0; @@ -393,7 +393,7 @@ void Object::interact(void){ * point to have non-normal traits so it could be invisible or invincible... */ -unsigned int Structures::spawn(_TYPE t, BUILD_SUB sub, float x, float y){ +unsigned int Structures::spawn(_TYPE t, BUILD_SUB sub, float x, float y, World *oi){ loc.x = x; loc.y = y; type = t; @@ -404,6 +404,8 @@ unsigned int Structures::spawn(_TYPE t, BUILD_SUB sub, float x, float y){ height = 40 * HLINE; bsubtype = sub; + inWorld = oi; + /* * tempN is the amount of entities that will be spawned in the village. Currently the village * will spawn bewteen 2 and 7 villagers for the starting hut. @@ -418,7 +420,7 @@ unsigned int Structures::spawn(_TYPE t, BUILD_SUB sub, float x, float y){ * with type NPC. */ - currentWorld->addNPC(loc.x + i * HLINE ,100); + inWorld->addNPC(loc.x + i * HLINE ,100); } |