diff --git a/game/client b/game/client index b57a50b..fbb164f 100755 Binary files a/game/client and b/game/client differ diff --git a/game/client.c b/game/client.c index 671b11e..c775424 100644 --- a/game/client.c +++ b/game/client.c @@ -181,7 +181,7 @@ float get_terrain_height(float x, float z) { return height * 6.0f + 2.0f; } -#define TERRAIN_SIZE 128 +#define TERRAIN_SIZE 256 #define TERRAIN_SCALE 1.0f static Mesh generate_terrain_mesh(void) { @@ -715,7 +715,7 @@ int main(void) { float recoilYaw = 0.0f, recoilPitch = 0.0f, crossSpread = 0.0f; float fireCooldown = 0.0f; int shotsInBurst = 0; - float burstResetTimer = 0.0f; + float burstResetTimer = 0.0f; const float pistolFireRate = 4.0f, rifleFireRate = 12.0f; const float recoilReturn = 18.0f, crossReturn = 14.0f; @@ -805,9 +805,9 @@ int main(void) { if (myId != 255 && rp[myId].present) { Vector3 body = rp[myId].pos; - camPos.x = body.x; - camPos.y = body.y + 1.0f; - camPos.z = body.z + 0.0001f; + camPos.x = body.x; + camPos.y = body.y + 1.0f; + camPos.z = body.z + 0.0001f; // Prevent camera from clipping into terrain float terrain_h = get_terrain_height(camPos.x, camPos.z); @@ -854,6 +854,8 @@ int main(void) { if (IsKeyDown(KEY_S)) moveZ -= 1.0f; + + uint8_t buttons = 0; if (IsKeyPressed(KEY_ONE)) buttons |= BTN_SWITCH_PISTOL; diff --git a/game/server b/game/server index f9cddc2..e113afb 100755 Binary files a/game/server and b/game/server differ diff --git a/game/server.c b/game/server.c index f042c43..0c2ddfd 100644 --- a/game/server.c +++ b/game/server.c @@ -28,7 +28,7 @@ typedef int socklen_t; #define MAX_PLAYERS 16 #define USERNAME_MAX 16 -#define TICK_HZ 60 +#define TICK_HZ 30 #define DT (1.0f / (float)TICK_HZ) #define WEAPON_PISTOL 0 @@ -147,7 +147,7 @@ float get_terrain_height(float x, float z) { return height * 5.0f + 2.0f; } -#define TERRAIN_SIZE 128 +#define TERRAIN_SIZE 256 #define TERRAIN_SCALE 1.0f static dReal *gHeightData = NULL; static dGeomID gTerrainGeom = NULL; @@ -816,7 +816,7 @@ int main(void) { dz /= len; } - float speed = 6.0f; + float speed = 10.0f; float fx = sinf(p->yaw) * dz - cosf(p->yaw) * dx; float fz = cosf(p->yaw) * dz + sinf(p->yaw) * dx; dBodySetLinearVel(p->body, fx * speed, lvel[1], fz * speed);