| 2564 | } |
| 2565 | |
| 2566 | void Map::DestroyModel( const unsigned int model_index ) |
| 2567 | { |
| 2568 | PC_ASSERT( model_index < static_models_.size() ); |
| 2569 | StaticModel& model= static_models_[ model_index ]; |
| 2570 | |
| 2571 | EmitModelDestructionEffects( model_index ); |
| 2572 | |
| 2573 | model.model_id++; // now, this model has other model type |
| 2574 | |
| 2575 | // Reset animation. Animation must be consistent with model. |
| 2576 | model.animation_start_frame= 0u; |
| 2577 | model.current_animation_frame= 0u; |
| 2578 | model.animation_state= StaticModel::AnimationState::Animation; |
| 2579 | |
| 2580 | if( model.model_id < map_data_->models_description.size() ) |
| 2581 | model.health= map_data_->models_description[ model.model_id ].break_limit; |
| 2582 | else |
| 2583 | model.health= 0; |
| 2584 | } |
| 2585 | |
| 2586 | void Map::DoExplosionDamage( |
| 2587 | const m_Vec3& explosion_center, |
nothing calls this directly
no outgoing calls
no test coverage detected