diff --git a/assets b/assets index 9e9d799f..ed931487 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 9e9d799f117f0e0952cc23e7cf680b78debcb338 +Subproject commit ed931487642fae21366f52d69121068a38c4c1a7 diff --git a/include/Engine/Collision/Collision.h b/include/Engine/Collision/Collision.h index 5431df4d..1fd24cc6 100644 --- a/include/Engine/Collision/Collision.h +++ b/include/Engine/Collision/Collision.h @@ -48,13 +48,13 @@ bool RayVsTriangle(const Ray& ray, bool trueOnNegativeDistance = false); //Return true if the ray hits any of the triangles in the model. Stops checking when a hit is detected. bool RayVsModel(const Ray& ray, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix); //Return true if the ray hits any of the triangles in the model. //Also returns the position of the intersection point. Will loop through all the whole model indices. bool RayVsModel(const Ray& ray, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix, glm::vec3& outHitPosition); @@ -62,7 +62,7 @@ bool RayVsModel(const Ray& ray, //Also returns the distance from the ray origin to the closest //intersection point, and the barycentric u,v-coordinates. Will loop through all the whole model indices. bool RayVsModel(const Ray& ray, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix, float& outDistance, @@ -70,7 +70,7 @@ bool RayVsModel(const Ray& ray, float& outVCoord); bool AABBvsTriangles(const AABB& box, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix, glm::vec3& boxVelocity, @@ -80,7 +80,7 @@ bool AABBvsTriangles(const AABB& box, //Detects collision, but does not resolve. bool AABBvsTriangles(const AABB& box, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix); @@ -92,7 +92,7 @@ enum Output }; //Detects intersection and containment. Output AABBvsTrianglesWContainment(const AABB& box, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix); diff --git a/include/Engine/Rendering/Model.h b/include/Engine/Rendering/Model.h index 4c63b922..acdf64db 100644 --- a/include/Engine/Rendering/Model.h +++ b/include/Engine/Rendering/Model.h @@ -16,15 +16,18 @@ private: public: ~Model(); - const std::vector& MaterialGroups() const { return m_RawModel->m_Materials; } - const glm::mat4& Matrix() const { return m_RawModel->m_Matrix; } - const RawModel::Vertex* Vertices() const { return m_RawModel->Vertices(); } - unsigned int NumberOfVertices() const { return m_RawModel->NumVertices(); } + const std::vector& MaterialGroups() const { return m_Materials; } + unsigned int NumberOfVertices() const { return m_Vertices.size(); } + const AABB& Box() const { return m_Box; } - bool IsSkinned() const { return m_RawModel->IsSkinned(); } + bool IsSkinned() const { return m_IsSkinned; } GLuint VAO; GLuint ElementBuffer; - RawModel* m_RawModel; + //RawModel* m_RawModel; + + Skeleton* m_Skeleton = nullptr; + std::vector m_Vertices; + std::vector m_Indices; private: AABB m_Box; @@ -34,6 +37,9 @@ private: GLuint TangentNormalsBuffer; GLuint BiTangentNormalsBuffer; GLuint TextureCoordBuffer; + + std::vector m_Materials; + bool m_IsSkinned; }; #endif diff --git a/include/Engine/Rendering/ModelJob.h b/include/Engine/Rendering/ModelJob.h index 4821a222..86b89ad6 100644 --- a/include/Engine/Rendering/ModelJob.h +++ b/include/Engine/Rendering/ModelJob.h @@ -110,7 +110,7 @@ struct ModelJob : RenderJob } if (model->IsSkinned()) { - Skeleton = Model->m_RawModel->m_Skeleton; + Skeleton = Model->m_Skeleton; if (Skeleton != nullptr) { EntityWrapper entityWrapper = EntityWrapper(world, modelComponent.EntityID); diff --git a/include/Engine/Rendering/RawModelCustom.h b/include/Engine/Rendering/RawModelCustom.h index f9fd18ef..12e54d3f 100644 --- a/include/Engine/Rendering/RawModelCustom.h +++ b/include/Engine/Rendering/RawModelCustom.h @@ -13,6 +13,7 @@ #include +#include #include "../Common.h" #include "../GLM.h" #include "../Core/ResourceManager.h" @@ -20,22 +21,17 @@ #include "Skeleton.h" #include "ShaderProgram.h" -#include "boost\endian\buffers.hpp" - - - class RawModelCustom : public Resource { friend class ResourceManager; - + friend class Model; protected: RawModelCustom(std::string fileName); public: ~RawModelCustom(); - - struct Vertex - { + + struct RenderVertex { glm::vec3 Position; glm::vec3 Normal; glm::vec3 Tangent; @@ -43,7 +39,7 @@ public: glm::vec2 TextureCoords; }; - struct SkinedVertex : public Vertex { + struct SkinedVertex : public RenderVertex { glm::vec4 BoneIndices; glm::vec4 BoneWeights; }; @@ -91,7 +87,7 @@ public: unsigned int ShaderID = 0; }; - const Vertex* Vertices() const { + const RenderVertex* Vertices() const { if (hasSkin) { return m_SkinedVertices.data(); } else { @@ -99,16 +95,16 @@ public: } }; - unsigned int VertexSize() const { + unsigned int VertexSize() const { if (hasSkin) { return sizeof(SkinedVertex); } else { - return sizeof(Vertex); + return sizeof(RenderVertex); } }; - unsigned int NumVertices() const { + size_t NumVertices() const { if (hasSkin) { return m_SkinedVertices.size(); } else { @@ -116,17 +112,39 @@ public: } }; + const std::vector& Indices() const { + return m_Indices; + } + bool IsSkinned() const { return hasSkin; }; + const std::vector& CollisionVertices(); + + size_t NumCollisionVertices() const { + return m_CollisionVertices.size(); + }; + + const std::vector& CollisionIndices() const { + if (hasCollisionMesh) { + return m_CollisionIndices; + } else { + return m_Indices; + } + }; + std::vector m_Materials; - std::vector m_Indices; + Skeleton* m_Skeleton = nullptr; glm::mat4 m_Matrix; private: bool hasSkin; - std::vector m_Vertices; + bool hasCollisionMesh = false; + std::vector m_Indices; + std::vector m_CollisionIndices; + std::vector m_CollisionVertices; + std::vector m_Vertices; std::vector m_SkinedVertices; void ReadMeshFile(std::string filePath); @@ -149,7 +167,12 @@ private: void ReadAnimationClips(std::size_t& offset, char* fileData, const unsigned int& fileByteSize, unsigned int numberOfClips); void ReadAnimationClipSingle(std::size_t& offset, char* fileData, const unsigned int& fileByteSize, unsigned int clipIndex); void ReadAnimationKeyFrame(std::size_t& offset, char* fileData, const unsigned int& fileByteSize, std::vector& animation); - + + + void ReadCollisionFile(std::string filePath); + void ReadCollisionFileData(std::size_t& offset, char* fileData, const unsigned int& fileByteSize); + + const std::vector& ConstructCollisionList(); //void CreateSkeleton(std::vector> &boneInfo, std::map &boneNameMapping, aiNode* node, int parentID); }; diff --git a/include/Game/Systems/MainMenuSystem.h b/include/Game/Systems/MainMenuSystem.h index 2e85df97..96b6ee28 100644 --- a/include/Game/Systems/MainMenuSystem.h +++ b/include/Game/Systems/MainMenuSystem.h @@ -13,6 +13,7 @@ #include "Input/EInputCommand.h" #include "Network/ESearchForServers.h" #include "Network/EConnectRequest.h" +#include class MainMenuSystem : public ImpureSystem diff --git a/include/Game/Systems/SpawnerSystem.h b/include/Game/Systems/SpawnerSystem.h index 71ae2772..96b33cb6 100644 --- a/include/Game/Systems/SpawnerSystem.h +++ b/include/Game/Systems/SpawnerSystem.h @@ -8,6 +8,7 @@ #include "Events/ESpawnerSpawn.h" #include "Core/TransformSystem.h" #include "Core/EntityFile.h" +#include "Rendering/Model.h" class SpawnerSystem : public System { diff --git a/resources/Schema/Entities/FriendlyBoostRedHUD.xml b/resources/Schema/Entities/FriendlyBoostRedHUD.xml new file mode 100644 index 00000000..bdf08281 --- /dev/null +++ b/resources/Schema/Entities/FriendlyBoostRedHUD.xml @@ -0,0 +1,151 @@ + + + + + + 0.5 + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + \1 + Fonts/Hind-Edited.otf,64 + + false + + + + + + + + + + + \1 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + \2 + Fonts/Hind-Edited.otf,64 + + false + + + + + + + + + + + \2 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + \3 + Fonts/Hind-Edited.otf,64 + + false + + + + + + + + + + + \3 + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/MovementTest.xml b/resources/Schema/Entities/MovementTest.xml index e12f6f7d..df9d7b06 100644 --- a/resources/Schema/Entities/MovementTest.xml +++ b/resources/Schema/Entities/MovementTest.xml @@ -20,8 +20,8 @@ - Schema/Entities/PlayerAssaultBlue.xml - Schema/Entities/PlayerDefenderBlue.xml + Schema/Entities/PlayerAssaultRed.xml + Schema/Entities/PlayerDefenderRed.xml @@ -115,7 +115,7 @@ - + @@ -128,7 +128,7 @@ - + diff --git a/resources/Schema/Entities/MuzzleFlashRed.xml b/resources/Schema/Entities/MuzzleFlashRed.xml index 50b22d6c..97fe29c8 100644 --- a/resources/Schema/Entities/MuzzleFlashRed.xml +++ b/resources/Schema/Entities/MuzzleFlashRed.xml @@ -130,6 +130,66 @@ + + + + + + + + + Models/Core/UnitSphere.mesh + false + false + + + + + + + + + + + + + + + Models/Core/UnitSphere.mesh + + false + false + + + + 0.40000000596046448 + + + + + + + + + + + + Models/Core/UnitSphere.mesh + false + false + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/MuzzleFlashSideArmRed.xml b/resources/Schema/Entities/MuzzleFlashSideArmRed.xml new file mode 100644 index 00000000..1f8220c4 --- /dev/null +++ b/resources/Schema/Entities/MuzzleFlashSideArmRed.xml @@ -0,0 +1,219 @@ + + + + + + 0.080000000000000002 + + + + + + + + + + + + + + 0.080000000000000002 + + + 2 + Models/Effects/MuzzleFlash/Red/Cone1Outside.mesh + false + true + + + + + + + + + 0.080000000000000002 + + + 2 + Models/Effects/MuzzleFlash/Red/Cone1Inside.mesh + false + true + + + + + + + + + + + + + + + + + + 0.080000000000000002 + + + 2 + Models/Effects/MuzzleFlash/Red/Cone2Inside.mesh + false + true + + + + + + + + + 0.080000000000000002 + + + 2 + Models/Effects/MuzzleFlash/Red/Cone2Outside.mesh + false + true + + + + + + + + + + + + + + + + + + 0.080000000000000002 + + + 2 + Models/Effects/MuzzleFlash/Red/PlaneLeft.mesh + false + true + + + + + + + + + 0.080000000000000002 + + + 2 + Models/Effects/MuzzleFlash/Red/PlaneRight.mesh + false + true + + + + + + + + + 0.080000000000000002 + + + 2 + Models/Effects/MuzzleFlash/Red/PlaneUp.mesh + false + true + + + + + + + + + 0.080000000000000002 + + + 2 + Models/Effects/MuzzleFlash/Red/PlaneDown.mesh + false + true + + + + + + + + + + + + + + + + Models/Core/UnitSphere.mesh + false + false + + + + + + + + + + + + + + + Models/Core/UnitSphere.mesh + + false + false + + + + 0.40000000596046448 + + + + + + + + + + + + Models/Core/UnitSphere.mesh + false + false + + + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/PlayerAssaultRed.xml b/resources/Schema/Entities/PlayerAssaultRed.xml new file mode 100644 index 00000000..6c25ce85 --- /dev/null +++ b/resources/Schema/Entities/PlayerAssaultRed.xml @@ -0,0 +1,1417 @@ + + + + + + + + + + + + + + + + + + + 10 + + + + + + + + 5 + + + + + + + + + + + + 0.10000000149011612 + 300 + + + + + + + + + + Models/Widgets/Camera.mesh + false + + + + + + + + + + + + Schema/Entities/PlayerHUD.xml + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Weapons/Crosshair/SmallThickHoleDot.png + + + + + + + + + + + + Schema/Entities/HitMarker.xml + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + 2 + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + 3 + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + 1 + + + + 4 + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + 1 + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + 1 + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + + + + + + + + + + + + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + Models/Widgets/Arrows/ArrowBlue.mesh + false + + + + + + + + + + + + + + + + + + + + + 1 + + + + + 100/100 + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + 1 + + + + + Models/Core/UnitQuad.mesh + + Textures/HealthHUD3.png + + + + + + + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Boosts/Assault-01.png + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Boosts/Defender-01.png + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Boosts/Sniper-01.png + + + + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Abilities/Long/Superman-01.png + + + + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/WeaponAssaultRedView.xml + + + + AssaultWeapon + + + + + + + + Schema/Entities/WeaponSidearmAssaultRedView.xml + + + + SidearmWeapon + + + + + + + + + + + + 0.10000000149011612 + 300 + + + Models/Widgets/Camera.mesh + false + + + + + + + + + + + + BlendTreeUpper + BlendTreeLower + + + + + 2.2000000476837158 + Models/Characters/Assault/AssaultRed.mesh + + + + + + + + R_Arm_Weapon_Joint + + + Schema/Entities/WeaponAssaultRedWorld.xml + + + + + + + AssaultWeapon + + + + + + + + + + + R_Arm_Weapon_Joint + + + Schema/Entities/SidearmWeaponRedWorld.xml + + + + + + + SidearmWeapon + + + + + + + + + + + MovementBlend + JumpDashBlend + 2.5146881298480398e-63 + true + + + + + + + + StandMovement + CrouchMovement + 0 + true + + + + + + + + DirectionBlend + Idle + 1 + + + + + + + + Walk + StrafeLRBlend + 0 + + + + + + + + Left + Right + 0.033793529385008014 + + + + + + + + CrouchStrafeLeftF + + true + + + + + + + + + CrouchStrafeRightF + + true + + + + + + + + + + + CrouchWalkF + + true + + + + + + + + + + + CrouchF + + true + + + + + + + + + + + DirectionBlend + Idle + 1 + + + + + + + + RunWalkBlend + StrafeLRBlend + 2.4565650245976452e-16 + + + + + + + + Walk + Run + 1.2938206818383024e-24 + + + + + + + + WalkF + + true + + + + + + + + + RunF + + 2 + true + + + + + + + + + + + Left + Right + 0.033793529385008014 + + + + + + + + StrafeLeftF + + 2 + true + + + + + + + + + StrafeRightF + + 2 + true + + + + + + + + + + + + + IdleF + + true + + + + + + + + + + + + + Jump + DashBlend + 1 + true + + + + + + + + JumpF + + false + + + + + + + + + DashFBBlend + DashLRBlend + 0.014621149736541383 + + + + + + + + DashForward + DashBackward + 0.014363533804961248 + + + + + + + + DashForwardF + + 1.7999999523162842 + false + + + + + + + + + DashBackwardF + + 1.7999999523162842 + false + + + + + + + + + + + DashLeft + DashRight + 4.3244885367500671e-16 + + + + + + + + DashLeftF + + 1.7999999523162842 + false + + + + + + + + + DashRightF + + 1.7999999523162842 + false + + + + + + + + + + + + + + + + + AssaultWeapon + SidearmWeapon + 0 + true + + + + + + + + Aim + WeaponBlend + + + + + + + + IdleAssault + ActionBlend + + + + + + + + Fire + Reload + 1 + + + + + + + + ReloadSwitchU + 0.5 + false + + + + + + + + + ShootFastRifleU + false + + + + + + + + + + + IdleAssaultRifleU + + true + true + + + + + + + + + + + AimRifleA + + 0.10000000149011612 + false + true + + + + + + + + + + + Aim + WeaponBlend + + + + + + + + IdleSidearm + ActionBlend + + + + + + + + Reload + Fire + 1 + + + + + + + + ReloadSwitchU + false + + + + + + + + + ShootSecWepU + false + + + + + + + + + + + IdleSecWepU + true + + + + + + + + + + + AimSecWepA + + false + true + + + + + + + + + + + + + + + + + + L_Elbow + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + + R_Elbow + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + + Head + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + + L_Leg_Top + + + + + 0.10000000149011612 + + + + + + + + + + + + R_Leg_Top + + + + + 0.10000000149011612 + + + + + + + + + + + + L_Leg_Bottomdw + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + + R_Leg_Bottom + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + false + + + + + + + + + + + + Models/Core/UnitCube.mesh + + false + + + + + + + + + + + + Fonts/DroidSans.ttf,100 + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Arrow.png + + + + + 50 + true + + + + + + + + + + + + Schema/Entities/DefenderShield.xml + + + + + + + + + + diff --git a/resources/Schema/Entities/PlayerDefenderRed.xml b/resources/Schema/Entities/PlayerDefenderRed.xml new file mode 100644 index 00000000..3dbb9289 --- /dev/null +++ b/resources/Schema/Entities/PlayerDefenderRed.xml @@ -0,0 +1,1426 @@ + + + + + + + + + + + + + + + + 120 + 8 + 5 + + + 10 + + + 150 + 150 + + + + + + + + 5 + + + + + + + + + + + + 0.10000000149011612 + 300 + + + + + + + + + + Models/Widgets/Camera.mesh + false + + + + + + + + + + + + + + + + + Schema/Entities/WeaponDefenderRedView.xml + + + + DefenderWeapon + + + + + + + + Schema/Entities/WeaponSidearmDefenderRedView.xml + + + + SidearmWeapon + + + + + + + + + + Schema/Entities/PlayerHUD.xml + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Weapons/Crosshair/SmallThickHoleDot.png + + + + + + + + + + + + Schema/Entities/HitMarker.xml + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + 2 + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + 3 + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + 1 + + + + 4 + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + 1 + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + 1 + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + + + + + + + + + + + + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + Fonts/Hind-Edited.otf,64 + + + + + + + + + + + + + + + + + + + + + + Models/Widgets/Arrows/ArrowBlue.mesh + false + + + + + + + + + + + + + + + + + + + + + 1 + + + + + 150/150 + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + 1 + + + + + Models/Core/UnitQuad.mesh + + Textures/HealthHUD3.png + + + + + + + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Boosts/Assault-01.png + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Boosts/Defender-01.png + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Boosts/Sniper-01.png + + + + + + + + + + + + + + + + + 1 + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Abilities/Long/SheildDots-01.png + + + + + + + + + + + + + + + + + + + + + + 0.10000000149011612 + 300 + + + Models/Widgets/Camera.mesh + false + + + + + + + + + + + + BlendTreeUpper + BlendTreeLower + + + + + 2.2000000476837158 + Models/Characters/Defender/DefenderRed.mesh + + + + + + + + R_Arm_Weapon_Joint + + + Schema/Entities/WeaponDefenderRedWorld.xml + + + + + + + DefenderWeapon + + + + + + + + + + + R_Arm_Weapon_Joint + + + Schema/Entities/SidearmWeaponRedWorld.xml + + + + + + + SidearmWeapon + + + + + + + + + + + MovementBlend + Jump + 0 + true + + + + + + + + StandMovement + CrouchMovement + 0 + true + + + + + + + + DirectionBlend + Idle + 1 + + + + + + + + Walk + StrafeLRBlend + 0 + + + + + + + + Left + Right + 0.033793529385008014 + + + + + + + + CrouchStrafeLeftF + + true + + + + + + + + + CrouchStrafeRightF + + true + + + + + + + + + + + CrouchWalkF + + true + + + + + + + + + + + CrouchF + + true + + + + + + + + + + + DirectionBlend + Idle + 1 + + + + + + + + RunWalkBlend + StrafeLRBlend + 2.4565650245976452e-16 + + + + + + + + Walk + Run + 1.2938206818383024e-24 + + + + + + + + WalkF + + true + + + + + + + + + RunF + + 2 + true + + + + + + + + + + + Left + Right + 0.033793529385008014 + + + + + + + + StrafeLeftF + + 2 + true + + + + + + + + + StrafeRightF + + 2 + true + + + + + + + + + + + + + IdleF + + true + + + + + + + + + + + + + JumpF + + false + + + + + + + + + + + DefenderWeapon + SidearmWeapon + 1 + true + + + + + + + + Aim + WeaponBlend + + + + + + + + IdleDefender + FinalBlend + + + + + + + + ShieldBlend + ActionBlend + 1 + + + + + + + + ActivateShield + SheildFront + 1 + + + + + + + + ActivateShieldU + + 2 + false + + + + + + + + + ShieldFrontU + + true + + + + + + + + + + + Fire + Reload + 0 + + + + + + + + ShootgunReloadU + + 0.5 + + + + + + + + + ShootRifleU + + false + + + + + + + + + + + + + IdleAssaultRifleU + + true + true + + + + + + + + + + + AimRifleA + + true + + + + + + + + + + + Aim + WeaponBlend + + + + + + + + IdleSidearm + ActionBlend + + + + + + + + Reload + Fire + + + + + + + + ReloadSwitchU + false + + + + + + + + + ShootSecWepU + false + + + + + + + + + + + IdleSecWepU + true + + + + + + + + + + + AimSecWepA + + 0.10000000149011612 + false + true + + + + + + + + + + + + + + + + + + Head + + + + + + + + + + + + 0.5 + 0.20000000298023224 + + + + + + + + + + + + 0.5 + 0.20000000298023224 + + + + + + + + + + + + 0.20000000298023224 + + + + + + + + + + + + + L_Shoulder_Armor_Joint + + + + + + + + + + + + 0.20000000298023224 + + + + + + + + + + + + + R_Shoulder_Armor_Joint + + + + + + + + + + + + 0.20000000298023224 + + + + + + + + + + + + + L_Elbow + + + + + + + + + + + + 0.20000000298023224 + + + + + + + + + + + + 0.20000000298023224 + + + + + + + + + + + + + R_Elbow + + + + + + + + + + + + 0.20000000298023224 + + + + + + + + + + + + 0.20000000298023224 + + + + + + + + + + + + + Spine_3 + + + + + + + + + + + + 0.20000000298023224 + + + + + + + + + + + + + L_Leg_Bottom + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + + R_Leg_Bottom + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + false + + + + + + + + + + + + Models/Core/UnitCube.mesh + + false + + + + + + + + + + + + Fonts/DroidSans.ttf,100 + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Icons/Arrow.png + + + + + 50 + true + + + + + + + + + + + + Schema/Entities/DefenderShield.xml + + + + + + + + diff --git a/resources/Schema/Entities/RayAssaultRed.xml b/resources/Schema/Entities/RayAssaultRed.xml new file mode 100644 index 00000000..e215f9ef --- /dev/null +++ b/resources/Schema/Entities/RayAssaultRed.xml @@ -0,0 +1,47 @@ + + + + + + 0.079999998211860657 + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Effects/NewRay5.png + + true + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Effects/NewRay5.png + + true + + + + + + + + + + + diff --git a/resources/Schema/Entities/RayDefenderRed.xml b/resources/Schema/Entities/RayDefenderRed.xml new file mode 100644 index 00000000..5ab225e2 --- /dev/null +++ b/resources/Schema/Entities/RayDefenderRed.xml @@ -0,0 +1,47 @@ + + + + + + 0.079999998211860657 + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Effects/NewRay7.png + + true + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Effects/NewRay7.png + + true + + + + + + + + + + + diff --git a/resources/Schema/Entities/RaySideArmRed.xml b/resources/Schema/Entities/RaySideArmRed.xml new file mode 100644 index 00000000..197d56ba --- /dev/null +++ b/resources/Schema/Entities/RaySideArmRed.xml @@ -0,0 +1,50 @@ + + + + + + 0.080000000000000002 + + + 0.080000000000000002 + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Effects/NewRay5.png + + true + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Effects/NewRay5.png + + true + + + + + + + + + + + diff --git a/resources/Schema/Entities/ReloadEffectViewRed.xml b/resources/Schema/Entities/ReloadEffectViewRed.xml index 56b9d140..731dff09 100644 --- a/resources/Schema/Entities/ReloadEffectViewRed.xml +++ b/resources/Schema/Entities/ReloadEffectViewRed.xml @@ -1,20 +1,20 @@ - + - 2 + 1 - true - - - true - + + + 1 + true Models/Weapons/Red/AssaultWeaponRed.mesh + true diff --git a/resources/Schema/Entities/ReloadEffectWorldRed.xml b/resources/Schema/Entities/ReloadEffectWorldRed.xml index 55c37389..94739beb 100644 --- a/resources/Schema/Entities/ReloadEffectWorldRed.xml +++ b/resources/Schema/Entities/ReloadEffectWorldRed.xml @@ -6,12 +6,14 @@ 2 - true - - - true - + + + + 1.3399996757507324 true + true + true + 5.0899982452392578 Models/Weapons/Red/AssaultWeaponRed.mesh diff --git a/resources/Schema/Entities/SidearmWeaponRedWorld.xml b/resources/Schema/Entities/SidearmWeaponRedWorld.xml new file mode 100644 index 00000000..0dc94319 --- /dev/null +++ b/resources/Schema/Entities/SidearmWeaponRedWorld.xml @@ -0,0 +1,47 @@ + + + + + + + Models/Weapons/Red/SecondaryWeaponRed.mesh + + + + + + + + + + + + + + + + Schema/Entities/RaySideArmRed.xml + + + + + + + + + + + Schema/Entities/MuzzleFlashSideArmRed.xml + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/StartMenu.xml b/resources/Schema/Entities/StartMenu.xml index 2bcd7118..28164744 100644 --- a/resources/Schema/Entities/StartMenu.xml +++ b/resources/Schema/Entities/StartMenu.xml @@ -22,7 +22,7 @@ - 5.9332086658013736 + 3.7499942402064335 @@ -54,8 +54,7 @@ - Models/Props/Walls/SciFiWallBig.mesh - true + Models/Props/Walls/SciFiWallMedium.mesh @@ -65,7 +64,8 @@ - Models/Props/Walls/SciFiWallMedium.mesh + Models/Props/Walls/SciFiWallBig.mesh + true @@ -697,6 +697,18 @@ + + + + + Models/Highgrounds/Hg4.mesh + + + + + + + @@ -758,18 +770,6 @@ - - - - - Models/Highgrounds/Hg4.mesh - - - - - - - @@ -2183,6 +2183,68 @@ + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + @@ -2523,6 +2585,47 @@ + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + @@ -3288,19 +3391,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -3341,20 +3431,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -3369,20 +3445,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -3396,8 +3458,8 @@ Models/Props/PickUps/PickUpHolder.mesh - - + + @@ -3405,49 +3467,7 @@ - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - + @@ -3462,8 +3482,8 @@ Models/Props/PickUps/AmmoPickUp.mesh - - + + @@ -3505,7 +3525,133 @@ - + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + @@ -3547,49 +3693,7 @@ - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - + @@ -3631,49 +3735,7 @@ - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - + @@ -3691,6 +3753,31 @@ + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + @@ -3720,18 +3807,6 @@ - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - @@ -3746,19 +3821,6 @@ - - - - - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - @@ -3775,73 +3837,24 @@ - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + @@ -3868,19 +3881,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - @@ -3912,6 +3912,108 @@ + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + @@ -3941,20 +4043,6 @@ - - - - - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - @@ -3969,21 +4057,6 @@ - - - - - 4 - Models/Props/Pillars/SciFiPillar3Red.mesh - - - - - - - - - @@ -3999,20 +4072,6 @@ - - - - - 6 - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - @@ -4027,21 +4086,6 @@ - - - - - 4 - Models/Props/Pillars/SciFiPillar1Red.mesh - - - - - - - - - @@ -4056,21 +4100,6 @@ - - - - - 4 - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - - @@ -4086,20 +4115,6 @@ - - - - - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - - @@ -4115,21 +4130,6 @@ - - - - - 4 - Models/Props/Pillars/SciFiPillar3Red.mesh - - - - - - - - - @@ -4137,53 +4137,813 @@ - + + - Models/Props/PickUps/PickUpHolder.mesh + Models/Props/Flora/SpecialRoot.mesh - - - + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + Models/Props/Walls/BigWallRed.mesh + - + + - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 4 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 2 + 1 + + + + + + + + + + + + 3 + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 4 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + 5 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + + @@ -4215,49 +4975,7 @@ - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - + @@ -4299,133 +5017,7 @@ - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - + @@ -4467,7 +5059,217 @@ - + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + @@ -4509,7 +5311,7 @@ - + @@ -4527,6 +5329,19 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + @@ -4567,19 +5382,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - @@ -4596,30 +5398,51 @@ - - - - - - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - - - + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + @@ -4627,13 +5450,269 @@ Models/Props/Stones/SmallStone1.mesh - - + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + @@ -4652,12 +5731,39 @@ - Models/Props/Stones/SmallStone1.mesh + Models/Props/Stones/SmallStone2.mesh - - - + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + @@ -4679,12 +5785,12 @@ - Models/Props/Stones/SmallStone1.mesh + Models/Props/Stones/MediumStone2.mesh - - - + + + @@ -4696,8 +5802,75 @@ Models/Props/Stones/SmallStone2.mesh - - + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + @@ -4716,19 +5889,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -4743,20 +5903,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -4770,18 +5916,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - @@ -4796,20 +5930,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - @@ -4823,20 +5943,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - @@ -4850,19 +5956,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - @@ -4876,20 +5969,6 @@ - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - @@ -4903,20 +5982,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -4930,19 +5995,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - @@ -4955,19 +6007,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -5022,20 +6061,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - @@ -5076,19 +6101,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -5103,20 +6115,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -5131,20 +6129,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -5159,20 +6143,6 @@ - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - @@ -5187,19 +6157,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -5213,19 +6170,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -5239,20 +6183,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - @@ -5267,19 +6197,6 @@ - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - @@ -5293,19 +6210,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - @@ -5319,20 +6223,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -5347,19 +6237,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -5373,19 +6250,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -5400,20 +6264,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - @@ -5456,19 +6306,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -5536,20 +6373,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - @@ -5564,19 +6387,6 @@ - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - @@ -5590,20 +6400,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - @@ -5618,15 +6414,21 @@ + + + + + + + - Models/Props/Stones/SmallStone1.mesh + Models/Props/Pillars/StonePillar.mesh - - + @@ -5658,8 +6460,8 @@ Models/Props/Stones/AssaultHolder.mesh - - + + @@ -5671,8 +6473,8 @@ Models/Props/Stones/AssaultHolder.mesh - - + + @@ -5684,6 +6486,18 @@ + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + @@ -5697,6 +6511,21 @@ + + + + + 6 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + @@ -5711,18 +6540,6 @@ - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - @@ -5737,21 +6554,6 @@ - - - - - 6 - Models/Props/Pillars/SciFiPillar1Red.mesh - - - - - - - - - @@ -5768,73 +6570,25 @@ - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - - - - - Models/Props/Flora/SpecialRoot.mesh - - - - - - - - - - + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + @@ -5863,20 +6617,6 @@ - - - - - Models/Props/Walls/SpecialWall1.mesh - - - - - - - - - @@ -5893,328 +6633,25 @@ - - - - - - - - - - 4 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - 3 - - - - - - - - - - - - 2 - - - - - - - - - - - - 2 - 1 - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - 4 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 5 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - - - + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + @@ -6227,45 +6664,6 @@ - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - - - - - - Models/Props/Pillars/SciFiBridgePillar1.mesh - - - - - - - - - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - @@ -6293,6 +6691,32 @@ + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + @@ -6306,6 +6730,32 @@ + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + @@ -6319,19 +6769,6 @@ - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - @@ -6351,12 +6788,12 @@ - Models/Props/Pillars/SciFiBridgePillar1.mesh + Models/Props/Bridges/SciFiBridge1Red.mesh - - - + + + @@ -6479,20 +6916,6 @@ - - - - - Models/Props/Bridges/SciFiBridge1Red.mesh - - - - - - - - - @@ -6510,429 +6933,6 @@ - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - @@ -6945,8 +6945,8 @@ Models/Props/SciFiHolder1.mesh - - + + @@ -6958,8 +6958,8 @@ Models/Props/SciFiHolder1.mesh - - + + @@ -7012,6 +7012,75 @@ + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + @@ -7054,19 +7123,6 @@ - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - @@ -7107,20 +7163,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -7160,20 +7202,6 @@ - - - - - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -7214,19 +7242,6 @@ - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - @@ -7266,236 +7281,6 @@ - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - - - - - - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - - 4 - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - 4 - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - - 4 - Models/Props/Pillars/SciFiPillar3Blue.mesh - - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar1Blue.mesh - - - - - - - - - - - - - 6 - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - - - - - - 4 - Models/Props/Pillars/SciFiPillar3Blue.mesh - - - - - - - - - @@ -7503,11 +7288,365 @@ + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + @@ -7535,19 +7674,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -7588,19 +7714,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -7642,19 +7755,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -7695,19 +7795,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -7734,32 +7821,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -7788,34 +7849,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -7868,7 +7901,7 @@ - + @@ -7910,7 +7943,7 @@ - + @@ -7928,6 +7961,46 @@ + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/smallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + @@ -7956,19 +8029,6 @@ - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - @@ -8010,20 +8070,6 @@ - - - - - Models/Props/Walls/smallWall3.mesh - - - - - - - - - @@ -8064,19 +8110,6 @@ - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - @@ -8116,253 +8149,220 @@ - + + + + + + + + + + + + + - + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + @@ -8373,6 +8373,17 @@ + + + + 10 + + + + + + + @@ -8407,17 +8418,6 @@ - - - - 10 - - - - - - - @@ -8472,6 +8472,19 @@ + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + @@ -8511,19 +8524,6 @@ - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - @@ -8546,6 +8546,18 @@ + + + + + Models/Core/UnitCube.mesh + + + + + + + @@ -8568,18 +8580,6 @@ - - - - - Models/Core/UnitCube.mesh - - - - - - - @@ -8804,7 +8804,7 @@ - + @@ -8816,7 +8816,7 @@ - + @@ -8872,14 +8872,14 @@ - + - + - + @@ -8890,48 +8890,21 @@ true + + Options + 1 + - - - - Quit - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Models/Core/UnitQuad.mesh - - Textures/HUD/ButtonCorner_16.png - false - - - - - - - - @@ -8948,8 +8921,39 @@ + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Options + Fonts/DroidSans.ttf,64 + + + + + + + + + + + @@ -9032,6 +9036,90 @@ + + + + + + + + + + + Quit + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + false + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + Quit + 1 + + + + + + + + + @@ -9114,90 +9202,6 @@ - - - - - - - - - - - - - - - - Models/Core/UnitQuad.mesh - - Textures/HUD/ButtonCorner_16.png - false - - - - - - - - - - - - - Models/Core/UnitQuad.mesh - - Textures/HUD/ButtonCorner_16.png - false - - - - - - - - - - - - - - - false - Models/Core/UnitQuad.mesh - - Textures/Core/White.png - true - - - - Options - 1 - - - - - - - - - - - Options - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - @@ -9207,19 +9211,19 @@ - + - Schema/Entities/OptionMenu.xml + Schema/Entities/ServerList.xml - + - Schema/Entities/ServerList.xml + Schema/Entities/OptionMenu.xml diff --git a/resources/Schema/Entities/WeaponAssaultRedView.xml b/resources/Schema/Entities/WeaponAssaultRedView.xml new file mode 100644 index 00000000..f3dcac06 --- /dev/null +++ b/resources/Schema/Entities/WeaponAssaultRedView.xml @@ -0,0 +1,233 @@ + + + + + + MovementBlend + ActionBlend + + + Models/Characters/Assault/FirstPersonAssaultRed.mesh + false + + + + + + + + + Fire + Reload + 0 + true + + + + + + + + ReloadSwitchF + 0.5 + false + + + + + + + + + ShootRifleF + false + + + + + + + + + + + Idle + Run + 0 + true + + + + + + + + RunF + true + true + + + + + + + + + IdleF + true + true + + + + + + + + + + + R_Arm_Weapon_Joint + + + 1.5 + Models/Weapons/Red/AssaultWeaponRed.mesh + false + + + + + + + + + + + Schema/Entities/WeaponAssaultReloadEffectViewRed.xml + + + + + + + + + + + + + + + + + Schema/Entities/MuzzleFlashRed.xml + + + + + + + + + + + Schema/Entities/RayAssaultRed.xml + + + + + + + + + + + + + + + R_Ammo_Joint + + true + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + + + 32 + Fonts/DroidSans.ttf,64 + + + + + AssaultWeapon + MagazineAmmo + + + + + + + + + + + 320 + Fonts/DroidSans.ttf,64 + + + + + AssaultWeapon + Ammo + + + + + + + + + + + + + + Schema/Entities/FriendlyBoostRedHUD.xml + + + + + + + + + + + + diff --git a/resources/Schema/Entities/WeaponAssaultRedWorld.xml b/resources/Schema/Entities/WeaponAssaultRedWorld.xml new file mode 100644 index 00000000..18d4096c --- /dev/null +++ b/resources/Schema/Entities/WeaponAssaultRedWorld.xml @@ -0,0 +1,56 @@ + + + + + + + Models/Weapons/Red/AssaultWeaponRed.mesh + + + + + + + + + Schema/Entities/ReloadEffectWorldRed.xml + + + + + + + + + + + + + + + + + Schema/Entities/MuzzleFlashRed.xml + + + + + + + + + + + Schema/Entities/RayAssaultRed.xml + + + + + + + + + + + + diff --git a/resources/Schema/Entities/WeaponAssaultReloadEffectViewRed.xml b/resources/Schema/Entities/WeaponAssaultReloadEffectViewRed.xml new file mode 100644 index 00000000..3cbb0fdc --- /dev/null +++ b/resources/Schema/Entities/WeaponAssaultReloadEffectViewRed.xml @@ -0,0 +1,54 @@ + + + + + + 2 + + + + + + + + + + + 1 + 1 + -1 + 1 + + true + + + Models/Weapons/Red/AssaultWeaponRed.mesh + true + + + + + + + + + 1 + + + + + 1 + + true + + + Models/Weapons/Red/AssaultWeaponRed.mesh + true + + + + + + + + diff --git a/resources/Schema/Entities/WeaponDefenderRedView.xml b/resources/Schema/Entities/WeaponDefenderRedView.xml new file mode 100644 index 00000000..b13d11d1 --- /dev/null +++ b/resources/Schema/Entities/WeaponDefenderRedView.xml @@ -0,0 +1,303 @@ + + + + + + MovementBlend + FinalBlend + + + Models/Characters/Defender/FirstPersonDefenderRed.mesh + false + + + + + + + + + ActionBlend + Shield + 0 + true + + + + + + + + ActivateShieldF + false + + + + + + + + + Fire + ReloadBlend + 0 + + + + + + + + ShootShotgunF + false + + + + + + + + + ReloadLoop + ReloadTransitionBlend + 1 + + + + + + + + ShotgunReloadTwoF + + + + + + + + + ReloadStart + ReloadEnd + 0 + + + + + + + + ShotgunReloadOneF + false + + + + + + + + + ShotgunReloadThreeF + false + + + + + + + + + + + + + + + + + Idle + Run + 0 + true + + + + + + + + IdleF + true + true + + + + + + + + + RunF + true + true + + + + + + + + + + + R_Ammo_Joint + + true + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + + + 38 + Fonts/DroidSans.ttf,64 + + + + + DefenderWeapon + Ammo + + + + + + + + + + + + 5 + Fonts/DroidSans.ttf,64 + + + + + DefenderWeapon + MagazineAmmo + + + + + + + + + + + + + Schema/Entities/FriendlyBoostRedHUD.xml + + + + + + + + + + + + + + + + + + R_Arm_Weapon_Joint + + + Models/Weapons/Red/DefenderWeaponRed.mesh + false + + + + + + + + + + + Schema/Entities/ReloadEffectView.xml + + + + + + + + + + + + + + + + + + Schema/Entities/RayDefenderRed.xml + + + + + + + + + + + Schema/Entities/MuzzleFlashRed.xml + + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/WeaponDefenderRedWorld.xml b/resources/Schema/Entities/WeaponDefenderRedWorld.xml new file mode 100644 index 00000000..19e5d332 --- /dev/null +++ b/resources/Schema/Entities/WeaponDefenderRedWorld.xml @@ -0,0 +1,56 @@ + + + + + + + Models/Weapons/Red/DefenderWeaponRed.mesh + + + + + + + + + Schema/Entities/ReloadEffectWorld.xml + + + + + + + + + + + + + + + + Schema/Entities/RayDefenderRed.xml + + + + + + + + + + + Schema/Entities/MuzzleFlashRed.xml + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/WeaponSidearmAssaultRedView.xml b/resources/Schema/Entities/WeaponSidearmAssaultRedView.xml new file mode 100644 index 00000000..b869d7ae --- /dev/null +++ b/resources/Schema/Entities/WeaponSidearmAssaultRedView.xml @@ -0,0 +1,239 @@ + + + + + + MovementBlend + ActionBlend + + + Models/Characters/Assault/FirstPersonAssaultRed.mesh + false + + + + + + + + + Idle + Run + 1 + true + + + + + + + + IdleSecF + true + true + + + + + + + + + RunSecF + true + true + + + + + + + + + + + Fire + Reload + 0 + + + + + + + + ShootSecF + false + + + + + + + + + ReloadSwitchSecF + false + + + + + + + + + + + R_Ammo_Joint + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + + + 16 + Fonts/DroidSans.ttf,64 + + + + + SidearmWeapon + MagazineAmmo + + + + + + + + + + + + 8 + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Schema/Entities/FriendlyAmmoHUD.xml + + + + + + + + + + + Schema/Entities/AmmoShareEffectView.xml + + + + + + + + + + + + + + + + R_Arm_Weapon_Joint + + + 1.2999999523162842 + Models/Weapons/Red/SecondaryWeaponRed.mesh + false + + + + + + + + + + + Schema/Entities/WeaponSidearmReloadEffectViewRed.xml + + + + + + + + + + + + + + + + + + Schema/Entities/RaySideArmRed.xml + + + + + + + + + Schema/Entities/MuzzleFlashSideArmRed.xml + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/WeaponSidearmDefenderRedView.xml b/resources/Schema/Entities/WeaponSidearmDefenderRedView.xml new file mode 100644 index 00000000..2f1a9b0d --- /dev/null +++ b/resources/Schema/Entities/WeaponSidearmDefenderRedView.xml @@ -0,0 +1,239 @@ + + + + + + MovementBlend + ActionBlend + + + Models/Characters/Defender/FirstPersonDefenderRed.mesh + false + + + + + + + + + Idle + Run + 1 + true + + + + + + + + IdleSecF + true + true + + + + + + + + + RunSecF + true + true + + + + + + + + + + + Fire + Reload + 0 + + + + + + + + ShootSecF + false + + + + + + + + + ReloadSwitchSecF + false + + + + + + + + + + + R_Ammo_Joint + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + + + 16 + Fonts/DroidSans.ttf,64 + + + + + SidearmWeapon + MagazineAmmo + + + + + + + + + + + + 8 + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Schema/Entities/FriendlyAmmoHUD.xml + + + + + + + + + + + Schema/Entities/AmmoShareEffectView.xml + + + + + + + + + + + + + + + + R_Arm_Weapon_Joint + + + 1.5 + Models/Weapons/Red/SecondaryWeaponRed.mesh + false + + + + + + + + + + + Schema/Entities/WeaponSidearmReloadEffectViewRed.xml + + + + + + + + + + + + + + + + + + Schema/Entities/RaySideArmRed.xml + + + + + + + + + Schema/Entities/MuzzleFlashSideArmRed.xml + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/WeaponSidearmReloadEffectViewRed.xml b/resources/Schema/Entities/WeaponSidearmReloadEffectViewRed.xml new file mode 100644 index 00000000..e20080b6 --- /dev/null +++ b/resources/Schema/Entities/WeaponSidearmReloadEffectViewRed.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + 0.5 + 0.5 + -1 + 0.5 + + true + + + 1.5 + Models/Weapons/Red/SecondaryWeaponRed.mesh + false + true + + + + + + + + + 0.5 + + + + 0.5 + + true + + + 1.5 + Models/Weapons/Red/SecondaryWeaponRed.mesh + false + true + + + + + + + + diff --git a/src/Engine/Collision/Collision.cpp b/src/Engine/Collision/Collision.cpp index dc04e8cf..ae09aeaf 100644 --- a/src/Engine/Collision/Collision.cpp +++ b/src/Engine/Collision/Collision.cpp @@ -146,14 +146,14 @@ bool RayVsTriangle(const Ray& ray, } bool RayVsModel(const Ray& ray, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix) { for (int i = 0; i < modelIndices.size();) { - glm::vec3 v0 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); - glm::vec3 v1 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); - glm::vec3 v2 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); + glm::vec3 v0 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix); + glm::vec3 v1 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix); + glm::vec3 v2 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix); if (RayVsTriangle(ray, v0, v1, v2)) { return true; } @@ -194,7 +194,7 @@ bool RayVsTriangle(const Ray& ray, } bool RayVsModel(const Ray& ray, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix, float& outDistance, @@ -204,9 +204,9 @@ bool RayVsModel(const Ray& ray, outDistance = INFINITY; bool hit = false; for (int i = 0; i < modelIndices.size();) { - glm::vec3 v0 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); - glm::vec3 v1 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); - glm::vec3 v2 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); + glm::vec3 v0 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix); + glm::vec3 v1 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix); + glm::vec3 v2 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix); float dist = outDistance; float u; float v; @@ -221,7 +221,7 @@ bool RayVsModel(const Ray& ray, } bool RayVsModel(const Ray& ray, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix, glm::vec3& outHitPosition) @@ -548,7 +548,7 @@ BoxTriRes AABBvsTriangle(const AABB& box, } Output AABBvsTriangles(const AABB& box, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix, glm::vec3& boxVelocity, @@ -565,9 +565,9 @@ Output AABBvsTriangles(const AABB& box, glm::vec3 originalBoxVelocity(boxVelocity); for (int i = 0; i < modelIndices.size(); ) { std::array triVertices = { - TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix), - TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix), - TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix) + TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix), + TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix), + TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix) }; glm::vec3 outVec; bool collideWithGround = isOnGround; @@ -595,7 +595,7 @@ Output AABBvsTriangles(const AABB& box, } bool AABBvsTriangles(const AABB& box, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix, glm::vec3& boxVelocity, @@ -615,7 +615,7 @@ bool AABBvsTriangles(const AABB& box, } bool AABBvsTriangles(const AABB& box, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix) { @@ -633,7 +633,7 @@ bool AABBvsTriangles(const AABB& box, } Output AABBvsTrianglesWContainment(const AABB& box, - const RawModel::Vertex* modelVertices, + const std::vector& modelVertices, const std::vector& modelIndices, const glm::mat4& modelMatrix) { @@ -741,7 +741,7 @@ boost::optional EntityFirstHitByRay(const Ray& ray, std::vectorVertices(), model->m_RawModel->m_Indices, TransformSystem::ModelMatrix(entityBox.Entity), outDistance, u, v)) { + if (RayVsModel(ray, model->m_Vertices, model->m_Indices, TransformSystem::ModelMatrix(entityBox.Entity), outDistance, u, v)) { outIntersectPos = ray.Origin() + outDistance * ray.Direction(); return entityBox; } diff --git a/src/Engine/Collision/CollisionSystem.cpp b/src/Engine/Collision/CollisionSystem.cpp index 433af482..e53143ac 100644 --- a/src/Engine/Collision/CollisionSystem.cpp +++ b/src/Engine/Collision/CollisionSystem.cpp @@ -41,15 +41,15 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c // Don't collide against invisible models. continue; } - RawModel* model; + Model* model; std::string res = (std::string)boxB.Entity["Model"]["Resource"]; try { - model = ResourceManager::Load(res); + model = ResourceManager::Load(res); } catch (const std::exception&) { continue; } float u, v; - hit = Collision::RayVsModel(ray, model->Vertices(), model->m_Indices, TransformSystem::ModelMatrix(boxB.Entity), dist, u, v); + hit = Collision::RayVsModel(ray, model->m_Vertices, model->m_Indices, TransformSystem::ModelMatrix(boxB.Entity), dist, u, v); } else { hit = Collision::RayVsAABB(ray, boxB, dist); } @@ -86,9 +86,9 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c // Don't collide against invisible models. continue; } - RawModel* model; + Model* model; try { - model = ResourceManager::Load(boxB.Entity["Model"]["Resource"]); + model = ResourceManager::Load(boxB.Entity["Model"]["Resource"]); } catch (const std::exception&) { continue; } @@ -98,7 +98,7 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c glm::vec3 inOutVelocity = (glm::vec3)cPhysics["Velocity"]; bool isOnGround = (bool)cPhysics["IsOnGround"]; float verticalStepHeight = (float)(double)cPhysics["VerticalStepHeight"]; - if (Collision::AABBvsTriangles(boxA, model->Vertices(), model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) { + if (Collision::AABBvsTriangles(boxA, model->m_Vertices, model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) { //Move the position to previous position if it is not moving in the xz-plane, else resolve with the resolution vector. (Field)cTransform["Position"] += resolutionVector; boxA = *Collision::EntityAbsoluteAABB(entity); diff --git a/src/Engine/Collision/TriggerSystem.cpp b/src/Engine/Collision/TriggerSystem.cpp index c9bc18dc..ef790bc9 100644 --- a/src/Engine/Collision/TriggerSystem.cpp +++ b/src/Engine/Collision/TriggerSystem.cpp @@ -10,11 +10,11 @@ void TriggerSystem::UpdateComponent(EntityWrapper& triggerEntity, ComponentWrapp return; } - RawModel* triggerModel = nullptr; + Model* triggerModel = nullptr; glm::mat4 triggerModelMat; if (triggerEntity.HasComponent("Model")) { try { - triggerModel = ResourceManager::Load(triggerEntity["Model"]["Resource"]); + triggerModel = ResourceManager::Load(triggerEntity["Model"]["Resource"]); triggerModelMat = TransformSystem::ModelMatrix(triggerEntity); } catch (const std::exception&) { } @@ -38,7 +38,7 @@ void TriggerSystem::UpdateComponent(EntityWrapper& triggerEntity, ComponentWrapp ? Collision::Output::OutContained : Collision::AABBvsTrianglesWContainment( colliderBox, - triggerModel->Vertices(), + triggerModel->m_Vertices, triggerModel->m_Indices, triggerModelMat); diff --git a/src/Engine/Rendering/AnimationSystem.cpp b/src/Engine/Rendering/AnimationSystem.cpp index 895cbc28..3e53612b 100644 --- a/src/Engine/Rendering/AnimationSystem.cpp +++ b/src/Engine/Rendering/AnimationSystem.cpp @@ -37,7 +37,7 @@ void AnimationSystem::CreateBlendTrees() continue;; } - Skeleton* skeleton = model->m_RawModel->m_Skeleton; + Skeleton* skeleton = model->m_Skeleton; if (skeleton == nullptr) { continue; } @@ -79,7 +79,7 @@ void AnimationSystem::UpdateAnimations(double dt) continue; } - Skeleton* skeleton = model->m_RawModel->m_Skeleton; + Skeleton* skeleton = model->m_Skeleton; if (skeleton == nullptr) { continue; } @@ -177,7 +177,7 @@ bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e) return false; } - Skeleton* skeleton = model->m_RawModel->m_Skeleton; + Skeleton* skeleton = model->m_Skeleton; if (skeleton == nullptr) { LOG_ERROR("%s, RootNode skeleton invalid %s", e.NodeName, e.RootNode.Name().c_str()); return false; @@ -300,7 +300,7 @@ bool AnimationSystem::OnEntityDeleted(Events::EntityDeleted& e) return false; } - Skeleton* skeleton = model->m_RawModel->m_Skeleton; + Skeleton* skeleton = model->m_Skeleton; if (skeleton == nullptr) { return false; } @@ -331,7 +331,7 @@ bool AnimationSystem::OnSetBlendWeight(Events::SetBlendWeight& e) return false; } - Skeleton* skeleton = model->m_RawModel->m_Skeleton; + Skeleton* skeleton = model->m_Skeleton; if (skeleton == nullptr) { return false; } diff --git a/src/Engine/Rendering/AutoBlendQueue.cpp b/src/Engine/Rendering/AutoBlendQueue.cpp index f4a854ec..016ae420 100644 --- a/src/Engine/Rendering/AutoBlendQueue.cpp +++ b/src/Engine/Rendering/AutoBlendQueue.cpp @@ -22,7 +22,7 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob) return; } - Skeleton* skeleton = model->m_RawModel->m_Skeleton; + Skeleton* skeleton = model->m_Skeleton; if (skeleton == nullptr) { return; } @@ -130,7 +130,7 @@ bool AutoBlendQueue::HasActiveBlendJob() return HasActiveBlendJob(); } - Skeleton* skeleton = model->m_RawModel->m_Skeleton; + Skeleton* skeleton = model->m_Skeleton; if (skeleton == nullptr) { m_BlendQueue.pop_front(); return HasActiveBlendJob(); @@ -173,7 +173,7 @@ std::shared_ptr AutoBlendQueue::GetBlendTree() return nullptr; } - Skeleton* skeleton = model->m_RawModel->m_Skeleton; + Skeleton* skeleton = model->m_Skeleton; if (skeleton == nullptr) { return nullptr; } diff --git a/src/Engine/Rendering/BoneAttachmentSystem.cpp b/src/Engine/Rendering/BoneAttachmentSystem.cpp index 440bb65c..82fd9507 100644 --- a/src/Engine/Rendering/BoneAttachmentSystem.cpp +++ b/src/Engine/Rendering/BoneAttachmentSystem.cpp @@ -26,7 +26,7 @@ void BoneAttachmentSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapp return; } - Skeleton* skeleton = model->m_RawModel->m_Skeleton; + Skeleton* skeleton = model->m_Skeleton; if(skeleton == nullptr) { return; diff --git a/src/Engine/Rendering/DrawFinalPass.cpp b/src/Engine/Rendering/DrawFinalPass.cpp index 19046bf0..8f221e13 100644 --- a/src/Engine/Rendering/DrawFinalPass.cpp +++ b/src/Engine/Rendering/DrawFinalPass.cpp @@ -332,14 +332,6 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass) glClearStencil(0x00); glClear(GL_STENCIL_BUFFER_BIT); - //Fill depth buffer - state->Enable(GL_STENCIL_TEST); - state->StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - state->StencilFunc(GL_ALWAYS, 1, 0xFF); - state->StencilMask(0xFF); - state->DepthMask(GL_FALSE); - //DrawToDepthStencilBuffer(scene.Jobs.ShieldObjects, scene); - state->DepthMask(GL_TRUE); //Draw Opaque shielded objects state->Disable(GL_STENCIL_TEST); @@ -354,10 +346,10 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass) GLERROR("OpaqueObjects"); //state->Disable(GL_STENCIL_TEST); - //Draw Transparen Shielded objects + //Draw Transparen objects state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); DrawModelRenderQueuesWithShieldCheck(scene.Jobs.TransparentObjects, scene); //might need changing - GLERROR("Shielded Transparent objects"); + GLERROR("Transparent objects"); //Generate blur texture. delete state; @@ -379,12 +371,6 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass) } else { stateSprite = new DrawFinalPassState(m_FinalPassFrameBuffer->GetHandle()); } - //Draw Transparen objects - //state->BlendFunc(GL_ONE, GL_ONE); - //state->StencilFunc(GL_EQUAL, 1, 0xFF); - //DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene); - GLERROR("TransparentObjects"); - //state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); stateSprite->Enable(GL_DEPTH_TEST); //stateSprite->AlphaFunc(GL_GEQUAL, 0.05f); //stateSprite->Enable(GL_ALPHA_TEST); @@ -638,7 +624,7 @@ void DrawFinalPass::DrawModelRenderQueues(std::list>& std::vector frameBones; if (modelJob->BlendTree != nullptr) { frameBones = modelJob->BlendTree->GetFinalPose(); - } else { + } else if (modelJob->Skeleton != nullptr) { frameBones = modelJob->Skeleton->GetTPose(); } glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); diff --git a/src/Engine/Rendering/Model.cpp b/src/Engine/Rendering/Model.cpp index d34ce809..596e254b 100644 --- a/src/Engine/Rendering/Model.cpp +++ b/src/Engine/Rendering/Model.cpp @@ -3,9 +3,9 @@ Model::Model(std::string fileName) { //Try loading the model asyncronously, if it throws any exceptions then let it propagate back to caller. - m_RawModel = ResourceManager::Load(fileName); + auto rawModel = ResourceManager::Load(fileName); - for (auto& materialProperty : m_RawModel->m_Materials) { + for (auto& materialProperty : rawModel->m_Materials) { switch (materialProperty.type) { case RawModel::MaterialType::SingleTextures: { @@ -46,11 +46,11 @@ Model::Model(std::string fileName) glGenBuffers(1, &buffer); glBindBuffer(GL_ARRAY_BUFFER, buffer); - glBufferData(GL_ARRAY_BUFFER, m_RawModel->NumVertices() * m_RawModel->VertexSize(), m_RawModel->Vertices(), GL_STATIC_DRAW); + glBufferData(GL_ARRAY_BUFFER, rawModel->NumVertices() * rawModel->VertexSize(), rawModel->Vertices(), GL_STATIC_DRAW); glGenBuffers(1, &ElementBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ElementBuffer); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_RawModel->m_Indices.size() * sizeof(unsigned int), &m_RawModel->m_Indices[0], GL_STATIC_DRAW); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, rawModel->Indices().size() * sizeof(unsigned int), rawModel->Indices().data(), GL_STATIC_DRAW); glGenVertexArrays(1, &VAO); glBindVertexArray(VAO); @@ -58,7 +58,7 @@ Model::Model(std::string fileName) glBindBuffer(GL_ARRAY_BUFFER, buffer); std::vector structSizes; - if (m_RawModel->IsSkinned()) { + if (rawModel->IsSkinned()) { structSizes = { 3, 3, 3, 3, 2, 4, 4 }; } else { structSizes = { 3, 3, 3, 3, 2 }; @@ -77,7 +77,7 @@ Model::Model(std::string fileName) glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; - if (m_RawModel->IsSkinned()) { + if (rawModel->IsSkinned()) { glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; } @@ -89,7 +89,7 @@ Model::Model(std::string fileName) glEnableVertexAttribArray(2); glEnableVertexAttribArray(3); glEnableVertexAttribArray(4); - if (m_RawModel->IsSkinned()) { + if (rawModel->IsSkinned()) { glEnableVertexAttribArray(5); glEnableVertexAttribArray(6); } @@ -99,17 +99,29 @@ Model::Model(std::string fileName) glm::vec3 mini(INFINITY); glm::vec3 maxi(-INFINITY); - - for (unsigned int i = 0; i < m_RawModel->NumVertices(); i++) { - const auto& v = m_RawModel->Vertices()[i]; + for (unsigned int i = 0; i < rawModel->NumVertices(); i++) { + const auto& v = rawModel->Vertices()[i]; mini = glm::min(mini, v.Position); maxi = glm::max(maxi, v.Position); } - m_Box = AABB(mini, maxi); + + m_Skeleton = rawModel->m_Skeleton; + m_Materials = rawModel->m_Materials; + m_Indices = rawModel->CollisionIndices(); + m_IsSkinned = rawModel->IsSkinned(); + // Copy vertex positions for collisions later + m_Vertices = rawModel->CollisionVertices(); + + ResourceManager::Release("RawModel", fileName); } Model::~Model() { - + if (m_Skeleton != nullptr) { + delete m_Skeleton; + } + for (auto material : m_Materials) { + delete material.material; + } } diff --git a/src/Engine/Rendering/PickingPass.cpp b/src/Engine/Rendering/PickingPass.cpp index f6343101..f75372d7 100644 --- a/src/Engine/Rendering/PickingPass.cpp +++ b/src/Engine/Rendering/PickingPass.cpp @@ -115,7 +115,7 @@ void PickingPass::Draw(RenderScene& scene) std::vector frameBones; if (modelJob->BlendTree != nullptr) { frameBones = modelJob->BlendTree->GetFinalPose(); - } else { + } else if (modelJob->Skeleton != nullptr) { frameBones = modelJob->Skeleton->GetTPose(); } glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); diff --git a/src/Engine/Rendering/RawModelCustom.cpp b/src/Engine/Rendering/RawModelCustom.cpp index 94a824f0..2106a699 100644 --- a/src/Engine/Rendering/RawModelCustom.cpp +++ b/src/Engine/Rendering/RawModelCustom.cpp @@ -11,6 +11,7 @@ RawModelCustom::RawModelCustom(std::string fileName) ReadMeshFile(fileName); ReadMaterialFile(fileName); ReadAnimationFile(fileName); + ReadCollisionFile(fileName); } void RawModelCustom::ReadMeshFile(std::string filePath) @@ -71,11 +72,11 @@ void RawModelCustom::ReadVertices(std::size_t& offset, char* fileData, const uns memcpy(&m_SkinedVertices[0], fileData + offset, m_SkinedVertices.size() * sizeof(SkinedVertex)); offset += m_SkinedVertices.size() * sizeof(SkinedVertex); } else { - if (offset + m_Vertices.size() * sizeof(Vertex) > fileByteSize) { + if (offset + m_Vertices.size() * sizeof(RenderVertex) > fileByteSize) { throw Resource::FailedLoadingException("Reading vertices failed"); } - memcpy(&m_Vertices[0], fileData + offset, m_Vertices.size() * sizeof(Vertex)); - offset += m_Vertices.size() * sizeof(Vertex); + memcpy(&m_Vertices[0], fileData + offset, m_Vertices.size() * sizeof(RenderVertex)); + offset += m_Vertices.size() * sizeof(RenderVertex); } #else #endif @@ -491,14 +492,90 @@ void RawModelCustom::ReadAnimationKeyFrame(std::size_t& offset, char* fileData, } +void RawModelCustom::ReadCollisionFile(std::string filePath) { + char* fileData; + filePath += ".colli"; + std::ifstream in(filePath.c_str(), std::ios_base::binary | std::ios_base::ate); + + if (!in.is_open()) { + return; + } + unsigned int fileByteSize = static_cast(in.tellg()); + in.seekg(0, std::ios_base::beg); + + fileData = new char[fileByteSize]; + in.read(fileData, fileByteSize); + in.close(); + + std::size_t offset = 0; + if (fileByteSize > 0) { + ReadCollisionFileData(offset, fileData, fileByteSize); + } + hasCollisionMesh = true; + delete[] fileData; +} + +const std::vector& RawModelCustom::CollisionVertices() { + if (hasCollisionMesh) { + return m_CollisionVertices; + } + else if (hasSkin) { + // We don't do collisions against skinned meshes now. + m_CollisionVertices = std::vector(); + return m_CollisionVertices; + } + else { + return ConstructCollisionList(); + } +}; + +void RawModelCustom::ReadCollisionFileData(std::size_t& offset, char* fileData, const unsigned int& fileByteSize){ + m_CollisionVertices.resize(static_cast(*(unsigned int*)(fileData + offset))); + offset += sizeof(unsigned int); + m_CollisionIndices.resize(static_cast(*(unsigned int*)(fileData + offset))); + offset += sizeof(unsigned int); + + if (offset + m_CollisionVertices.size() * sizeof(glm::vec3) > fileByteSize) { + throw Resource::FailedLoadingException("Reading collision vertices failed"); + } + memcpy(&m_CollisionVertices[0], fileData + offset, m_CollisionVertices.size() * sizeof(glm::vec3)); + offset += m_CollisionVertices.size() * sizeof(glm::vec3); + + if (offset + m_CollisionIndices.size() * sizeof(unsigned int) > fileByteSize) { + throw Resource::FailedLoadingException("Reading collision indices failed"); + } + memcpy(&m_CollisionIndices[0], fileData + offset, m_CollisionIndices.size() * sizeof(unsigned int)); + offset += m_CollisionIndices.size() * sizeof(unsigned int); +} + +const std::vector& RawModelCustom::ConstructCollisionList() +{ + if (!hasCollisionMesh && m_CollisionVertices.size() == 0) { + if (hasSkin) { + m_CollisionVertices.reserve(m_SkinedVertices.size()); + for (const auto& vertex : m_SkinedVertices) { + m_CollisionVertices.push_back(vertex.Position); + } + } else { + m_CollisionVertices.reserve(m_Vertices.size()); + for (const auto& vertex : m_Vertices) { + m_CollisionVertices.push_back(vertex.Position); + } + } + } + + return m_CollisionVertices; +} + RawModelCustom::~RawModelCustom() { - if (m_Skeleton != nullptr) { - delete m_Skeleton; - } - for (auto material : m_Materials) { - delete material.material; - } + // Ownership of skeleton and materials get transferred to Model + // if (m_Skeleton != nullptr) { + // delete m_Skeleton; + // } + //for (auto material : m_Materials) { + // delete material.material; + //} } #endif \ No newline at end of file diff --git a/src/Engine/Rendering/ShadowPass.cpp b/src/Engine/Rendering/ShadowPass.cpp index 9aff0266..05430708 100644 --- a/src/Engine/Rendering/ShadowPass.cpp +++ b/src/Engine/Rendering/ShadowPass.cpp @@ -261,7 +261,7 @@ void ShadowPass::Draw(RenderScene & scene) std::vector frameBones; if (modelJob->BlendTree != nullptr) { frameBones = modelJob->BlendTree->GetFinalPose(); - } else { + } else if (modelJob->Skeleton != nullptr) { frameBones = modelJob->Skeleton->GetTPose(); } glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); diff --git a/src/Game/Systems/HealthSystem.cpp b/src/Game/Systems/HealthSystem.cpp index 4343eeeb..a6ff96a0 100644 --- a/src/Game/Systems/HealthSystem.cpp +++ b/src/Game/Systems/HealthSystem.cpp @@ -25,9 +25,9 @@ bool HealthSystem::OnPlayerDamaged(Events::PlayerDamage& e) //if player has the boost from a defender, subtract the damage taken by StrengthOfEffect amount auto playerBoostDefenderEntity = e.Victim.FirstChildByName("BoostDefender"); if (playerBoostDefenderEntity.Valid()) { - e.Damage -= (double)playerBoostDefenderEntity["BoostDefender"]["StrengthOfEffect"]; + e.Damage -= (const double&)playerBoostDefenderEntity["BoostDefender"]["StrengthOfEffect"]; } - if (health > 0) { + if (health > 0 && e.Damage > 0) { health -= e.Damage; if (health <= 0.0) { Events::PlayerDeath ePlayerDeath; diff --git a/src/Game/Systems/MainMenuSystem.cpp b/src/Game/Systems/MainMenuSystem.cpp index fa7c0479..1be751f0 100644 --- a/src/Game/Systems/MainMenuSystem.cpp +++ b/src/Game/Systems/MainMenuSystem.cpp @@ -135,6 +135,8 @@ bool MainMenuSystem::OnInputCommand(const Events::InputCommand& e) OpenSubMenu(e); } else if (e.Command == "Resolution" && e.Value == 1) { OpenDropDown(e); + } else if (e.Command == "Quit" && e.Value == 1) { + exit(EXIT_FAILURE); } return true; } \ No newline at end of file diff --git a/src/Game/Systems/PlayerDeathSystem.cpp b/src/Game/Systems/PlayerDeathSystem.cpp index 61abde31..7b618644 100644 --- a/src/Game/Systems/PlayerDeathSystem.cpp +++ b/src/Game/Systems/PlayerDeathSystem.cpp @@ -10,8 +10,7 @@ PlayerDeathSystem::PlayerDeathSystem(SystemParams params) } void PlayerDeathSystem::Update(double dt) -{ -} +{ } bool PlayerDeathSystem::OnPlayerDeath(Events::PlayerDeath& e) { @@ -33,31 +32,35 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player) auto entityFile = ResourceManager::Load("Schema/Entities/PlayerDeathExplosionWithCamera.xml"); EntityWrapper deathEffectEW = entityFile->MergeInto(m_World); - //components that we need from player auto playerModel = player.FirstChildByName("PlayerModel"); - if (!playerModel.HasComponent("Model") || !playerModel.HasComponent("Animation")) { + if (!playerModel.Valid()) { if (player == LocalPlayer) { setSpectatorCamera(); } return; } - auto playerEntityModel = playerModel["Model"]; - auto playerEntityAnimation = playerModel["Animation"]; - - //copy the data from player to explosioneffectmodel - playerEntityModel.Copy(deathEffectEW["Model"]); - playerEntityAnimation.Copy(deathEffectEW["Animation"]); - - //copy the models position,orientation - deathEffectEW["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"]; - deathEffectEW["Transform"]["Orientation"] = (glm::vec3)player["Transform"]["Orientation"]; - //effect,camera is relative to playersPosition - //deathEffectEW["ExplosionEffect"]["ExplosionOrigin"] = glm::vec3(0, 0, 0); - + if (!playerModel.HasComponent("Model")) { + return; + } + EntityWrapper deathEffect = playerModel.Clone(); + for (auto& cAnim : deathEffect.ChildrenWithComponent("Animation")) { + cAnim["Animation"]["Play"] = false; + } + deathEffect.AttachComponent("ExplosionEffect"); + deathEffectEW["ExplosionEffect"].Copy(deathEffect["ExplosionEffect"]); + deathEffect.AttachComponent("Lifetime"); + deathEffectEW["Lifetime"].Copy(deathEffect["Lifetime"]); + deathEffect["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"]; + deathEffect["Transform"]["Orientation"] = (glm::vec3)player["Transform"]["Orientation"]; + for (auto& cModel : deathEffect.ChildrenWithComponent("Model")) { + EntityWrapper e(m_World, cModel.ID); + e.AttachComponent("ExplosionEffect"); + deathEffectEW["ExplosionEffect"].Copy(e["ExplosionEffect"]); + } + EntityWrapper cam = deathEffectEW.FirstChildByName("Camera").Clone(deathEffect); //camera (with lifetime) behind the player if (player == LocalPlayer) { - m_LocalPlayerDeathEffect = deathEffectEW; - auto cam = deathEffectEW.FirstChildByName("Camera"); + m_LocalPlayerDeathEffect = deathEffect; Events::SetCamera eSetCamera; eSetCamera.CameraEntity = cam; m_EventBroker->Publish(eSetCamera); diff --git a/src/Game/Systems/SpawnerSystem.cpp b/src/Game/Systems/SpawnerSystem.cpp index fb770bb5..f444827b 100644 --- a/src/Game/Systems/SpawnerSystem.cpp +++ b/src/Game/Systems/SpawnerSystem.cpp @@ -112,15 +112,15 @@ bool SpawnerSystem::spawnedEntityIsColliding(EntityWrapper spawnedEntity, Entity if (!spawnedBox.Entity.HasComponent("Model")) { return true; } - RawModel* model = nullptr; + Model* model = nullptr; try { - model = ResourceManager::Load(otherEntity["Model"]["Resource"]); + model = ResourceManager::Load(otherEntity["Model"]["Resource"]); } catch (const std::exception&) { } if (model != nullptr && Collision::AABBvsTriangles( spawnedBox, - model->Vertices(), + model->m_Vertices, model->m_Indices, TransformSystem::ModelMatrix(otherEntity))) { return true; diff --git a/tools/MayaExporter/MayaExporter/Export.cpp b/tools/MayaExporter/MayaExporter/Export.cpp index 3497fd04..28112cd6 100644 --- a/tools/MayaExporter/MayaExporter/Export.cpp +++ b/tools/MayaExporter/MayaExporter/Export.cpp @@ -5,7 +5,7 @@ Export::Export() } -bool Export::Meshes(std::string pathName, bool selectedOnly) +bool Export::Meshes(std::string pathName, bool selectedOnly, bool isCollision) { MStatus status; if (pathName.empty()) { @@ -92,8 +92,14 @@ bool Export::Meshes(std::string pathName, bool selectedOnly) Objects.append(node); } } - GetMeshData(Objects); - WriteMeshData(pathName); + GetMeshData(Objects, isCollision); + + if (!isCollision) { + WriteMeshData(pathName); + } else { + WriteCollisionData(pathName); + } + MGlobal::displayInfo(MString() + "Enabling IKSolvers"); status = MGlobal::executeCommand("doEnableNodeItems true all;"); if (status != MS::kSuccess) { @@ -144,9 +150,9 @@ bool Export::Animations(std::string pathName, std::vector animInf return true; } -bool Export::GetMeshData(MObjectArray object) +bool Export::GetMeshData(MObjectArray object, bool collision) { - meshes = m_MeshHandler.GetMeshData(object); + meshes = m_MeshHandler.GetMeshData(object, collision); return true; } @@ -185,6 +191,17 @@ void Export::WriteMeshData(std::string pathName) m_MeshFile.CloseFiles(); } +void Export::WriteCollisionData(std::string pathName) { + m_ColliFile.ASCIIFilePath(pathName + "_colli.txt"); + m_ColliFile.binaryFilePath(pathName + ".colli"); + + m_ColliFile.OpenFiles(); + + m_ColliFile.writeToFiles((OutputData*)&meshes); + + m_ColliFile.CloseFiles(); +} + void Export::WriteAnimData(std::string pathName) { if (allBindPoses.size() > 0) { diff --git a/tools/MayaExporter/MayaExporter/Export.h b/tools/MayaExporter/MayaExporter/Export.h index 42b40445..c22cd26e 100644 --- a/tools/MayaExporter/MayaExporter/Export.h +++ b/tools/MayaExporter/MayaExporter/Export.h @@ -22,18 +22,19 @@ public: int End; }; - bool Meshes(std::string pathName, bool selectedOnly = false); + bool Meshes(std::string pathName, bool selectedOnly = false, bool isCollision = false); bool Materials(std::string pathName); bool Animations(std::string pathName, std::vector animInfo); private: - bool GetMeshData(MObjectArray object); + bool GetMeshData(MObjectArray object, bool collision); bool GetMaterialData(); bool GetAnimationData(AnimationInfo info); void WriteMeshData(std::string pathName); void WriteAnimData(std::string pathName); void WriteMaterialData(std::string pathName); + void WriteCollisionData(std::string pathName); Material m_MaterialHandler; Skeleton m_SkeletonHandler; @@ -44,6 +45,7 @@ private: WriteToFile m_MeshFile; WriteToFile m_AnimFile; WriteToFile m_MtrlFile; + WriteToFile m_ColliFile; //Mesh Data Mesh meshes; diff --git a/tools/MayaExporter/MayaExporter/Menu.cpp b/tools/MayaExporter/MayaExporter/Menu.cpp index 02810018..ed3761df 100644 --- a/tools/MayaExporter/MayaExporter/Menu.cpp +++ b/tools/MayaExporter/MayaExporter/Menu.cpp @@ -25,6 +25,7 @@ Menu::Menu(QDialog* dialog) m_ExportSelectedButton = new QCheckBox(tr("&Export Selected")); m_ExportAnimationsButton = new QCheckBox(tr("&Export Animations")); m_ExportMaterialButton = new QCheckBox(tr("&Export Material"));; + m_IsCollision = new QCheckBox(tr("&Export as collision mesh")); m_ExportAnimationsButton->setChecked(true); m_ExportMaterialButton->setChecked(true); @@ -32,6 +33,7 @@ Menu::Menu(QDialog* dialog) vbox->addWidget(m_ExportSelectedButton); vbox->addWidget(m_ExportAnimationsButton); vbox->addWidget(m_ExportMaterialButton); + vbox->addWidget(m_IsCollision); vbox->addStretch(1); optionsBox->setLayout(vbox); @@ -46,6 +48,7 @@ Menu::Menu(QDialog* dialog) connect(m_ExportSelectedButton, SIGNAL(clicked(bool)), this, SLOT(NULL)); connect(m_ExportAnimationsButton, SIGNAL(clicked(bool)), this, SLOT(NULL)); connect(m_ExportMaterialButton, SIGNAL(clicked(bool)), this, SLOT(NULL)); + connect(m_IsCollision, SIGNAL(clicked(bool)), this, SLOT(NULL)); // Creating several layouts, adding widgets & adding them to one layout in the end QHBoxLayout* topLayout = new QHBoxLayout; @@ -163,40 +166,42 @@ void Menu::RemoveClipClicked(bool) void Menu::ExportAll(bool) { - if (m_ExportPath->text().isEmpty()) { - MGlobal::displayError(MString() + "Please select a folder."); - return; - } + if (m_ExportPath->text().isEmpty()) { + MGlobal::displayError(MString() + "Please select a folder."); + return; + } - //Export meshes - if (!m_Export.Meshes(m_ExportPath->text().toLocal8Bit().constData(), m_ExportSelectedButton->isChecked())) { - MGlobal::displayError(MString() + "Could not export mesh"); - return; - } + //Export meshes + if (!m_Export.Meshes(m_ExportPath->text().toLocal8Bit().constData(), m_ExportSelectedButton->isChecked(), m_IsCollision->isChecked())) { + MGlobal::displayError(MString() + "Could not export mesh"); + return; + } - if (m_ExportMaterialButton->isChecked()) { - if (!m_Export.Materials(m_ExportPath->text().toLocal8Bit().constData())) { - MGlobal::displayError(MString() + "Could not export materials"); - return; - } - } + if (!m_IsCollision->isChecked()){ + if (m_ExportMaterialButton->isChecked()) { + if (!m_Export.Materials(m_ExportPath->text().toLocal8Bit().constData())) { + MGlobal::displayError(MString() + "Could not export materials"); + return; + } + } - std::vector animations; - for (unsigned int i = 0; i < m_AnimationClipName.size(); i++) { - Export::AnimationInfo thisClip; - thisClip.Name = std::string(m_AnimationClipName[i]->text().toLocal8Bit().constData()); - thisClip.Start = m_StartFrameLines[i]->text().toInt(); - thisClip.End = m_EndFrameLines[i]->text().toInt(); + std::vector animations; + for (unsigned int i = 0; i < m_AnimationClipName.size(); i++) { + Export::AnimationInfo thisClip; + thisClip.Name = std::string(m_AnimationClipName[i]->text().toLocal8Bit().constData()); + thisClip.Start = m_StartFrameLines[i]->text().toInt(); + thisClip.End = m_EndFrameLines[i]->text().toInt(); - animations.push_back(thisClip); - } - if (m_ExportAnimationsButton->isChecked()) { - //Export Animations - if (!m_Export.Animations(m_ExportPath->text().toLocal8Bit().constData(), animations)) { - MGlobal::displayError(MString() + "Could not export animations"); - return; - } - } + animations.push_back(thisClip); + } + if (m_ExportAnimationsButton->isChecked()) { + //Export Animations + if (!m_Export.Animations(m_ExportPath->text().toLocal8Bit().constData(), animations)) { + MGlobal::displayError(MString() + "Could not export animations"); + return; + } + } + } } void Menu::CancelClicked(bool) diff --git a/tools/MayaExporter/MayaExporter/Menu.h b/tools/MayaExporter/MayaExporter/Menu.h index fb95a953..89211a12 100644 --- a/tools/MayaExporter/MayaExporter/Menu.h +++ b/tools/MayaExporter/MayaExporter/Menu.h @@ -66,6 +66,7 @@ private: QCheckBox* m_ExportSelectedButton = nullptr; QCheckBox* m_ExportAnimationsButton = nullptr; QCheckBox* m_ExportMaterialButton = nullptr; + QCheckBox* m_IsCollision = nullptr; QLineEdit* m_ExportPath = nullptr; QFileDialog* m_FileDialog = nullptr; diff --git a/tools/MayaExporter/MayaExporter/Mesh.cpp b/tools/MayaExporter/MayaExporter/Mesh.cpp index ee5a6022..6868e792 100644 --- a/tools/MayaExporter/MayaExporter/Mesh.cpp +++ b/tools/MayaExporter/MayaExporter/Mesh.cpp @@ -94,33 +94,37 @@ MeshClass::MeshClass() // return weightMap; //} -Mesh MeshClass::GetMeshData(MObjectArray object) +Mesh MeshClass::GetMeshData(MObjectArray object, bool collision) { MS status; Mesh newMesh; + newMesh.isCollison = collision; vector& vertexList = newMesh.Vertices; map>& indexLists = newMesh.Indices; for (int ObjectID = 0; ObjectID < object.length(); ObjectID++) { if (!object[ObjectID].hasFn(MFn::kMesh)) continue; + MObject node = object[ObjectID]; MFnDependencyNode thisNode(node); MPlugArray connections; thisNode.findPlug("inMesh").connectedTo(connections, true, true); MPlug weightList, weights; MObject weightListObject; - for (unsigned int i = 0; i < connections.length(); i++) { - if (connections[i].node().apiType() == MFn::kSkinClusterFilter) { - MFnSkinCluster skinCluster(connections[i].node()); - weightList = skinCluster.findPlug("weightList", &status); - weightListObject = weightList.attribute(); - weights = skinCluster.findPlug("weights"); - newMesh.hasSkin = true; - break; - } - } + if (!collision) { + for (unsigned int i = 0; i < connections.length(); i++) { + if (connections[i].node().apiType() == MFn::kSkinClusterFilter) { + MFnSkinCluster skinCluster(connections[i].node()); + weightList = skinCluster.findPlug("weightList", &status); + weightListObject = weightList.attribute(); + weights = skinCluster.findPlug("weights"); + newMesh.hasSkin = true; + break; + } + } + } // In here, we retrieve triangulated polygons from the mesh MFnMesh mesh(object[ObjectID]); @@ -257,62 +261,62 @@ Mesh MeshClass::GetMeshData(MObjectArray object) thisVertex.Pos[0] = pos.x; thisVertex.Pos[1] = pos.y; thisVertex.Pos[2] = pos.z; + thisVertex.isCollision = collision; - status = faceVert.getNormal(normal, MSpace::kObject); - if (status != MS::kSuccess) { - MGlobal::displayError(MString() + "faceVert.getNormal() ERROR: " + status.errorString() + "for local vertex " + i + " in " + faceID + " in mesh " + thisMeshPath.fullPathName()); - break; - } + if (!collision) { + status = faceVert.getNormal(normal, MSpace::kObject); + if (status != MS::kSuccess) { + MGlobal::displayError(MString() + "faceVert.getNormal() ERROR: " + status.errorString() + "for local vertex " + i + " in " + faceID + " in mesh " + thisMeshPath.fullPathName()); + break; + } - thisVertex.Normal[0] = normal[0]; - thisVertex.Normal[1] = normal[1]; - thisVertex.Normal[2] = normal[2]; + thisVertex.Normal[0] = normal[0]; + thisVertex.Normal[1] = normal[1]; + thisVertex.Normal[2] = normal[2]; - MFloatVector Tangent = Tangents[faceVert.tangentId()]; - //MVector tmp = faceVert.getTangent(MSpace::kObject, NULL); - //tmp.get(biTangent); - thisVertex.Tangent[0] = Tangent[0]; - thisVertex.Tangent[1] = Tangent[1]; - thisVertex.Tangent[2] = Tangent[2]; + MFloatVector Tangent = Tangents[faceVert.tangentId()]; + //MVector tmp = faceVert.getTangent(MSpace::kObject, NULL); + //tmp.get(biTangent); + thisVertex.Tangent[0] = Tangent[0]; + thisVertex.Tangent[1] = Tangent[1]; + thisVertex.Tangent[2] = Tangent[2]; - MFloatVector biNormal = biNormals[faceVert.tangentId()]; - //faceVert.getBinormal().get(biNormal); - thisVertex.BiNormal[0] = biNormal[0]; - thisVertex.BiNormal[1] = biNormal[1]; - thisVertex.BiNormal[2] = biNormal[2]; + MFloatVector biNormal = biNormals[faceVert.tangentId()]; + //faceVert.getBinormal().get(biNormal); + thisVertex.BiNormal[0] = biNormal[0]; + thisVertex.BiNormal[1] = biNormal[1]; + thisVertex.BiNormal[2] = biNormal[2]; - status = faceVert.getUV(UV); - if (status != MS::kSuccess) { - MGlobal::displayError(MString() + " faceVert.getUV() ERROR: " + status.errorString() + "for local vertex " + i + " in " + faceID + " in mesh " + thisMeshPath.fullPathName()); - break; - } - thisVertex.Uv[0] = UV[0]; - thisVertex.Uv[1] = UV[1]; + status = faceVert.getUV(UV); + if (status != MS::kSuccess) { + MGlobal::displayError(MString() + " faceVert.getUV() ERROR: " + status.errorString() + "for local vertex " + i + " in " + faceID + " in mesh " + thisMeshPath.fullPathName()); + break; + } + thisVertex.Uv[0] = UV[0]; + thisVertex.Uv[1] = UV[1]; - if (newMesh.hasSkin) { - thisVertex.useWeights = true; - float totalWeight = 0.0f; - unsigned int totalBones = 0; - MIntArray jointIDs /* ??? */; - weights.selectAncestorLogicalIndex(vertexIndex, weightListObject); - weights.getExistingArrayAttributeIndices(jointIDs); - for (unsigned int i = 0; i < jointIDs.length() && i < 4; i++) { - if (weights[i].asFloat() > 0.001f) { - thisVertex.BoneIndices[totalBones] = jointIDs[i]; - thisVertex.BoneWeights[totalBones] = weights[i].asFloat(); - totalWeight = totalWeight + weights[i].asFloat(); - totalBones++; - } - } + if (newMesh.hasSkin) { + thisVertex.useWeights = true; + float totalWeight = 0.0f; + unsigned int totalBones = 0; + MIntArray jointIDs /* ??? */; + weights.selectAncestorLogicalIndex(vertexIndex, weightListObject); + weights.getExistingArrayAttributeIndices(jointIDs); + for (unsigned int i = 0; i < jointIDs.length() && i < 4; i++) { + if (weights[i].asFloat() > 0.001f) { + thisVertex.BoneIndices[totalBones] = jointIDs[i]; + thisVertex.BoneWeights[totalBones] = weights[i].asFloat(); + totalWeight = totalWeight + weights[i].asFloat(); + totalBones++; + } + } - for (unsigned int i = 0; i < 4; i++) { - //thisVertex.BoneWeights[i] = thisVertex.BoneWeights[i] / totalWeight; - } - } else { - thisVertex.useWeights = false; + for (unsigned int i = 0; i < 4; i++) { + //thisVertex.BoneWeights[i] = thisVertex.BoneWeights[i] / totalWeight; + } + } } - //float totalWeight = thisVertex.BoneWeights[0] + thisVertex.BoneWeights[1] + thisVertex.BoneWeights[2] + thisVertex.BoneWeights[3]; //if (totalWeight > 0.0001f) { // thisVertex.BoneWeights[0] /= totalWeight; diff --git a/tools/MayaExporter/MayaExporter/Mesh.h b/tools/MayaExporter/MayaExporter/Mesh.h index affc4320..f9376a8c 100644 --- a/tools/MayaExporter/MayaExporter/Mesh.h +++ b/tools/MayaExporter/MayaExporter/Mesh.h @@ -11,7 +11,8 @@ class VertexLayout : public OutputData { public: - bool useWeights = true; + bool isCollision = false; + bool useWeights = false; float Pos[3]{ 0 }; float Normal[3]{ 0 }; float Tangent[3]{ 0 }; @@ -23,28 +24,31 @@ public: virtual void WriteBinary(std::ostream& out) { out.write((char*)&Pos, sizeof(float) * 3); - out.write((char*)&Normal, sizeof(float) * 3); - out.write((char*)&Tangent, sizeof(float) * 3); - out.write((char*)&BiNormal, sizeof(float) * 3); - out.write((char*)&Uv, sizeof(float) * 2); - if (useWeights) { - out.write((char*)&BoneIndices, sizeof(float) * 4); - out.write((char*)&BoneWeights, sizeof(float) * 4); + if (!isCollision) { + out.write((char*)&Normal, sizeof(float) * 3); + out.write((char*)&Tangent, sizeof(float) * 3); + out.write((char*)&BiNormal, sizeof(float) * 3); + out.write((char*)&Uv, sizeof(float) * 2); + if (useWeights) { + out.write((char*)&BoneIndices, sizeof(float) * 4); + out.write((char*)&BoneWeights, sizeof(float) * 4); + } } } virtual void WriteASCII(std::ostream& out) const { out << Pos[0] << " " << Pos[1] << " " << Pos[2] << endl; - out << Normal[0] << " " << Normal[1] << " " << Normal[2] << endl; - out << Tangent[0] << " " << Tangent[1] << " " << Tangent[2] << endl; - out << BiNormal[0] << " " << BiNormal[1] << " " << BiNormal[2] << endl; - out << Uv[0] << " " << Uv[1] << endl; - if (useWeights) { - out << BoneIndices[0] << " " << BoneIndices[1] << " " << BoneIndices[2] << " " << BoneIndices[3] << endl; - out << BoneWeights[0] << " " << BoneWeights[1] << " " << BoneWeights[2] << " " << BoneWeights[3] << endl; + if (!isCollision) { + out << Normal[0] << " " << Normal[1] << " " << Normal[2] << endl; + out << Tangent[0] << " " << Tangent[1] << " " << Tangent[2] << endl; + out << BiNormal[0] << " " << BiNormal[1] << " " << BiNormal[2] << endl; + out << Uv[0] << " " << Uv[1] << endl; + if (useWeights) { + out << BoneIndices[0] << " " << BoneIndices[1] << " " << BoneIndices[2] << " " << BoneIndices[3] << endl; + out << BoneWeights[0] << " " << BoneWeights[1] << " " << BoneWeights[2] << " " << BoneWeights[3] << endl; + } } - } bool operator==(const VertexLayout& right) { @@ -62,6 +66,7 @@ public: class Mesh : public OutputData { public: + bool isCollison = false; bool hasSkin = false; unsigned int NumVertices; unsigned int NumIndices; @@ -70,7 +75,9 @@ public: virtual void WriteBinary(std::ostream& out) { - out.write((char*)&hasSkin, sizeof(bool)); + if (!isCollison) { + out.write((char*)&hasSkin, sizeof(bool)); + } out.write((char*)&NumVertices, sizeof(int)); out.write((char*)&NumIndices, sizeof(int)); for (auto aVertex : Vertices) { @@ -86,11 +93,13 @@ public: virtual void WriteASCII(std::ostream& out) const { out << "New Mesh _ not in binary" << endl; - out << "hasSkin: "; - if(hasSkin) - out << "true" << endl; - else - out << "false" << endl; + if (!isCollison) { + out << "hasSkin: "; + if (hasSkin) + out << "true" << endl; + else + out << "false" << endl; + } out << "Number of vertices: " << NumVertices << endl; out << "number of indices: " << NumIndices << endl; int vertexNumber = 0; @@ -115,7 +124,7 @@ class MeshClass { public: MeshClass(); - Mesh GetMeshData(MObjectArray Object); + Mesh GetMeshData(MObjectArray Object, bool collision = false); ~MeshClass(); private: struct WeightInfo {