Skip to content

Commit

Permalink
Check for spawn permissions when grabbing the object spawner
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Oct 12, 2023
1 parent 8246d3e commit eb5fb42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bit-systems/object-spawner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export enum OBJECT_SPAWNER_FLAGS {
}

function* spawnObjectJob(world: HubsWorld, spawner: EntityID) {
if (!APP.hubChannel!.can("spawn_and_move_media")) return;

const spawned = createNetworkedMedia(world, {
src: APP.getString(ObjectSpawner.src[spawner])!,
recenter: true,
Expand Down

0 comments on commit eb5fb42

Please sign in to comment.