Skip to content

Commit

Permalink
fix ship spawn crash
Browse files Browse the repository at this point in the history
  • Loading branch information
parzivail committed Mar 3, 2024
1 parent 0ffb349 commit 90febef
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ public void setRotation(Quaternionf q)
@Environment(EnvType.CLIENT)
public Quaternionf getViewRotation(float t)
{
var start = clientPrevRotation;
var end = clientRotation;
return QuatUtil.slerp(start, end, t);
if (clientPrevRotation == null || clientRotation == null)
return new Quaternionf();
return QuatUtil.slerp(clientPrevRotation, clientRotation, t);
}

public void acceptControlInput(EnumSet<ShipControls> controls)
Expand Down

0 comments on commit 90febef

Please sign in to comment.