Fix harpoon badly attaching to some static meshes

Just needed to add proper computation of relative location, that takes
into account mesh's own rotation.
This commit is contained in:
Anton Tarasenko 2024-10-30 03:21:47 +07:00
parent 618229b8d3
commit 501662a7d7
2 changed files with 2 additions and 1 deletions

View File

@ -710,7 +710,7 @@ function Stick(Actor target, Vector hitLocation) {
expData.affectedByScream = charAffectedByScream;
if (!target.IsA('NiceMonster')) {
hitLocation -= target.location;
hitLocation = (hitLocation - target.location) << target.rotation;
boneStick = 'None';
resultTarget = target;
} else {

View File

@ -259,6 +259,7 @@ static function SpawnStuckProjectile(
} else {
spawnedBullet.SetBase(base);
spawnedBullet.SetRelativeLocation(shift);
spawnedBullet.SetRelativeRotation(direction - base.rotation);
}
}