bug fixed with weapons

master
Vectozavr 2021-11-03 20:40:46 +07:00
parent 9dff5dff32
commit 943253b1bc
1 changed files with 1 additions and 2 deletions

View File

@ -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;