MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / addEntityToPositionTile

Method addEntityToPositionTile

source/entities/GameEntity.cpp:123–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void GameEntity::addEntityToPositionTile()
124{
125 if(getIsOnMap())
126 return;
127
128 setIsOnMap(true);
129 Tile* tile = getPositionTile();
130 if(tile == nullptr)
131 {
132 OD_LOG_ERR(getGameMap()->serverStr() + "entityName=" + getName() + ", pos=" + Helper::toString(getPosition()));
133 return;
134 }
135 OD_ASSERT_TRUE_MSG(tile->addEntity(this), getGameMap()->serverStr() + "entity=" + getName() + ", pos=" + Helper::toString(getPosition()) + ", tile=" + Tile::displayAsString(tile));
136}
137
138void GameEntity::removeEntityFromPositionTile()
139{

Callers 1

Calls 3

serverStrMethod · 0.80
addEntityMethod · 0.80
toStringFunction · 0.50

Tested by

no test coverage detected