--- deliantra/server/common/living.C 2006/12/23 06:30:49 1.20 +++ deliantra/server/common/living.C 2007/01/08 18:18:35 1.26 @@ -1,6 +1,7 @@ /* CrossFire, A Multiplayer game for X-windows + Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team Copyright (C) 2002 Mark Wedel & Crossfire Development Team Copyright (C) 1992 Frank Tore Johansen @@ -226,11 +227,11 @@ }; const char *const statname[NUM_STATS] = { - "strength", "dexterity", "constitution", "wisdom", "charisma", "intelligence", "power" + "strength", "dexterity", "constitution", "intelligence", "wisdom", "power", "charisma" }; const char *const short_stat_name[NUM_STATS] = { - "Str", "Dex", "Con", "Wis", "Cha", "Int", "Pow" + "Str", "Dex", "Con", "Int", "Wis", "Pow", "Cha" }; /* @@ -834,6 +835,7 @@ int best_wc = 0, best_ac = 0, wc = 0, ac = 0; int prot[NROFATTACKS], vuln[NROFATTACKS], potion_resist[NROFATTACKS]; object *grace_obj = NULL, *mana_obj = NULL, *wc_obj = NULL, *tmp; + float old_speed = speed; /* First task is to clear all the values back to their original values */ if (type == PLAYER) @@ -1030,7 +1032,7 @@ for (i = 0; i < NROFATTACKS; i++) { /* Potential for cursed potions, in which case we just can use - * a straight MAX, as potion_resist is initialized to zero. + * a straight MAX, as potion_resist is initialised to zero. */ if (tmp->type == POTION_EFFECT) { @@ -1504,7 +1506,8 @@ else if (move_type & (MOVE_FLY_LOW | MOVE_FLY_HIGH)) move_type &= ~MOVE_WALK; - update_ob_speed (this); + if (speed != old_speed) + set_speed (speed); /* It is quite possible that a player's spell costing might have changed, * so we will check that now. @@ -1678,11 +1681,14 @@ skill_obj->stats.exp = 0; skill_obj->level = 1; insert_ob_in_ob (skill_obj, op); + if (op->contr) { - op->contr->last_skill_ob[skill_obj->subtype] = skill_obj; - op->contr->last_skill_exp[skill_obj->subtype] = -1; + op->contr->last_skill_ob [skill_obj->subtype] = skill_obj; + if (op->contr->ns) + op->contr->ns->last_skill_exp[skill_obj->subtype] = -1;//TODO: should be made superfluous } + return skill_obj; }