Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak(clrcore): add missing flags and types #2740

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion code/client/clrcore/External/Blip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,56 @@ public enum BlipColor
Red,
Green,
Blue,
LightRed = 6,
Violet,
Pink,
LightOrange,
LightBrown,
LightGreen,
LightBlue,
LightPurple,
DarkPurple,
Cyan,
LightYellow,
Orange,
DarkPink = 19,
DarkYellow,
DarkOrange,
LightGray,
LightPink,
LemonGreen,
ForestGreen,
ElectricBlue,
BrightPurple,
DarkBlue = 29,
DarkCyan,
Beige = 36,
DarkGray,
PinkRed,
MichaelBlue = 42,
FranklinGreen,
TrevorOrange,
Yellow = 66
Gold = 46,
BrilliantRose = 48,
MediumPurple = 50,
Salmon,
DarkGreen,
BlizzardBlue,
OracleBlue,
Silver,
Brown,
EastBay = 58,
YellowOrange = 60,
MulberyyPink,
AltoGray,
JellyBeanBlue,
Mamba = 65,
Yellow,
TransparentBlack = 72,
DeepRed = 76,
TransparentRed = 79,
TransparentBlue,
Purple = 83,
}
public enum BlipSprite
{
Expand Down
66 changes: 55 additions & 11 deletions code/client/clrcore/External/Ped.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,42 @@ public enum Gender
public enum DrivingStyle
{
None = 0,
Normal = 786603,
IgnoreLights = 2883621,
StopForCars = 1,
StopForPeds = 2,
SwerveAroundCars = 4,
SometimesOvertakeTraffic = 5,
Rushed = 1074528293,
AvoidTraffic = 786468,
AvoidTrafficExtremely = 6,
AvoidHighwaysWhenPossible = 536870912,
IgnorePathing = 16777216,
IgnoreRoads = 4194304,
SteerAroundStationaryCars = 8,
SteerAroundPeds = 16,
SteerAroundObjects = 32,
IgnorePlayerPed = 64,
StopAtLights = 128,
GoOffRoad = 256,
DriveInOncoming = 512,
Backwards = 1024,
WanderOnPathFail = 2048,
AvoidRestrictedAreas = 4096,
NoBackgroundPathfinding = 8192,
AdjustSpeedForRoad = 16384,
ShortestPath = 262144,
Backwards = 1024
ChangeLanes = 524288,
UseInactiveNodes = 2097152,
IgnoreRoads = 4194304,
PlaneTaxiMode = 8388608,
IgnorePathing = 16777216,
StringPullAtJunctions = 33554432,
AvoidHighwaysWhenPossible = 536870912,
JoinInRoadDirection = 1073741824,
StrictStopForCars = 262275,
AvoidCars = 786469,
AvoidTraffic = 786468,
PloughThrough = 262144,
StopForCarsIgnoreLights = 786475,
AvoidCarsObeyLights = 786597,
AvoidCarsStopForPedsObeyLights = 786599,
Normal = 786603,
IgnoreLights = 2883621,
Rushed = 1074528293,
}
[Flags]
public enum VehicleDrivingFlags : uint
Expand All @@ -56,16 +81,35 @@ public enum VehicleDrivingFlags : uint
}
public enum HelmetType : uint
{
None = 0u,
Bulky = 1u,
Job = 2u,
Sunny = 4u,
Wet = 8u,
Cold = 16u,
NotInCar = 32u,
BikeOnly = 64u,
NotIndoors = 128u,
FireRetardant = 256u,
Armoured = 512u,
LightlyArmoured = 1024u,
HighDetail = 2048u,
RegularMotorcycleHelmet = 4096u,
RandomHelmet = 8192u,
FiremanHelmet = 16384u,
PilotHeadset = 32768u
PilotHeadset = 32768u,
HideInFirstPerson = 65536u,
UsePhysicsHat2 = 131072u,
PilotHelmet = 262144u
}
public enum ParachuteLandingType
{
None = -1,
Stumbling = 1,
Slow = 0,
Stumbling,
Rolling,
Ragdoll
Ragdoll,
Water
}
public enum ParachuteState
{
Expand Down
3 changes: 3 additions & 0 deletions code/client/clrcore/External/Rope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ namespace CitizenFX.Core
{
public enum RopeType
{
ThinRope = 0,
DefaultRope = 1,
DefaultWire = 3,
ThickRope = 4,
ThinMetalWire = 5,
}
Expand Down
75 changes: 62 additions & 13 deletions code/client/clrcore/External/Tasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,40 @@ public enum FiringPattern : uint
}
[Flags]
public enum AnimationFlags
{
None = 0,
Loop = 1,
StayInEndFrame = 2,
UpperBodyOnly = 16,
AllowRotation = 32,
CancelableWithMovement = 128,
RagdollOnCollision = 4194304
}
{
None = 0,
Loop = 1,
StayInEndFrame = 2,
RepositionAtEnd = 4,
NonInterruptible = 8,
UpperBodyOnly = 16,
AllowRotation = 32,
ReorientAtEnd = 64,
CancelableWithMovement = 128,
AdditivePlayback = 256,
IgnoreCollision = 512,
OverridePhysics = 1024,
IgnoreGravity = 2048,
ApplyInitialOffset = 4096,
ExitOnInterrupt = 8192,
SyncInBlend = 16384,
SyncOutBlend = 32768,
ContinuousSync = 65536,
ForceStart = 131072,
KinematicPhysics = 262144,
MoverExtraction = 524288,
HideWeapon = 1048576,
DeadPoseOnEnd = 2097152,
RagdollOnCollision = 4194304,
PersistOnDeath = 8388608,
AbortOnDamage = 16777216,
DisablePhysicsUpdate = 33554432,
ProcessAttachments = 67108864,
ExpandCapsuleFromSkeleton = 134217728,
AltFPAnim = 268435456,
BlendOutAtEnd = 536870912,
FullBlending = 1073741824,
}
[Flags]
public enum LeaveVehicleFlags
{
Expand All @@ -52,6 +77,28 @@ public enum LeaveVehicleFlags
LeaveDoorOpen = 256,
BailOut = 4096
}
[Flags]
public enum LookFlags
{
None = 0,
SlowTurnRate = 1,
FastTurnRate = 2,
WideYawLimit = 4,
WidePitchLimit = 8,
WidestYawLimit = 16,
WidestPitchLimit = 32,
NarrowYawLimit = 64,
NarrowPitchLimit = 128,
NarrowestYawLimit = 256,
NarrowestPitchLimit = 512,
IncludeTorso = 1024,
TrackOutOfFOV = 2048,
CameraFocus = 4096,
EyesOnly = 8192,
UseLookDir = 16384,
ScriptOnly = 32768,
AbsoluteRefDir = 65536,
}

public class Tasks
{
Expand Down Expand Up @@ -259,18 +306,20 @@ public void LeaveVehicle(Vehicle vehicle, LeaveVehicleFlags flags)
/// </summary>
/// <param name="target"></param>
/// <param name="duration">Must be greater than 0 for the ped to actually move their head.</param>
public void LookAt(Entity target, int duration = 1)
/// <param name="flag"></param>
public void LookAt(Entity target, int duration = 1, LookFlags flag = LookFlags.FastTurnRate)
{
API.TaskLookAtEntity(_ped.Handle, target.Handle, duration, 0, 2);
API.TaskLookAtEntity(_ped.Handle, target.Handle, duration, 0, (int)flag);
}
/// <summary>
/// Looks at the specified <see cref="Vector3"/> position.
/// </summary>
/// <param name="position"></param>
/// <param name="duration">Must be greater than 0 for the ped to actually move their head.</param>
public void LookAt(Vector3 position, int duration = 1)
/// <param name="flag"></param>
public void LookAt(Vector3 position, int duration = 1, LookFlags flag = LookFlags.FastTurnRate)
{
API.TaskLookAtCoord(_ped.Handle, position.X, position.Y, position.Z, duration, 0, 2);
API.TaskLookAtCoord(_ped.Handle, position.X, position.Y, position.Z, duration, 0, (int)flag);
}

public void ParachuteTo(Vector3 position)
Expand Down
7 changes: 5 additions & 2 deletions code/client/clrcore/External/Vehicle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,12 @@ public enum VehicleLockStatus
Locked,
LockedForPlayer,
StickPlayerInside,
CanBeBrokenInto = 7,
LockedInitially,
ForceShutDoors,
CanBeBrokenInto,
CanBeBrokenIntoPersist,
CannotBeTriedToEnter = 10
LockedNoPassengers,
CannotBeTriedToEnter
}
public enum VehicleNeonLight
{
Expand Down
9 changes: 9 additions & 0 deletions code/client/clrcore/External/VehicleModCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ public enum VehicleModType
Horns,
Suspension,
Armor,
Nitrous,
Turbo,
Subwoofer,
TyreSmoke,
Hydraulics2,
XenonLights,
FrontWheel = 23,
RearWheel,
PlateHolder,
Expand Down Expand Up @@ -65,8 +71,11 @@ public enum VehicleModType

public enum VehicleToggleModType
{
Nitrous = 17,
Turbo = 18,
Subwoofer = 19,
TireSmoke = 20,
Hydraulics = 21,
XenonHeadlights = 22
}

Expand Down
Loading