Return position 0 instead of None
This commit is contained in:
parent
ccfb065ad7
commit
204317762d
@ -124,7 +124,7 @@ class Manager(object):
|
|||||||
|
|
||||||
def get_player_position(self):
|
def get_player_position(self):
|
||||||
if not self.last_player_update:
|
if not self.last_player_update:
|
||||||
return None
|
return 0.0
|
||||||
position = self.player_position
|
position = self.player_position
|
||||||
if not self.player_paused:
|
if not self.player_paused:
|
||||||
position += time.time() - self.last_player_update
|
position += time.time() - self.last_player_update
|
||||||
@ -132,7 +132,7 @@ class Manager(object):
|
|||||||
|
|
||||||
def get_global_position(self):
|
def get_global_position(self):
|
||||||
if not self.last_global_update:
|
if not self.last_global_update:
|
||||||
return None
|
return 0.0
|
||||||
position = self.global_position
|
position = self.global_position
|
||||||
if not self.global_paused:
|
if not self.global_paused:
|
||||||
position += time.time() - self.last_global_update
|
position += time.time() - self.last_global_update
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user