SolvedGerdHook rage fix.

Posts 1–5 of 5 · Page 1 of 1
GerdHook rage fix.
is there a way to fix this.

Error C2360 initialization of 'jitter' is skipped by 'case' label
Error C2360 initialization of 'jitterangle' is skipped by 'case' label

Code:
	case 1: {
		Vector OriginalY = pCmd->viewangles;
		pCmd->viewangles.y = OriginalY.y + 180.0;
		break;
	}

	case 2: {
		if (!(pCmd->command_number % 2)) {
			Vector OriginalY2 = pCmd->viewangles;
			pCmd->viewangles.y = OriginalY2.y + 180.0;
		}
		break;
	}

	case 3:
		// pJitter
	{
		static int jitter = -1;

		if (jitter <= 2)
		{
			if (bSendPacket)
				pCmd->viewangles.y += 180;
			jitter++;
		}
		else if (jitter > 2 && jitter <= 3)
		{
			if (bSendPacket)
				pCmd->viewangles.y += 146;
			jitter++;
		}
		else
		{
			jitter = 0;
			break;
		}

	case 4: {
		if (pCmd->command_number % 3)
			pCmd->viewangles.y = pCmd->viewangles.y + 200.0;
		break;
	}

	case 5: {
		Vector v37 = pCmd->viewangles;
		pCmd->viewangles.y = v37.y + 90.0;
		break;
	}

	case 6: {
		Vector v372 = pCmd->viewangles;
		if (pCmd->command_number % 2) {
			pCmd->viewangles.y = v372.y + 90.0;
		}
		else {
			pCmd->viewangles.y = v372.y - 90.0;
		}
		break;
	}

	case 7: {
		if (!(pCmd->command_number % 2)) {
			pCmd->viewangles.y = pCmd->viewangles.y + 180.0;
		}
		break;
	}

	case 8: {
		float CalculatedCurTime = (Interfaces::Globals->curtime * 1000.0);
		pCmd->viewangles.y = CalculatedCurTime;
		break;
	}

	case 9: {
		float CalculatedCurTime = (Interfaces::Globals->curtime * 5000.0);
		pCmd->viewangles.y = CalculatedCurTime;
		break;
	}

	case 10: {
		Vector OriginalYX = pCmd->viewangles;
		pCmd->viewangles.y = OriginalYX.y + 36000180.0;
		break;
	}

	case 11: {
		pCmd->viewangles.y = 36000180.000000;
		break;
	}

	case 12: {
		float v42 = (Interfaces::Globals->curtime * 5000.0);
		pCmd->viewangles.y = v42 + 36000000.0;
		break;
	}

	case 13: {
		if (pCmd->command_number % 2) {
			pCmd->viewangles.y = pCmd->viewangles.y + 36000180.0;
		}
		float CalculatedCurTime_2 = (Interfaces::Globals->curtime * 5000.0);
		pCmd->viewangles.y = CalculatedCurTime_2 + 36000000.0;
		break;
	}

	case 14: {
		pCmd->viewangles.y = 0;
		break;
	}
	case 15: {
		int random = 179 - rand() % 100;
		static float current_y = pCmd->viewangles.y;
		current_y += random;
		pCmd->viewangles.y = current_y;
	}
	case 16: {
		static int jitterangle = 0;

		if (jitterangle <= 1)
		{

			pCmd->viewangles.y += 198;
			jitterangle += 1;
		}
		else if (jitterangle > 1 && jitterangle <= 3)
		{

			pCmd->viewangles.y -= 120;
			jitterangle += 1;
		}
		else
		{
			jitterangle = 0;

		}
	case 17: {
		static int jitterangle = 0;

		if (jitterangle <= 1)
		{

			pCmd->viewangles.y += 3150;
			jitterangle += 1;
		}
		else if (jitterangle > 1 && jitterangle <= 3)
		{

			pCmd->viewangles.y -= 3240;
			jitterangle += 1;
		}
		else
		{
			jitterangle = 0;
		}
im new to c++ and a bit of help would be nice
This code is fucking autistic and will give you untrusted.
Quote Originally Posted by Don Coderleone View Post
This code is fucking autistic and will give you untrusted.
thanks for the 'help' bud
Don't put the break inside of the brackets lmao.
The break should be at the end of the brackets outside of it. to close the case.
( thats obviously why there stands case skipped )
Dumb ass
Quote Originally Posted by Joplin View Post
Don't put the break inside of the brackets lmao.
The break should be at the end of the brackets outside of it. to close the case.
( thats obviously why there stands case skipped )
Dumb ass
cheers joplin bby +rep
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us