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

Method Player

PanzerChasm/server/player.cpp:19–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17static const float g_mega_destroyer_recoil_speed= 10.0f;
18
19Player::Player( const GameResourcesConstPtr& game_resources, const Time current_time )
20 : MonsterBase( game_resources, 0u, m_Vec3( 0.0f, 0.0f, 0.0f ), 0.0f )
21 , spawn_time_( current_time )
22 , speed_( 0.0f, 0.0f, 0.0f )
23 , on_floor_(false)
24 , noclip_(false)
25 , god_mode_(false)
26 , teleported_(true)
27 , armor_(0)
28 , last_state_change_time_( current_time )
29 , last_shoot_time_( current_time )
30 , weapon_animation_state_change_time_( current_time )
31 , last_pain_sound_time_( current_time )
32 , last_step_sound_time_( current_time )
33{
34 PC_ASSERT( game_resources_ != nullptr );
35
36 for( unsigned int i= 0u; i < GameConstants::weapon_count; i++ )
37 {
38 ammo_[i]= 0u;
39 have_weapon_[i]= false;
40 }
41
42 // Give rifle
43 ammo_[0]= game_resources_->weapons_description[0].limit;
44 have_weapon_[0]= true;
45
46 // give mines fake weapon.
47 have_weapon_[ GameConstants::mine_weapon_number ]= true;
48}
49
50Player::~Player()
51{}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected