DM: Fix isSquareACorridorTeleporterPitOrDoor for the demo, set version of demo to 2.0

This commit is contained in:
Strangerke 2016-10-11 21:41:21 +02:00
parent 7c138231e0
commit 86e525c1ad
2 changed files with 5 additions and 3 deletions

View File

@ -71,7 +71,8 @@ static const DMADGameDescription gameDescriptions[] = {
{ kDMSavePlatformAcceptAny }
},
{
{"dm", "Amiga Demo v??? English",
// Added by Strangerke
{"dm", "Amiga Demo v2.0 English",
{
{"graphics.dat", 0, "3932c8359bb36c24291b09e915114d38", 192421},
{"DemoDun.dat", 0, "78848e1a2d3d5a11e5954deb8c7b772b", 1209},
@ -90,12 +91,10 @@ static const DMADGameDescription gameDescriptions[] = {
}
};
static const ADExtraGuiOptionsMap optionsList[] = {
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
class DMMetaEngine : public AdvancedMetaEngine {
public:
DMMetaEngine() : AdvancedMetaEngine(DM::gameDescriptions, sizeof(DMADGameDescription), DMGames, optionsList) {

View File

@ -1832,6 +1832,9 @@ Thing GroupMan::groupGetGenerated(CreatureType creatureType, int16 healthMultipl
}
bool GroupMan::isSquareACorridorTeleporterPitOrDoor(int16 mapX, int16 mapY) {
if (_vm->isDemo())
return false;
int16 squareType = Square(_vm->_dungeonMan->getSquare(mapX, mapY)).getType();
return ((squareType == kDMElementTypeCorridor) || (squareType == kDMElementTypeTeleporter)