summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
Diffstat (limited to 'servers')
-rw-r--r--servers/audio/audio_mixer_sw.cpp2
-rw-r--r--servers/audio/reverb_sw.cpp116
-rw-r--r--servers/physics/area_pair_sw.cpp2
-rw-r--r--servers/physics/body_sw.cpp54
-rw-r--r--servers/physics/collision_solver_sat.cpp24
-rw-r--r--servers/physics/collision_solver_sw.cpp2
-rw-r--r--servers/physics/joints/cone_twist_joint_sw.cpp4
-rw-r--r--servers/physics/joints/generic_6dof_joint_sw.cpp29
-rw-r--r--servers/physics/joints/hinge_joint_sw.cpp8
-rw-r--r--servers/physics/joints/pin_joint_sw.cpp4
-rw-r--r--servers/physics/physics_server_sw.cpp16
-rw-r--r--servers/physics/physics_server_sw.h2
-rw-r--r--servers/physics/shape_sw.cpp10
-rw-r--r--servers/physics/shape_sw.h4
-rw-r--r--servers/physics/space_sw.cpp6
-rw-r--r--servers/physics/step_sw.cpp2
-rw-r--r--servers/physics_2d/body_2d_sw.cpp52
-rw-r--r--servers/physics_2d/broad_phase_2d_hash_grid.cpp12
-rw-r--r--servers/physics_2d/collision_solver_2d_sat.cpp16
-rw-r--r--servers/physics_2d/collision_solver_2d_sw.cpp8
-rw-r--r--servers/physics_2d/joints_2d_sw.cpp4
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp18
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h2
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp18
-rw-r--r--servers/physics_2d/space_2d_sw.cpp27
-rw-r--r--servers/physics_2d/step_2d_sw.cpp2
-rw-r--r--servers/physics_2d_server.cpp12
-rw-r--r--servers/physics_server.cpp16
-rw-r--r--servers/physics_server.h4
-rw-r--r--servers/spatial_sound/spatial_sound_server_sw.cpp2
-rw-r--r--servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp22
-rw-r--r--servers/spatial_sound_2d/spatial_sound_2d_server_sw.h2
-rw-r--r--servers/visual/rasterizer.cpp2
-rw-r--r--servers/visual/shader_language.cpp2
-rw-r--r--servers/visual/shader_language.h2
-rw-r--r--servers/visual/visual_server_canvas.cpp8
-rw-r--r--servers/visual/visual_server_raster.cpp46
-rw-r--r--servers/visual/visual_server_scene.cpp18
-rw-r--r--servers/visual/visual_server_viewport.cpp4
-rw-r--r--servers/visual_server.cpp2
-rw-r--r--servers/visual_server.h2
41 files changed, 332 insertions, 256 deletions
diff --git a/servers/audio/audio_mixer_sw.cpp b/servers/audio/audio_mixer_sw.cpp
index faed6905ea..0123b66430 100644
--- a/servers/audio/audio_mixer_sw.cpp
+++ b/servers/audio/audio_mixer_sw.cpp
@@ -271,7 +271,7 @@ void AudioMixerSW::mix_channel(Channel& c) {
bool is_stereo=sample_manager->sample_is_stereo(c.sample);
int32_t todo=mix_chunk_size;
-// int mixed=0;
+ //int mixed=0;
bool use_filter=false;
ResamplerState rstate;
diff --git a/servers/audio/reverb_sw.cpp b/servers/audio/reverb_sw.cpp
index 0050dbedeb..5e02f37679 100644
--- a/servers/audio/reverb_sw.cpp
+++ b/servers/audio/reverb_sw.cpp
@@ -100,145 +100,145 @@ struct ReverbParamsSW {
static ReverbParamsSW reverb_params_Room = {
0x26C0/2,
-// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
+ //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
0x6D80, 0x54B8, -0x4130, 0x0000, 0x0000, -0x4580,
-// gReva gRevb gInputL gInputR
+ //gReva gRevb gInputL gInputR
0x5800, 0x5300, -0x8000, -0x8000,
-// nRevaOldL nRevaOldR nRevbOldL nRevbOldR
+ //nRevaOldL nRevaOldR nRevbOldL nRevbOldR
0x01B4 - 0x007D, 0x0136 - 0x007D, 0x00B8 - 0x005B, 0x005C - 0x005B,
-// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
+ //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
0x04D6, 0x0333, 0x03F0, 0x0227, 0x0374, 0x01EF,
-// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
+ //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
0x0334, 0x01B5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
+ //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
0x0000, 0x0000, 0x01B4, 0x0136, 0x00B8, 0x005C
};
static ReverbParamsSW reverb_params_StudioSmall = {
0x1F40/2,
-// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
+ //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
0x70F0, 0x4FA8, -0x4320, 0x4410, -0x3F10, -0x6400,
-// gReva gRevb gInputL gInputR
+ //gReva gRevb gInputL gInputR
0x5280, 0x4EC0, -0x8000, -0x8000,
-// nRevaOldL nRevaOldR nRevbOldL nRevbOldR
+ //nRevaOldL nRevaOldR nRevbOldL nRevbOldR
0x00B4 - 0x0033, 0x0080 - 0x0033, 0x004C - 0x0025, 0x0026 - 0x0025,
-// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
+ //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
0x03E4, 0x031B, 0x03A4, 0x02AF, 0x0372, 0x0266,
-// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
+ //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
0x031C, 0x025D, 0x025C, 0x018E, 0x022F, 0x0135, 0x01D2, 0x00B7,
-// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
+ //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
0x018F, 0x00B5, 0x00B4, 0x0080, 0x004C, 0x0026
};
static ReverbParamsSW reverb_params_StudioMedium = {
0x4840/2,
-// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
+ //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
0x70F0, 0x4FA8, -0x4320, 0x4510, -0x4110, -0x4B40,
-// gReva gRevb gInputL gInputR
+ //gReva gRevb gInputL gInputR
0x5280, 0x4EC0, -0x8000, -0x8000,
-// nRevaOldL nRevaOldR nRevbOldL nRevbOldR
+ //nRevaOldL nRevaOldR nRevbOldL nRevbOldR
0x0264 - 0x00B1, 0x01B2 - 0x00B1, 0x0100 - 0x007F, 0x0080 - 0x007F,
-// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
+ //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
0x0904, 0x076B, 0x0824, 0x065F, 0x07A2, 0x0616,
-// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
+ //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
0x076C, 0x05ED, 0x05EC, 0x042E, 0x050F, 0x0305, 0x0462, 0x02B7,
-// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
+ //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
0x042F, 0x0265, 0x0264, 0x01B2, 0x0100, 0x0080
};
static ReverbParamsSW reverb_params_StudioLarge = {
0x6FE0/2,
-// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
+ //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
0x6F60, 0x4FA8, -0x4320, 0x4510, -0x4110, -0x5980,
-// gReva gRevb gInputL gInputR
+ //gReva gRevb gInputL gInputR
0x5680, 0x52C0, -0x8000, -0x8000,
-// nRevaOldL nRevaOldR nRevbOldL nRevbOldR
+ //nRevaOldL nRevaOldR nRevbOldL nRevbOldR
0x031C - 0x00E3, 0x0238 - 0x00E3, 0x0154 - 0x00A9, 0x00AA - 0x00A9,
-// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
+ //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
0x0DFB, 0x0B58, 0x0D09, 0x0A3C, 0x0BD9, 0x0973,
-// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
+ //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
0x0B59, 0x08DA, 0x08D9, 0x05E9, 0x07EC, 0x04B0, 0x06EF, 0x03D2,
-// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
+ //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
0x05EA, 0x031D, 0x031C, 0x0238, 0x0154, 0x00AA
};
static ReverbParamsSW reverb_params_Hall = {
0xADE0/2,
-// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
+ //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
0x6000, 0x5000, 0x4C00, -0x4800, -0x4400, -0x4000,
-// gReva gRevb gInputL gInputR
+ //gReva gRevb gInputL gInputR
0x6000, 0x5C00, -0x8000, -0x8000,
-// nRevaOldL nRevaOldR nRevbOldL nRevbOldR
+ //nRevaOldL nRevaOldR nRevbOldL nRevbOldR
0x05C0 - 0x01A5, 0x041A - 0x01A5, 0x0274 - 0x0139, 0x013A - 0x0139,
-// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
+ //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
0x15BA, 0x11BB, 0x14C2, 0x10BD, 0x11BC, 0x0DC1,
-// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
+ //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
0x11C0, 0x0DC3, 0x0DC0, 0x09C1, 0x0BC4, 0x07C1, 0x0A00, 0x06CD,
-// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
+ //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
0x09C2, 0x05C1, 0x05C0, 0x041A, 0x0274, 0x013A
};
static ReverbParamsSW reverb_params_SpaceEcho = {
0xF6C0/2,
-// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
+ //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
0x7E00, 0x5000, -0x4C00, -0x5000, 0x4C00, -0x5000,
-// gReva gRevb gInputL gInputR
+ //gReva gRevb gInputL gInputR
0x6000, 0x5400, -0x8000, -0x8000,
-// nRevaOldL nRevaOldR nRevbOldL nRevbOldR
+ //nRevaOldL nRevaOldR nRevbOldL nRevbOldR
0x0AE0 - 0x033D, 0x07A2 - 0x033D, 0x0464 - 0x0231, 0x0232 - 0x0231,
-// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
+ //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
0x1ED6, 0x1A31, 0x1D14, 0x183B, 0x1BC2, 0x16B2,
-// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
+ //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
0x1A32, 0x15EF, 0x15EE, 0x1055, 0x1334, 0x0F2D, 0x11F6, 0x0C5D,
-// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
+ //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
0x1056, 0x0AE1, 0x0AE0, 0x07A2, 0x0464, 0x0232
};
static ReverbParamsSW reverb_params_Echo = {
0x18040/2,
-// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
+ //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
0x7FFF, 0x7FFF, 0x0000, 0x0000, 0x0000, -0x7F00,
-// gReva gRevb gInputL gInputR
+ //gReva gRevb gInputL gInputR
0x0000, 0x0000, -0x8000, -0x8000,
-// nRevaOldL nRevaOldR nRevbOldL nRevbOldR
+ //nRevaOldL nRevaOldR nRevbOldL nRevbOldR
0x1004 - 0x0001, 0x1002 - 0x0001, 0x0004 - 0x0001, 0x0002 - 0x0001,
-// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
+ //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
0x1FFF, 0x0FFF, 0x1005, 0x0005, 0x0000, 0x0000,
-// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
+ //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
0x1005, 0x0005, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
+ //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
0x0000, 0x0000, 0x1004, 0x1002, 0x0004, 0x0002
};
static ReverbParamsSW reverb_params_Delay = {
0x18040/2,
-// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
+ //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
0x7FFF, 0x7FFF, 0x0000, 0x0000, 0x0000, 0x0000,
-// gReva gRevb gInputL gInputR
+ //gReva gRevb gInputL gInputR
0x0000, 0x0000, -0x8000, -0x8000,
-// nRevaOldL nRevaOldR nRevbOldL nRevbOldR
+ //nRevaOldL nRevaOldR nRevbOldL nRevbOldR
0x1004 - 0x0001, 0x1002 - 0x0001, 0x0004 - 0x0001, 0x0002 - 0x0001,
-// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
+ //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
0x1FFF, 0x0FFF, 0x1005, 0x0005, 0x0000, 0x0000,
-// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
+ //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
0x1005, 0x0005, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
+ //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
0x0000, 0x0000, 0x1004, 0x1002, 0x0004, 0x0002
};
static ReverbParamsSW reverb_params_HalfEcho = {
0x3C00/2,
-// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
+ //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall
0x70F0, 0x4FA8, -0x4320, 0x4510, -0x4110, -0x7B00,
-// gReva gRevb gInputL gInputR
+ //gReva gRevb gInputL gInputR
0x5F80, 0x54C0, -0x8000, -0x8000,
-// nRevaOldL nRevaOldR nRevbOldL nRevbOldR
+ //nRevaOldL nRevaOldR nRevbOldL nRevbOldR
0x0058 - 0x0017, 0x0040 - 0x0017, 0x0028 - 0x0013, 0x0014 - 0x0013,
-// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
+ //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R
0x0371, 0x02AF, 0x02E5, 0x01DF, 0x02B0, 0x01D7,
-// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
+ //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R
0x0358, 0x026A, 0x01D6, 0x011E, 0x012D, 0x00B1, 0x011F, 0x0059,
-// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
+ //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR
0x01A0, 0x00E3, 0x0058, 0x0040, 0x0028, 0x0014
};
@@ -265,7 +265,7 @@ bool ReverbSW::process(int *p_input,int *p_output,int p_frames,int p_stereo_stri
// p_input must point to a non-looping buffer.
// BOTH p_input and p_output must be touched (use ClearModuleBuffer).
- // �������LOCAL MACROS ������۲
+ // LOCAL MACROS
#undef LM_SETSRCOFFSET
#define LM_SETSRCOFFSET(x) \
@@ -296,14 +296,14 @@ MULSHIFT_S32 ( x, current_params->y, 15 )
#undef LM_REVERB
#define LM_REVERB(x) reverb_buffer[ (x) + cSample ]
- // �������LOCAL VARIABLES ������۲
+ // LOCAL VARIABLES
unsigned int Offset;
int lwl, lwr, rwl, rwr;
-// unsigned char HZShift;
+ //unsigned char HZShift;
- // �������CODE ������۲
+ // CODE
lwl = state.lwl;
diff --git a/servers/physics/area_pair_sw.cpp b/servers/physics/area_pair_sw.cpp
index 1131aa90d3..e95c85d751 100644
--- a/servers/physics/area_pair_sw.cpp
+++ b/servers/physics/area_pair_sw.cpp
@@ -110,7 +110,7 @@ bool Area2PairSW::setup(float p_step) {
return false;
}
-// bool result = area_a->test_collision_mask(area_b) && CollisionSolverSW::solve(area_a->get_shape(shape_a),area_a->get_transform() * area_a->get_shape_transform(shape_a),Vector2(),area_b->get_shape(shape_b),area_b->get_transform() * area_b->get_shape_transform(shape_b),Vector2(),NULL,this);
+ //bool result = area_a->test_collision_mask(area_b) && CollisionSolverSW::solve(area_a->get_shape(shape_a),area_a->get_transform() * area_a->get_shape_transform(shape_a),Vector2(),area_b->get_shape(shape_b),area_b->get_transform() * area_b->get_shape_transform(shape_b),Vector2(),NULL,this);
bool result = CollisionSolverSW::solve_static(area_a->get_shape(shape_a),area_a->get_transform() * area_a->get_shape_transform(shape_a),area_b->get_shape(shape_b),area_b->get_transform() * area_b->get_shape_transform(shape_b),NULL,this);
if (result!=colliding) {
diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp
index ceeeafe04a..81604dd5e1 100644
--- a/servers/physics/body_sw.cpp
+++ b/servers/physics/body_sw.cpp
@@ -270,8 +270,10 @@ void BodySW::set_mode(PhysicsServer::BodyMode p_mode) {
}
_update_inertia();
- //if (get_space())
-// _update_queries();
+ /*
+ if (get_space())
+ _update_queries();
+ */
}
PhysicsServer::BodyMode BodySW::get_mode() const {
@@ -319,14 +321,18 @@ void BodySW::set_state(PhysicsServer::BodyState p_state, const Variant& p_varian
} break;
case PhysicsServer::BODY_STATE_LINEAR_VELOCITY: {
- //if (mode==PhysicsServer::BODY_MODE_STATIC)
- // break;
+ /*
+ if (mode==PhysicsServer::BODY_MODE_STATIC)
+ break;
+ */
linear_velocity=p_variant;
wakeup();
} break;
case PhysicsServer::BODY_STATE_ANGULAR_VELOCITY: {
- //if (mode!=PhysicsServer::BODY_MODE_RIGID)
- // break;
+ /*
+ if (mode!=PhysicsServer::BODY_MODE_RIGID)
+ break;
+ */
angular_velocity=p_variant;
wakeup();
@@ -400,11 +406,13 @@ void BodySW::set_space(SpaceSW *p_space){
_update_inertia();
if (active)
get_space()->body_add_to_active_list(&active_list);
-// _update_queries();
- //if (is_active()) {
- // active=false;
- // set_active(true);
- //}
+ /*
+ _update_queries();
+ if (is_active()) {
+ active=false;
+ set_active(true);
+ }
+ */
}
@@ -479,13 +487,17 @@ void BodySW::integrate_forces(real_t p_step) {
// If less than 0, override dampenings with that of the Body
if (angular_damp>=0)
area_angular_damp=angular_damp;
- //else
- // area_angular_damp=damp_area->get_angular_damp();
+ /*
+ else
+ area_angular_damp=damp_area->get_angular_damp();
+ */
if (linear_damp>=0)
area_linear_damp=linear_damp;
- //else
- // area_linear_damp=damp_area->get_linear_damp();
+ /*
+ else
+ area_linear_damp=damp_area->get_linear_damp();
+ */
Vector3 motion;
@@ -630,10 +642,10 @@ void BodySW::integrate_velocities(real_t p_step) {
_update_transform_dependant();
- //if (fi_callback) {
-
- // get_space()->body_add_to_state_query_list(&direct_state_query_list);
- //
+ /*
+ if (fi_callback) {
+ get_space()->body_add_to_state_query_list(&direct_state_query_list);
+ */
}
/*
@@ -772,12 +784,12 @@ BodySW::BodySW() : CollisionObjectSW(TYPE_BODY), active_list(this), inertia_upda
active=true;
mass=1;
-// _inv_inertia=Transform();
+ //_inv_inertia=Transform();
_inv_mass=1;
bounce=0;
friction=1;
omit_force_integration=false;
-// applied_torque=0;
+ //applied_torque=0;
island_step=0;
island_next=NULL;
island_list_next=NULL;
diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp
index 7f8153611f..d02303e23d 100644
--- a/servers/physics/collision_solver_sat.cpp
+++ b/servers/physics/collision_solver_sat.cpp
@@ -42,9 +42,11 @@ struct _CollectorCallback {
_FORCE_INLINE_ void call(const Vector3& p_point_A, const Vector3& p_point_B) {
- //if (normal.dot(p_point_A) >= normal.dot(p_point_B))
- // return;
-// print_line("** A: "+p_point_A+" B: "+p_point_B+" D: "+rtos(p_point_A.distance_to(p_point_B)));
+ /*
+ if (normal.dot(p_point_A) >= normal.dot(p_point_B))
+ return;
+ print_line("** A: "+p_point_A+" B: "+p_point_B+" D: "+rtos(p_point_A.distance_to(p_point_B)));
+ */
if (swap)
callback(p_point_B,p_point_A,userdata);
@@ -108,7 +110,7 @@ static void _generate_contacts_edge_edge(const Vector3 * p_points_A,int p_point_
Vector3 c=rel_A.cross(rel_B).cross(rel_B);
-// if ( Math::abs(rel_A.dot(c) )<_EDGE_IS_VALID_SUPPORT_TRESHOLD ) {
+ //if ( Math::abs(rel_A.dot(c) )<_EDGE_IS_VALID_SUPPORT_TRESHOLD ) {
if ( Math::abs(rel_A.dot(c) )<CMP_EPSILON ) {
// should handle somehow..
@@ -205,7 +207,7 @@ static void _generate_contacts_face_face(const Vector3 * p_points_A,int p_point_
// check for different sides and non coplanar
-// if ( (dist0*dist1) < -CMP_EPSILON && !(edge && j)) {
+ //if ( (dist0*dist1) < -CMP_EPSILON && !(edge && j)) {
if ( (dist0*dist1) < 0 && !(edge && j)) {
// calculate intersection
@@ -233,8 +235,10 @@ static void _generate_contacts_face_face(const Vector3 * p_points_A,int p_point_
for (int i=0;i<clipbuf_len;i++) {
float d = plane_B.distance_to(clipbuf_src[i]);
- //if (d>CMP_EPSILON)
- // continue;
+ /*
+ if (d>CMP_EPSILON)
+ continue;
+ */
Vector3 closest_B=clipbuf_src[i] - plane_B.normal*d;
@@ -1379,7 +1383,7 @@ static void _collision_convex_polygon_convex_polygon(const ShapeSW *p_a,const Tr
for (int i=0;i<face_count_A;i++) {
Vector3 axis = p_transform_a.xform( faces_A[i].plane ).normal;
-// Vector3 axis = p_transform_a.basis.xform( faces_A[i].plane.normal ).normalized();
+ //Vector3 axis = p_transform_a.basis.xform( faces_A[i].plane.normal ).normalized();
if (!separator.test_axis( axis ))
return;
@@ -1389,7 +1393,7 @@ static void _collision_convex_polygon_convex_polygon(const ShapeSW *p_a,const Tr
for (int i=0;i<face_count_B;i++) {
Vector3 axis = p_transform_b.xform( faces_B[i].plane ).normal;
-// Vector3 axis = p_transform_b.basis.xform( faces_B[i].plane.normal ).normalized();
+ //Vector3 axis = p_transform_b.basis.xform( faces_B[i].plane.normal ).normalized();
if (!separator.test_axis( axis ))
@@ -1502,7 +1506,7 @@ static void _collision_convex_polygon_face(const ShapeSW *p_a,const Transform &p
// faces of A
for (int i=0;i<face_count;i++) {
-// Vector3 axis = p_transform_a.xform( faces[i].plane ).normal;
+ //Vector3 axis = p_transform_a.xform( faces[i].plane ).normal;
Vector3 axis = p_transform_a.basis.xform( faces[i].plane.normal ).normalized();
if (!separator.test_axis( axis ))
diff --git a/servers/physics/collision_solver_sw.cpp b/servers/physics/collision_solver_sw.cpp
index 91ef7913cf..3399849ab7 100644
--- a/servers/physics/collision_solver_sw.cpp
+++ b/servers/physics/collision_solver_sw.cpp
@@ -383,7 +383,7 @@ bool CollisionSolverSW::solve_distance(const ShapeSW *p_shape_A,const Transform&
concave_B->cull(local_aabb,concave_distance_callback,&cinfo);
if (!cinfo.collided) {
-// print_line(itos(cinfo.tested));
+ //print_line(itos(cinfo.tested));
r_point_A=cinfo.close_A;
r_point_B=cinfo.close_B;
diff --git a/servers/physics/joints/cone_twist_joint_sw.cpp b/servers/physics/joints/cone_twist_joint_sw.cpp
index 5036a1d8a3..cbf444f1e8 100644
--- a/servers/physics/joints/cone_twist_joint_sw.cpp
+++ b/servers/physics/joints/cone_twist_joint_sw.cpp
@@ -156,7 +156,7 @@ bool ConeTwistJointSW::setup(float p_step) {
if (m_swingSpan1 >= real_t(0.05f))
{
b1Axis2 = A->get_transform().basis.xform( this->m_rbAFrame.basis.get_axis(1) );
-// swing1 = btAtan2Fast( b2Axis1.dot(b1Axis2),b2Axis1.dot(b1Axis1) );
+ //swing1 = btAtan2Fast( b2Axis1.dot(b1Axis2),b2Axis1.dot(b1Axis1) );
swx = b2Axis1.dot(b1Axis1);
swy = b2Axis1.dot(b1Axis2);
swing1 = atan2fast(swy, swx);
@@ -169,7 +169,7 @@ bool ConeTwistJointSW::setup(float p_step) {
if (m_swingSpan2 >= real_t(0.05f))
{
b1Axis3 = A->get_transform().basis.xform( this->m_rbAFrame.basis.get_axis(2) );
-// swing2 = btAtan2Fast( b2Axis1.dot(b1Axis3),b2Axis1.dot(b1Axis1) );
+ //swing2 = btAtan2Fast( b2Axis1.dot(b1Axis3),b2Axis1.dot(b1Axis1) );
swx = b2Axis1.dot(b1Axis1);
swy = b2Axis1.dot(b1Axis3);
swing2 = atan2fast(swy, swx);
diff --git a/servers/physics/joints/generic_6dof_joint_sw.cpp b/servers/physics/joints/generic_6dof_joint_sw.cpp
index 5824de0127..48f70d9077 100644
--- a/servers/physics/joints/generic_6dof_joint_sw.cpp
+++ b/servers/physics/joints/generic_6dof_joint_sw.cpp
@@ -50,10 +50,9 @@ real_t btGetMatrixElem(const Basis& mat, int index)
bool matrixToEulerXYZ(const Basis& mat,Vector3& xyz);
bool matrixToEulerXYZ(const Basis& mat,Vector3& xyz)
{
-// // rot = cy*cz -cy*sz sy
-// // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx
-// // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy
-//
+ // rot = cy*cz -cy*sz sy
+ // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx
+ // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy
if (btGetMatrixElem(mat,2) < real_t(1.0))
{
@@ -325,16 +324,18 @@ void Generic6DOFJointSW::calculateAngleInfo()
m_calculatedAxis[2] = axis0.cross(m_calculatedAxis[1]);
-// if(m_debugDrawer)
-// {
-//
-// char buff[300];
-// sprintf(buff,"\n X: %.2f ; Y: %.2f ; Z: %.2f ",
-// m_calculatedAxisAngleDiff[0],
-// m_calculatedAxisAngleDiff[1],
-// m_calculatedAxisAngleDiff[2]);
-// m_debugDrawer->reportErrorWarning(buff);
-// }
+ /*
+ if(m_debugDrawer)
+ {
+
+ char buff[300];
+ sprintf(buff,"\n X: %.2f ; Y: %.2f ; Z: %.2f ",
+ m_calculatedAxisAngleDiff[0],
+ m_calculatedAxisAngleDiff[1],
+ m_calculatedAxisAngleDiff[2]);
+ m_debugDrawer->reportErrorWarning(buff);
+ }
+ */
}
diff --git a/servers/physics/joints/hinge_joint_sw.cpp b/servers/physics/joints/hinge_joint_sw.cpp
index 2f07779131..277346fbbb 100644
--- a/servers/physics/joints/hinge_joint_sw.cpp
+++ b/servers/physics/joints/hinge_joint_sw.cpp
@@ -221,7 +221,7 @@ bool HingeJointSW::setup(float p_step) {
// Compute limit information
real_t hingeAngle = get_hinge_angle();
-// print_line("angle: "+rtos(hingeAngle));
+ //print_line("angle: "+rtos(hingeAngle));
//set bias, sign, clear accumulator
m_correction = real_t(0.);
m_limitSign = real_t(0.);
@@ -235,17 +235,17 @@ bool HingeJointSW::setup(float p_step) {
print_line("hi: "+rtos(m_upperLimit));
}*/
-// if (m_lowerLimit < m_upperLimit)
+ //if (m_lowerLimit < m_upperLimit)
if (m_useLimit && m_lowerLimit <= m_upperLimit)
{
-// if (hingeAngle <= m_lowerLimit*m_limitSoftness)
+ //if (hingeAngle <= m_lowerLimit*m_limitSoftness)
if (hingeAngle <= m_lowerLimit)
{
m_correction = (m_lowerLimit - hingeAngle);
m_limitSign = 1.0f;
m_solveLimit = true;
}
-// else if (hingeAngle >= m_upperLimit*m_limitSoftness)
+ //else if (hingeAngle >= m_upperLimit*m_limitSoftness)
else if (hingeAngle >= m_upperLimit)
{
m_correction = m_upperLimit - hingeAngle;
diff --git a/servers/physics/joints/pin_joint_sw.cpp b/servers/physics/joints/pin_joint_sw.cpp
index 292d30443c..9c7fe65684 100644
--- a/servers/physics/joints/pin_joint_sw.cpp
+++ b/servers/physics/joints/pin_joint_sw.cpp
@@ -68,8 +68,8 @@ void PinJointSW::solve(float p_step){
Vector3 normal(0,0,0);
-// Vector3 angvelA = A->get_transform().origin.getBasis().transpose() * A->getAngularVelocity();
-// Vector3 angvelB = B->get_transform().origin.getBasis().transpose() * B->getAngularVelocity();
+ //Vector3 angvelA = A->get_transform().origin.getBasis().transpose() * A->getAngularVelocity();
+ //Vector3 angvelB = B->get_transform().origin.getBasis().transpose() * B->getAngularVelocity();
for (int i=0;i<3;i++)
{
diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp
index 4069ccdccb..b71eae54b0 100644
--- a/servers/physics/physics_server_sw.cpp
+++ b/servers/physics/physics_server_sw.cpp
@@ -1395,11 +1395,13 @@ void PhysicsServerSW::free(RID p_rid) {
BodySW *body = body_owner.get(p_rid);
-// if (body->get_state_query())
-// _clear_query(body->get_state_query());
+ /*
+ if (body->get_state_query())
+ _clear_query(body->get_state_query());
-// if (body->get_direct_state_query())
-// _clear_query(body->get_direct_state_query());
+ if (body->get_direct_state_query())
+ _clear_query(body->get_direct_state_query());
+ */
body->set_space(NULL);
@@ -1422,8 +1424,10 @@ void PhysicsServerSW::free(RID p_rid) {
AreaSW *area = area_owner.get(p_rid);
-// if (area->get_monitor_query())
-// _clear_query(area->get_monitor_query());
+ /*
+ if (area->get_monitor_query())
+ _clear_query(area->get_monitor_query());
+ */
area->set_space(NULL);
diff --git a/servers/physics/physics_server_sw.h b/servers/physics/physics_server_sw.h
index a3f98392fc..72b133c4b9 100644
--- a/servers/physics/physics_server_sw.h
+++ b/servers/physics/physics_server_sw.h
@@ -62,7 +62,7 @@ friend class PhysicsDirectSpaceStateSW;
mutable RID_Owner<BodySW> body_owner;
mutable RID_Owner<JointSW> joint_owner;
-// void _clear_query(QuerySW *p_query);
+ //void _clear_query(QuerySW *p_query);
public:
struct CollCbkData {
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp
index 59ade71475..9f8d1107f4 100644
--- a/servers/physics/shape_sw.cpp
+++ b/servers/physics/shape_sw.cpp
@@ -1048,8 +1048,10 @@ void ConcavePolygonShapeSW::_cull_segment(int p_idx,_SegmentCullParams *p_params
const BVH *bvh=&p_params->bvh[p_idx];
- //if (p_params->dir.dot(bvh->aabb.get_support(-p_params->dir))>p_params->min_d)
- // return; //test against whole AABB, which isn't very costly
+ /*
+ if (p_params->dir.dot(bvh->aabb.get_support(-p_params->dir))>p_params->min_d)
+ return; //test against whole AABB, which isn't very costly
+ */
//printf("addr: %p\n",bvh);
@@ -1309,7 +1311,7 @@ _VolumeSW_BVH* _volume_sw_build_bvh(_VolumeSW_BVH_Element *p_elements,int p_size
bvh->left=_volume_sw_build_bvh(p_elements,split,count);
bvh->right=_volume_sw_build_bvh(&p_elements[split],p_size-split,count);
-// printf("branch at %p - %i: %i\n",bvh,count,bvh->face_index);
+ //printf("branch at %p - %i: %i\n",bvh,count,bvh->face_index);
count++;
return bvh;
}
@@ -1322,7 +1324,7 @@ void ConcavePolygonShapeSW::_fill_bvh(_VolumeSW_BVH* p_bvh_tree,BVH* p_bvh_array
p_bvh_array[idx].aabb=p_bvh_tree->aabb;
p_bvh_array[idx].face_index=p_bvh_tree->face_index;
-// printf("%p - %i: %i(%p) -- %p:%p\n",%p_bvh_array[idx],p_idx,p_bvh_array[i]->face_index,&p_bvh_tree->face_index,p_bvh_tree->left,p_bvh_tree->right);
+ //printf("%p - %i: %i(%p) -- %p:%p\n",%p_bvh_array[idx],p_idx,p_bvh_array[i]->face_index,&p_bvh_tree->face_index,p_bvh_tree->left,p_bvh_tree->right);
if (p_bvh_tree->left) {
diff --git a/servers/physics/shape_sw.h b/servers/physics/shape_sw.h
index 3cbd1c9609..919c681105 100644
--- a/servers/physics/shape_sw.h
+++ b/servers/physics/shape_sw.h
@@ -366,8 +366,8 @@ struct HeightMapShapeSW : public ConcaveShapeSW {
int depth;
float cell_size;
-// void _cull_segment(int p_idx,_SegmentCullParams *p_params) const;
-// void _cull(int p_idx,_CullParams *p_params) const;
+ //void _cull_segment(int p_idx,_SegmentCullParams *p_params) const;
+ //void _cull(int p_idx,_CullParams *p_params) const;
void _setup(PoolVector<float> p_heights,int p_width,int p_depth,float p_cell_size);
public:
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp
index d73d5f140e..eaa3d3194c 100644
--- a/servers/physics/space_sw.cpp
+++ b/servers/physics/space_sw.cpp
@@ -204,8 +204,10 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID& p_shape, const Transform&
aabb=aabb.merge(Rect3(aabb.pos+p_motion,aabb.size)); //motion
aabb=aabb.grow(p_margin);
- //if (p_motion!=Vector3())
- // print_line(p_motion);
+ /*
+ if (p_motion!=Vector3())
+ print_line(p_motion);
+ */
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,SpaceSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
diff --git a/servers/physics/step_sw.cpp b/servers/physics/step_sw.cpp
index e24081761b..30ee33a7de 100644
--- a/servers/physics/step_sw.cpp
+++ b/servers/physics/step_sw.cpp
@@ -233,7 +233,7 @@ void StepSW::step(SpaceSW* p_space,float p_delta,int p_iterations) {
}
-// print_line("island count: "+itos(island_count)+" active count: "+itos(active_count));
+ //print_line("island count: "+itos(island_count)+" active count: "+itos(active_count));
/* SETUP CONSTRAINT ISLANDS */
{
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp
index a32e024fe9..093f69a169 100644
--- a/servers/physics_2d/body_2d_sw.cpp
+++ b/servers/physics_2d/body_2d_sw.cpp
@@ -251,8 +251,10 @@ void Body2DSW::set_mode(Physics2DServer::BodyMode p_mode) {
}
_update_inertia();
- //if (get_space())
-// _update_queries();
+ /*
+ if (get_space())
+ _update_queries();
+ */
}
Physics2DServer::BodyMode Body2DSW::get_mode() const {
@@ -301,15 +303,19 @@ void Body2DSW::set_state(Physics2DServer::BodyState p_state, const Variant& p_va
} break;
case Physics2DServer::BODY_STATE_LINEAR_VELOCITY: {
- //if (mode==Physics2DServer::BODY_MODE_STATIC)
- // break;
+ /*
+ if (mode==Physics2DServer::BODY_MODE_STATIC)
+ break;
+ */
linear_velocity=p_variant;
wakeup();
} break;
case Physics2DServer::BODY_STATE_ANGULAR_VELOCITY: {
- //if (mode!=Physics2DServer::BODY_MODE_RIGID)
- // break;
+ /*
+ if (mode!=Physics2DServer::BODY_MODE_RIGID)
+ break;
+ */
angular_velocity=p_variant;
wakeup();
@@ -385,11 +391,13 @@ void Body2DSW::set_space(Space2DSW *p_space){
_update_inertia();
if (active)
get_space()->body_add_to_active_list(&active_list);
-// _update_queries();
- //if (is_active()) {
- // active=false;
- // set_active(true);
- //}
+ /*
+ _update_queries();
+ if (is_active()) {
+ active=false;
+ set_active(true);
+ }
+ */
}
@@ -459,13 +467,17 @@ void Body2DSW::integrate_forces(real_t p_step) {
// If less than 0, override dampenings with that of the Body2D
if (angular_damp>=0)
area_angular_damp = angular_damp;
- //else
- // area_angular_damp=damp_area->get_angular_damp();
+ /*
+ else
+ area_angular_damp=damp_area->get_angular_damp();
+ */
if (linear_damp>=0)
area_linear_damp = linear_damp;
- //else
- // area_linear_damp=damp_area->get_linear_damp();
+ /*
+ else
+ area_linear_damp=damp_area->get_linear_damp();
+ */
Vector2 motion;
bool do_motion=false;
@@ -482,10 +494,12 @@ void Body2DSW::integrate_forces(real_t p_step) {
do_motion=true;
- //for(int i=0;i<get_shape_count();i++) {
- // set_shape_kinematic_advance(i,Vector2());
- // set_shape_kinematic_retreat(i,0);
- //}
+ /*
+ for(int i=0;i<get_shape_count();i++) {
+ set_shape_kinematic_advance(i,Vector2());
+ set_shape_kinematic_retreat(i,0);
+ }
+ */
} else {
if (!omit_force_integration && !first_integration) {
diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp
index efa12c37cb..d2b37319ad 100644
--- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp
+++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp
@@ -599,8 +599,10 @@ int BroadPhase2DHashGrid::cull_segment(const Vector2& p_from, const Vector2& p_t
E->key()->pass=pass;
-// if (use_aabb && !p_aabb.intersects(E->key()->aabb))
-// continue;
+ /*
+ if (use_aabb && !p_aabb.intersects(E->key()->aabb))
+ continue;
+ */
if (!E->key()->aabb.intersects_segment(p_from,p_to))
continue;
@@ -645,8 +647,10 @@ int BroadPhase2DHashGrid::cull_aabb(const Rect2& p_aabb,CollisionObject2DSW** p_
if (!p_aabb.intersects(E->key()->aabb))
continue;
-// if (!E->key()->aabb.intersects_segment(p_from,p_to))
-// continue;
+ /*
+ if (!E->key()->aabb.intersects_segment(p_from,p_to))
+ continue;
+ */
p_results[cullcount]=E->key()->owner;
p_result_indices[cullcount]=E->key()->subindex;
diff --git a/servers/physics_2d/collision_solver_2d_sat.cpp b/servers/physics_2d/collision_solver_2d_sat.cpp
index 2e7b0d8835..a09574a94c 100644
--- a/servers/physics_2d/collision_solver_2d_sat.cpp
+++ b/servers/physics_2d/collision_solver_2d_sat.cpp
@@ -40,8 +40,10 @@ struct _CollectorCallback2D {
_FORCE_INLINE_ void call(const Vector2& p_point_A, const Vector2& p_point_B) {
- //if (normal.dot(p_point_A) >= normal.dot(p_point_B))
- // return;
+ /*
+ if (normal.dot(p_point_A) >= normal.dot(p_point_B))
+ return;
+ */
if (swap)
callback(p_point_B,p_point_A,userdata);
else
@@ -462,7 +464,7 @@ public:
}
}
- // print_line("test axis: "+p_axis+" depth: "+rtos(best_depth));
+ //print_line("test axis: "+p_axis+" depth: "+rtos(best_depth));
#ifdef DEBUG_ENABLED
best_axis_count++;
#endif
@@ -610,8 +612,10 @@ static void _collision_segment_segment(const Shape2DSW* p_a,const Transform2D& p
//this collision is kind of pointless
- //if (!separator.test_previous_axis())
- // return;
+ /*
+ if (!separator.test_previous_axis())
+ return;
+ */
if (!separator.test_cast())
return;
@@ -850,7 +854,7 @@ static void _collision_circle_rectangle(const Shape2DSW* p_a,const Transform2D&
const Vector2 &sphere=p_transform_a.elements[2];
const Vector2 *axis=&p_transform_b.elements[0];
-// const Vector2& half_extents = rectangle_B->get_half_extents();
+ //const Vector2& half_extents = rectangle_B->get_half_extents();
if (!separator.test_axis(axis[0].normalized()))
return;
diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp
index e509bb76cd..02d59b69f0 100644
--- a/servers/physics_2d/collision_solver_2d_sw.cpp
+++ b/servers/physics_2d/collision_solver_2d_sw.cpp
@@ -226,7 +226,7 @@ bool CollisionSolver2DSW::solve_concave(const Shape2DSW *p_shape_A,const Transfo
concave_B->cull(local_aabb,concave_callback,&cinfo);
-// print_line("Rect2 TESTS: "+itos(cinfo.aabb_tests));
+ //print_line("Rect2 TESTS: "+itos(cinfo.aabb_tests));
return cinfo.collided;
}
@@ -255,9 +255,11 @@ bool CollisionSolver2DSW::solve(const Shape2DSW *p_shape_A,const Transform2D& p_
if (type_B==Physics2DServer::SHAPE_LINE || type_B==Physics2DServer::SHAPE_RAY) {
return false;
- //if (type_B==Physics2DServer::SHAPE_RAY) {
- // return false;
}
+ /*
+ if (type_B==Physics2DServer::SHAPE_RAY) {
+ return false;
+ */
if (swap) {
return solve_static_line(p_shape_B,p_transform_B,p_shape_A,p_transform_A,p_result_callback,p_userdata,true);
diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp
index 7205e90d27..f0703a0894 100644
--- a/servers/physics_2d/joints_2d_sw.cpp
+++ b/servers/physics_2d/joints_2d_sw.cpp
@@ -407,8 +407,8 @@ bool GrooveJoint2DSW::setup(float p_step) {
jn_max = get_max_force() * p_step;
// calculate bias velocity
-// cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1));
-// joint->bias = cpvclamp(cpvmult(delta, -joint->constraint.biasCoef*dt_inv), joint->constraint.maxBias);
+ //cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1));
+ //joint->bias = cpvclamp(cpvmult(delta, -joint->constraint.biasCoef*dt_inv), joint->constraint.maxBias);
Vector2 delta = (B->get_transform().get_origin() +rB) - (A->get_transform().get_origin() + rA);
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index 3cc69f470e..d134ce7ea8 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -1176,11 +1176,13 @@ void Physics2DServerSW::free(RID p_rid) {
Body2DSW *body = body_owner.get(p_rid);
-// if (body->get_state_query())
-// _clear_query(body->get_state_query());
+ /*
+ if (body->get_state_query())
+ _clear_query(body->get_state_query());
-// if (body->get_direct_state_query())
-// _clear_query(body->get_direct_state_query());
+ if (body->get_direct_state_query())
+ _clear_query(body->get_direct_state_query());
+ */
body->set_space(NULL);
@@ -1203,8 +1205,10 @@ void Physics2DServerSW::free(RID p_rid) {
Area2DSW *area = area_owner.get(p_rid);
-// if (area->get_monitor_query())
-// _clear_query(area->get_monitor_query());
+ /*
+ if (area->get_monitor_query())
+ _clear_query(area->get_monitor_query());
+ */
area->set_space(NULL);
@@ -1380,7 +1384,7 @@ Physics2DServerSW::Physics2DServerSW() {
singletonsw=this;
BroadPhase2DSW::create_func=BroadPhase2DHashGrid::_create;
-// BroadPhase2DSW::create_func=BroadPhase2DBasic::_create;
+ //BroadPhase2DSW::create_func=BroadPhase2DBasic::_create;
active=true;
island_count=0;
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index ba45dd9272..1da7d65dc8 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -70,7 +70,7 @@ friend class Physics2DDirectBodyStateSW;
static Physics2DServerSW *singletonsw;
-// void _clear_query(Query2DSW *p_query);
+ //void _clear_query(Query2DSW *p_query);
public:
struct CollCbkData {
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 8b19122f17..886ae7730b 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -639,8 +639,10 @@ bool ConvexPolygonShape2DSW::intersect_segment(const Vector2& p_begin,const Vect
for(int i=0;i<point_count;i++) {
//hmm crap.. no can do..
- //if (d.dot(points[i].normal)>=0)
- // continue;
+ /*
+ if (d.dot(points[i].normal)>=0)
+ continue;
+ */
Vector2 res;
@@ -816,8 +818,10 @@ bool ConcavePolygonShape2DSW::intersect_segment(const Vector2& p_begin,const Vec
real_t d=1e10;
bool inters=false;
- //for(int i=0;i<bvh_depth;i++)
- // stack[i]=0;
+ /*
+ for(int i=0;i<bvh_depth;i++)
+ stack[i]=0;
+ */
int level=0;
@@ -1077,8 +1081,10 @@ void ConcavePolygonShape2DSW::cull(const Rect2& p_local_aabb,Callback p_callback
};
- //for(int i=0;i<bvh_depth;i++)
- // stack[i]=0;
+ /*
+ for(int i=0;i<bvh_depth;i++)
+ stack[i]=0;
+ */
int level=0;
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 2c7b099b36..e95707f135 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -248,8 +248,10 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Transfor
aabb=aabb.merge(Rect2(aabb.pos+p_motion,aabb.size)); //motion
aabb=aabb.grow(p_margin);
- //if (p_motion!=Vector2())
- // print_line(p_motion);
+ /*
+ if (p_motion!=Vector2())
+ print_line(p_motion);
+ */
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,Space2DSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
@@ -661,8 +663,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
Vector2 cdir = body->get_one_way_collision_direction();
- //if (cdir!=Vector2() && p_motion.dot(cdir)<0)
- // continue;
+ /*
+ if (cdir!=Vector2() && p_motion.dot(cdir)<0)
+ continue;
+ */
cbk.valid_dir=cdir;
cbk.valid_depth=body->get_one_way_collision_max_depth();
@@ -698,11 +702,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
float traveled = n.dot(recover_motion);
a+=n*traveled;
+ float d = a.distance_to(b);
+ if (d<margin)
+ continue;
#endif
- // float d = a.distance_to(b);
-
- //if (d<margin)
- /// continue;
recover_motion+=(b-a)*0.4;
}
@@ -972,7 +975,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
if (collide_character)
mask|=Physics2DDirectSpaceState::TYPE_MASK_CHARACTER_BODY;
-// print_line("motion: "+p_motion+" margin: "+rtos(margin));
+ //print_line("motion: "+p_motion+" margin: "+rtos(margin));
//print_line("margin: "+rtos(margin));
do {
@@ -999,8 +1002,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
float d = a.distance_to(b);
- //if (d<margin)
- /// continue;
+ /*
+ if (d<margin)
+ continue;
+ */
recover_motion+=(b-a)*0.4;
}
diff --git a/servers/physics_2d/step_2d_sw.cpp b/servers/physics_2d/step_2d_sw.cpp
index 05c0bf0516..8be4e2b5d5 100644
--- a/servers/physics_2d/step_2d_sw.cpp
+++ b/servers/physics_2d/step_2d_sw.cpp
@@ -216,7 +216,7 @@ void Step2DSW::step(Space2DSW* p_space,float p_delta,int p_iterations) {
p_space->area_remove_from_moved_list((SelfList<Area2DSW>*)aml.first()); //faster to remove here
}
-// print_line("island count: "+itos(island_count)+" active count: "+itos(active_count));
+ //print_line("island count: "+itos(island_count)+" active count: "+itos(active_count));
{ //profile
profile_endtime=OS::get_singleton()->get_ticks_usec();
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index c175c04ee9..bd5a58e57b 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -602,7 +602,7 @@ void Physics2DServer::_bind_methods() {
ClassDB::bind_method(_MD("body_add_collision_exception","body","excepted_body"),&Physics2DServer::body_add_collision_exception);
ClassDB::bind_method(_MD("body_remove_collision_exception","body","excepted_body"),&Physics2DServer::body_remove_collision_exception);
-// virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0;
+ //virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0;
ClassDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&Physics2DServer::body_set_max_contacts_reported);
ClassDB::bind_method(_MD("body_get_max_contacts_reported","body"),&Physics2DServer::body_get_max_contacts_reported);
@@ -641,9 +641,9 @@ void Physics2DServer::_bind_methods() {
ClassDB::bind_method(_MD("get_process_info","process_info"),&Physics2DServer::get_process_info);
-// ClassDB::bind_method(_MD("init"),&Physics2DServer::init);
-// ClassDB::bind_method(_MD("step"),&Physics2DServer::step);
-// ClassDB::bind_method(_MD("sync"),&Physics2DServer::sync);
+ //ClassDB::bind_method(_MD("init"),&Physics2DServer::init);
+ //ClassDB::bind_method(_MD("step"),&Physics2DServer::step);
+ //ClassDB::bind_method(_MD("sync"),&Physics2DServer::sync);
//ClassDB::bind_method(_MD("flush_queries"),&Physics2DServer::flush_queries);
BIND_CONSTANT( SPACE_PARAM_CONTACT_RECYCLE_RADIUS );
@@ -710,8 +710,8 @@ void Physics2DServer::_bind_methods() {
BIND_CONSTANT( CCD_MODE_CAST_RAY );
BIND_CONSTANT( CCD_MODE_CAST_SHAPE );
-// BIND_CONSTANT( TYPE_BODY );
-// BIND_CONSTANT( TYPE_AREA );
+ //BIND_CONSTANT( TYPE_BODY );
+ //BIND_CONSTANT( TYPE_AREA );
BIND_CONSTANT( AREA_BODY_ADDED );
BIND_CONSTANT( AREA_BODY_REMOVED );
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index 8f57fcfbdb..93553efb27 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -363,8 +363,8 @@ PhysicsDirectSpaceState::PhysicsDirectSpaceState() {
void PhysicsDirectSpaceState::_bind_methods() {
-// ClassDB::bind_method(_MD("intersect_ray","from","to","exclude","umask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0));
-// ClassDB::bind_method(_MD("intersect_shape:PhysicsShapeQueryResult","shape","xform","result_max","exclude","umask"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0));
+ //ClassDB::bind_method(_MD("intersect_ray","from","to","exclude","umask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0));
+ //ClassDB::bind_method(_MD("intersect_shape:PhysicsShapeQueryResult","shape","xform","result_max","exclude","umask"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0));
ClassDB::bind_method(_MD("intersect_ray:Dictionary","from","to","exclude","layer_mask","type_mask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0x7FFFFFFF),DEFVAL(TYPE_MASK_COLLISION));
ClassDB::bind_method(_MD("intersect_shape","shape:PhysicsShapeQueryParameters","max_results"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(32));
@@ -529,7 +529,7 @@ void PhysicsServer::_bind_methods() {
ClassDB::bind_method(_MD("body_add_collision_exception","body","excepted_body"),&PhysicsServer::body_add_collision_exception);
ClassDB::bind_method(_MD("body_remove_collision_exception","body","excepted_body"),&PhysicsServer::body_remove_collision_exception);
-// virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0;
+ //virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0;
ClassDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&PhysicsServer::body_set_max_contacts_reported);
ClassDB::bind_method(_MD("body_get_max_contacts_reported","body"),&PhysicsServer::body_get_max_contacts_reported);
@@ -678,9 +678,9 @@ void PhysicsServer::_bind_methods() {
ClassDB::bind_method(_MD("set_active","active"),&PhysicsServer::set_active);
-// ClassDB::bind_method(_MD("init"),&PhysicsServer::init);
-// ClassDB::bind_method(_MD("step"),&PhysicsServer::step);
-// ClassDB::bind_method(_MD("sync"),&PhysicsServer::sync);
+ //ClassDB::bind_method(_MD("init"),&PhysicsServer::init);
+ //ClassDB::bind_method(_MD("step"),&PhysicsServer::step);
+ //ClassDB::bind_method(_MD("sync"),&PhysicsServer::sync);
//ClassDB::bind_method(_MD("flush_queries"),&PhysicsServer::flush_queries);
@@ -739,8 +739,8 @@ void PhysicsServer::_bind_methods() {
BIND_CONSTANT( DAMPED_STRING_STIFFNESS );
BIND_CONSTANT( DAMPED_STRING_DAMPING );
*/
-// BIND_CONSTANT( TYPE_BODY );
-// BIND_CONSTANT( TYPE_AREA );
+ //BIND_CONSTANT( TYPE_BODY );
+ //BIND_CONSTANT( TYPE_AREA );
BIND_CONSTANT( AREA_BODY_ADDED );
BIND_CONSTANT( AREA_BODY_REMOVED );
diff --git a/servers/physics_server.h b/servers/physics_server.h
index d57ca93d92..653959be45 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -135,8 +135,8 @@ class PhysicsDirectSpaceState : public Object {
GDCLASS( PhysicsDirectSpaceState, Object );
-// Variant _intersect_ray(const Vector3& p_from, const Vector3& p_to,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
-// Variant _intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max=64,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
+ //Variant _intersect_ray(const Vector3& p_from, const Vector3& p_to,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
+ //Variant _intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max=64,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
public:
enum ObjectTypeMask {
diff --git a/servers/spatial_sound/spatial_sound_server_sw.cpp b/servers/spatial_sound/spatial_sound_server_sw.cpp
index ccde73561f..d550134d82 100644
--- a/servers/spatial_sound/spatial_sound_server_sw.cpp
+++ b/servers/spatial_sound/spatial_sound_server_sw.cpp
@@ -66,7 +66,7 @@ void SpatialSoundServerSW::_update_sources() {
SpatialSoundServerSW::Room::Room() {
-// params[ROOM_PARAM_SPEED_OF_SOUND]=343.0;
+ //params[ROOM_PARAM_SPEED_OF_SOUND]=343.0;
params[ROOM_PARAM_SPEED_OF_SOUND_SCALE]=1;
params[ROOM_PARAM_DOPPLER_FACTOR]=1.0;
params[ROOM_PARAM_PITCH_SCALE]=1.0;
diff --git a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp
index 33e51eb262..2bcc9644f1 100644
--- a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp
+++ b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp
@@ -67,7 +67,7 @@ void SpatialSound2DServerSW::_update_sources() {
SpatialSound2DServerSW::Room::Room() {
-// params[ROOM_PARAM_SPEED_OF_SOUND]=343.0;
+ //params[ROOM_PARAM_SPEED_OF_SOUND]=343.0;
params[ROOM_PARAM_PITCH_SCALE]=1.0;
params[ROOM_PARAM_VOLUME_SCALE_DB]=0;
params[ROOM_PARAM_REVERB_SEND]=0;
@@ -79,7 +79,7 @@ SpatialSound2DServerSW::Room::Room() {
params[ROOM_PARAM_ATTENUATION_REVERB_SCALE]=0.0;
override_other_sources=false;
reverb=ROOM_REVERB_HALL;
-// octree_id=0;
+ //octree_id=0;
level=-1;
@@ -149,7 +149,7 @@ void SpatialSound2DServerSW::room_set_space(RID p_room,RID p_space) {
Space *space = space_owner.get(room->space);
space->rooms.erase(p_room);
-// space->octree.erase(room->octree_id);
+ //space->octree.erase(room->octree_id);
//room->octree_id=0;
}
@@ -160,10 +160,10 @@ void SpatialSound2DServerSW::room_set_space(RID p_room,RID p_space) {
Space *space = space_owner.get(p_space);
ERR_FAIL_COND(!space);
space->rooms.insert(p_room);
-// room->octree_id=space->octree.create(room,AABB());
+ //room->octree_id=space->octree.create(room,AABB());
//set bounds
-// AABB aabb = room->bounds.is_empty()?AABB():room->bounds.get_aabb();
- // space->octree.move(room->octree_id,room->transform.xform(aabb));
+ //AABB aabb = room->bounds.is_empty()?AABB():room->bounds.get_aabb();
+ //space->octree.move(room->octree_id,room->transform.xform(aabb));
room->space=p_space;
}
@@ -191,11 +191,11 @@ void SpatialSound2DServerSW::room_set_bounds(RID p_room, const PoolVector<Point2
if (!room->space.is_valid())
return;
-// AABB aabb = room->bounds.is_empty()?AABB():room->bounds.get_aabb();
-// Space* space = space_owner.get(room->space);
-// ERR_FAIL_COND(!space);
+ //AABB aabb = room->bounds.is_empty()?AABB():room->bounds.get_aabb();
+ //Space* space = space_owner.get(room->space);
+ //ERR_FAIL_COND(!space);
-// space->octree.move(room->octree_id,room->transform.xform(aabb));
+ //space->octree.move(room->octree_id,room->transform.xform(aabb));
}
PoolVector<Point2> SpatialSound2DServerSW::room_get_bounds(RID p_room) const {
@@ -603,7 +603,7 @@ void SpatialSound2DServerSW::free(RID p_id) {
if (room->space.is_valid()) {
Space *space = space_owner.get(room->space);
ERR_FAIL_COND(!space);
-// space->octree.erase(room->octree_id);
+ //space->octree.erase(room->octree_id);
space->rooms.erase(p_id);
}
room_owner.free(p_id);
diff --git a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h
index 16d2c93e7d..7999a8c22b 100644
--- a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h
+++ b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h
@@ -179,7 +179,7 @@ class SpatialSound2DServerSW : public SpatialSound2DServer {
ActiveVoice(Source *p_source=NULL,int p_voice=0) { source=p_source; voice=p_voice; }
};
-// Room *cull_rooms[MAX_CULL_ROOMS];
+ //Room *cull_rooms[MAX_CULL_ROOMS];
Set<Source*> streaming_sources;
Set<ActiveVoice> active_voices;
diff --git a/servers/visual/rasterizer.cpp b/servers/visual/rasterizer.cpp
index 1adf2ee021..ba85f92e37 100644
--- a/servers/visual/rasterizer.cpp
+++ b/servers/visual/rasterizer.cpp
@@ -256,7 +256,7 @@ RID Rasterizer::_create_shader(const FixedSpatialMaterialShaderKey& p_key) {
vcode+="uniform float "+_fixed_material_point_size_name+";\n";
vcode+="POINT_SIZE="+_fixed_material_point_size_name+";\n";
-// vcode+="POINT_SIZE=10.0;\n";
+ //vcode+="POINT_SIZE=10.0;\n";
}
String lcode;
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index ea634e8f06..6a6f437816 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -2920,7 +2920,7 @@ ShaderLanguage::Node* ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha
ERR_FAIL_COND_V(op->arguments[0]->type!=Node::TYPE_VARIABLE,p_node);
VariableNode *vn = static_cast<VariableNode*>(op->arguments[0]);
- // StringName name=vn->name;
+ //StringName name=vn->name;
DataType base=get_scalar_type(op->get_datatype());
diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h
index b5f843c114..4f8717088e 100644
--- a/servers/visual/shader_language.h
+++ b/servers/visual/shader_language.h
@@ -579,7 +579,7 @@ private:
public:
-// static void get_keyword_list(ShaderType p_type,List<String> *p_keywords);
+ //static void get_keyword_list(ShaderType p_type,List<String> *p_keywords);
void clear();
Error compile(const String& p_code,const Map< StringName, Map<StringName,DataType> > &p_functions,const Set<String>& p_render_modes);
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp
index d68c580442..2f7bcccf73 100644
--- a/servers/visual/visual_server_canvas.cpp
+++ b/servers/visual/visual_server_canvas.cpp
@@ -1188,9 +1188,11 @@ bool VisualServerCanvas::free(RID p_rid) {
canvas_item->child_items[i]->parent=RID();
}
-// if (canvas_item->material) {
-// canvas_item->material->owners.erase(canvas_item);
-// }
+ /*
+ if (canvas_item->material) {
+ canvas_item->material->owners.erase(canvas_item);
+ }
+ */
canvas_item_owner.free( p_rid );
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 3262479c43..e3bc0fb6c6 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -85,8 +85,10 @@ void VisualServerRaster::free( RID p_rid ){
void VisualServerRaster::draw(){
- //if (changes)
- // print_line("changes: "+itos(changes));
+ /*
+ if (changes)
+ print_line("changes: "+itos(changes));
+ */
changes=0;
@@ -181,7 +183,7 @@ BalloonAllocator<> *VisualServerRaster::OctreeAllocator::allocator=NULL;
#define VS_CHANGED\
changes++;\
-// print_line(__FUNCTION__);
+ //print_line(__FUNCTION__);
@@ -2928,7 +2930,7 @@ void VisualServerRaster::instance_geometry_set_flag(RID p_instance,InstanceFlags
Instance *instance = instance_owner.get( p_instance );
ERR_FAIL_COND( !instance );
-// ERR_FAIL_COND( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK) );
+ //ERR_FAIL_COND( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK) );
switch(p_flags) {
@@ -2980,7 +2982,7 @@ bool VisualServerRaster::instance_geometry_get_flag(RID p_instance,InstanceFlags
const Instance *instance = instance_owner.get( p_instance );
ERR_FAIL_COND_V( !instance, false );
-// ERR_FAIL_COND_V( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK), false );
+ //ERR_FAIL_COND_V( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK), false );
switch(p_flags) {
@@ -3335,8 +3337,10 @@ void VisualServerRaster::_update_instance(Instance *p_instance) {
} else {
- // if (new_aabb==p_instance->data.transformed_aabb)
- // return;
+ /*
+ if (new_aabb==p_instance->data.transformed_aabb)
+ return;
+ */
p_instance->scenario->octree.move(p_instance->octree_id,new_aabb);
}
@@ -4656,7 +4660,7 @@ void VisualServerRaster::_free_attached_instances(RID p_rid,bool p_free_scenario
void VisualServerRaster::custom_shade_model_set_shader(int p_model, RID p_shader) {
VS_CHANGED;
-// rasterizer->custom_shade_model_set_shader(p_model,p_shader);
+ //rasterizer->custom_shade_model_set_shader(p_model,p_shader);
}
RID VisualServerRaster::custom_shade_model_get_shader(int p_model) const {
@@ -4746,8 +4750,10 @@ void VisualServerRaster::free( RID p_rid ) {
BakedLightSampler *baked_light_sampler = baked_light_sampler_owner.get(p_rid);
ERR_FAIL_COND(!baked_light_sampler);
- //if (baked_light->data.octree_texture.is_valid())
- // rasterizer->free(baked_light->data.octree_texture);
+ /*
+ if (baked_light->data.octree_texture.is_valid())
+ rasterizer->free(baked_light->data.octree_texture);
+ */
baked_light_sampler_owner.free(p_rid);
memdelete(baked_light_sampler);
@@ -4766,7 +4772,7 @@ void VisualServerRaster::free( RID p_rid ) {
Viewport *viewport = viewport_owner.get( p_rid );
ERR_FAIL_COND(!viewport);
-// Viewport *parent=NULL;
+ //Viewport *parent=NULL;
rasterizer->free(viewport->viewport_data);
if (viewport->render_target.is_valid()) {
@@ -5105,7 +5111,7 @@ void VisualServerRaster::_light_instance_update_pssm_shadow(Instance *p_light,Sc
float distances[5];
float texsize=rasterizer->light_instance_get_shadow_size( p_light->light_info->instance );
-// float cull_min=p_cull_range.min;
+ //float cull_min=p_cull_range.min;
//float cull_max=p_cull_range.max;
@@ -6657,7 +6663,7 @@ void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, S
/* print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0));
print_line("OTO: "+itos(p_scenario->octree.get_octant_count()));
-// print_line("OTE: "+itos(p_scenario->octree.get_elem_count()));
+ //print_line("OTE: "+itos(p_scenario->octree.get_elem_count()));
print_line("OTP: "+itos(p_scenario->octree.get_pair_count()));
*/
@@ -6761,7 +6767,7 @@ void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, S
if (light_cull_count<MAX_LIGHTS_CULLED) {
light_cull_result[light_cull_count++]=ins;
-// rasterizer->light_instance_set_active_hint(ins->light_info->instance);
+ //rasterizer->light_instance_set_active_hint(ins->light_info->instance);
{
//compute distance to camera using aabb support
Vector3 n = ins->data.transform.basis.xform_inv(cull_range.nearp.normal).normalized();
@@ -7284,7 +7290,7 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_
ViewportRect desired_rect=p_viewport->rect;
ViewportRect old_rect = viewport_rect;
-// bool vpchanged=false;
+ //bool vpchanged=false;
// convert default expanding viewports to actual size
//if (desired_rect.x==0 && desired_rect.y==0 && desired_rect.width==0 && desired_rect.height==0) {
if (p_parent_w != 0 && p_parent_h != 0) {
@@ -7476,7 +7482,7 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_
for (Map<Viewport::CanvasKey,Viewport::CanvasData*>::Element *E=canvas_map.front();E;E=E->next()) {
- // print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size()));
+ //print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size()));
//print_line("GT "+p_viewport->global_transform+". CT: "+E->get()->transform);
Matrix32 xform = p_viewport->global_transform * E->get()->transform;
@@ -7508,7 +7514,7 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_
}
-// rasterizer->canvas_debug_viewport_shadows(lights_with_shadow);
+ //rasterizer->canvas_debug_viewport_shadows(lights_with_shadow);
}
//capture
@@ -7721,8 +7727,10 @@ void VisualServerRaster::sync() {
}
void VisualServerRaster::draw() {
- //if (changes)
- // print_line("changes: "+itos(changes));
+ /*
+ if (changes)
+ print_line("changes: "+itos(changes));
+ */
changes=0;
shadows_enabled=GLOBAL_DEF("render/shadows_enabled",true);
room_cull_enabled = GLOBAL_DEF("render/room_cull_enabled",true);
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index 030796a22d..157a85be98 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -78,7 +78,7 @@ void VisualServerScene::camera_set_use_vertical_aspect(RID p_camera,bool p_enabl
void* VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance *p_A,int, OctreeElementID, Instance *p_B,int) {
-// VisualServerScene *self = (VisualServerScene*)p_self;
+ //VisualServerScene *self = (VisualServerScene*)p_self;
Instance *A = p_A;
Instance *B = p_B;
@@ -204,7 +204,7 @@ void* VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance
}
void VisualServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance *p_A,int, OctreeElementID, Instance *p_B,int,void* udata) {
-// VisualServerScene *self = (VisualServerScene*)p_self;
+ //VisualServerScene *self = (VisualServerScene*)p_self;
Instance *A = p_A;
Instance *B = p_B;
@@ -1239,8 +1239,10 @@ void VisualServerScene::_update_instance(Instance *p_instance) {
} else {
- // if (new_aabb==p_instance->data.transformed_aabb)
- // return;
+ /*
+ if (new_aabb==p_instance->data.transformed_aabb)
+ return;
+ */
p_instance->scenario->octree.move(p_instance->octree_id,new_aabb);
}
@@ -1773,7 +1775,7 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform,const Came
VSG::scene_render->set_scene_pass(render_pass);
-// rasterizer->set_camera(camera->transform, camera_matrix,ortho);
+ //rasterizer->set_camera(camera->transform, camera_matrix,ortho);
Vector<Plane> planes = p_cam_projection.get_projection_planes(p_cam_transform);
@@ -1786,11 +1788,11 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform,const Came
reflection_probe_cull_count=0;
-// light_samplers_culled=0;
+ //light_samplers_culled=0;
/* print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0));
print_line("OTO: "+itos(p_scenario->octree.get_octant_count()));
-// print_line("OTE: "+itos(p_scenario->octree.get_elem_count()));
+ //print_line("OTE: "+itos(p_scenario->octree.get_elem_count()));
print_line("OTP: "+itos(p_scenario->octree.get_pair_count()));
*/
@@ -3375,7 +3377,7 @@ void VisualServerScene::render_probes() {
probe->dynamic.updating_stage=GI_UPDATE_STAGE_CHECK;
-// print_line("UPLOAD TIME: "+rtos((OS::get_singleton()->get_ticks_usec()-us)/1000000.0));
+ //print_line("UPLOAD TIME: "+rtos((OS::get_singleton()->get_ticks_usec()-us)/1000000.0));
} break;
}
diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp
index 780335a7f4..d2ee32f9cc 100644
--- a/servers/visual/visual_server_viewport.cpp
+++ b/servers/visual/visual_server_viewport.cpp
@@ -176,7 +176,7 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport) {
light=light->shadows_next_ptr;
}
- // VSG::canvas_render->reset_canvas();
+ //VSG::canvas_render->reset_canvas();
}
VSG::rasterizer->restore_render_target();
@@ -196,7 +196,7 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport) {
VisualServerCanvas::Canvas *canvas = static_cast<VisualServerCanvas::Canvas*>(E->get()->canvas);
- // print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size()));
+ //print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size()));
//print_line("GT "+p_viewport->global_transform+". CT: "+E->get()->transform);
Transform2D xform = p_viewport->global_transform * E->get()->transform;
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 71f9c88f2a..da73980e08 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1675,7 +1675,7 @@ RID VisualServer::instance_create2(RID p_base, RID p_scenario) {
VisualServer::VisualServer() {
-// ERR_FAIL_COND(singleton);
+ //ERR_FAIL_COND(singleton);
singleton=this;
}
diff --git a/servers/visual_server.h b/servers/visual_server.h
index cb4d87ce8a..f75223e378 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -706,7 +706,7 @@ public:
virtual RID instance_create2(RID p_base, RID p_scenario);
-// virtual RID instance_create(RID p_base,RID p_scenario)=0; // from can be mesh, light, area and portal so far.
+ //virtual RID instance_create(RID p_base,RID p_scenario)=0; // from can be mesh, light, area and portal so far.
virtual RID instance_create()=0; // from can be mesh, light, poly, area and portal so far.
virtual void instance_set_base(RID p_instance, RID p_base)=0; // from can be mesh, light, poly, area and portal so far.