MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / GetAnimation

Method GetAnimation

PanzerChasm/server/monster_base.cpp:128–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128int MonsterBase::GetAnimation( const AnimationId id ) const
129{
130 PC_ASSERT( monster_id_ < game_resources_->monsters_models.size() );
131 const Model& model= game_resources_->monsters_models[ monster_id_ ];
132
133 for( const Model::Animation& animation : model.animations )
134 {
135 if( animation.id == static_cast<unsigned int>(id) )
136 return &animation - model.animations.data();
137 }
138 return -1;
139}
140
141int MonsterBase::GetAnyAnimation( const std::initializer_list<AnimationId>& ids ) const
142{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected