1
This commit is contained in:
parent
7a7563109d
commit
debf6938e5
@ -71,6 +71,8 @@ class Human : public Creature
|
|||||||
std::shared_ptr<cs::MFThrow> throw_bomb;
|
std::shared_ptr<cs::MFThrow> throw_bomb;
|
||||||
std::map<int, std::shared_ptr<cs::MFThrow>> pending_throw_bomb;
|
std::map<int, std::shared_ptr<cs::MFThrow>> pending_throw_bomb;
|
||||||
std::shared_ptr<glm::vec3> sand_table_target_pos;
|
std::shared_ptr<glm::vec3> sand_table_target_pos;
|
||||||
|
std::shared_ptr<glm::vec3> shot_target_pos;
|
||||||
|
std::shared_ptr<glm::vec3> shot_client_pos;
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string avatar_url;
|
std::string avatar_url;
|
||||||
|
@ -1130,6 +1130,20 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
|
|||||||
GetMovement()->CalcTargetPos(distance);
|
GetMovement()->CalcTargetPos(distance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (msg.has_shot_target_pos() &&
|
||||||
|
msg.has_shot_client_pos()) {
|
||||||
|
if (!shot_target_pos) {
|
||||||
|
shot_target_pos = std::make_shared<glm::vec3>(0.0f, 0.0f, 0.0f);
|
||||||
|
}
|
||||||
|
if (!shot_client_pos) {
|
||||||
|
shot_client_pos = std::make_shared<glm::vec3>(0.0f, 0.0f, 0.0f);
|
||||||
|
}
|
||||||
|
TypeConvert::FromPb(*shot_target_pos, &msg.shot_target_pos());
|
||||||
|
TypeConvert::FromPb(*shot_client_pos, &msg.shot_client_pos());
|
||||||
|
} else {
|
||||||
|
shot_target_pos = nullptr;
|
||||||
|
shot_client_pos = nullptr;
|
||||||
|
}
|
||||||
last_cmmove_frameno = room->GetFrameNo();
|
last_cmmove_frameno = room->GetFrameNo();
|
||||||
trace_target_uniid = msg.trace_target_uniid();
|
trace_target_uniid = msg.trace_target_uniid();
|
||||||
#ifdef DEBUG1
|
#ifdef DEBUG1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user