MCPcopy Index your code
hub / github.com/Syncplay/syncplay / getPlayerPosition

Method getPlayerPosition

syncplay/client.py:483–493  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

481 self.userlist.removeUser(username)
482
483 def getPlayerPosition(self):
484 if not self._lastPlayerUpdate:
485 if self._lastGlobalUpdate:
486 return self.getGlobalPosition()
487 else:
488 return 0.0
489 position = self._playerPosition
490 if not self._playerPaused:
491 diff = time.time() - self._lastPlayerUpdate
492 position += diff
493 return position
494
495 def getStoredPlayerPosition(self):
496 return self._playerPosition if self._playerPosition is not None else None

Callers 10

updatePlayerStatusMethod · 0.95
getLocalStateMethod · 0.95
_serverSeekedMethod · 0.95
setPositionMethod · 0.95
_tryAdvancedCommandsMethod · 0.80
executeCommandMethod · 0.80
undoSeekMethod · 0.80
setOffsetMethod · 0.80

Calls 1

getGlobalPositionMethod · 0.95

Tested by

no test coverage detected