mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Moved some tempmodels code to cg_tempmodels.cpp and implemented FreeSomeTempModels()
This commit is contained in:
parent
9a104566ba
commit
dda79e7f27
4 changed files with 103 additions and 27 deletions
|
@ -2706,8 +2706,7 @@ void ClientGameCommandManager::DeleteEmitters(dtiki_t *tiki)
|
|||
for (i = m_emitters.NumObjects(); i > 0; i--) {
|
||||
spawnthing = m_emitters.ObjectAt(i);
|
||||
if (spawnthing->cgd.tiki == tiki) {
|
||||
m_emitters.RemoveObjectAt(i);
|
||||
delete spawnthing;
|
||||
FreeSpawnthing(spawnthing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4538,28 +4537,6 @@ bool ClientGameCommandManager::GetTagPositionAndOrientation(str tagname, orienta
|
|||
return ClientGameCommandManager::GetTagPositionAndOrientation(tagnum, new_or);
|
||||
}
|
||||
|
||||
//===============
|
||||
// FreeAllTempModels
|
||||
//===============
|
||||
void ClientGameCommandManager::FreeAllTempModels(void)
|
||||
{
|
||||
ctempmodel_t *p, *next;
|
||||
|
||||
// Go through all the temp models and run the physics if necessary,
|
||||
// then add them to the ref
|
||||
p = m_active_tempmodels.prev;
|
||||
for (; p != &m_active_tempmodels; p = next) {
|
||||
// grab next now, so if the local entity is freed we still have it
|
||||
next = p->prev;
|
||||
FreeTempModel(p);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientGameCommandManager::FreeSomeTempModels(void)
|
||||
{
|
||||
// FIXME: unimplemented
|
||||
}
|
||||
|
||||
//===============
|
||||
// FreeAllEmitters
|
||||
//===============
|
||||
|
@ -4576,6 +4553,9 @@ void CG_RestartCommandManager()
|
|||
commandManager.FreeAllTempModels();
|
||||
}
|
||||
|
||||
//=================
|
||||
// CG_CleanUpTempModels
|
||||
//=================
|
||||
void CG_CleanUpTempModels()
|
||||
{
|
||||
commandManager.FreeSomeTempModels();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue