--- deliantra/server/socket/request.C 2007/06/03 17:42:39 1.102 +++ deliantra/server/socket/request.C 2007/06/09 20:07:50 1.107 @@ -524,7 +524,6 @@ pl->count = 0; } - /** * This handles the general commands from the client (ie, north, fire, cast, * etc.). It is a lot like PlayerCmd above, but is called with the @@ -740,9 +739,11 @@ if (pl->combat_ob) buf << " Combat" << (pl->ob->current_weapon == pl->combat_ob ? "*" : "") << ": " << pl->combat_ob->name; +#if 0 //TODO: remove this when slot system is working, this is only for debugging if (pl->ob->chosen_skill) buf << " Skill*: " << pl->ob->chosen_skill->name; +#endif //TODO: maybe golem should become the current_weapon, quite simply? if (pl->golem) @@ -797,6 +798,8 @@ if (!ob) return; + player *opl = ob->contr ? static_cast(ob->contr) : pl; + packet sl ("stats"); AddIfShort (ns->last_stats.hp, ob->stats.hp, CS_STAT_HP); @@ -814,7 +817,7 @@ AddIfShort (ns->last_stats.Cha, ob->stats.Cha, CS_STAT_CHA); for (int s = 0; s < NUM_SKILLS; s++) - if (object *skill = pl->last_skill_ob[s]) + if (object *skill = opl->last_skill_ob[s]) if (skill->stats.exp != ns->last_skill_exp [s]) { ns->last_skill_exp [s] = skill->stats.exp; @@ -839,10 +842,10 @@ flags = 0; - if (pl->fire_on) + if (opl->fire_on) flags |= SF_FIREON; - if (pl->run_on) + if (opl->run_on) flags |= SF_RUNON; AddIfShort (ns->last_flags, flags, CS_STAT_FLAGS); @@ -866,7 +869,7 @@ AddIfInt (ns->last_path_denied, ob->path_denied, CS_STAT_SPELL_DENY); } - rangetostring (pl, buf); /* we want use the new fire & run system in new client */ + rangetostring (opl, buf); /* we want use the new fire & run system in new client */ AddIfString (ns->stats.range, buf, CS_STAT_RANGE); set_title (ob, buf); AddIfString (ns->stats.title, buf, CS_STAT_TITLE); @@ -1215,6 +1218,7 @@ lastcell.count = d; mapspace &ms = m->at (nx, ny); + ms.update (); if (socket.extmap) { @@ -1234,7 +1238,7 @@ if (op->stats.maxhp > 0 && (unsigned) op->stats.maxhp > (unsigned) op->stats.hp) { stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; - stat_width = op->arch->tail_x; + stat_width = op->arch->max_x - op->arch->x; //TODO: should be upper-left edge } }