pep8 compliance: E702 multiple statements on one line (semicolon)
This commit is contained in:
parent
c800106039
commit
41aa14b5fc
@ -230,7 +230,7 @@ class CameraViewport(GLViewport):
|
|||||||
|
|
||||||
self.brake = False
|
self.brake = False
|
||||||
self.lastTick = datetime.now()
|
self.lastTick = datetime.now()
|
||||||
# self.nearheight = near * tang;
|
# self.nearheight = near * tang
|
||||||
|
|
||||||
self.cameraPosition = (16., 45., 16.)
|
self.cameraPosition = (16., 45., 16.)
|
||||||
self.velocity = [0., 0., 0.]
|
self.velocity = [0., 0., 0.]
|
||||||
@ -349,7 +349,7 @@ class CameraViewport(GLViewport):
|
|||||||
|
|
||||||
# give the camera an impulse according to the state of the inputs and in the direction of the camera
|
# give the camera an impulse according to the state of the inputs and in the direction of the camera
|
||||||
cameraAccel = map(lambda x:x * accel_factor * timeDelta, directedInputs)
|
cameraAccel = map(lambda x:x * accel_factor * timeDelta, directedInputs)
|
||||||
# cameraImpulse = map(lambda x:x*impulse_factor, directedInputs);
|
# cameraImpulse = map(lambda x:x*impulse_factor, directedInputs)
|
||||||
|
|
||||||
newVelocity = map(lambda a, b:a + b, velocity, cameraAccel)
|
newVelocity = map(lambda a, b:a + b, velocity, cameraAccel)
|
||||||
velocityDir, speed = normalize_size(newVelocity)
|
velocityDir, speed = normalize_size(newVelocity)
|
||||||
@ -370,7 +370,7 @@ class CameraViewport(GLViewport):
|
|||||||
speed = max(-max_speed, min(max_speed, speed))
|
speed = max(-max_speed, min(max_speed, speed))
|
||||||
|
|
||||||
if abs(speed) < drag_epsilon:
|
if abs(speed) < drag_epsilon:
|
||||||
speed = 0;
|
speed = 0
|
||||||
|
|
||||||
velocity = map(lambda a:a * speed, velocityDir)
|
velocity = map(lambda a:a * speed, velocityDir)
|
||||||
|
|
||||||
@ -467,8 +467,8 @@ class CameraViewport(GLViewport):
|
|||||||
pixel = glReadPixels(x, y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT)
|
pixel = glReadPixels(x, y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT)
|
||||||
newpoint = unproject(x, y, pixel[0])
|
newpoint = unproject(x, y, pixel[0])
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
# print e;
|
# print e
|
||||||
# traceback.print_exc();
|
# traceback.print_exc()
|
||||||
return 0, 0, 0
|
return 0, 0, 0
|
||||||
|
|
||||||
return newpoint
|
return newpoint
|
||||||
@ -946,7 +946,7 @@ class CameraViewport(GLViewport):
|
|||||||
|
|
||||||
td = datetime.now() - self.rightMouseDragStart
|
td = datetime.now() - self.rightMouseDragStart
|
||||||
# except AttributeError:
|
# except AttributeError:
|
||||||
# return;
|
# return
|
||||||
# print "RightClickUp: ", td
|
# print "RightClickUp: ", td
|
||||||
if td.seconds > 0 or td.microseconds > 280000:
|
if td.seconds > 0 or td.microseconds > 280000:
|
||||||
self.mouseLookOff()
|
self.mouseLookOff()
|
||||||
@ -1036,13 +1036,13 @@ class CameraViewport(GLViewport):
|
|||||||
self.editor.renderer.loadNearbyChunks()
|
self.editor.renderer.loadNearbyChunks()
|
||||||
self.lastRendererUpdate = datetime.now()
|
self.lastRendererUpdate = datetime.now()
|
||||||
|
|
||||||
# adjustLimit = 2;
|
# adjustLimit = 2
|
||||||
|
|
||||||
# self.oldMousePosition = (x, y)
|
# self.oldMousePosition = (x, y)
|
||||||
# if (self.startingMousePosition[0] - x > adjustLimit or self.startingMousePosition[1] - y > adjustLimit or
|
# if (self.startingMousePosition[0] - x > adjustLimit or self.startingMousePosition[1] - y > adjustLimit or
|
||||||
# self.startingMousePosition[0] - x < -adjustLimit or self.startingMousePosition[1] - y < -adjustLimit):
|
# self.startingMousePosition[0] - x < -adjustLimit or self.startingMousePosition[1] - y < -adjustLimit):
|
||||||
# mouse.set_pos(*self.startingMousePosition)
|
# mouse.set_pos(*self.startingMousePosition)
|
||||||
# event.get(MOUSEMOTION);
|
# event.get(MOUSEMOTION)
|
||||||
# self.oldMousePosition = (self.startingMousePosition)
|
# self.oldMousePosition = (self.startingMousePosition)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -1244,7 +1244,7 @@ class CameraViewport(GLViewport):
|
|||||||
else:
|
else:
|
||||||
self.viewingFrustum = None
|
self.viewingFrustum = None
|
||||||
|
|
||||||
# self.editor.drawStars();
|
# self.editor.drawStars()
|
||||||
if self.drawSky:
|
if self.drawSky:
|
||||||
self.drawSkyBackground()
|
self.drawSkyBackground()
|
||||||
if self.drawFog:
|
if self.drawFog:
|
||||||
@ -1916,7 +1916,7 @@ class LevelEditor(GLViewport):
|
|||||||
if self.level and self.unsavedEdits > 0:
|
if self.level and self.unsavedEdits > 0:
|
||||||
resp = ask("Save unsaved edits before loading?", ["Cancel", "Don't Save", "Save"], default=2, cancel=0)
|
resp = ask("Save unsaved edits before loading?", ["Cancel", "Don't Save", "Save"], default=2, cancel=0)
|
||||||
if resp == "Cancel":
|
if resp == "Cancel":
|
||||||
return;
|
return
|
||||||
if resp == "Save":
|
if resp == "Save":
|
||||||
self.saveFile()
|
self.saveFile()
|
||||||
|
|
||||||
@ -1936,9 +1936,9 @@ class LevelEditor(GLViewport):
|
|||||||
|
|
||||||
y, p = level.getPlayerOrientation()
|
y, p = level.getPlayerOrientation()
|
||||||
if p == -90.0:
|
if p == -90.0:
|
||||||
p += 0.000000001;
|
p += 0.000000001
|
||||||
if p == 90.0:
|
if p == 90.0:
|
||||||
p -= 0.000000001;
|
p -= 0.000000001
|
||||||
self.mainViewport.yaw, self.mainViewport.pitch = y, p
|
self.mainViewport.yaw, self.mainViewport.pitch = y, p
|
||||||
|
|
||||||
pdim = level.getPlayerDimension()
|
pdim = level.getPlayerDimension()
|
||||||
|
Reference in New Issue
Block a user