开枪时自动取消装弹

This commit is contained in:
aozhiwei 2019-05-06 19:20:34 +08:00
parent baedbcfc51
commit 8d983e2a93
2 changed files with 12 additions and 1 deletions

View File

@ -438,6 +438,10 @@ void Player::Shot()
return;
}
if (action_type != AT_Reload) {
CancelAction();
}
if (room->gas_data.gas_mode != GasInactive &&
!a8::HasBitFlag(status, HS_Fly) &&
!a8::HasBitFlag(status, HS_Jump)

View File

@ -594,9 +594,16 @@ bool Room::OverBorder(const Vector2D pos, float radius)
Human* Room::GetWatchWarTarget(Human* hum)
{
if (hum->team_members) {
for (auto& member : *hum->team_members) {
if (member != hum && !member->dead) {
return member;
}
}
}
std::vector<Human*> humans;
for (auto& pair : human_hash_) {
if (pair.first != hum->entity_uniid) {
if (pair.first != hum->entity_uniid && !pair.second->dead) {
humans.push_back(pair.second);
}
}