Switched to using the shot class on the server. Broadcast shots to all players
This commit is contained in:
1 parent
cc8d1a05ce
commit
fbfcea6bc9
6 files changed
+70
-62
No files matched your search
@@ -15,11 +15,7 @@ Player::Player()
|
||||
rel_mouse_movement = 0.0;
|
||||
updated = false;
|
||||
m_client = NULL;
|
||||
m_shot_distance = 0.0;
|
||||
m_shot_start_time = 0.0;
|
||||
m_shot_start_x = 0.0;
|
||||
m_shot_start_y = 0.0;
|
||||
m_shot_direction = 0.0;
|
||||
m_shot = NULL;
|
||||
m_shot_allowed = true;
|
||||
|
||||
}
|
||||
+3
-5
@@ -5,6 +5,8 @@
|
||||
#include "Types.h"
|
||||
#include "SFML/Config.hpp"
|
||||
#include "Network.h"
|
||||
#include "Shot.h"
|
||||
#include "refptr.h"
|
||||
|
||||
class Player
|
||||
{
|
||||
@@ -21,12 +23,8 @@ class Player
|
||||
sf::Int32 rel_mouse_movement;
|
||||
bool updated;
|
||||
Client_t* m_client;
|
||||
float m_shot_distance;
|
||||
double m_shot_start_x;
|
||||
double m_shot_start_y;
|
||||
double m_shot_direction;
|
||||
double m_shot_start_time;
|
||||
bool m_shot_allowed;
|
||||
refptr<Shot> m_shot;
|
||||
|
||||
Player();
|
||||
};
|
||||
|
||||
@@ -12,8 +12,4 @@
|
||||
|
||||
#define TILE_DAMAGED 0xA1u
|
||||
|
||||
// The speed of the projectile
|
||||
#define PROJECTILE_VELOCITY 100.0
|
||||
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user