View Single Post
  #42  
Old 07-11-2009, 08:29 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Okay I'm looking into it right now on the dead disconnection thing:

When a client dies they call Client::Death() which sets
dead = true
and dead_timer is set to go off in 5000MS

From there in the main process there's entity_list.MobProcess() which runs Process() on every mob in the entity_list and if it returns false it will drop the client or depop the npc it's processing.

and... in client::process we have
Code:
if(dead && dead_timer.Check()) {
			database.MoveCharacterToZone(GetName(),database.GetZoneName(m_pp.binds[0].zoneId));
			m_pp.zone_id = m_pp.binds[0].zoneId;
			m_pp.zoneInstance = 0;
			m_pp.x = m_pp.binds[0].x;
			m_pp.y = m_pp.binds[0].y;
			m_pp.z = m_pp.binds[0].z;
			Save();
			
			Group *mygroup = GetGroup();
			if (mygroup)	// && zone.GetZoneID() != m_pp.binds[0].zoneId
			{
				entity_list.MessageGroup(this,true,15,"%s died.", GetName());
				mygroup->MemberZoned(this);
			}
			Raid *myraid = entity_list.GetRaidByClient(this);
			if (myraid)
			{
				myraid->MemberZoned(this);
			}
			return(false);
		}
So 5 seconds after dying the client's process returns false and they are dropped even if they haven't zoned. To facilitate this we would need to alter the logic to only drop and move the client to the zone if they had a return to bind flag set, 6.2/titanium would set it automatically and would zone normally and SoF would set it when you clicked return to bind or whatever, and then could also have the code for instantly returning to the body after being revived.
Reply With Quote