author | terom |
Mon, 08 Dec 2008 23:42:40 +0000 | |
changeset 330 | dcc47278e5ab |
parent 303 | 36a502a0023f |
child 332 | 78657bf06302 |
permissions | -rw-r--r-- |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
1 |
#ifndef NETWORKCLIENT_HH |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
2 |
#define NETWORKCLIENT_HH |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
3 |
|
186 | 4 |
#include "../GameState.hh" |
5 |
#include "Session.hh" |
|
6 |
#include "Object.hh" |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
7 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
8 |
// forward-declare |
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
9 |
class NetworkClient; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
10 |
class NetworkClientLocalPlayer; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
11 |
class NetworkClientRemotePlayer; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
12 |
|
294 | 13 |
/** |
14 |
* Our specialized NetworkObject_ClientController that overrides handle_create to create the right kind of |
|
15 |
* object (a subclass of NetowrkClientObject). |
|
16 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
17 |
class NetworkClientController : public NetworkObject_ClientController { |
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
18 |
protected: |
294 | 19 |
/** |
20 |
* The NetworkClient |
|
21 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
22 |
NetworkClient &client; |
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
23 |
|
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
24 |
public: |
294 | 25 |
/** |
26 |
* Control objects on the given client using the client.netsession's NETCHAN_CORE channel |
|
27 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
28 |
NetworkClientController (NetworkClient &client); |
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
29 |
|
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
30 |
protected: |
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
31 |
/** |
294 | 32 |
* We override handle_create from NetworkObject_ClientController to call one of the on_* methods, which creates |
33 |
* a NetworkClientObject subclass |
|
34 |
* |
|
35 |
* @see NetworkObject_ClientController::handle_create |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
36 |
*/ |
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
37 |
virtual void handle_create (NetworkObjectID obj_id, NetworkMessageID msg_id, NetworkPacketInput &pkt, NetworkNode *node); |
294 | 38 |
|
39 |
/** |
|
40 |
* Handle NETMSG_SERVER_HELLO -> NetworkClientLocalPlayer |
|
41 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
42 |
void on_server_hello (NetworkObjectID obj_id, NetworkPacketInput &pkt); |
294 | 43 |
|
44 |
/** |
|
45 |
* Handle NETMSG_PLAYER_INFO -> NetworkClientRemotePlayer |
|
46 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
47 |
void on_player_info (NetworkObjectID obj_id, NetworkPacketInput &pkt); |
294 | 48 |
|
49 |
/** |
|
50 |
* Handle NETMSG_PLAYER_JOIN -> NetworkClientRemotePlayer |
|
51 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
52 |
void on_player_join (NetworkObjectID obj_id, NetworkPacketInput &pkt); |
294 | 53 |
|
54 |
/** |
|
55 |
* Handle NETMSG_PROJECTILE_PLAYER_FIRED -> NetworkClientProjectile |
|
56 |
*/ |
|
276
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
274
diff
changeset
|
57 |
void on_projectile_player_fired (NetworkObjectID obj_id, NetworkPacketInput &pkt); |
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
58 |
}; |
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
59 |
|
294 | 60 |
/** |
61 |
* Our NetworkClient, that connects to a NetworkServer. This has the GameState, NetworkSession, NetworkClientController, etc. |
|
62 |
*/ |
|
187 | 63 |
class NetworkClient { |
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
64 |
friend class NetworkClientController; |
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
65 |
friend class NetworkClientObject; |
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
66 |
friend class NetworkClientPlayerBase; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
67 |
friend class NetworkClientLocalPlayer; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
68 |
friend class NetworkClientRemotePlayer; |
223 | 69 |
friend class NetworkClientProjectile; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
70 |
|
187 | 71 |
protected: |
294 | 72 |
/** |
73 |
* The GameState |
|
74 |
*/ |
|
187 | 75 |
GameState &state; |
294 | 76 |
|
187 | 77 |
CL_SlotContainer slots; |
294 | 78 |
|
79 |
/** |
|
80 |
* The connect()-mode NetworkSession |
|
81 |
*/ |
|
82 |
NetworkSession netsession; |
|
187 | 83 |
|
294 | 84 |
/** |
85 |
* The server NetworkNode from Netsession::connect |
|
86 |
*/ |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
87 |
NetworkNode *server; |
294 | 88 |
|
89 |
/** |
|
90 |
* Our specialized NetworkObject_ClientController |
|
91 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
92 |
NetworkClientController controller; |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
93 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
94 |
public: |
294 | 95 |
/** |
96 |
* Create a NetworkClient with the given GameState, connecting a server on the given NetworkAddress |
|
97 |
* |
|
98 |
* @param state the GameState to use |
|
99 |
* @param connect_to the address to connect to |
|
100 |
*/ |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
101 |
NetworkClient (GameState &state, const NetworkAddress &connect_to); |
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
102 |
|
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
103 |
protected: |
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
104 |
/** |
294 | 105 |
* Receive the NETCHAN_TERRAIN_ARRAY message from the server and apply it to our GameState::world terrain |
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
106 |
*/ |
203
3ec7ab40755f
send initial terrain data to clients using a new NETCHAN_TERRAIN_ARRAY channel using raw BigNetworkPacket
terom
parents:
200
diff
changeset
|
107 |
void on_terrain_array (NetworkPacketInput &pkt, NetworkNode *node); |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
108 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
109 |
public: |
294 | 110 |
/** |
111 |
* Called by NetworkClientRemotePlayer when they get disconnected. Doesn't do anything currently |
|
112 |
*/ |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
113 |
void player_quit (NetworkClientRemotePlayer *player); |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
114 |
}; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
115 |
|
294 | 116 |
/** |
117 |
* Our base NetworkObject_Client object, containing the NetworkClient and a CL_SlotContainer for conveniance |
|
118 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
119 |
class NetworkClientObject : public NetworkObject_Client { |
200
2dbf40661580
better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents:
187
diff
changeset
|
120 |
protected: |
294 | 121 |
/** |
122 |
* The NetworkClient |
|
123 |
*/ |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
124 |
NetworkClient &client; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
125 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
126 |
CL_SlotContainer slots; |
294 | 127 |
|
128 |
/** |
|
129 |
* Construct this using the given client and obj_id, passing the client.controller and obj_id to the |
|
130 |
* NetworkObject_Client's constructor |
|
131 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
132 |
NetworkClientObject (NetworkClient &client, NetworkObjectID obj_id); |
223 | 133 |
}; |
134 |
||
294 | 135 |
/** |
136 |
* Our base class for NetworkClient Players, this implements most of the server -> client messages |
|
137 |
* |
|
138 |
* This inherits from NetworkClientObject and virtually from Player, as classes should inherit from both this and |
|
139 |
* LocalPlayer/RemotePlayer |
|
140 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
141 |
class NetworkClientPlayerBase : public NetworkClientObject, public virtual Player { |
200
2dbf40661580
better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents:
187
diff
changeset
|
142 |
protected: |
294 | 143 |
/** |
144 |
* Dummy-initialize Player, initialize NetworkClientObject, and hook up our signals |
|
145 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
146 |
NetworkClientPlayerBase (NetworkClient &client, NetworkObjectID obj_id, Vector position); |
200
2dbf40661580
better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents:
187
diff
changeset
|
147 |
|
302 | 148 |
protected: |
149 |
// @{ |
|
150 |
/** |
|
151 |
* These should never be called directly, always via the network |
|
152 |
*/ |
|
153 |
virtual void spawn (Vector position); |
|
154 |
virtual void respawn (TimeMS dt); |
|
155 |
// @} |
|
303 | 156 |
|
157 |
/** |
|
158 |
* Ignore, the servers tells us this |
|
159 |
*/ |
|
160 |
virtual void die (bool start_timer = true); |
|
302 | 161 |
|
200
2dbf40661580
better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents:
187
diff
changeset
|
162 |
private: |
294 | 163 |
/** |
164 |
* NETMSG_PLAYER_POSITION -> PhysicsObject::updatePhysics |
|
165 |
*/ |
|
200
2dbf40661580
better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents:
187
diff
changeset
|
166 |
void on_position (NetworkPacketInput &pkt); |
294 | 167 |
|
168 |
/** |
|
169 |
* NETMSG_PLAYER_DIG -> Player::handleDig |
|
170 |
*/ |
|
200
2dbf40661580
better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents:
187
diff
changeset
|
171 |
void on_dig (NetworkPacketInput &pkt); |
294 | 172 |
|
173 |
/** |
|
174 |
* NETMSG_PLAYER_WEAPON_CHANGE -> Player::rope.handleChangeWeapon |
|
175 |
*/ |
|
239
550397d9d479
implement network weapon changes and fix weapon firing
terom
parents:
224
diff
changeset
|
176 |
void on_weapon_change (NetworkPacketInput &pkt); |
294 | 177 |
|
178 |
/** |
|
179 |
* NETMSG_PLAYER_ROPE_THROW -> Player::rope.updateState(ROPE_FLYING) |
|
180 |
*/ |
|
241 | 181 |
void on_rope_throw (NetworkPacketInput &pkt); |
294 | 182 |
|
183 |
/** |
|
184 |
* NETMSG_PLAYER_ROPE_FIXED -> Player::rope.updateState(ROPE_FIXED) |
|
185 |
*/ |
|
241 | 186 |
void on_rope_fixed (NetworkPacketInput &pkt); |
294 | 187 |
|
188 |
/** |
|
189 |
* NETMSG_PLAYER_ROPE_RELEASED -> Player::rope.updateState(ROPE_FOLDED) |
|
190 |
*/ |
|
241 | 191 |
void on_rope_released (NetworkPacketInput &pkt); |
294 | 192 |
|
193 |
/** |
|
194 |
* NETMSG_PLAYER_ROPE_LENGTH -> Player::Rope.updateLength |
|
195 |
*/ |
|
241 | 196 |
void on_rope_length (NetworkPacketInput &pkt); |
302 | 197 |
|
198 |
/** |
|
199 |
* NETMSG_PLAYER_SPAWN -> Player::spawn |
|
200 |
*/ |
|
201 |
void on_spawn (NetworkPacketInput &pkt); |
|
202 |
||
203 |
/** |
|
204 |
* NETMSG_PLAYER_Die -> Player::die |
|
205 |
*/ |
|
206 |
void on_die (NetworkPacketInput &pkt); |
|
200
2dbf40661580
better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents:
187
diff
changeset
|
207 |
}; |
2dbf40661580
better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents:
187
diff
changeset
|
208 |
|
294 | 209 |
/** |
210 |
* Our NetworkClientPlayerBase + LocalPlayer specialization, this lets us handle local input |
|
211 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
212 |
class NetworkClientLocalPlayer : public NetworkClientPlayerBase, public LocalPlayer { |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
213 |
public: |
294 | 214 |
/** |
215 |
* Calls NetworkClientPlayerBase/Player constructors, calls GameState::setLocalPlayer |
|
216 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
217 |
NetworkClientLocalPlayer (NetworkClient &client, NetworkObjectID obj_id, Vector position); |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
218 |
|
294 | 219 |
/** |
220 |
* Overriden from LocalPlayer to send a NETMSG_CLIENT_INPUT message without executing LocalPlayer::handleInput |
|
221 |
* locally |
|
222 |
*/ |
|
277 | 223 |
virtual void handleInput (PlayerInput input, TimeMS dt); |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
224 |
}; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
225 |
|
294 | 226 |
/** |
227 |
* Our NetworkClientPlayerBase + RemotePlayer specialization, this lets us handle players quitting |
|
228 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
229 |
class NetworkClientRemotePlayer : public NetworkClientPlayerBase, public RemotePlayer { |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
230 |
public: |
294 | 231 |
/** |
232 |
* Calls NetworkClientPlayerBase/Player constructors and hooks up signals |
|
233 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
234 |
NetworkClientRemotePlayer (NetworkClient &client, NetworkObjectID obj_id, Vector position); |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
235 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
236 |
private: |
294 | 237 |
/** |
238 |
* Calls NetworkClient::player_quit, and then destroys ourselves |
|
239 |
*/ |
|
200
2dbf40661580
better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents:
187
diff
changeset
|
240 |
void on_quit (NetworkPacketInput &pkt); |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
241 |
}; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
242 |
|
294 | 243 |
/** |
244 |
* A Projectile that was created on the server |
|
245 |
*/ |
|
274
c35307e8645c
add comments, move addPlayer/removePlayer to Player.cc, and refactor Network code to inherit from NetworkObject
terom
parents:
263
diff
changeset
|
246 |
class NetworkClientProjectile : public NetworkClientObject, public Projectile { |
223 | 247 |
public: |
294 | 248 |
/** |
249 |
* Call Projectile's constructor, hook up signals and call player->weaponFired |
|
250 |
*/ |
|
276
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
274
diff
changeset
|
251 |
NetworkClientProjectile (NetworkClient &client, NetworkObjectID obj_id, Player *player, Vector position, |
87434abc1ba1
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
terom
parents:
274
diff
changeset
|
252 |
Vector velocity, Weapon *weapon); |
224
e6faefba2ec1
fixed logger, and network projectiles should work reasonably well now
terom
parents:
223
diff
changeset
|
253 |
|
e6faefba2ec1
fixed logger, and network projectiles should work reasonably well now
terom
parents:
223
diff
changeset
|
254 |
protected: |
294 | 255 |
/** |
256 |
* Overrides Projectile::onDestroy to ignore this, as we must wait for the server to tell us where it impacted |
|
257 |
* so that we can remove the ground reliably |
|
258 |
*/ |
|
224
e6faefba2ec1
fixed logger, and network projectiles should work reasonably well now
terom
parents:
223
diff
changeset
|
259 |
virtual void onDestroy (Vector position, bool removeGround); |
296
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
260 |
|
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
261 |
/** |
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
262 |
* Overrides Projectile::onHitPlayer to ignore this, as we must wait for the server to tell us if it really did |
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
263 |
* happen. |
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
264 |
*/ |
330 | 265 |
virtual void onHitPlayer (Player *player); |
224
e6faefba2ec1
fixed logger, and network projectiles should work reasonably well now
terom
parents:
223
diff
changeset
|
266 |
|
e6faefba2ec1
fixed logger, and network projectiles should work reasonably well now
terom
parents:
223
diff
changeset
|
267 |
private: |
294 | 268 |
/** |
269 |
* NETMSG_PROJECTILE_DESTROY -> Projectile::onDestory |
|
270 |
*/ |
|
224
e6faefba2ec1
fixed logger, and network projectiles should work reasonably well now
terom
parents:
223
diff
changeset
|
271 |
void on_destroy (NetworkPacketInput &pkt); |
296
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
272 |
|
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
273 |
/** |
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
274 |
* NETMSG_PROJECTILE_HIT_PLAYER -> Projectile::onHitPlayer |
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
275 |
*/ |
4d3ebaa29430
add separate Types.hh, and fix projectile-worm collisions on network
terom
parents:
294
diff
changeset
|
276 |
void on_hit_player (NetworkPacketInput &pkt); |
223 | 277 |
}; |
278 |
||
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
279 |
#endif |