MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / R_CheckForEntityDefsUsingModel

Function R_CheckForEntityDefsUsingModel

neo/renderer/tr_lightrun.cpp:787–807  ·  view source on GitHub ↗

=================== R_CheckForEntityDefsUsingModel =================== */

Source from the content-addressed store, hash-verified

785===================
786*/
787void R_CheckForEntityDefsUsingModel( idRenderModel *model ) {
788 int i, j;
789 idRenderWorldLocal *rw;
790 idRenderEntityLocal *def;
791
792 for ( j = 0; j < tr.worlds.Num(); j++ ) {
793 rw = tr.worlds[j];
794
795 for ( i = 0 ; i < rw->entityDefs.Num(); i++ ) {
796 def = rw->entityDefs[i];
797 if ( !def ) {
798 continue;
799 }
800 if ( def->parms.hModel == model ) {
801 //assert( 0 );
802 // this should never happen but Radiant messes it up all the time so just free the derived data
803 R_FreeEntityDefDerivedData( def, false, false );
804 }
805 }
806 }
807}
808
809/*
810===================

Callers 3

FreeModelMethod · 0.85
BeginLevelLoadMethod · 0.85
EndLevelLoadMethod · 0.85

Calls 2

NumMethod · 0.45

Tested by

no test coverage detected