ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/player.C
(Generate patch)

Comparing deliantra/server/server/player.C (file contents):
Revision 1.4 by root, Fri Aug 25 17:11:53 2006 UTC vs.
Revision 1.6 by root, Sat Aug 26 23:36:34 2006 UTC

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.6 2006/08/26 23:36:34 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;
1035 int x = op->x, y = op->y; 1034 int x = op->x, y = op->y;
1036 remove_statbonus(op); 1035 remove_statbonus(op);
1037 remove_ob (op); 1036 remove_ob (op);
1038 op->arch = get_player_archetype(op->arch); 1037 op->arch = get_player_archetype(op->arch);
1039 copy_object (&op->arch->clone, op); 1038 copy_object (&op->arch->clone, op);
1039 op->instantiate ();
1040 op->stats = op->contr->orig_stats; 1040 op->stats = op->contr->orig_stats;
1041 free_string (op->name); 1041 free_string (op->name);
1042 op->name = name; 1042 op->name = name;
1043 free_string(op->name_pl); 1043 free_string(op->name_pl);
1044 op->name_pl = add_string(name); 1044 op->name_pl = add_string(name);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines