================= idRenderModelManagerLocal::FreeModel ================= */
| 361 | ================= |
| 362 | */ |
| 363 | void idRenderModelManagerLocal::FreeModel( idRenderModel *model ) { |
| 364 | if ( !model ) { |
| 365 | return; |
| 366 | } |
| 367 | if ( !dynamic_cast<idRenderModelStatic *>( model ) ) { |
| 368 | common->Error( "idRenderModelManager::FreeModel: model '%s' is not a static model", model->Name() ); |
| 369 | return; |
| 370 | } |
| 371 | if ( model == defaultModel ) { |
| 372 | common->Error( "idRenderModelManager::FreeModel: can't free the default model" ); |
| 373 | return; |
| 374 | } |
| 375 | if ( model == beamModel ) { |
| 376 | common->Error( "idRenderModelManager::FreeModel: can't free the beam model" ); |
| 377 | return; |
| 378 | } |
| 379 | if ( model == spriteModel ) { |
| 380 | common->Error( "idRenderModelManager::FreeModel: can't free the sprite model" ); |
| 381 | return; |
| 382 | } |
| 383 | |
| 384 | R_CheckForEntityDefsUsingModel( model ); |
| 385 | |
| 386 | delete model; |
| 387 | } |
| 388 | |
| 389 | /* |
| 390 | ================= |
no test coverage detected