diff --git a/code/rd-rend2/G2_misc.cpp b/code/rd-rend2/G2_misc.cpp index e0bf23b804..e4451cf310 100644 --- a/code/rd-rend2/G2_misc.cpp +++ b/code/rd-rend2/G2_misc.cpp @@ -45,7 +45,7 @@ int goreModelIndex; static cvar_t *cg_g2MarksAllModels=NULL; -static inline void DestroyGoreTexCoordinates(int tag) +static inline void DestroyR2GoreTexCoordinates(int tag) { R2GoreTextureCoordinates* gTC = FindR2GoreRecord(tag); if (!gTC) @@ -113,29 +113,14 @@ R2GoreTextureCoordinates* FindR2GoreRecord(int tag) return 0; } -GoreTextureCoordinates* FindGoreRecord(int tag) -{ - std::map::iterator i = GoreRecords.find(tag); - if (i != GoreRecords.end()) - { - return (GoreTextureCoordinates*)(&(*i).second); - } - return 0; -} - void *G2_GetGoreRecord(int tag) { - return FindGoreRecord(tag); + return FindR2GoreRecord(tag); } void DeleteR2GoreRecord(int tag) { - DeleteGoreRecord(tag); -} - -void DeleteGoreRecord(int tag) -{ - DestroyGoreTexCoordinates(tag); + DestroyR2GoreTexCoordinates(tag); GoreRecords.erase(tag); } @@ -183,7 +168,7 @@ CGoreSet::~CGoreSet() std::multimap::iterator i; for (i=mGoreRecords.begin();i!=mGoreRecords.end();i++) { - DeleteGoreRecord((*i).second.mGoreTag); + DeleteR2GoreRecord((*i).second.mGoreTag); } }; #endif // _SOF2