Skip to content

Commit

Permalink
fix: object initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuyk committed Jul 11, 2024
1 parent d15f6f7 commit 5af4a31
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## Version 43

### Code Changes

- Fixed local object initialization

### Docs Changes

- N/A

---

## Version 42

### Code Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "stuyk",
"type": "module",
"version": "42",
"version": "43",
"scripts": {
"dev": "nodemon -x pnpm start",
"dev:linux": "nodemon -x pnpm start:linux",
Expand Down
8 changes: 8 additions & 0 deletions src/main/server/controllers/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ export function useObjectLocal(player: alt.Player, objectData: iObject) {
objectData.uid = Utility.uid.generate();
}

if (!objectData.dimension) {
objectData.dimension = 0;
}

if (!objectData.rot) {
objectData.rot = alt.Vector3.zero;
}

function destroy() {
player.emit(Events.controllers.textlabel.destroy, objectData.uid);
}
Expand Down

0 comments on commit 5af4a31

Please sign in to comment.