about summary refs log tree commit diff
path: root/src/game/game_protocol.h
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-09-09 18:21:14 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-09-09 18:21:14 +0000
commit3f4587ede831760b2f6976960658d202c9d847ff (patch)
tree6c3a22251906673e5e7491dcd86faec23887691b /src/game/game_protocol.h
parent350e968f514a00d4a89395ed13e415103390b9d9 (diff)
downloadzcatch-3f4587ede831760b2f6976960658d202c9d847ff.tar.gz
zcatch-3f4587ede831760b2f6976960658d202c9d847ff.zip
a lot of changes. client side prediction added
Diffstat (limited to 'src/game/game_protocol.h')
-rw-r--r--src/game/game_protocol.h37
1 files changed, 30 insertions, 7 deletions
diff --git a/src/game/game_protocol.h b/src/game/game_protocol.h
index cd28b2d5..3ef491ef 100644
--- a/src/game/game_protocol.h
+++ b/src/game/game_protocol.h
@@ -1,5 +1,22 @@
 // NOTE: Be very careful when editing this file as it will change the network version
 
+// --------- PHYSICS TWEAK! --------
+const float ground_control_speed = 7.0f;
+const float ground_control_accel = 2.0f;
+const float ground_friction = 0.5f;
+const float ground_jump_speed = 13.5f;
+const float air_control_speed = 3.5f;
+const float air_control_accel = 1.2f;
+const float air_friction = 0.95f;
+const float hook_length = 34*10.0f;
+const float hook_fire_speed = 45.0f;
+const float hook_drag_accel = 3.0f;
+const float hook_drag_speed = 15.0f;
+const float gravity = 0.5f;
+const float wall_friction = 0.80f;
+const float wall_jump_speed_up = ground_jump_speed*0.8f;
+const float wall_jump_speed_out = ground_jump_speed*0.8f;
+
 // Network stuff
 enum
 {
@@ -129,7 +146,19 @@ struct obj_flag
 	int team;
 };
 
-struct obj_player
+
+struct obj_player_core
+{
+	int x, y;
+	int vx, vy;
+	int angle;
+
+	int hook_state;
+	int hook_x, hook_y;
+	int hook_dx, hook_dy;
+};
+
+struct obj_player : public obj_player_core
 {
 	int local;
 	int clientid;
@@ -139,10 +168,6 @@ struct obj_player
 	int armor;
 	int ammocount;
 	
-	int x, y;
-	int vx, vy;
-	int angle;
-	
 	int weapon; // current active weapon
 
 	int attacktick; // num attack ticks left of current attack
@@ -152,7 +177,5 @@ struct obj_player
 	int latency_flux;
 	int emote;
 	
-	int hook_active;
-	int hook_x, hook_y;
 	int team;
 };