1
This commit is contained in:
parent
f86291f4bc
commit
35fd26271d
@ -72,6 +72,9 @@ void Player::Update(int delta_time)
|
||||
if (action_type != AT_None) {
|
||||
UpdateAction();
|
||||
}
|
||||
if (spectate) {
|
||||
UpdateSpectate();
|
||||
}
|
||||
MakeUpdateMsg();
|
||||
SendNotifyMsg(*update_msg);
|
||||
{
|
||||
@ -249,6 +252,11 @@ void Player::UpdateUseItemIdx()
|
||||
use_item = false;
|
||||
}
|
||||
|
||||
void Player::UpdateSpectate()
|
||||
{
|
||||
spectate = false;
|
||||
}
|
||||
|
||||
void Player::Shot()
|
||||
{
|
||||
if (!curr_weapon->meta) {
|
||||
@ -590,6 +598,9 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
|
||||
use_item = true;
|
||||
use_item_idx = msg.use_item_idx();
|
||||
}
|
||||
if (msg.has_spectate()) {
|
||||
spectate = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Player::UpdateDropWeapon()
|
||||
|
@ -55,6 +55,8 @@ class Player : public Human
|
||||
|
||||
bool reload = false;
|
||||
|
||||
bool spectate = false;
|
||||
|
||||
::google::protobuf::RepeatedField< ::google::protobuf::int32 > interaction_objids;
|
||||
|
||||
template <typename T>
|
||||
@ -76,6 +78,7 @@ class Player : public Human
|
||||
void UpdateReload();
|
||||
void UpdateCancelAction();
|
||||
void UpdateUseItemIdx();
|
||||
void UpdateSpectate();
|
||||
void Shot();
|
||||
void ProcInteraction();
|
||||
void ObstacleInteraction(Obstacle* entity);
|
||||
|
Loading…
x
Reference in New Issue
Block a user