summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorehriche <eehrich@googlemail.com>2015-05-06 00:56:59 +0200
committerehriche <eehrich@googlemail.com>2015-05-06 01:22:31 +0200
commit897a1aade5332753d9fda950d80495798cdc85b4 (patch)
tree53f4cab913ef39a1563704751df07d43ebfef42f /servers
parentfe13c728fd44a1271f218685fc73ed4ba8d3ce7a (diff)
optional formal changes
Diffstat (limited to 'servers')
-rw-r--r--servers/physics/collision_object_sw.h4
-rw-r--r--servers/visual/rasterizer.h10
-rw-r--r--servers/visual/visual_server_raster.cpp2
3 files changed, 9 insertions, 7 deletions
diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h
index 70fc3e8fcb..c018ab6224 100644
--- a/servers/physics/collision_object_sw.h
+++ b/servers/physics/collision_object_sw.h
@@ -34,8 +34,10 @@
#include "self_list.h"
#include "broad_phase_sw.h"
-#define MAX_OBJECT_DISTANCE 10000000
+#ifdef DEBUG_ENABLED
+#define MAX_OBJECT_DISTANCE 10000000.0
#define MAX_OBJECT_DISTANCE_X2 (MAX_OBJECT_DISTANCE*MAX_OBJECT_DISTANCE)
+#endif
class SpaceSW;
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 81862fb3a6..79365f7db6 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -863,17 +863,17 @@ public:
if (polygon->indices != NULL) {
r.pos=polygon->points[polygon->indices[0]];
- for (int i=1; i<polygon->count; i++) {
+ for (int i=1; i<l; i++) {
r.expand_to(polygon->points[polygon->indices[i]]);
- };
+ }
} else {
r.pos=polygon->points[0];
- for (int i=1; i<polygon->count; i++) {
+ for (int i=1; i<l; i++) {
r.expand_to(polygon->points[i]);
- };
- };
+ }
+ }
} break;
case CanvasItem::Command::TYPE_CIRCLE: {
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 6556f8bc42..a547da9b61 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -7281,7 +7281,7 @@ void VisualServerRaster::_draw_viewports() {
if (r.size.width==0)
r.size.width=window_w;
if (r.size.height==0)
- r.size.height=window_w;
+ r.size.height=window_h;
_draw_viewport(vp,r.pos.x,r.pos.y,r.size.width,r.size.height);