@nativewrappers/fivem 0.0.41 → 0.0.42

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/Model.d.ts CHANGED
@@ -126,7 +126,7 @@ export declare class Model {
126
126
  * This function will not automatically set the model as no longer needed when
127
127
  * done.
128
128
  *
129
- * @param timeout Maximum allowed time for model to load.
129
+ * @param timeoutMs Maximum allowed time for model to load.
130
130
  */
131
131
  request(timeoutMs?: number): Promise<boolean>;
132
132
  /**
package/client/Model.js CHANGED
@@ -173,7 +173,7 @@ export class Model {
173
173
  * This function will not automatically set the model as no longer needed when
174
174
  * done.
175
175
  *
176
- * @param timeout Maximum allowed time for model to load.
176
+ * @param timeoutMs Maximum allowed time for model to load.
177
177
  */
178
178
  async request(timeoutMs = 1000) {
179
179
  if (!this.IsInCdImage && !this.IsValid && !IsWeaponValid(this.hash)) {
@@ -185,7 +185,7 @@ export class Model {
185
185
  }
186
186
  RequestModel(this.hash);
187
187
  const timeout = GetGameTimer() + timeoutMs;
188
- while (!this.IsLoaded && timeout < GetGameTimer()) {
188
+ while (!this.IsLoaded && GetGameTimer() < timeout) {
189
189
  await Wait(0);
190
190
  }
191
191
  return this.IsLoaded;
@@ -266,7 +266,7 @@ export declare class Vector {
266
266
  /**
267
267
  * @see Vector.addY
268
268
  */
269
- addY(x: number): InferVector<this>;
269
+ addY(y: number): InferVector<this>;
270
270
  /**
271
271
  * @see Vector.subtract
272
272
  */
@@ -59,9 +59,9 @@ export class Vector {
59
59
  const isNumber = typeof b === 'number';
60
60
  x = operator(x, isNumber ? b : (b.x ?? 0));
61
61
  y = operator(y, isNumber ? b : (b.y ?? 0));
62
- if (z)
62
+ if (z !== undefined)
63
63
  z = operator(z, isNumber ? b : (b.z ?? 0));
64
- if (w)
64
+ if (w !== undefined)
65
65
  w = operator(w, isNumber ? b : (b.w ?? 0));
66
66
  return this.create(x, y, z, w);
67
67
  }
@@ -157,9 +157,9 @@ export class Vector {
157
157
  const isNumber = typeof b === 'number';
158
158
  x = operator(Math.abs(x), isNumber ? b : Math.abs(b.x ?? 0));
159
159
  y = operator(Math.abs(y), isNumber ? b : Math.abs(b.y ?? 0));
160
- if (z)
160
+ if (z !== undefined)
161
161
  z = operator(Math.abs(z), isNumber ? b : Math.abs(b.z ?? 0));
162
- if (w)
162
+ if (w !== undefined)
163
163
  w = operator(Math.abs(w), isNumber ? b : Math.abs(b.w ?? 0));
164
164
  return this.create(x, y, z, w);
165
165
  }
@@ -367,8 +367,8 @@ export class Vector {
367
367
  /**
368
368
  * @see Vector.addY
369
369
  */
370
- addY(x) {
371
- return Vector.addY(this, x);
370
+ addY(y) {
371
+ return Vector.addY(this, y);
372
372
  }
373
373
  /**
374
374
  * @see Vector.subtract
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.41",
7
+ "version": "0.0.42",
8
8
  "publishConfig": {
9
9
  "directory": "lib"
10
10
  },