@@ -29,7 +29,7 @@ void Box2DBody2D::_apply_mass_properties(bool force_update) {
29
29
30
30
b2Vec2 com = { center_of_mass.x , center_of_mass.y };
31
31
32
- b2World * space_handle = get_space ()->get_handle ();
32
+ b2WorldId space_handle = get_space ()->get_handle ();
33
33
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
34
34
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
35
35
@@ -140,7 +140,7 @@ void Box2DBody2D::set_active(bool p_active) {
140
140
void Box2DBody2D::set_can_sleep (bool p_can_sleep) {
141
141
ERR_FAIL_COND (!get_space ());
142
142
143
- b2World * space_handle = get_space ()->get_handle ();
143
+ b2WorldId space_handle = get_space ()->get_handle ();
144
144
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
145
145
146
146
box2d::body_set_can_sleep (space_handle, body_handle, p_can_sleep);
@@ -204,7 +204,7 @@ void Box2DBody2D::set_param(PhysicsServer2D::BodyParameter p_param, const Varian
204
204
return ;
205
205
}
206
206
207
- b2World * space_handle = get_space ()->get_handle ();
207
+ b2WorldId space_handle = get_space ()->get_handle ();
208
208
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
209
209
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
210
210
box2d::Material mat;
@@ -469,7 +469,7 @@ void Box2DBody2D::set_continuous_collision_detection_mode(PhysicsServer2D::CCDMo
469
469
ccd_mode = p_mode;
470
470
471
471
if (get_space ()) {
472
- b2World * space_handle = get_space ()->get_handle ();
472
+ b2WorldId space_handle = get_space ()->get_handle ();
473
473
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
474
474
475
475
box2d::body_set_ccd_enabled (space_handle, body_handle, ccd_mode != PhysicsServer2D::CCD_MODE_DISABLED);
@@ -483,7 +483,7 @@ void Box2DBody2D::_init_material(box2d::Material &mat) const {
483
483
484
484
void Box2DBody2D::_init_collider (box2d::FixtureHandle collider_handle) const {
485
485
ERR_FAIL_COND (!get_space ());
486
- b2World * space_handle = get_space ()->get_handle ();
486
+ b2WorldId space_handle = get_space ()->get_handle ();
487
487
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
488
488
489
489
// Send contact infos for dynamic bodies
@@ -574,7 +574,7 @@ void Box2DBody2D::set_space(Box2DSpace2D *p_space) {
574
574
apply_torque (torque_force);
575
575
torque_force = 0.0 ;
576
576
}
577
- b2World * space_handle = get_space ()->get_handle ();
577
+ b2WorldId space_handle = get_space ()->get_handle ();
578
578
box2d::Material mat;
579
579
mat.friction = friction;
580
580
mat.restitution = bounce;
@@ -651,7 +651,7 @@ void Box2DBody2D::apply_central_impulse(const Vector2 &p_impulse) {
651
651
update_mass_properties (true );
652
652
}
653
653
654
- b2World * space_handle = get_space ()->get_handle ();
654
+ b2WorldId space_handle = get_space ()->get_handle ();
655
655
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
656
656
657
657
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -671,7 +671,7 @@ void Box2DBody2D::apply_impulse(const Vector2 &p_impulse, const Vector2 &p_posit
671
671
update_mass_properties (true );
672
672
}
673
673
674
- b2World * space_handle = get_space ()->get_handle ();
674
+ b2WorldId space_handle = get_space ()->get_handle ();
675
675
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
676
676
677
677
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -692,7 +692,7 @@ void Box2DBody2D::apply_torque_impulse(real_t p_torque) {
692
692
update_mass_properties (true );
693
693
}
694
694
695
- b2World * space_handle = get_space ()->get_handle ();
695
+ b2WorldId space_handle = get_space ()->get_handle ();
696
696
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
697
697
698
698
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -710,7 +710,7 @@ void Box2DBody2D::apply_central_force(const Vector2 &p_force) {
710
710
update_mass_properties (true );
711
711
}
712
712
713
- b2World * space_handle = get_space ()->get_handle ();
713
+ b2WorldId space_handle = get_space ()->get_handle ();
714
714
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
715
715
// Note: using last delta assuming constant physics time
716
716
real_t last_delta = get_space ()->get_last_step ();
@@ -732,7 +732,7 @@ void Box2DBody2D::apply_force(const Vector2 &p_force, const Vector2 &p_position)
732
732
update_mass_properties (true );
733
733
}
734
734
735
- b2World * space_handle = get_space ()->get_handle ();
735
+ b2WorldId space_handle = get_space ()->get_handle ();
736
736
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
737
737
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
738
738
// Note: using last delta assuming constant physics time
@@ -754,7 +754,7 @@ void Box2DBody2D::apply_torque(real_t p_torque) {
754
754
update_mass_properties (true );
755
755
}
756
756
757
- b2World * space_handle = get_space ()->get_handle ();
757
+ b2WorldId space_handle = get_space ()->get_handle ();
758
758
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
759
759
760
760
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -774,7 +774,7 @@ void Box2DBody2D::add_constant_central_force(const Vector2 &p_force) {
774
774
update_mass_properties (true );
775
775
}
776
776
777
- b2World * space_handle = get_space ()->get_handle ();
777
+ b2WorldId space_handle = get_space ()->get_handle ();
778
778
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
779
779
780
780
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -794,7 +794,7 @@ void Box2DBody2D::add_constant_force(const Vector2 &p_force, const Vector2 &p_po
794
794
update_mass_properties (true );
795
795
}
796
796
797
- b2World * space_handle = get_space ()->get_handle ();
797
+ b2WorldId space_handle = get_space ()->get_handle ();
798
798
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
799
799
800
800
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -815,7 +815,7 @@ void Box2DBody2D::add_constant_torque(real_t p_torque) {
815
815
update_mass_properties (true );
816
816
}
817
817
818
- b2World * space_handle = get_space ()->get_handle ();
818
+ b2WorldId space_handle = get_space ()->get_handle ();
819
819
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
820
820
821
821
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -833,7 +833,7 @@ void Box2DBody2D::set_constant_force(const Vector2 &p_force) {
833
833
update_mass_properties (true );
834
834
}
835
835
836
- b2World * space_handle = get_space ()->get_handle ();
836
+ b2WorldId space_handle = get_space ()->get_handle ();
837
837
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
838
838
839
839
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -847,7 +847,7 @@ Vector2 Box2DBody2D::get_constant_force() const {
847
847
return constant_force;
848
848
}
849
849
850
- b2World * space_handle = get_space ()->get_handle ();
850
+ b2WorldId space_handle = get_space ()->get_handle ();
851
851
ERR_FAIL_COND_V (!box2d::is_handle_valid (space_handle), Vector2 ());
852
852
853
853
ERR_FAIL_COND_V (!box2d::is_handle_valid (body_handle), Vector2 ());
@@ -868,7 +868,7 @@ void Box2DBody2D::set_constant_torque(real_t p_torque) {
868
868
update_mass_properties (true );
869
869
}
870
870
871
- b2World * space_handle = get_space ()->get_handle ();
871
+ b2WorldId space_handle = get_space ()->get_handle ();
872
872
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
873
873
874
874
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -881,7 +881,7 @@ real_t Box2DBody2D::get_constant_torque() const {
881
881
return constant_torque;
882
882
}
883
883
884
- b2World * space_handle = get_space ()->get_handle ();
884
+ b2WorldId space_handle = get_space ()->get_handle ();
885
885
ERR_FAIL_COND_V (!box2d::is_handle_valid (space_handle), 0.0 );
886
886
887
887
ERR_FAIL_COND_V (!box2d::is_handle_valid (body_handle), 0.0 );
@@ -899,7 +899,7 @@ void Box2DBody2D::wakeup() {
899
899
return ;
900
900
}
901
901
902
- b2World * space_handle = get_space ()->get_handle ();
902
+ b2WorldId space_handle = get_space ()->get_handle ();
903
903
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
904
904
905
905
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -912,7 +912,7 @@ void Box2DBody2D::force_sleep() {
912
912
return ;
913
913
}
914
914
915
- b2World * space_handle = get_space ()->get_handle ();
915
+ b2WorldId space_handle = get_space ()->get_handle ();
916
916
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
917
917
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
918
918
box2d::body_force_sleep (space_handle, body_handle);
@@ -963,7 +963,7 @@ void Box2DBody2D::set_linear_velocity(const Vector2 &p_linear_velocity) {
963
963
return ;
964
964
}
965
965
966
- b2World * space_handle = get_space ()->get_handle ();
966
+ b2WorldId space_handle = get_space ()->get_handle ();
967
967
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
968
968
969
969
// TODO: apply delta
@@ -977,7 +977,7 @@ Vector2 Box2DBody2D::get_linear_velocity() const {
977
977
return linear_velocity;
978
978
}
979
979
980
- b2World * space_handle = get_space ()->get_handle ();
980
+ b2WorldId space_handle = get_space ()->get_handle ();
981
981
ERR_FAIL_COND_V (!box2d::is_handle_valid (space_handle), Vector2 ());
982
982
983
983
ERR_FAIL_COND_V (!box2d::is_handle_valid (body_handle), Vector2 ());
@@ -999,7 +999,7 @@ void Box2DBody2D::set_angular_velocity(real_t p_angular_velocity) {
999
999
return ;
1000
1000
}
1001
1001
1002
- b2World * space_handle = get_space ()->get_handle ();
1002
+ b2WorldId space_handle = get_space ()->get_handle ();
1003
1003
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
1004
1004
1005
1005
// TODO: apply delta
@@ -1012,7 +1012,7 @@ real_t Box2DBody2D::get_angular_velocity() const {
1012
1012
return angular_velocity;
1013
1013
}
1014
1014
1015
- b2World * space_handle = get_space ()->get_handle ();
1015
+ b2WorldId space_handle = get_space ()->get_handle ();
1016
1016
ERR_FAIL_COND_V (!box2d::is_handle_valid (space_handle), 0 .0f );
1017
1017
1018
1018
ERR_FAIL_COND_V (!box2d::is_handle_valid (body_handle), 0 .0f );
@@ -1034,7 +1034,7 @@ void Box2DBody2D::_apply_linear_damping(real_t new_value, bool apply_default) {
1034
1034
total_linear_damping += (real_t )get_space ()->get_default_area_param (PhysicsServer2D::AREA_PARAM_LINEAR_DAMP);
1035
1035
}
1036
1036
1037
- b2World * space_handle = get_space ()->get_handle ();
1037
+ b2WorldId space_handle = get_space ()->get_handle ();
1038
1038
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
1039
1039
1040
1040
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -1052,7 +1052,7 @@ void Box2DBody2D::_apply_angular_damping(real_t new_value, bool apply_default) {
1052
1052
total_angular_damping += (real_t )get_space ()->get_default_area_param (PhysicsServer2D::AREA_PARAM_ANGULAR_DAMP);
1053
1053
}
1054
1054
1055
- b2World * space_handle = get_space ()->get_handle ();
1055
+ b2WorldId space_handle = get_space ()->get_handle ();
1056
1056
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
1057
1057
1058
1058
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -1064,7 +1064,7 @@ void Box2DBody2D::_apply_gravity_scale(real_t new_value) {
1064
1064
return ;
1065
1065
}
1066
1066
1067
- b2World * space_handle = get_space ()->get_handle ();
1067
+ b2WorldId space_handle = get_space ()->get_handle ();
1068
1068
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
1069
1069
1070
1070
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
@@ -1206,7 +1206,7 @@ void Box2DBody2D::update_gravity(real_t p_step) {
1206
1206
1207
1207
Vector2 gravity_impulse = total_gravity * mass * p_step;
1208
1208
1209
- b2World * space_handle = get_space ()->get_handle ();
1209
+ b2WorldId space_handle = get_space ()->get_handle ();
1210
1210
ERR_FAIL_COND (!box2d::is_handle_valid (space_handle));
1211
1211
1212
1212
ERR_FAIL_COND (!box2d::is_handle_valid (body_handle));
0 commit comments