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.92 by root, Mon Jan 8 01:19:04 2007 UTC vs.
Revision 1.93 by root, Mon Jan 8 14:11:05 2007 UTC

216 ns->update_look = 0; 216 ns->update_look = 0;
217 ns->look_position = 0; 217 ns->look_position = 0;
218 218
219 clear_los (ob); 219 clear_los (ob);
220 220
221//TODO: must move into client
222/* we need to clear these to -1 and not zero - otherwise,
223 * if a player quits and starts a new character, we wont
224 * send new values to the client, as things like exp start
225 * at zero.
226 */
227for (int i = 0; i < NUM_SKILLS; i++)
228 last_skill_exp[i] = -1;
229
230for (int i = 0; i < NROFATTACKS; i++)
231 last_resist[i] = -1;
232
233last_weapon_sp = -1;
234last_level = -1;
235last_stats.exp = -1;
236last_weight = (uint32) - 1;
237last_flags = 0;
238last_weight = 0;
239last_weight_limit = 0;
240last_path_attuned = 0;
241last_path_repelled = 0;
242last_path_denied = 0;
243last_speed = 0;
244run_on = 0;
245fire_on = 0;
246memset (&last_stats, 0, sizeof (living)); //TODO dirty
247
221 /* make sure he's a player -- needed because of class change. */ 248 /* make sure he's a player -- needed because of class change. */
222 ob->type = PLAYER; // we are paranoid 249 ob->type = PLAYER; // we are paranoid
223 ob->race = ob->arch->clone.race; 250 ob->race = ob->arch->clone.race;
224 251
225 if (!legal_range (ob, shoottype)) 252 if (!legal_range (ob, shoottype))
333 listening = 10; 360 listening = 10;
334 usekeys = containers; 361 usekeys = containers;
335 last_weapon_sp = -1; 362 last_weapon_sp = -1;
336 peaceful = 1; /* default peaceful */ 363 peaceful = 1; /* default peaceful */
337 do_los = 1; 364 do_los = 1;
338
339 /* we need to clear these to -1 and not zero - otherwise,
340 * if a player quits and starts a new character, we wont
341 * send new values to the client, as things like exp start
342 * at zero.
343 */
344 for (int i = 0; i < NUM_SKILLS; i++)
345 last_skill_exp[i] = -1;
346
347 for (int i = 0; i < NROFATTACKS; i++)
348 last_resist[i] = -1;
349
350 last_stats.exp = -1;
351 last_weight = (uint32) - 1;
352} 365}
353 366
354void 367void
355player::do_destroy () 368player::do_destroy ()
356{ 369{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines