Mantis: 225

o Mines can't be placed within 15 units of each other

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@210 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
puzl 2005-06-23 17:55:30 +00:00
parent d3850ba1a3
commit 847913b46c

View file

@ -225,8 +225,10 @@ bool AvHMine::GetDropLocation(Vector& outLocation, Vector* outAngles) const
theSuccess = true; theSuccess = true;
for(BaseEntityListType::iterator theIter = theEntityList.begin(); theIter != theEntityList.end(); theIter++) for(BaseEntityListType::iterator theIter = theEntityList.begin(); theIter != theEntityList.end(); theIter++)
{ {
// puzl: 225 make sure there are no mines within kMineSearchRadius of each other ( 15 units )
CBaseEntity* theCurrentEntity = *theIter; CBaseEntity* theCurrentEntity = *theIter;
if(!theCurrentEntity || (theCurrentEntity->pev->flags & FL_CONVEYOR) || AvHSUGetIsExternalClassName(STRING(theCurrentEntity->pev->classname)) || dynamic_cast<CBaseDoor*>(theCurrentEntity) || dynamic_cast<CRotDoor*>(theCurrentEntity)) if(!theCurrentEntity || (theCurrentEntity->pev->flags & FL_CONVEYOR) || AvHSUGetIsExternalClassName(STRING(theCurrentEntity->pev->classname)) || dynamic_cast<CBaseDoor*>(theCurrentEntity) || dynamic_cast<CRotDoor*>(theCurrentEntity)
|| dynamic_cast<AvHDeployedMine*>(theCurrentEntity) )
{ {
theSuccess = false; theSuccess = false;
break; break;