@nativewrappers/fivem 0.0.33 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client/Raycast.js CHANGED
@@ -33,7 +33,7 @@ class RaycastResult {
33
33
  * Whether the entity hit exists.
34
34
  */
35
35
  get DidHitEntity() {
36
- return this.entityHandleArg?.Handle !== 0;
36
+ return this.entityHandleArg !== null && this.entityHandleArg.Handle !== 0;
37
37
  }
38
38
  /**
39
39
  * Material type that was hit.
@@ -9,7 +9,7 @@ export declare class TaskSequence {
9
9
  dispose(): void;
10
10
  close(repeat?: boolean): void;
11
11
  get Handle(): number;
12
- get AddTask(): Tasks | null | undefined;
12
+ get AddTask(): Tasks;
13
13
  get IsClosed(): boolean;
14
14
  get Count(): number;
15
15
  }
@@ -33,7 +33,7 @@ export class TaskSequence {
33
33
  throw new Error("You can't add tasks to a closed sequence!");
34
34
  }
35
35
  this.count += 1;
36
- return TaskSequence.nullPed?.Task;
36
+ return TaskSequence.nullPed.Task;
37
37
  }
38
38
  get IsClosed() {
39
39
  return this.isClosed;
@@ -136,7 +136,7 @@ export declare class BaseEntity {
136
136
  * @param offset: the amount to offset from the entity
137
137
  * @returns the offset position from the entity in world coords
138
138
  */
139
- getAbsolutePositionOffset(worldCoords: Vector3): Vector3;
139
+ getOffsetInRelativeCoords(worldCoords: Vector3): Vector3;
140
140
  /**
141
141
  * @example
142
142
  * ```typescript
@@ -153,13 +153,13 @@ export declare class BaseEntity {
153
153
  * @param worldCoords: the offset given the world coords
154
154
  * @returns the offset position from the entity in relative coords
155
155
  */
156
- getRelativePositionOffset(offset: Vector3): Vector3;
156
+ getOffsetInWorldCoords(offset: Vector3): Vector3;
157
157
  /**
158
- * @deprecated use [[getAbsolutePositionOffset]] instead
158
+ * @deprecated use [[getOffsetInRelativeCoords]] instead
159
159
  */
160
160
  getPositionOffset(worldCoords: Vector3): Vector3;
161
161
  /**
162
- * @deprecated use [[getRelativePositionOffset]]
162
+ * @deprecated use [[getOffsetInWorldCoords]]
163
163
  */
164
164
  getOffsetPosition(offset: Vector3): Vector3;
165
165
  attachTo(entity: BaseEntity, position: Vector3, rotation: Vector3, collisions?: boolean, unk9?: boolean, useSoftPinning?: boolean, rotationOrder?: number): void;
@@ -366,7 +366,7 @@ export class BaseEntity {
366
366
  * @param offset: the amount to offset from the entity
367
367
  * @returns the offset position from the entity in world coords
368
368
  */
369
- getAbsolutePositionOffset(worldCoords) {
369
+ getOffsetInRelativeCoords(worldCoords) {
370
370
  return Vector3.fromArray(GetOffsetFromEntityGivenWorldCoords(this.handle, worldCoords.x, worldCoords.y, worldCoords.z));
371
371
  }
372
372
  // TODO: Better example
@@ -386,20 +386,20 @@ export class BaseEntity {
386
386
  * @param worldCoords: the offset given the world coords
387
387
  * @returns the offset position from the entity in relative coords
388
388
  */
389
- getRelativePositionOffset(offset) {
389
+ getOffsetInWorldCoords(offset) {
390
390
  return Vector3.fromArray(GetOffsetFromEntityInWorldCoords(this.handle, offset.x, offset.y, offset.z));
391
391
  }
392
392
  /**
393
- * @deprecated use [[getAbsolutePositionOffset]] instead
393
+ * @deprecated use [[getOffsetInRelativeCoords]] instead
394
394
  */
395
395
  getPositionOffset(worldCoords) {
396
- return this.getAbsolutePositionOffset(worldCoords);
396
+ return this.getOffsetInRelativeCoords(worldCoords);
397
397
  }
398
398
  /**
399
- * @deprecated use [[getRelativePositionOffset]]
399
+ * @deprecated use [[getOffsetInWorldCoords]]
400
400
  */
401
401
  getOffsetPosition(offset) {
402
- return this.getRelativePositionOffset(offset);
402
+ return this.getOffsetInWorldCoords(offset);
403
403
  }
404
404
  attachTo(entity, position, rotation, collisions = false, unk9 = true, useSoftPinning = true, rotationOrder = 1) {
405
405
  if (this.handle == entity.Handle) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "Remco Troost <d0p3t>",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
- "version": "0.0.33",
7
+ "version": "0.0.35",
8
8
  "publishConfig": {
9
9
  "directory": "lib"
10
10
  },