You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Renaming of servers for coherency.
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "shape_2d.h"
|
||||
#include "servers/physics_2d_server.h"
|
||||
#include "servers/physics_server_2d.h"
|
||||
RID Shape2D::get_rid() const {
|
||||
|
||||
return shape;
|
||||
@@ -38,7 +38,7 @@ RID Shape2D::get_rid() const {
|
||||
void Shape2D::set_custom_solver_bias(real_t p_bias) {
|
||||
|
||||
custom_bias = p_bias;
|
||||
Physics2DServer::get_singleton()->shape_set_custom_solver_bias(shape, custom_bias);
|
||||
PhysicsServer2D::get_singleton()->shape_set_custom_solver_bias(shape, custom_bias);
|
||||
}
|
||||
|
||||
real_t Shape2D::get_custom_solver_bias() const {
|
||||
@@ -50,13 +50,13 @@ bool Shape2D::collide_with_motion(const Transform2D &p_local_xform, const Vector
|
||||
|
||||
ERR_FAIL_COND_V(p_shape.is_null(), false);
|
||||
int r;
|
||||
return Physics2DServer::get_singleton()->shape_collide(get_rid(), p_local_xform, p_local_motion, p_shape->get_rid(), p_shape_xform, p_shape_motion, NULL, 0, r);
|
||||
return PhysicsServer2D::get_singleton()->shape_collide(get_rid(), p_local_xform, p_local_motion, p_shape->get_rid(), p_shape_xform, p_shape_motion, NULL, 0, r);
|
||||
}
|
||||
|
||||
bool Shape2D::collide(const Transform2D &p_local_xform, const Ref<Shape2D> &p_shape, const Transform2D &p_shape_xform) {
|
||||
ERR_FAIL_COND_V(p_shape.is_null(), false);
|
||||
int r;
|
||||
return Physics2DServer::get_singleton()->shape_collide(get_rid(), p_local_xform, Vector2(), p_shape->get_rid(), p_shape_xform, Vector2(), NULL, 0, r);
|
||||
return PhysicsServer2D::get_singleton()->shape_collide(get_rid(), p_local_xform, Vector2(), p_shape->get_rid(), p_shape_xform, Vector2(), NULL, 0, r);
|
||||
}
|
||||
|
||||
Array Shape2D::collide_with_motion_and_get_contacts(const Transform2D &p_local_xform, const Vector2 &p_local_motion, const Ref<Shape2D> &p_shape, const Transform2D &p_shape_xform, const Vector2 &p_shape_motion) {
|
||||
@@ -66,7 +66,7 @@ Array Shape2D::collide_with_motion_and_get_contacts(const Transform2D &p_local_x
|
||||
Vector2 result[max_contacts * 2];
|
||||
int contacts = 0;
|
||||
|
||||
if (!Physics2DServer::get_singleton()->shape_collide(get_rid(), p_local_xform, p_local_motion, p_shape->get_rid(), p_shape_xform, p_shape_motion, result, max_contacts, contacts))
|
||||
if (!PhysicsServer2D::get_singleton()->shape_collide(get_rid(), p_local_xform, p_local_motion, p_shape->get_rid(), p_shape_xform, p_shape_motion, result, max_contacts, contacts))
|
||||
return Array();
|
||||
|
||||
Array results;
|
||||
@@ -84,7 +84,7 @@ Array Shape2D::collide_and_get_contacts(const Transform2D &p_local_xform, const
|
||||
Vector2 result[max_contacts * 2];
|
||||
int contacts = 0;
|
||||
|
||||
if (!Physics2DServer::get_singleton()->shape_collide(get_rid(), p_local_xform, Vector2(), p_shape->get_rid(), p_shape_xform, Vector2(), result, max_contacts, contacts))
|
||||
if (!PhysicsServer2D::get_singleton()->shape_collide(get_rid(), p_local_xform, Vector2(), p_shape->get_rid(), p_shape_xform, Vector2(), result, max_contacts, contacts))
|
||||
return Array();
|
||||
|
||||
Array results;
|
||||
@@ -115,5 +115,5 @@ Shape2D::Shape2D(const RID &p_rid) {
|
||||
|
||||
Shape2D::~Shape2D() {
|
||||
|
||||
Physics2DServer::get_singleton()->free(shape);
|
||||
PhysicsServer2D::get_singleton()->free(shape);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user