bug fixed with weapons
parent
9dff5dff32
commit
943253b1bc
|
@ -103,8 +103,7 @@ Weapon::addTrace(std::function<IntersectionInformation(const Vec3D &, const Vec3
|
||||||
|
|
||||||
// add trace line
|
// add trace line
|
||||||
Vec3D lineFrom = position() + model() * Vec3D(triangles().back()[0]);
|
Vec3D lineFrom = position() + model() * Vec3D(triangles().back()[0]);
|
||||||
Vec3D lineTo = rayCast.intersected ? rayCast.pointOfIntersection : position() +
|
Vec3D lineTo = rayCast.intersected ? rayCast.pointOfIntersection : position() + directionTo * ShooterConsts::FIRE_DISTANCE + randV;
|
||||||
-lookAt() * ShooterConsts::FIRE_DISTANCE + randV;
|
|
||||||
_addTraceCallBack(lineFrom, lineTo);
|
_addTraceCallBack(lineFrom, lineTo);
|
||||||
|
|
||||||
return damagedPlayers;
|
return damagedPlayers;
|
||||||
|
|
Loading…
Reference in New Issue