diff --git a/resources/Schema/Entities/Player.xml b/resources/Schema/Entities/Player.xml
index 1d72189e..be6009ba 100644
--- a/resources/Schema/Entities/Player.xml
+++ b/resources/Schema/Entities/Player.xml
@@ -23,9 +23,7 @@
-
-
-
+
@@ -37,20 +35,6 @@
-
-
-
- Fonts/DroidSans.ttf,100
-
-
-
-
-
-
-
-
-
-
@@ -504,7 +488,6 @@
Models/Characters/Assault/AssaultAnimations.mesh
- false
@@ -574,6 +557,21 @@
+
+
+
+ Insert name here
+ Fonts/DroidSans.ttf,100
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/Schema/Entities/PlayerRed.xml b/resources/Schema/Entities/PlayerRed.xml
index 3031f27b..d9839e9f 100644
--- a/resources/Schema/Entities/PlayerRed.xml
+++ b/resources/Schema/Entities/PlayerRed.xml
@@ -35,20 +35,6 @@
-
-
-
- Fonts/DroidSans.ttf,100
-
-
-
-
-
-
-
-
-
-
@@ -571,6 +557,21 @@
+
+
+
+ Insert name here
+ Fonts/DroidSans.ttf,100
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Engine/Rendering/Skeleton.cpp b/src/Engine/Rendering/Skeleton.cpp
index e390d694..2957b1b6 100644
--- a/src/Engine/Rendering/Skeleton.cpp
+++ b/src/Engine/Rendering/Skeleton.cpp
@@ -121,7 +121,6 @@ void Skeleton::AccumulateBoneTransforms(bool noRootMotion, std::vector 1.0f || progress < 0.0f) {
- LOG_INFO("Progress: %f", progress);
progress = glm::clamp(progress, 0.0f, 1.0f);
}
Animation::Keyframe::BoneProperty currentBoneProperty = currentFrame.BoneProperties;
@@ -241,7 +240,6 @@ void Skeleton::AccumulateBoneTransforms(bool noRootMotion, std::vector 1.0f || progress < 0.0f) {
- LOG_INFO("Progress: %f", progress);
progress = glm::clamp(progress, 0.0f, 1.0f);
}
Animation::Keyframe::BoneProperty currentBoneProperty = currentFrame.BoneProperties;
@@ -489,7 +487,6 @@ glm::mat4 Skeleton::GetBoneTransform(bool noRootMotion, const Bone* bone, std::v
if (progress > 1.0f || progress < 0.0f) {
- LOG_INFO("Progress: %f", progress);
progress = glm::clamp(progress, 0.0f, 1.0f);
}
Animation::Keyframe::BoneProperty currentBoneProperty = currentFrame.BoneProperties;
@@ -609,12 +606,10 @@ glm::mat4 Skeleton::GetBoneTransform(bool noRootMotion, const Bone* bone, std::v
progress = (time - currentFrame.Time) / (animation->Duration - currentFrame.Time);
} else {
progress = (time - currentFrame.Time) / (nextFrame.Time - currentFrame.Time);
-
}
if (progress > 1.0f || progress < 0.0f) {
- LOG_INFO("Progress: %f", progress);
progress = glm::clamp(progress, 0.0f, 1.0f);
}
Animation::Keyframe::BoneProperty currentBoneProperty = currentFrame.BoneProperties;
diff --git a/src/Game/Network/MultiplayerSnapshotFilter.cpp b/src/Game/Network/MultiplayerSnapshotFilter.cpp
index 52255ed3..69b7f282 100644
--- a/src/Game/Network/MultiplayerSnapshotFilter.cpp
+++ b/src/Game/Network/MultiplayerSnapshotFilter.cpp
@@ -15,6 +15,7 @@ bool MultiplayerSnapshotFilter::FilterComponent(EntityWrapper entity, SharedComp
|| component.Info.Name == "AssaultWeapon"
|| component.Info.Name == "Animation"
|| component.Info.Name == "AnimationOffset"
+ || entity.Name() == "PlayerName"
) {
return false;
}
diff --git a/src/Game/Systems/PlayerMovementSystem.cpp b/src/Game/Systems/PlayerMovementSystem.cpp
index 9bf1d25e..71fb16ee 100644
--- a/src/Game/Systems/PlayerMovementSystem.cpp
+++ b/src/Game/Systems/PlayerMovementSystem.cpp
@@ -79,18 +79,18 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
}
glm::vec3& velocity = cPhysics["Velocity"];
bool isOnGround = (bool)cPhysics["IsOnGround"];
- ImGui::Text(isOnGround ? "On ground" : "In air");
- ImGui::Text("velocity: (%f, %f, %f) |%f|", velocity.x, velocity.y, velocity.z, glm::length(velocity));
+ //ImGui::Text(isOnGround ? "On ground" : "In air");
+ //ImGui::Text("velocity: (%f, %f, %f) |%f|", velocity.x, velocity.y, velocity.z, glm::length(velocity));
glm::vec3 groundVelocity(0.f, 0.f, 0.f);
groundVelocity.x = velocity.x;
groundVelocity.z = velocity.z;
- ImGui::Text("groundVelocity: (%f, %f, %f) |%f|", groundVelocity.x, groundVelocity.y, groundVelocity.z, glm::length(groundVelocity));
- ImGui::Text("wishDirection: (%f, %f, %f) |%f|", wishDirection.x, wishDirection.y, wishDirection.z, glm::length(wishDirection));
+ //ImGui::Text("groundVelocity: (%f, %f, %f) |%f|", groundVelocity.x, groundVelocity.y, groundVelocity.z, glm::length(groundVelocity));
+ //ImGui::Text("wishDirection: (%f, %f, %f) |%f|", wishDirection.x, wishDirection.y, wishDirection.z, glm::length(wishDirection));
float currentSpeedProj = glm::dot(groundVelocity, wishDirection);
float addSpeed = wishSpeed - currentSpeedProj;
- ImGui::Text("currentSpeedProj: %f", currentSpeedProj);
- ImGui::Text("wishSpeed: %f", wishSpeed);
- ImGui::Text("addSpeed: %f", addSpeed);
+ //ImGui::Text("currentSpeedProj: %f", currentSpeedProj);
+ //ImGui::Text("wishSpeed: %f", wishSpeed);
+ //ImGui::Text("addSpeed: %f", addSpeed);
if (addSpeed > 0) {
static float accel = 15.f;
diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp
index 8183866b..5f53a1fc 100644
--- a/src/Game/Systems/PlayerSpawnSystem.cpp
+++ b/src/Game/Systems/PlayerSpawnSystem.cpp
@@ -128,6 +128,12 @@ bool PlayerSpawnSystem::OnPlayerSpawned(Events::PlayerSpawned& e)
// When a player is actually spawned (since the actual spawning is handled on the server)
// Hack should be moved.
+ // TODO: Set the player name to whatever
+ EntityWrapper playerName = e.Player.FirstChildByName("PlayerName");
+ if (playerName.Valid()) {
+ playerName["Text"]["Content"] = e.PlayerName;
+ }
+
if (!IsClient) {
return false;
}
@@ -153,12 +159,6 @@ bool PlayerSpawnSystem::OnPlayerSpawned(Events::PlayerSpawned& e)
}
}
- // TODO: Set the player name to whatever
- EntityWrapper playerName = e.Player.FirstChildByName("PlayerName");
- if (playerName.Valid()) {
- playerName["Text"]["Content"] = e.PlayerName;
- }
-
return true;
}
@@ -181,10 +181,10 @@ bool PlayerSpawnSystem::OnPlayerDeath(Events::PlayerDeath& e)
return false;
}
- SpawnRequest req;
- req.PlayerID = m_PlayerIDs.at(e.Player.ID);
- req.Team = cTeam["Team"];
- m_SpawnRequests.push_back(req);
+ SpawnRequest req;
+ req.PlayerID = m_PlayerIDs.at(e.Player.ID);
+ req.Team = cTeam["Team"];
+ m_SpawnRequests.push_back(req);
return true;
}