ClearEntities();
}
-DEntity* DMap::AddEntity(char *classname, int ID)
+DEntity* DMap::AddEntity(const char *classname, int ID)
{
DEntity* newEntity;
if(ID == -1)
newEntity = new DEntity(classname, ID);
entityList.push_back(newEntity);
-
+
return newEntity;
}
else
{
cnt = (*fixEntity)->FixBrushes(FALSE);
-
+
if(cnt && rebuild)
RebuildEntity(*fixEntity);
}
return count;
}
-void DMap::ResetTextures( const char* textureName, float fScale[2], float fShift[2], int rotation, const char* newTextureName,
+void DMap::ResetTextures( const char* textureName, float fScale[2], float fShift[2], int rotation, const char* newTextureName,
int bResetTextureName, int bResetScale[2], int bResetShift[2], int bResetRotation)
{
for(list<DEntity *>::const_iterator texEntity=entityList.begin(); texEntity!=entityList.end(); texEntity++)
{
if(!stricmp("worldspawn", (*texEntity)->m_Classname))
- (*texEntity)->ResetTextures(textureName, fScale, fShift, rotation, newTextureName,
+ (*texEntity)->ResetTextures(textureName, fScale, fShift, rotation, newTextureName,
bResetTextureName, bResetScale, bResetShift, bResetRotation, TRUE);
else
{
- if((*texEntity)->ResetTextures( textureName, fScale, fShift, rotation, newTextureName,
+ if((*texEntity)->ResetTextures( textureName, fScale, fShift, rotation, newTextureName,
bResetTextureName, bResetScale, bResetShift, bResetRotation, FALSE))
RebuildEntity(*texEntity);
}
- }
+ }
}
void DMap::RebuildEntity(DEntity *ent)