Note that, before the launch of The African Kingdoms, it was highly unrecommended to stay close to building fire not only with ships, but also with Camels, Mamelukes, and Saboteurs, as they were classified as ships, hence taking full bonus damage. In The African Kingdoms, however, that was changed and camel-type units were moved out of the ship class.
"Coastal gunners who engaged ships learned to heat their cannonballs in furnaces until they were red hot. If a heated shot lodged in the woodwork of a sailing ship, it could set the ship afire. The wadding in the barrel of the gun had to be sufficiently thick to not burn away before the cannon could be fired. If the shot burned through the wadding too quickly, the gun could go off before being properly aimed. In such a case the gun might explode rather than fire. Heated shot that plunged through decks was especially dangerous. It could lodge deep in the ship where the crew could not reach it with water before fire had taken hold. If fire reached the powder magazine, the ship would explode."