send slightly more accurate shot distance to server
This commit is contained in:
parent
11a9b70522
commit
3e22ad70e1
@ -17,7 +17,6 @@ using namespace std;
|
|||||||
#define SKY_DIST 2000
|
#define SKY_DIST 2000
|
||||||
#define NUM_SKY_STEPS 9
|
#define NUM_SKY_STEPS 9
|
||||||
#define LAVA_SIZE 100
|
#define LAVA_SIZE 100
|
||||||
#define SHOT_RING_WIDTH 10.0f
|
|
||||||
#define NUM_SHOT_RING_STEPS 24
|
#define NUM_SHOT_RING_STEPS 24
|
||||||
|
|
||||||
/* points of a horizontal hexagon 1.0 units high */
|
/* points of a horizontal hexagon 1.0 units high */
|
||||||
|
@ -359,7 +359,7 @@ void Client::update(double elapsed_time)
|
|||||||
client_packet.clear();
|
client_packet.clear();
|
||||||
client_packet << packet_type;
|
client_packet << packet_type;
|
||||||
client_packet << m_current_player;
|
client_packet << m_current_player;
|
||||||
client_packet << m_drawing_shot_distance;
|
client_packet << (float)(m_drawing_shot_distance + SHOT_RING_WIDTH / 2.0);
|
||||||
m_net_client->sendData(client_packet, true);
|
m_net_client->sendData(client_packet, true);
|
||||||
m_shot_fired = false;
|
m_shot_fired = false;
|
||||||
m_drawing_shot_distance = 0;
|
m_drawing_shot_distance = 0;
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include "GLBuffer.h"
|
#include "GLBuffer.h"
|
||||||
#include "Network.h"
|
#include "Network.h"
|
||||||
|
|
||||||
|
#define SHOT_RING_WIDTH 10.0f
|
||||||
|
|
||||||
class Client
|
class Client
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user