Thread: Sense Heading
View Single Post
  #1  
Old 10-05-2008, 12:35 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default Sense Heading

The Sense Heading "skill" is hard coded at 200 when you create your character, but It seems the skill check is still in place.

While I was unit testing the double attack code I had some debug statements in the CheckIncreaseSkill() method and I came across the SENSE_HEADING skill being checked... In a LOOP! I would move my character forward and a left turn then a right turn and stop and my debug text would print out sense heading continuously while I was just standing there. I think this loop is adding unneeded lag and should be removed since it's hard coded at max.

Is there any reason not to rem out or delete this code?
client_packet.cpp ~line 930 in Client::Handle_OP_ClientUpdate()
Code:
	if(
		( (heading != ppu->heading) && !((int)heading % 3) ) ||	// turning
		( (x_pos != ppu->x_pos) && !((int)x_pos % 6) )					// moving
	)
	{
		CheckIncreaseSkill(SENSE_HEADING, -20);
	}
Reply With Quote