Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unneeded localPlayer updateds #2646

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/totum
12 changes: 7 additions & 5 deletions players-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ class PlayersManager {
this.unbindStateFn = this.playersArray.unobserve.bind(this.playersArray, playersObserveFn);
}
}
update(timestamp, timeDiff) {
for (const remotePlayer of this.remotePlayers.values()) {
remotePlayer.updateAvatar(timestamp, timeDiff);
}
}

// updates now handled by vrm template, will likely remove
// update(timestamp, timeDiff) {
// for (const remotePlayer of this.remotePlayers.values()) {
// remotePlayer.updateAvatar(timestamp, timeDiff);
// }
// }
}
const playersManager = new PlayersManager();

Expand Down
13 changes: 1 addition & 12 deletions webaverse.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ import Avatar from './avatars/avatars.js';
import * as sounds from './sounds.js';
import physx from './physx.js';
import ioManager from './io-manager.js';
import physicsManager from './physics-manager.js';
import {world} from './world.js';
import * as blockchain from './blockchain.js';
import cameraManager from './camera-manager.js';
import game from './game.js';
import hpManager from './hp-manager.js';
import {playersManager} from './players-manager.js';
import minimapManager from './minimap.js';
import postProcessing from './post-processing.js';
import loadoutManager from './loadout-manager.js';
Expand Down Expand Up @@ -302,19 +300,10 @@ export default class Webaverse extends EventTarget {
const _pre = () => {
ioManager.update(timeDiffCapped);
// this.injectRigInput();

const localPlayer = metaversefileApi.useLocalPlayer();
if (this.contentLoaded && physicsManager.getPhysicsEnabled()) {
physicsManager.simulatePhysics(timeDiffCapped);
localPlayer.updatePhysics(timestamp, timeDiffCapped);
}

transformControls.update();
game.update(timestamp, timeDiffCapped);

localPlayer.updateAvatar(timestamp, timeDiffCapped);
playersManager.update(timestamp, timeDiffCapped);
Copy link
Contributor

@avaer avaer Mar 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is removed and not added in the Totum PR. Where did this go?



world.appManager.tick(timestamp, timeDiffCapped, frame);

hpManager.update(timestamp, timeDiffCapped);
Expand Down