Skip to content

Commit

Permalink
Merge pull request #6323 from mozilla/bitecs-object-spawner-permissio…
Browse files Browse the repository at this point in the history
…ns-check

Check for spawn permissions when grabbing the object spawner
  • Loading branch information
keianhzo authored Oct 13, 2023
2 parents 98371c9 + eb5fb42 commit 3e065cc
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 3e065cc

Please sign in to comment.