diff --git a/server/bin/exported/task/ChaseToKill.xml b/server/bin/exported/task/ChaseToKill.xml
index a6ed4b27..71892b0a 100644
--- a/server/bin/exported/task/ChaseToKill.xml
+++ b/server/bin/exported/task/ChaseToKill.xml
@@ -11,13 +11,6 @@
-
-
-
-
-
-
-
@@ -50,6 +43,13 @@
+
+
+
+
+
+
+
diff --git a/server/gameserver/hero_agent.cc b/server/gameserver/hero_agent.cc
index 3940e8d1..a0c48fc0 100644
--- a/server/gameserver/hero_agent.cc
+++ b/server/gameserver/hero_agent.cc
@@ -140,6 +140,10 @@ bool HeroAgent::CanShot()
if (owner_->GetActionType() == AT_Reload) {
return false;
}
+ if (owner_->GetCar() && owner_->IsHuman() &&
+ !owner_->GetCar()->CanShot(owner_->AsHuman())) {
+ return false;
+ }
return owner_->CanShot(true);
}
@@ -1266,9 +1270,6 @@ behaviac::EBTStatus HeroAgent::CoGetNextMobaModeRoadPoint()
int HeroAgent::SearchPickupObj()
{
-#ifdef DEBUG
- a8::XPrintf("SearchPickupObj\n", {});
-#endif
if (!owner_->IsHuman()) {
return 0;
}
@@ -1315,14 +1316,8 @@ int HeroAgent::SearchPickupObj()
} else if (e->IsLoot()) {
}
});
-#ifdef DEBUG
- a8::XPrintf("SearchPickupObj 11111 %d\n", {nearest_obj ? 1 : 0});
-#endif
if (nearest_obj &&
nearest_obj->GetPos().ManhattanDistance2D(owner_->GetPos()) < 600) {
-#ifdef DEBUG
- a8::XPrintf("SearchPickupObj 22222\n", {});
-#endif
int obj_type = 0;
if (nearest_obj->IsCar()) {
obj_type = 1;
@@ -1373,7 +1368,7 @@ behaviac::EBTStatus HeroAgent::Pickup()
auto context = MAKE_BTCONTEXT
(
);
- int pickup_time = a8::RandEx(500, 1000 * 3);
+ int pickup_time = a8::RandEx(200, 800);
auto co = std::make_shared(context, co_id, "Pickup");
co->runing_cb =
[this, context, pickup_time] (BtCoroutine* co)
@@ -1391,7 +1386,7 @@ behaviac::EBTStatus HeroAgent::Pickup()
return behaviac::BT_FAILURE;
}
if (!owner_->IsHuman()) {
- return behaviac::BT_RUNNING;
+ return behaviac::BT_FAILURE;
}
if ((GetRoom()->GetFrameNo() - context->frameno) * FRAME_RATE_MS < pickup_time) {
return behaviac::BT_RUNNING;