View Single Post
  #3  
Old 05-15-2011, 03:46 PM
Sikkun
Sarnak
 
Join Date: Apr 2011
Posts: 30
Default

Ok so I have came out with a new solution. This works when sitting and standing still on a mount, it no longer allows you to regenerate while moving on a mount.

in the Zone project
client_process.cpp
void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
Method

ADD:
Code:
//allow player to have OOC regeneration on a mount
	if(ppu->y_pos == y_pos || ppu->x_pos == x_pos)
	{
		if(GetHorseId() != 0)
		{
			playeraction = 1;
		}
	}
	else if(ppu->y_pos != y_pos || ppu->x_pos != x_pos)
	{
		if(GetHorseId() != 0)
		{
			playeraction = 0;
		}
	}
I added my code right after the //Break hide if moving without sneak code block so it looks like:

Code:
// Break Hide if moving without sneaking and set rewind timer if moved
	if(ppu->y_pos != y_pos || ppu->x_pos != x_pos){
	    if((hidden || improved_hidden) && !sneaking){
			hidden = false;
			improved_hidden = false;
			if(!invisible) {
				EQApplicationPacket* outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(SpawnAppearance_Struct));
				SpawnAppearance_Struct* sa_out = (SpawnAppearance_Struct*)outapp->pBuffer;
				sa_out->spawn_id = GetID();
				sa_out->type = 0x03;
				sa_out->parameter = 0;
				entity_list.QueueClients(this, outapp, true);
				safe_delete(outapp);
			}
		}
		rewind_timer.Start(30000, true);
	}

	//allow player to have OOC regeneration on a mount
	if(ppu->y_pos == y_pos || ppu->x_pos == x_pos)
	{
		if(GetHorseId() != 0)
		{
			playeraction = 1;
		}
	}
	else if(ppu->y_pos != y_pos || ppu->x_pos != x_pos)
	{
		if(GetHorseId() != 0)
		{
			playeraction = 0;
		}
	}
Reply With Quote