Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
remove redundant engine state
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField committed Nov 8, 2023
1 parent 75436ca commit 60c10ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/enums/BotHooks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export enum BotHooks {
IsBot = 'BotHooks_IsBot',
LocationLoaded = 'BotHooks_LocationLoaded',
LocationReady = 'BotHooks_LocationReady',
SceneLoaded = 'BotHooks_SceneLoaded',
GetPlayerPosition = 'BotHooks_GetPlayerPosition',
GetPlayerRotation = 'BotHooks_GetPlayerRotation',
Expand Down
6 changes: 3 additions & 3 deletions src/functions/botHookFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { NetworkState } from '@etherealengine/engine/src/networking/NetworkState

export const BotHookFunctions = {
[BotHooks.IsBot]:isBot,
[BotHooks.LocationLoaded]: locationLoaded,
[BotHooks.LocationReady]: worldNetworkReady,
[BotHooks.SceneLoaded]: sceneLoaded,
[BotHooks.GetPlayerPosition]: getPlayerPosition,
[BotHooks.GetPlayerRotation]: getPlayerRotation,
Expand Down Expand Up @@ -55,8 +55,8 @@ export function isBot(){
return getState(EngineState).isBot
}

export function locationLoaded() {
return getState(EngineState).connectedWorld
export function worldNetworkReady() {
return NetworkState.worldNetwork?.ready
}

export function sceneLoaded() {
Expand Down

0 comments on commit 60c10ec

Please sign in to comment.