All pastes #499648 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-21 05:13 UTC
rendered paste body
int zonenum(vec3_t point)
{
	float x = point[0], y = point[1];

	if (y >= 2200)
	{
		if (x <= 424) 	{return 1;}
		else if (x <= 595) {return 2;}
		else if (x <= 748)	{return 3;}
		else if (x <= 919) {return 4;}
		else					{return 5;}
	}
	else if (y >= 2050)
	{
		if (x <= 424) 	{return 6;}
		else if (x <= 595) {return 7;}
		else if (x <= 748)	{return 8;}
		else if (x <= 919) {return 9;}
		else					{return 10;}
	}
	else if (y >= 1700)
	{
		if (x <= 424) 	{return 11;}
		else if (x <= 595) {return 12;}
		else if (x <= 748)	{return 13;}
		else if (x <= 919) {return 14;}
		else					{return 15;}
	}
	else if (y >= 1390)
	{
		if (x <= 424)		{return 16;}
		else if (x <= 595)	{return 17;}
		else if (x <= 748)	{return 18;}
		else if (x <= 919)	{return 19;}
		else					{return 20;}
	}
	else if (y >= 1164)
	{
		if (x <= 350)		{return 21;}
		else if (x <= 595)	{return 22;}
		else if (x <= 747)	{return 23;}
		else if (x <= 1000)	{return 24;}
		else					{return 25;}
	}
	else if (y >= 896)
	{
   	if (x <= 673)	{return 26;}
		else				{return 27;}
	}
	else if (y >= 646)
	{
		if (x <= 328)		{return 28;}
		else if (x <= 592)	{return 29;}
		else if (x <= 747)	{return 30;}
		else if (x <= 1015)	{return 31;}
		else					{return 32;}
	}
	else if	(y >= 475)
	{
		if (x <= 592)		{return 33;}
		else if (x <= 747)	{return 34;}
		else					{return 35;}
	}
	else if (y >= 200)
	{
		if (x <= 673)	{return 36;}
		else				{return 37;}
	}
	else if (y >= 14)
	{
		return 38;
	}
	else
	{
		return 39;
	}

	return -1;
}