1
This commit is contained in:
parent
86a1d5f2d6
commit
c9a56f73f5
@ -1466,6 +1466,9 @@ bool HeroAgent::CanThrowItem(int slot)
|
|||||||
if (owner_->IsCar()) {
|
if (owner_->IsCar()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (owner_->room->GetFrameNo() - last_throw_item_frameno_ < SERVER_FRAME_RATE * 5) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (owner_->HasBuffEffect(kBET_Jump) ||
|
if (owner_->HasBuffEffect(kBET_Jump) ||
|
||||||
owner_->HasBuffEffect(kBET_Fly)) {
|
owner_->HasBuffEffect(kBET_Fly)) {
|
||||||
return false;
|
return false;
|
||||||
@ -1550,6 +1553,7 @@ behaviac::EBTStatus HeroAgent::ThrowItem(int slot)
|
|||||||
bomb_dir,
|
bomb_dir,
|
||||||
fly_distance,
|
fly_distance,
|
||||||
0);
|
0);
|
||||||
|
last_throw_item_frameno_ = owner_->room->GetFrameNo();
|
||||||
return behaviac::BT_SUCCESS;
|
return behaviac::BT_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,5 +176,6 @@ private:
|
|||||||
int bullet_angle_offset_min_ = 0;
|
int bullet_angle_offset_min_ = 0;
|
||||||
int bullet_angle_offset_max_ = 0;
|
int bullet_angle_offset_max_ = 0;
|
||||||
long long last_try_search_enemy_frameno_ = 0;
|
long long last_try_search_enemy_frameno_ = 0;
|
||||||
|
long long last_throw_item_frameno_ = 0;
|
||||||
std::map<int, int> abandon_pickup_hash_;
|
std::map<int, int> abandon_pickup_hash_;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user