Skip to content

Commit

Permalink
Fix beam turret direction parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
GinjaNinja32 committed Aug 28, 2024
1 parent e3bd8ca commit dc95cc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/api/entity/spaceship.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/api/shipTemplate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc95cc0

Please sign in to comment.