Le bonhomme n'a plus la maladie de Parkinson, et le jeu refonctionne sur MSVC++.
This commit is contained in:
		| @@ -30,11 +30,12 @@ Vector3f Player::GetInput(bool front, bool back, bool left, bool right, bool jum | ||||
| 						  -sin(m_rotX / 57.2957795056f), | ||||
| 						   sin(m_rotY / 57.2957795056f) * cos(m_rotX / 57.2957795056f)); | ||||
|  | ||||
| 	if (m_airborne && !jump) m_airborne = false; // Anti-rebondissement du saut, pour pouvoir rebondir. | ||||
| 	//if (m_airborne && !jump) m_airborne = false; // Anti-rebondissement du saut, pour pouvoir rebondir. | ||||
|  | ||||
| 	if ((jump || dash) && !m_airborne) { | ||||
| 		delta.y += jump ? m_jumpforce : 0.01f; | ||||
| 		m_airborne = true; | ||||
| 		//m_jumped = true; | ||||
| 		m_dbljump++; | ||||
| 	} | ||||
|  | ||||
| @@ -201,7 +202,7 @@ void Player::ApplyPhysics(Vector3f input, World world, float elapsedTime) { | ||||
| 		if (!m_airborne) m_position.y = (int)m_position.y + .7f; | ||||
| 		m_airborne = false; | ||||
| 	} | ||||
| 	else { | ||||
| 	else if (m_airborne) { | ||||
| 		if (abs(m_velocity.y) < 1.1f) m_velocity.y += input.y - 1.1f * elapsedTime; | ||||
| 		m_airborne = true; | ||||
| 	} | ||||
| @@ -223,14 +224,13 @@ void Player::ApplyPhysics(Vector3f input, World world, float elapsedTime) { | ||||
| 	/* Fin gestion de collisions */ | ||||
|  | ||||
| 	m_position += input; | ||||
| 	m_POV = input; | ||||
| 	m_position.y += m_velocity.y; | ||||
| 	if (m_airborne) m_position.y += m_velocity.y; | ||||
|  | ||||
| 	//static float bobbingtime = 0; // Gestion de la cam<61>ra | ||||
| 	//if (bobbingtime <= 360.f) bobbingtime += elapsedTime * m_topspeed / 2; else bobbingtime = 0; | ||||
| 	//m_POV.x = m_position.x; | ||||
| 	//m_POV.z = m_position.z; | ||||
| 	//m_POV.y = m_position.y - 1.7f + m_airborne ? 0 : ((sin(bobbingtime) - 0.5f) * (abs(m_velocity.x * 40) + abs(m_velocity.z * 40)) / (10.f * m_topspeed)); | ||||
| 	static float bobbingtime = 0; // Gestion de la cam<61>ra | ||||
| 	if (bobbingtime <= 360.f) bobbingtime += elapsedTime * m_topspeed / 2; else bobbingtime = 0; | ||||
| 	m_POV.x = m_position.x; | ||||
| 	m_POV.z = m_position.z; | ||||
| 	m_POV.y = m_position.y - 1.7f + m_airborne ? 0 : ((sin(bobbingtime) - 0.5f) * (abs(m_velocity.x * 40) + abs(m_velocity.z * 40)) / (10.f * m_topspeed)); | ||||
| } | ||||
|  | ||||
| void Player::ApplyTransformation(Transformation& transformation, bool rel) const { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user