PDA

View Full Version : Mobs don't summon players -- FIX INSIDE


RangerDown
03-04-2005, 06:40 PM
As of the latest CVS mobs will say "You will not evade me, Soandso!" and you get the message "You have been summoned!" But, you don't actually go to the mob.

Server side, it seems that it puts you by the mob like it should -- immediately after I get the summoned message I get a round of melee -- but for some reason the client doesn't get the message to actually go there.

The fix is a change to the code is in mob.cpp, in the function bool Mob::HateSummon()

Change this block of code:

// get summon target
target = GetHateTop();
if( target)
{
if (target->IsClient())
target->CastToClient()->Message(15,"You have been summoned!");
entity_list.MessageClose(this, true, 500, 10, "%s says,'You will not evade me, %s!' ", GetName(), GetHateTop()->GetName() );
GetHateTop()->GMMove(x_pos, y_pos, z_pos, target->GetHeading());
return true;
}
return false;


to:


// get summon target
target = GetHateTop();
if(target)
{
entity_list.MessageClose(this, true, 500, 10, "%s says,'You will not evade me, %s!' ", GetName(), target->GetName() );
if (target->IsClient()) // RangerDown - GMMove doesn't seem to be working well with players, so use MovePC for them, GMMove for NPC's
target->CastToClient()->MovePC(zone->GetZoneID(),x_pos,y_pos,z_pos,0,true);
else
GetHateTop()->GMMove(x_pos, y_pos, z_pos, target->GetHeading());
return true;
}
return false;


For whatever reason, GMMove() seems quirky when used on player clients. So, I use MovePC() instead for clients, and GMMove() for NPC's.