开枪时自动取消装弹
This commit is contained in:
parent
baedbcfc51
commit
8d983e2a93
@ -438,6 +438,10 @@ void Player::Shot()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (action_type != AT_Reload) {
|
||||||
|
CancelAction();
|
||||||
|
}
|
||||||
|
|
||||||
if (room->gas_data.gas_mode != GasInactive &&
|
if (room->gas_data.gas_mode != GasInactive &&
|
||||||
!a8::HasBitFlag(status, HS_Fly) &&
|
!a8::HasBitFlag(status, HS_Fly) &&
|
||||||
!a8::HasBitFlag(status, HS_Jump)
|
!a8::HasBitFlag(status, HS_Jump)
|
||||||
|
@ -594,9 +594,16 @@ bool Room::OverBorder(const Vector2D pos, float radius)
|
|||||||
|
|
||||||
Human* Room::GetWatchWarTarget(Human* hum)
|
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;
|
std::vector<Human*> humans;
|
||||||
for (auto& pair : human_hash_) {
|
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);
|
humans.push_back(pair.second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user