Fixed compile errors in linux. Fixed lights not turning on at night.
This commit is contained in:
parent
6fc187f4b3
commit
c95ab47f87
|
@ -188,7 +188,6 @@ void export_actor() {
|
|||
|
||||
class_<cc::Walker, bases<cc::Actor>, boost::noncopyable, boost::shared_ptr<cc::Walker>>("Walker", no_init)
|
||||
.def("apply_control", &ApplyControl<cr::WalkerControl>, (arg("control")))
|
||||
.def("apply_control", &ApplyControl<cr::WalkerBoneControlIn>, (arg("control")))
|
||||
.def("get_control", &cc::Walker::GetWalkerControl)
|
||||
.def("get_bones", &cc::Walker::GetBonesTransform)
|
||||
.def("set_bones", &cc::Walker::SetBonesTransform, (arg("bones")))
|
||||
|
|
|
@ -144,26 +144,6 @@ static auto GetVectorOfBoneTransformFromList(const boost::python::list &list) {
|
|||
return v;
|
||||
}
|
||||
|
||||
static auto GetVectorOfBoneTransformOutFromList(const boost::python::list &list) {
|
||||
std::vector<carla::rpc::BoneTransformDataOut> v;
|
||||
|
||||
auto length = boost::python::len(list);
|
||||
v.reserve(static_cast<size_t>(length));
|
||||
for (auto i = 0u; i < length; ++i) {
|
||||
boost::python::extract<carla::rpc::BoneTransformDataOut> ext(list[i]);
|
||||
if (ext.check()) {
|
||||
v.push_back(ext);
|
||||
} else {
|
||||
v.push_back(carla::rpc::BoneTransformDataOut{
|
||||
boost::python::extract<std::string>(list[i][0u]),
|
||||
boost::python::extract<carla::geom::Transform>(list[i][1u]),
|
||||
boost::python::extract<carla::geom::Transform>(list[i][2u]),
|
||||
boost::python::extract<carla::geom::Transform>(list[i][3u])});
|
||||
}
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
static auto GetWheels(const carla::rpc::VehiclePhysicsControl &self) {
|
||||
const auto &wheels = self.GetWheels();
|
||||
boost::python::object get_iter = boost::python::iterator<std::vector<carla::rpc::WheelPhysicsControl>>();
|
||||
|
@ -283,10 +263,6 @@ static auto GetBonesTransformOut(const carla::rpc::WalkerBoneControlOut &self) {
|
|||
return boost::python::list(iter);
|
||||
}
|
||||
|
||||
static void SetBonesTransformOut(carla::rpc::WalkerBoneControlOut &self, const boost::python::list &list) {
|
||||
self.bone_transforms = GetVectorOfBoneTransformOutFromList(list);
|
||||
}
|
||||
|
||||
boost::python::object WalkerBoneControl_init(boost::python::tuple args, boost::python::dict kwargs) {
|
||||
// Args names
|
||||
const uint32_t NUM_ARGUMENTS = 1;
|
||||
|
|
|
@ -224,6 +224,10 @@ void ACarlaGameModeBase::BeginPlay()
|
|||
for(UCarlaLight* Light : Lights)
|
||||
{
|
||||
Light->RegisterLight();
|
||||
if(!Light->HasBegunPlay())
|
||||
{
|
||||
Light->BeginPlay();
|
||||
}
|
||||
}
|
||||
}
|
||||
EnableOverlapEvents();
|
||||
|
|
Loading…
Reference in New Issue