Giants!
Changed mfMaxplusone to mfUnhandled for readability, and fixed a default case warning.
This commit is contained in:
parent
b008ba5d98
commit
624deea6c4
@ -763,6 +763,7 @@ cMonster::eFamily cMonster::FamilyFromType(eType a_Type)
|
|||||||
case mtCreeper: return mfHostile;
|
case mtCreeper: return mfHostile;
|
||||||
case mtEnderman: return mfHostile;
|
case mtEnderman: return mfHostile;
|
||||||
case mtGhast: return mfHostile;
|
case mtGhast: return mfHostile;
|
||||||
|
case mtGiant: return mfHostile;
|
||||||
case mtHorse: return mfPassive;
|
case mtHorse: return mfPassive;
|
||||||
case mtIronGolem: return mfPassive;
|
case mtIronGolem: return mfPassive;
|
||||||
case mtMagmaCube: return mfHostile;
|
case mtMagmaCube: return mfHostile;
|
||||||
@ -781,9 +782,11 @@ cMonster::eFamily cMonster::FamilyFromType(eType a_Type)
|
|||||||
case mtWolf: return mfHostile;
|
case mtWolf: return mfHostile;
|
||||||
case mtZombie: return mfHostile;
|
case mtZombie: return mfHostile;
|
||||||
case mtZombiePigman: return mfHostile;
|
case mtZombiePigman: return mfHostile;
|
||||||
} ;
|
|
||||||
|
case mtInvalidType: break;
|
||||||
|
}
|
||||||
ASSERT(!"Unhandled mob type");
|
ASSERT(!"Unhandled mob type");
|
||||||
return mfMaxplusone;
|
return mfUnhandled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -794,10 +797,11 @@ int cMonster::GetSpawnDelay(cMonster::eFamily a_MobFamily)
|
|||||||
{
|
{
|
||||||
switch (a_MobFamily)
|
switch (a_MobFamily)
|
||||||
{
|
{
|
||||||
case mfHostile: return 40;
|
case mfHostile: return 40;
|
||||||
case mfPassive: return 40;
|
case mfPassive: return 40;
|
||||||
case mfAmbient: return 40;
|
case mfAmbient: return 40;
|
||||||
case mfWater: return 400;
|
case mfWater: return 400;
|
||||||
|
case mfUnhandled: break;
|
||||||
}
|
}
|
||||||
ASSERT(!"Unhandled mob family");
|
ASSERT(!"Unhandled mob family");
|
||||||
return -1;
|
return -1;
|
||||||
@ -866,6 +870,7 @@ cMonster * cMonster::NewMonsterFromType(cMonster::eType a_MobType)
|
|||||||
case mtEnderDragon: toReturn = new cEnderDragon(); break;
|
case mtEnderDragon: toReturn = new cEnderDragon(); break;
|
||||||
case mtEnderman: toReturn = new cEnderman(); break;
|
case mtEnderman: toReturn = new cEnderman(); break;
|
||||||
case mtGhast: toReturn = new cGhast(); break;
|
case mtGhast: toReturn = new cGhast(); break;
|
||||||
|
case mtGiant: toReturn = new cGiant(); break;
|
||||||
case mtIronGolem: toReturn = new cIronGolem(); break;
|
case mtIronGolem: toReturn = new cIronGolem(); break;
|
||||||
case mtMooshroom: toReturn = new cMooshroom(); break;
|
case mtMooshroom: toReturn = new cMooshroom(); break;
|
||||||
case mtOcelot: toReturn = new cOcelot(); break;
|
case mtOcelot: toReturn = new cOcelot(); break;
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
mfAmbient = 2, // Bats
|
mfAmbient = 2, // Bats
|
||||||
mfWater = 3, // Squid
|
mfWater = 3, // Squid
|
||||||
|
|
||||||
mfMaxplusone, // Nothing. Be sure this is the last and the others are in order
|
mfUnhandled, // Nothing. Be sure this is the last and the others are in order
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
// tolua_end
|
// tolua_end
|
||||||
|
Loading…
Reference in New Issue
Block a user