about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/client/gc_client.cpp7
-rw-r--r--src/game/g_protocol.def7
-rw-r--r--src/game/server/gs_server.cpp20
3 files changed, 12 insertions, 22 deletions
diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp
index 168f6913..4ef64f87 100644
--- a/src/game/client/gc_client.cpp
+++ b/src/game/client/gc_client.cpp
@@ -1056,9 +1056,6 @@ void render_game()
 		gfx_mapscreen(0,0,300*gfx_screenaspect(),300);
 		
 		// if weaponstage is active, put a "glow" around the stage ammo
-		select_sprite(SPRITE_TEE_BODY);
-		for (int i = 0; i < netobjects.local_character->weaponstage; i++)
-			gfx_quads_drawTL(x+netobjects.local_character->ammocount * 12 -i*12, y+22, 11, 11);
 		select_sprite(data->weapons[netobjects.local_character->weapon%data->num_weapons].sprite_proj);
 		for (int i = 0; i < min(netobjects.local_character->ammocount, 10); i++)
 			gfx_quads_drawTL(x+i*12,y+24,10,10);
@@ -1300,7 +1297,7 @@ void render_game()
 				
 				if(gametype == GAMETYPE_CTF)
 				{
-					gfx_text(0, whole-20-w/2+5, 300-40-15+t*20+2, 14, buf, -1);
+					gfx_text(0, whole-20-w/2+5, 300-40-15+t*20, 14, buf, -1);
 					if(netobjects.flags[t])
 					{
  						if(netobjects.flags[t]->carried_by == -2 || (netobjects.flags[t]->carried_by == -1 && ((client_tick()/10)&1)))
@@ -1398,7 +1395,7 @@ void render_game()
 		float ramp = velocity_ramp(velspeed, tuning.velramp_start, tuning.velramp_range, tuning.velramp_curvature);
 		
 		char buf[512];
-		str_format(buf, sizeof(buf), "%.0f\n%.0f\n%.2f\n%d", velspeed, velspeed*ramp, ramp, netobj_num_corrections());
+		str_format(buf, sizeof(buf), "%.0f\n%.0f\n%.2f\n%d %s", velspeed, velspeed*ramp, ramp, netobj_num_corrections(), netobj_corrected_on());
 		gfx_text(0, 150, 50, 12, buf, -1);
 	}
 
diff --git a/src/game/g_protocol.def b/src/game/g_protocol.def
index 4a7b79bc..d731b37e 100644
--- a/src/game/g_protocol.def
+++ b/src/game/g_protocol.def
@@ -64,7 +64,7 @@ end
 object projectile
 	any x, y
 	any vx, vy
-	range(0, NUM_WEAPONS) type
+	range(0, NUM_WEAPONS-1) type
 	range(0, max_int) start_tick
 end
 
@@ -85,7 +85,7 @@ end
 object flag
 	any x, y
 	range(0, 1) team
-	range(-1,MAX_CLIENTS-1) carried_by
+	range(-2,MAX_CLIENTS-1) carried_by // -2 == at stand -1 == on the field
 end
 
 object game
@@ -114,7 +114,7 @@ object player_core
 	range(0, 3) jumped
 
 	range(-1,MAX_CLIENTS-1) hooked_player
-	range(0, 3) hook_state
+	range(-1,2) hook_state
 	range(0, max_int) hook_tick
 
 	any hook_x
@@ -136,7 +136,6 @@ object player_character extends player_core
 	range(0, NUM_WEAPONS-1) weapon
 	range(0, NUM_EMOTES-1) emote
 	
-	range(0, 10) weaponstage
 	range(0, max_int) attacktick
 end
 
diff --git a/src/game/server/gs_server.cpp b/src/game/server/gs_server.cpp
index 21b2f61f..70027086 100644
--- a/src/game/server/gs_server.cpp
+++ b/src/game/server/gs_server.cpp
@@ -855,7 +855,7 @@ void player::try_respawn()
 	weapons[WEAPON_GUN].ammo = data->weapons[WEAPON_GUN].maxammo;
 
 	weapons[WEAPON_RIFLE].got = true;
-	weapons[WEAPON_RIFLE].ammo = 100000; //data->weapons[WEAPON_LASER].maxammo;
+	weapons[WEAPON_RIFLE].ammo = -1;
 	
 	active_weapon = WEAPON_GUN;
 	last_weapon = WEAPON_HAMMER;
@@ -1101,7 +1101,8 @@ void player::fire_weapon()
 		
 	}
 
-	weapons[active_weapon].ammo--;
+	if(weapons[active_weapon].ammo > 0) // -1 == unlimited
+		weapons[active_weapon].ammo--;
 	attack_tick = server_tick();
 	reload_timer = data->weapons[active_weapon].firedelay * server_tickspeed() / 1000;
 }
@@ -1622,7 +1623,7 @@ void player::snap(int snaping_client)
 			info->local = 1;
 	}
 
-	if(health > 0 && team >= 0 && distance(players[snaping_client].pos, pos) < 1000.0f)
+	if(!dead && health > 0 && team >= 0 && distance(players[snaping_client].pos, pos) < 1000.0f)
 	{
 		NETOBJ_PLAYER_CHARACTER *character = (NETOBJ_PLAYER_CHARACTER *)snap_new_item(NETOBJTYPE_PLAYER_CHARACTER, client_id, sizeof(NETOBJ_PLAYER_CHARACTER));
 
@@ -1643,7 +1644,7 @@ void player::snap(int snaping_client)
 
 		character->emote = emote_type;
 
-		character->ammocount = weapons[active_weapon].ammo;
+		character->ammocount = 0;
 		character->health = 0;
 		character->armor = 0;
 		
@@ -1661,17 +1662,10 @@ void player::snap(int snaping_client)
 		{
 			character->health = health;
 			character->armor = armor;
+			if(weapons[active_weapon].ammo > 0)
+				character->ammocount = weapons[active_weapon].ammo;
 		}
 
-		if(dead)
-			character->health = -1;
-
-		//if(length(vel) > 15.0f)
-		//	player->emote = EMOTE_HAPPY;
-
-		//if(damage_taken_tick+50 > server_tick())
-		//	player->emote = EMOTE_PAIN;
-
 		if (character->emote == EMOTE_NORMAL)
 		{
 			if(250 - ((server_tick() - last_action)%(250)) < 5)