| 216 | } |
| 217 | |
| 218 | bool ChickenEntity::tryDrop(Seat* seat, Tile* tile) |
| 219 | { |
| 220 | if (tile->isFullTile()) |
| 221 | return false; |
| 222 | |
| 223 | // In editor mode, we allow to drop an object in dirt, claimed or gold tiles |
| 224 | if(getGameMap()->isInEditorMode() && |
| 225 | (tile->getTileVisual() == TileVisual::dirtGround || tile->getTileVisual() == TileVisual::goldGround || tile->getTileVisual() == TileVisual::rockGround)) |
| 226 | { |
| 227 | return true; |
| 228 | } |
| 229 | |
| 230 | // we cannot drop a chicken on a tile we don't see |
| 231 | if(!seat->hasVisionOnTile(tile)) |
| 232 | return false; |
| 233 | |
| 234 | // Otherwise, we allow to drop an object only on allied claimed tiles |
| 235 | if(tile->isClaimedForSeat(seat)) |
| 236 | return true; |
| 237 | |
| 238 | return false; |
| 239 | } |
| 240 | |
| 241 | void ChickenEntity::correctEntityMovePosition(Ogre::Vector3& position) |
| 242 | { |
nothing calls this directly
no test coverage detected