Browse Source

fix compiler issues

Kolja Strohm 3 years ago
parent
commit
8fe8ffc96b
3 changed files with 2 additions and 4 deletions
  1. 0 2
      FactoryCraft/Dimension.cpp
  2. 1 1
      FactoryCraft/Entity.cpp
  3. 1 1
      FactoryCraft/ItemEntity.cpp

+ 0 - 2
FactoryCraft/Dimension.cpp

@@ -291,8 +291,6 @@ Entity* Dimension::zNearestEntity( Framework::Vec3<float> pos, std::function<boo
 
 void Dimension::removeEntity( int id )
 {
-    Entity* result = 0;
-    float sqDist = 0;
     int index = 0;
     for( auto entity : *entities )
     {

+ 1 - 1
FactoryCraft/Entity.cpp

@@ -80,7 +80,7 @@ Entity::Entity( const EntityType* zType, Framework::Vec3<float> location, int di
 void Entity::onDeath()
 {
     removed = 1;
-    Game::INSTANCE->requestWorldUpdate( new EntityRemovedUpdate( id ) );
+    Game::INSTANCE->requestWorldUpdate( new EntityRemovedUpdate( id, currentDimensionId, location ) );
 }
 
 void Entity::useItem( const ItemType* zType, Item* zItem )

+ 1 - 1
FactoryCraft/ItemEntity.cpp

@@ -23,7 +23,7 @@ ItemEntity::ItemEntity( Framework::Vec3<float> location, int dimensionId, int en
 void ItemEntity::tick( const Dimension* zDimension )
 {
     Framework::Vec3<float> pos = location;
-    // TODO: add speed to next entity with free inventory
+    // add speed to next entity with free inventory
     Entity* zOther = Game::INSTANCE->zNearestEntity( currentDimensionId, location, [this]( Entity* zOther ) {
         return zOther != this && zOther->numberOfAddableItems( slot->zStack(), NO_DIRECTION );
     } );