Exemplo n.º 1
0
Rectangle::Rectangle()
{
//	m_RadiusX = NULL;
//	m_RadiusY = NULL;

	SetClipMode(false);

	/*
	m_RectangleLeft = NULL;
	m_RectangleTop = NULL;
	m_RectangleWidth = NULL;
	m_RectangleHeight = NULL;
	m_RadiusX = NULL;
	m_RadiusY = NULL;
	*/
}
Exemplo n.º 2
0
bool CCheatMgr::Process( CheatCode nCheatCode, CParsedMsgW const& cMsg )
{
	if ( nCheatCode <= CHEAT_NONE || nCheatCode >= CHEAT_MAX ) return false;

#ifdef _FINAL
	// Don't do cheats in multiplayer...
    if (IsMultiplayerGameClient())
	{
		// Well, okay, let them toggle between 1st and 3rd person ;)
		// and, well, blood is pretty cool...
		switch ( nCheatCode )
		{
			case CHEAT_EXITLEVEL:	// exit the current level
				SetExitLevel();
			break;

			case CHEAT_NEXTMISSION:	// exit the current mission
				NextMission();
			break;

			case CHEAT_BOOT:		// boot players
				BootPlayer(cMsg);
			break;

			default :
				return false;
			break;
		}

		m_bPlayerCheated = true;
		return true;
	}

#else // _FINAL

	// Only allow cheats in MP if console variable turned on.
	if( IsMultiplayerGameClient( ))
	{
		float fVal = 0.0f;
		g_pLTClient->GetSConValueFloat( "AllowMPCheats", fVal );
		bool bAllowMPCheats = fVal != 0.0f;
		if( !bAllowMPCheats )
			return false;
	}

#endif // _FINAL

	// process cheat codes
	switch ( nCheatCode )
	{
		case CHEAT_GOD:			// god mode toggle
			SetGodMode(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_ARMOR:		// full armor
			SetArmor();
		break;

		case CHEAT_HEALTH:		// full health
			SetHealth();
		break;

		case CHEAT_EXITLEVEL:	// exit the current level
			SetExitLevel();
		break;

		case CHEAT_VERSION:		// display version info
			Version();
		break;

		case CHEAT_INVISIBLE:	// time to mess with the AI
			SetInvisible(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_BODYGOLFING:	// bodies fly far
			//currently unimplemented...
//			BodyGolfing(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_POS:			// show/hide player position
			SetPos(!s_CheatInfo[nCheatCode].bActive);
		break;

#ifndef _DEMO
		
		case CHEAT_KFA:			// give em everything
			SetKFA();
		break;

		case CHEAT_AMMO:		// full ammo
			SetAmmo();
		break;

		case CHEAT_MODSQUAD:	// give all mods for current weapons
			ModSquad();
		break;

		case CHEAT_CONSOLE:
			SetConsole(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_NEXTMISSION:	// exit the current mission
			NextMission();
		break;

		case CHEAT_BOOT:	// exit the current mission
			BootPlayer(cMsg);
		break;

		case CHEAT_FULL_WEAPONS:   // give all weapons
			SetFullWeapons();
		break;

		case CHEAT_FULL_GEAR:	// give all gear
			FullGear();
		break;

		case CHEAT_TEARS:	      // toggle tears cheat
			Tears(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_GIMMEGUN:
			GimmeGun( cMsg );
		break;

		case CHEAT_GIMMEMOD:
			GimmeMod( cMsg );
		break;

		case CHEAT_GIMMEGEAR:
			GimmeGear( cMsg );
		break;

		case CHEAT_GIMMEAMMO:
			GimmeAmmo( cMsg );
		break;

		case CHEAT_ENDGAME:
			ToggleEndgameFlag();
		break;

#ifndef _FINAL

		case CHEAT_CHASETOGGLE:	   // toggle 3rd person view
			ChaseToggle();
		break;

		case CHEAT_CLIP:		// toggle clipping mode
			SetClipMode(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_TELEPORT:	// teleport to beginning
			Teleport();
		break;

		case CHEAT_CAM_POSROT:    // show/hide camera position/rotation
			SetCamPosRot(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_POSWEAPON:		    // toggle adjust of weapon pos
			PosWeapon(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_REMOVEAI:	  // remove all ai
			RemoveAI(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_TRIGGERBOX:	  // toggle trigger boxes on/off
			TriggerBox(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_POS1STCAM:	  // toggle 1st person camera adjust on/off
			Pos1stCam(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_SAVEVEHICLE:		// save the vehicle tweaks to the bute file
			SaveVehicle( );
		break;

#endif  // _FINAL
#endif // _DEMO

		default:
			return false;			// skip setting global cheat indicator for unhandled cheats
	}

    m_bPlayerCheated = true;

	return true;
}
Exemplo n.º 3
0
bool CCheatMgr::Process( CheatCode nCheatCode, CParsedMsg &cMsg )
{
	if ( nCheatCode <= CHEAT_NONE || nCheatCode >= CHEAT_MAX ) return false;

#ifdef _FINAL
	// Don't do cheats in multiplayer...
    if (IsMultiplayerGame())
	{
		// Well, okay, let them toggle between 1st and 3rd person ;)
		// and, well, blood is pretty cool...
		switch ( nCheatCode )
		{
			case CHEAT_CHASETOGGLE:
				ChaseToggle();
			break;

			case CHEAT_EXITLEVEL:	// exit the current level
				SetExitLevel();
			break;

			case CHEAT_NEXTMISSION:	// exit the current mission
				NextMission();
			break;

			case CHEAT_BOOT:		// boot players
				BootPlayer(cMsg);
			break;

			default :
				return false;
			break;
		}

		m_bPlayerCheated = LTTRUE;
		return true;
	}
#endif // _FINAL

	// process cheat codes
	switch ( nCheatCode )
	{
		case CHEAT_GOD:			// god mode toggle
			SetGodMode(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_SKILLZ:		// give em skill points
			GetSkills();
		break;

		case CHEAT_ARMOR:		// full armor
			SetArmor();
		break;

		case CHEAT_HEALTH:		// full health
			SetHealth();
		break;

		case CHEAT_EXITLEVEL:	// exit the current level
			SetExitLevel();
		break;

		case CHEAT_VERSION:		// display version info
			Version();
		break;

		case CHEAT_BUILDGUID:	// display build guid
			BuildGuid();
		break;

		case CHEAT_INVISIBLE:	// time to mess with the AI
			SetInvisible(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_BODYGOLFING:	// bodies fly far	
			BodyGolfing(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_POS:			// show/hide player position
			SetPos(!s_CheatInfo[nCheatCode].bActive);
		break;

#ifndef _TO2DEMO
		
		case CHEAT_KFA:			// give em everything
			SetKFA();
		break;

		case CHEAT_AMMO:		// full ammo
			SetAmmo();
		break;

		case CHEAT_MODSQUAD:	// give all mods for current weapons
			ModSquad();
		break;

		case CHEAT_CONSOLE:
			SetConsole(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_NEXTMISSION:	// exit the current mission
			NextMission();
		break;

		case CHEAT_BOOT:	// exit the current mission
			BootPlayer(cMsg);
		break;

		case CHEAT_FULL_WEAPONS:   // give all weapons
			SetFullWeapons();
		break;

		case CHEAT_SNOWMOBILE:	  // spawn in snowmobile
			Snowmobile(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_FULL_GEAR:	// give all gear
			FullGear();
		break;

		case CHEAT_TEARS:	      // toggle tears cheat
			Tears(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_GIMMEGUN:
			GimmeGun( cMsg );
		break;

		case CHEAT_GIMMEMOD:
			GimmeMod( cMsg );
		break;

		case CHEAT_GIMMEGEAR:
			GimmeGear( cMsg );
		break;

		case CHEAT_GIMMEAMMO:
			GimmeAmmo( cMsg );
		break;

		case CHEAT_ENDGAME:
			ToggleEndgameFlag();
		break;

#ifndef _FINAL

		case CHEAT_CHASETOGGLE:	   // toggle 3rd person view
			ChaseToggle();
		break;

		case CHEAT_CLIP:		// toggle clipping mode
			SetClipMode(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_TELEPORT:	// teleport to beginning
			Teleport();
		break;

		case CHEAT_CAM_POSROT:    // show/hide camera position/rotation
			SetCamPosRot(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_POSWEAPON:		    // toggle adjust of weapon pos
			PosWeapon(!s_CheatInfo[nCheatCode].bActive);
		break;

  		case CHEAT_POSWEAPON_MUZZLE:	// toggle adjust of weapon muzzle pos
  			PosWeaponMuzzle(!s_CheatInfo[nCheatCode].bActive);
  		break;

  		case CHEAT_WEAPON_BREACHOFFSET:	// toggle adjust of weapon breach offset pos
  			WeaponBreachOffset(!s_CheatInfo[nCheatCode].bActive);
  		break;

		case CHEAT_LIGHTSCALE:	      // toggle client light scale offset
			LightScale(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_LIGHTADD:	      // toggle client light add offset
			LightAdd(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_FOV:				// toggle fov cheat
			FOV(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_REMOVEAI:	  // remove all ai
			RemoveAI(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_TRIGGERBOX:	  // toggle trigger boxes on/off
			TriggerBox(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_POS1STCAM:	  // toggle 1st person camera adjust on/off
			Pos1stCam(!s_CheatInfo[nCheatCode].bActive);
		break;

#endif  // _FINAL
#endif // _TO2DEMO

		default:
			return false;			// skip setting global cheat indicator for unhandled cheats
	}

    m_bPlayerCheated = LTTRUE;

	return true;
}