From a1aeb71512ecd39b2998f8bc7e21eb49fe0e6752 Mon Sep 17 00:00:00 2001 From: bdnugget Date: Thu, 23 Jan 2025 10:09:10 +0100 Subject: [PATCH] asdfghjk --- game/game.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/game/game.go b/game/game.go index 2a26f9a..e3bf9c4 100644 --- a/game/game.go +++ b/game/game.go @@ -149,7 +149,7 @@ func (g *Game) DrawMap() { } } -func (g *Game) DrawPlayer(player *types.Player, model rl.Model) { +func (g *Game) DrawPlayer(player *types.Player) { player.Lock() defer player.Unlock() @@ -169,15 +169,15 @@ func (g *Game) DrawPlayer(player *types.Player, model rl.Model) { if player.IsMoving && len(modelAsset.Animations.Walk) > 0 { anim := modelAsset.Animations.Walk[0] // Use first walk animation player.AnimationFrame = player.AnimationFrame % anim.FrameCount - rl.UpdateModelAnimation(model, anim, player.AnimationFrame) + rl.UpdateModelAnimation(player.Model, anim, player.AnimationFrame) } else if len(modelAsset.Animations.Idle) > 0 { anim := modelAsset.Animations.Idle[0] // Use first idle animation player.AnimationFrame = player.AnimationFrame % anim.FrameCount - rl.UpdateModelAnimation(model, anim, player.AnimationFrame) + rl.UpdateModelAnimation(player.Model, anim, player.AnimationFrame) } } - rl.DrawModel(model, playerPos, 16, rl.White) + rl.DrawModel(player.Model, playerPos, 16, rl.White) // Draw floating messages and path indicators if player.FloatingMessage != nil { @@ -221,12 +221,12 @@ func (g *Game) Render() { rl.BeginMode3D(g.Camera) g.DrawMap() - g.DrawPlayer(g.Player, g.Player.Model) + g.DrawPlayer(g.Player) for _, other := range g.OtherPlayers { if other.Model.Meshes == nil { g.AssignModelToPlayer(other) } - g.DrawPlayer(other, other.Model) + g.DrawPlayer(other) } rl.EndMode3D()