Eh baswell
This commit is contained in:
		| @@ -33,48 +33,51 @@ void RemotePlayer::Init() | ||||
|  | ||||
| void RemotePlayer::Feed(const netprot::Output out) { | ||||
|  | ||||
| 	//current.position = out.position; | ||||
| 	//current.direction = out.direction; | ||||
| 	//current.states = out.states; | ||||
| 	//current.id = out.id; | ||||
| 	current.position = out.position; | ||||
| 	current.direction = out.direction; | ||||
| 	current.states = out.states; | ||||
| 	current.id = out.id; | ||||
|  | ||||
| 	//if (current.position != previous.position) | ||||
| 	//{ | ||||
| 	//	Vector3f positionDelta = current.position - previous.position; | ||||
| 	//	m_position = current.position + positionDelta; | ||||
| 	//	m_direction = current.direction;		 | ||||
| 	if (current.position != previous.position) | ||||
| 	{ | ||||
| 		Vector3f positionDelta = current.position - previous.position; | ||||
| 		m_position = current.position + positionDelta; | ||||
| 		m_direction = current.direction;		 | ||||
|  | ||||
| 	//} | ||||
| 	} | ||||
|  | ||||
| 	//if(current.direction != previous.direction) | ||||
| 	//{ | ||||
| 	//	m_direction = current.direction; | ||||
| 	//	current.direction = current.direction; | ||||
| 	//} | ||||
| 	if(current.direction != previous.direction) | ||||
| 	{ | ||||
| 		m_direction = current.direction; | ||||
| 		current.direction = current.direction; | ||||
| 	} | ||||
|  | ||||
| 	//if (current.states.shooting) { | ||||
| 	//	m_animstate = Anim::SHOOTING; | ||||
| 	//} | ||||
| 	//else if (current.states.jumping) { | ||||
| 	//	m_animstate = Anim::JUMPING; | ||||
| 	//} | ||||
| 	//else if (current.states.dead) { | ||||
| 	//	m_animstate = Anim::DEAD; | ||||
| 	//} | ||||
| 	//else if(current.states.powerup){ | ||||
| 	//	m_animstate = Anim::POWERUP; | ||||
| 	//} | ||||
| 	//else if (current.states.still) { | ||||
| 	//	m_animstate = Anim::STILL; | ||||
| 	//} | ||||
| 	//else if (current.states.running) { | ||||
| 	//	m_animstate = Anim::RUNNING; | ||||
| 	//} | ||||
| 	if (current.states.shooting) { | ||||
| 		m_animstate = Anim::SHOOTING; | ||||
| 	} | ||||
| 	else if (current.states.jumping) { | ||||
| 		m_animstate = Anim::JUMPING; | ||||
| 	} | ||||
| 	else if (current.states.dead) { | ||||
| 		m_animstate = Anim::DEAD; | ||||
| 	} | ||||
| 	else if(current.states.powerup){ | ||||
| 		m_animstate = Anim::POWERUP; | ||||
| 	} | ||||
| 	else if (current.states.still) { | ||||
| 		m_animstate = Anim::STILL; | ||||
| 	} | ||||
| 	else if (current.states.running) { | ||||
| 		m_animstate = Anim::RUNNING; | ||||
| 	} | ||||
|  | ||||
| 	//previous.direction = current.direction; | ||||
| 	//previous.position = current.position; | ||||
| 	//previous.states = current.states; | ||||
| 	//previous.id = current.id; | ||||
| 	previous.direction = current.direction; | ||||
| 	previous.position = current.position; | ||||
| 	previous.states = current.states; | ||||
| 	previous.id = current.id; | ||||
|  | ||||
| 	m_direction = current.direction; | ||||
| 	m_position = current.position; | ||||
| } | ||||
|  | ||||
| void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tran, float elapsedTime) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user