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

Method Monster

PanzerChasm/server/monster.cpp:102–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100static const m_Vec3 g_target_shoot_point_delta( 0.0f, 0.0f, 0.5f );
101
102Monster::Monster(
103 const MapData::Monster& map_monster,
104 const float z,
105 const GameResourcesConstPtr& game_resources,
106 const LongRandPtr& random_generator,
107 const Time spawn_time )
108 : MonsterBase(
109 game_resources,
110 map_monster.monster_id,
111 m_Vec3( map_monster.pos, z ),
112 map_monster.angle )
113 , random_generator_(random_generator)
114 , current_animation_start_time_(spawn_time)
115{
116 PC_ASSERT( random_generator_ != nullptr );
117
118 current_animation_= GetIdleAnimation();
119
120 health_= game_resources_->monsters_description[ monster_id_ ].life;
121}
122
123Monster::~Monster()
124{}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected