Remove internal server cuz we have it in the networking branch.

Minor refactoring (changed all Chunk* world or Chunk world[] to World world)
This commit is contained in:
milkwx3
2026-06-24 16:00:56 +03:00
parent cf53a42620
commit 3ad54bd59d
13 changed files with 137 additions and 522 deletions
+3 -3
View File
@@ -28,7 +28,7 @@ extern bool online;
extern Vector3 player_position;
extern Vector3 player_velocity;
void TakeDamage(float amount);
void SetBlockNetwork(Chunk world[], int bx, int by, int bz, int t);
void SetBlockNetwork(World &world, int bx, int by, int bz, int t);
#else
bool online = true;
#endif
@@ -48,7 +48,7 @@ void AddEntity(Entity ent) {
entities.push_back(ent);
}
static void UpdateEntityPhysics(Chunk world[], Entity& ent, float dt) {
static void UpdateEntityPhysics(World &world, Entity& ent, float dt) {
Vector3 velocityTgt = Vector3Add(ent.velocity, {0, -dt * 20.0f, 0});
Vector3 tgt = Vector3Add(ent.position, Vector3Scale(velocityTgt, dt));
Vector3 final = ent.position;
@@ -67,7 +67,7 @@ static void UpdateEntityPhysics(Chunk world[], Entity& ent, float dt) {
ent.velocity = velocityTgt;
ent.position = final;
}
void UpdateEntities(Chunk world[], float dt) {
void UpdateEntities(World &world, float dt) {
if(entities.size() > 0) {
int idx = 0;
for(Entity& ent : entities) {