1 | /* |
1 | /* |
2 | * static char *rcsid_player_c = |
2 | * static char *rcsid_player_c = |
3 | * "$Id: player.C,v 1.4 2006/08/25 17:11:53 root Exp $"; |
3 | * "$Id: player.C,v 1.5 2006/08/26 08:44:06 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
228 | } |
228 | } |
229 | |
229 | |
230 | /* Clears basically the entire player structure except |
230 | /* Clears basically the entire player structure except |
231 | * for next and socket. |
231 | * for next and socket. |
232 | */ |
232 | */ |
233 | memset((void*)((char*)p + offsetof(player, ob)), 0, |
233 | memset (static_cast<player_memset *>(p), 0, sizeof (player_memset)); |
234 | sizeof(player) - offsetof(player, ob)); |
|
|
235 | |
234 | |
236 | /* There are some elements we want initialized to non zero value - |
235 | /* There are some elements we want initialized to non zero value - |
237 | * we deal with that below this point. |
236 | * we deal with that below this point. |
238 | */ |
237 | */ |
239 | p->party=NULL; |
238 | p->party=NULL; |