diff --git a/scripts/api/entity/spaceship.lua b/scripts/api/entity/spaceship.lua index 1415dd5e9..6fab9e9bc 100644 --- a/scripts/api/entity/spaceship.lua +++ b/scripts/api/entity/spaceship.lua @@ -637,7 +637,7 @@ end function Entity:setBeamWeaponTurret(index, arc, direction, rotation_rate) if self.components.beam_weapons == nil or #self.components.beam_weapons <= index then return self end self.components.beam_weapons[index + 1].turret_arc = arc - self.components.beam_weapons[index + 1].turret_direction = arc + self.components.beam_weapons[index + 1].turret_direction = direction self.components.beam_weapons[index + 1].turret_rotation_rate = rotation_rate return self end diff --git a/scripts/api/shipTemplate.lua b/scripts/api/shipTemplate.lua index 035bf56da..84a1e0fd7 100644 --- a/scripts/api/shipTemplate.lua +++ b/scripts/api/shipTemplate.lua @@ -243,7 +243,7 @@ end --- template:setBeamWeaponTurret(0,200,90,5) function ShipTemplate:setBeamWeaponTurret(index, arc, direction, rotation_rate) self.beam_weapons[index + 1].turret_arc = arc - self.beam_weapons[index + 1].turret_direction = arc + self.beam_weapons[index + 1].turret_direction = direction self.beam_weapons[index + 1].turret_rotation_rate = rotation_rate return self end