--- deliantra/server/socket/request.C 2007/06/06 17:22:55 1.105 +++ deliantra/server/socket/request.C 2007/06/07 17:30:43 1.106 @@ -733,9 +733,6 @@ { dynbuf_text buf; - if (pl->observe->contr) - pl = pl->observe->contr; - if (pl->ranged_ob) buf << " Range" << (pl->ob->current_weapon == pl->ranged_ob ? "*" : "") << ": " << pl->ranged_ob->name; @@ -801,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); @@ -818,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; @@ -843,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); @@ -870,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);