Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Actually fix targetSprite crashes AGAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
ShamblesSM committed Feb 18, 2023
1 parent 360b496 commit b594c68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Level.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ function Level:serialize()
powerupList = self.powerupList,
lastPowerupDeltas = self.lastPowerupDeltas,
target = (self.target and self.target:serialize()),
targetSprite = self.targetSprite.path,
targetSprite = self.targetSprite,
targetSecondsCooldown = self.targetSecondsCooldown,
targetInitialDelaySecondsElapsed = self.targetInitialDelaySecondsElapsed,
targetHitScore = self.targetHitScore,
Expand Down Expand Up @@ -1304,7 +1304,7 @@ function Level:deserialize(t)
self.stateCount = t.stateCount
self.powerupList = t.powerupList
self.lastPowerupDeltas = t.lastPowerupDeltas
self.targetSprite = _Game.resourceManager:getSprite(t.targetSprite)
self.targetSprite = t.targetSprite
if t.target then
self.target = Target(self.targetSprite, Vec2(t.target.pos.x, t.target.pos.y), false)
end
Expand Down

0 comments on commit b594c68

Please sign in to comment.