defender ray fixes
This commit is contained in:
@@ -3,11 +3,9 @@
|
||||
|
||||
<Components>
|
||||
<c:Lifetime>
|
||||
<Lifetime>0.5</Lifetime>
|
||||
<Lifetime>0.079999998211860657</Lifetime>
|
||||
</c:Lifetime>
|
||||
<c:Transform>
|
||||
<Scale X="0" Y="1" Z="1"/>
|
||||
</c:Transform>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
@@ -16,14 +14,14 @@
|
||||
<c:Sprite>
|
||||
<Model>Models/Core/UnitQuad.mesh</Model>
|
||||
<GlowMap></GlowMap>
|
||||
<DiffuseTexture>Textures/Effects/NewRay3.png</DiffuseTexture>
|
||||
<Color A="0.419607848" B="3.92156863" G="0.270588249" R="0"/>
|
||||
<KeepRatioX>true</KeepRatioX>
|
||||
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
|
||||
<Color A="1" B="2.35294127" G="1.17647064" R="0"/>
|
||||
<KeepRatio>true</KeepRatio>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.5"/>
|
||||
<Orientation X="0" Y="-1.57099998" Z="0"/>
|
||||
<Scale X="1" Y="0.0710000023" Z="0"/>
|
||||
<Scale X="1" Y="0.0700000003" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -33,14 +31,14 @@
|
||||
<c:Sprite>
|
||||
<Model>Models/Core/UnitQuad.mesh</Model>
|
||||
<GlowMap></GlowMap>
|
||||
<DiffuseTexture>Textures/Effects/NewRay3.png</DiffuseTexture>
|
||||
<Color A="0.419607848" B="3.92156863" G="0.270588249" R="0"/>
|
||||
<KeepRatioX>true</KeepRatioX>
|
||||
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
|
||||
<Color A="1" B="2.35294127" G="1.17647064" R="0"/>
|
||||
<KeepRatio>true</KeepRatio>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-0.5"/>
|
||||
<Orientation X="0" Y="4.71218538" Z="3.14199996"/>
|
||||
<Scale X="1" Y="0.0710000023" Z="0"/>
|
||||
<Scale X="1" Y="0.0700000003" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
|
||||
@@ -393,7 +393,7 @@ void DefenderWeaponBehaviour::spawnTracers(ComponentWrapper cWeapon, WeaponInfo&
|
||||
float yaw = std::atan2(lookVector.x, lookVector.z);
|
||||
glm::quat orientation = glm::quat(glm::vec3(pitch, yaw, 0));
|
||||
rayOrientation = glm::eulerAngles(orientation);
|
||||
rayScale.z(glm::length(muzzleToHit));
|
||||
rayScale.x(glm::length(muzzleToHit));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -449,8 +449,8 @@ void DefenderWeaponBehaviour::dealDamage(ComponentWrapper cWeapon, WeaponInfo& w
|
||||
}
|
||||
|
||||
// Temp hit decal
|
||||
// EntityWrapper hit = ResourceManager::Load<EntityFile>("Schema/Entities/HitTest.xml")->MergeInto(m_World);
|
||||
// hit["Transform"]["Position"] = pick.Position;
|
||||
EntityWrapper hit = ResourceManager::Load<EntityFile>("Schema/Entities/HitTest.xml")->MergeInto(m_World);
|
||||
(Field<glm::vec3>)hit["Transform"]["Position"] = pick.Position;
|
||||
|
||||
// Don't let us shoot ourselves in the foot somehow
|
||||
if (victim == LocalPlayer) {
|
||||
@@ -472,7 +472,7 @@ void DefenderWeaponBehaviour::dealDamage(ComponentWrapper cWeapon, WeaponInfo& w
|
||||
}
|
||||
|
||||
damageSum[victim] += pelletDamage;
|
||||
// ((glm::vec3&)hit["Model"]["Color"]).b = 1.f;
|
||||
((Field<glm::vec4>)hit["Model"]["Color"]).z(1.f);
|
||||
}
|
||||
|
||||
// Deal damage!
|
||||
|
||||
Reference in New Issue
Block a user