-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc5ef9f
commit 6b6afdf
Showing
8 changed files
with
85 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
#include "Red/TypeInfo/Macros/Definition.hpp" | ||
#include <RED4ext/Common.hpp> | ||
#include <RED4ext/RTTISystem.hpp> | ||
#include <RED4ext/Scripting/Natives/Generated/ent/IPlacedComponent.hpp> | ||
#include <RED4ext/Scripting/Natives/Generated/vehicle/ChassisComponent.hpp> | ||
#include <RED4ext/Scripting/Natives/Generated/physics/SystemBody.hpp> | ||
#include <RED4ext/Scripting/Natives/Generated/physics/SystemBodyParams.hpp> | ||
#include <RedLib.hpp> | ||
// #include "Red/TypeInfo/Macros/Definition.hpp" | ||
// #include <RED4ext/Common.hpp> | ||
// #include <RED4ext/RTTISystem.hpp> | ||
// #include <RED4ext/Scripting/Natives/Generated/ent/IPlacedComponent.hpp> | ||
// #include <RED4ext/Scripting/Natives/Generated/vehicle/ChassisComponent.hpp> | ||
// #include <RED4ext/Scripting/Natives/Generated/physics/SystemBody.hpp> | ||
// #include <RED4ext/Scripting/Natives/Generated/physics/SystemBodyParams.hpp> | ||
// #include <RedLib.hpp> | ||
|
||
struct VehicleChassisComponent : RED4ext::vehicle::ChassisComponent { | ||
RED4ext::Transform GetComOffset() { | ||
auto hpsb = this->collisionResource.Fetch().GetPtr()->bodies[0]; | ||
return hpsb->params.comOffset; | ||
} | ||
RTTI_IMPL_TYPEINFO(VehicleChassisComponent); | ||
RTTI_IMPL_ALLOCATOR(); | ||
}; | ||
// struct VehicleChassisComponent : RED4ext::vehicle::ChassisComponent { | ||
// RED4ext::Transform GetComOffset() { | ||
// auto hpsb = this->collisionResource.Fetch().GetPtr()->bodies[0]; | ||
// return hpsb->params.comOffset; | ||
// } | ||
// RTTI_IMPL_TYPEINFO(VehicleChassisComponent); | ||
// RTTI_FWD_CONSTRUCTOR(); | ||
// // RTTI_IMPL_ALLOCATOR(); | ||
// }; | ||
|
||
RTTI_DEFINE_CLASS(VehicleChassisComponent, "vehicleChassisComponent", { | ||
// RTTI_ABSTRACT(); | ||
RTTI_PARENT(RED4ext::ent::IPlacedComponent); | ||
RTTI_METHOD(VehicleChassisComponent::GetComOffset); | ||
}); | ||
// RTTI_DEFINE_CLASS(VehicleChassisComponent, "vehicleChassisComponent", { | ||
// // RTTI_ABSTRACT(); | ||
// RTTI_PARENT(RED4ext::ent::IPlacedComponent); | ||
// RTTI_METHOD(GetComOffset); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#include "Red/TypeInfo/Macros/Definition.hpp" | ||
#include <RED4ext/Common.hpp> | ||
#include <RED4ext/RTTISystem.hpp> | ||
#include <RED4ext/Scripting/Natives/Generated/vehicle/DriveToPointEvent.hpp> | ||
#include <RedLib.hpp> | ||
// #include "Red/TypeInfo/Macros/Definition.hpp" | ||
// #include <RED4ext/Common.hpp> | ||
// #include <RED4ext/RTTISystem.hpp> | ||
// #include <RED4ext/Scripting/Natives/Generated/vehicle/DriveToPointEvent.hpp> | ||
// #include <RedLib.hpp> | ||
|
||
struct VehicleDriveToPointEvent : RED4ext::vehicle::DriveToPointEvent { | ||
}; | ||
// struct VehicleDriveToPointEvent : RED4ext::vehicle::DriveToPointEvent { | ||
// }; | ||
|
||
RTTI_DEFINE_CLASS(VehicleDriveToPointEvent, "vehicleDriveToPointEvent", { | ||
RTTI_PARENT(RED4ext::red::Event); | ||
RTTI_PROPERTY(VehicleDriveToPointEvent::targetPos); | ||
RTTI_PROPERTY(VehicleDriveToPointEvent::useTraffic); | ||
RTTI_PROPERTY(VehicleDriveToPointEvent::speedInTraffic); | ||
}); | ||
// RTTI_DEFINE_CLASS(VehicleDriveToPointEvent, "vehicleDriveToPointEvent", { | ||
// RTTI_PARENT(RED4ext::red::Event); | ||
// RTTI_PROPERTY(VehicleDriveToPointEvent::targetPos); | ||
// RTTI_PROPERTY(VehicleDriveToPointEvent::useTraffic); | ||
// RTTI_PROPERTY(VehicleDriveToPointEvent::speedInTraffic); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
#include "Red/TypeInfo/Macros/Definition.hpp" | ||
#include <RED4ext/Common.hpp> | ||
#include <RED4ext/RTTISystem.hpp> | ||
#include <RED4ext/Scripting/Natives/Generated/vehicle/TPPCameraComponent.hpp> | ||
#include <RedLib.hpp> | ||
// #include "Red/TypeInfo/Macros/Definition.hpp" | ||
// #include <RED4ext/Common.hpp> | ||
// #include <RED4ext/RTTISystem.hpp> | ||
// #include <RED4ext/Scripting/Natives/Generated/vehicle/TPPCameraComponent.hpp> | ||
// #include <RedLib.hpp> | ||
|
||
struct VehicleTPPCameraComponent : RED4ext::vehicle::TPPCameraComponent { | ||
RTTI_IMPL_TYPEINFO(VehicleTPPCameraComponent); | ||
RTTI_IMPL_ALLOCATOR(); | ||
}; | ||
// struct VehicleTPPCameraComponent : RED4ext::vehicle::TPPCameraComponent { | ||
// RTTI_IMPL_TYPEINFO(VehicleTPPCameraComponent); | ||
// RTTI_FWD_CONSTRUCTOR(); | ||
// // RTTI_IMPL_ALLOCATOR(); | ||
// }; | ||
|
||
RTTI_DEFINE_CLASS(VehicleTPPCameraComponent, "vehicleTPPCameraComponent", { | ||
// RTTI_ABSTRACT(); | ||
RTTI_PARENT(RED4ext::game::CameraComponent); | ||
RTTI_PROPERTY(VehicleTPPCameraComponent::drivingDirectionCompensationSpeedCoef); | ||
RTTI_PROPERTY(VehicleTPPCameraComponent::drivingDirectionCompensationAngleSmooth); | ||
RTTI_PROPERTY(VehicleTPPCameraComponent::lockedCamera); | ||
RTTI_PROPERTY(VehicleTPPCameraComponent::initialTransform); | ||
RTTI_PROPERTY(VehicleTPPCameraComponent::pitch); | ||
RTTI_PROPERTY(VehicleTPPCameraComponent::yaw); | ||
RTTI_PROPERTY(VehicleTPPCameraComponent::data); | ||
}); | ||
// RTTI_DEFINE_CLASS(RED4ext::vehicle::TPPCameraComponent, "vehicleTPPCameraComponent", { | ||
// // RTTI_ABSTRACT(); | ||
// RTTI_PARENT(RED4ext::game::CameraComponent); | ||
// RTTI_PROPERTY(drivingDirectionCompensationSpeedCoef); | ||
// RTTI_PROPERTY(drivingDirectionCompensationAngleSmooth); | ||
// RTTI_PROPERTY(lockedCamera); | ||
// RTTI_PROPERTY(initialTransform); | ||
// RTTI_PROPERTY(pitch); | ||
// RTTI_PROPERTY(yaw); | ||
// RTTI_PROPERTY(data); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters