Merge remote-tracking branch 'origin/Networking' into Networking

This commit is contained in:
Jocke
2015-12-16 14:58:36 +01:00
3 changed files with 10 additions and 8 deletions
+5 -5
View File
@@ -2,17 +2,17 @@
void PlayerSystem::UpdateComponent(World * world, ComponentWrapper & player, double dt)
{
(glm::vec3)player["Velocity"] = glm::vec3(0.f, 0.f, 0.f);
if (static_cast<bool>(player["Forward"])== true) {
player["Velocity"] = glm::vec3(0.f, 0.f, 0.f);
if ((bool&)player["Forward"] == true) {
((glm::vec3&)player["Velocity"]).z = m_Speed * float(dt) * -1;
}
if (static_cast<bool>(player["Left"]) == true) {
if ((bool&)player["Left"] == true) {
((glm::vec3&)player["Velocity"]).x = m_Speed * float(dt) * -1;
}
if (static_cast<bool>(player["Back"]) == true) {
if ((bool&)player["Back"] == true) {
((glm::vec3&)player["Velocity"]).z = m_Speed * float(dt);
}
if (static_cast<bool>(player["Right"]) == true) {
if ((bool&)player["Right"] == true) {
((glm::vec3&)player["Velocity"]).x = m_Speed * float(dt);
}