aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entities.cpp')
-rw-r--r--src/entities.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index a2bff3c..729bcdd 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -376,14 +376,14 @@ unsigned int Structures::spawn(_TYPE t, float x, float y){
unsigned int tempN = (getRand() % 5 + 2);
- while(--tempN){
+ for(unsigned int i = 0;i < tempN;i++){
/*
* This is where the entities actually spawn. A new entity is created
* with type NPC.
*/
- currentWorld->addNPC(loc.x + (tempN - 5),100);
+ currentWorld->addNPC(loc.x + i * HLINE ,100);
}