Browse Source

fix problem with item entity movement

Kolja Strohm 2 years ago
parent
commit
5445ab04dd
2 changed files with 1 additions and 2 deletions
  1. 0 2
      FactoryCraft/Entity.cpp
  2. 1 0
      FactoryCraft/ItemEntity.cpp

+ 0 - 2
FactoryCraft/Entity.cpp

@@ -214,8 +214,6 @@ void Entity::addMovementFrame(MovementFrame& frame)
 	*(double*)(msg + 29) = frame.duration;
 	message.setMessage(msg, 37, 0);
 	Game::INSTANCE->broadcastMessage(&message);
-	// TODO: implement movement on server
-	setPosition(frame.targetPosition);
 	faceDir = frame.direction;
 	// TODO implement subscription system to notify only interested clients
 }

+ 1 - 0
FactoryCraft/ItemEntity.cpp

@@ -60,6 +60,7 @@ void ItemEntity::tick(const Dimension* zDimension)
 				onDeath();
 		}
 	}
+	Entity::tick(zDimension);
 }
 
 void ItemEntity::onFall(float collisionSpeed)