1
This commit is contained in:
parent
27d454857c
commit
b70dc4c3ab
@ -1317,8 +1317,13 @@ behaviac::EBTStatus HeroAgent::Pickup()
|
|||||||
RoomObstacle* ob = curr_pickup_obj_.Get()->AsRoomObstacle();
|
RoomObstacle* ob = curr_pickup_obj_.Get()->AsRoomObstacle();
|
||||||
owner_->AsHuman()->ObstacleInteraction(ob);
|
owner_->AsHuman()->ObstacleInteraction(ob);
|
||||||
} else if (curr_pickup_obj_.Get()->IsCar()) {
|
} else if (curr_pickup_obj_.Get()->IsCar()) {
|
||||||
Car* car = curr_pickup_obj_.Get()->AsCar();
|
if (owner_->HasBuffEffect(kBET_Driver) ||
|
||||||
owner_->AsHuman()->DoGetOn(car->GetUniId());
|
owner_->HasBuffEffect(kBET_Passenger)) {
|
||||||
|
return behaviac::BT_FAILURE;
|
||||||
|
} else {
|
||||||
|
Car* car = curr_pickup_obj_.Get()->AsCar();
|
||||||
|
owner_->AsHuman()->DoGetOn(car->GetUniId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return behaviac::BT_SUCCESS;
|
return behaviac::BT_SUCCESS;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user