diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2025-01-26 15:21:55 -0600 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2025-01-26 15:21:55 -0600 |
| commit | f7a6cb3573957ae617bf88a05f72cb22bb912abd (patch) | |
| tree | 9bd8dabfcbd5808a74d995c93dc6f3f611da13f8 /src/player.moon | |
| parent | 5846a4fea8d6a993466a792977128d21a18587bc (diff) | |
| download | ggj25-f7a6cb3573957ae617bf88a05f72cb22bb912abd.tar.gz ggj25-f7a6cb3573957ae617bf88a05f72cb22bb912abd.tar.bz2 ggj25-f7a6cb3573957ae617bf88a05f72cb22bb912abd.zip | |
Revert "final commit"
This reverts commit c39ff632b46c179709101c5b50a061ebd723689f.
Diffstat (limited to 'src/player.moon')
| -rw-r--r-- | src/player.moon | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/player.moon b/src/player.moon index f43407c..1083e06 100644 --- a/src/player.moon +++ b/src/player.moon @@ -67,8 +67,7 @@ class PlayerLineGraphicComponent extends world.GraphicsComponent direction += math.pi rot = math.rotate4(direction) move2 = vec3(s.pred.properties.pos, 0) - cast_end = s.pred.properties.cast_end - scale = math.sqrt(cast_end / math.length(offset)) * math.length(offset) + scale = s.pred.properties.cast_end z = -0.12 local1 = vec4(-width, 0,z,1) * rot local2 = vec4(-width, scale,z,1) * rot @@ -183,7 +182,7 @@ class PlayerPredictedComponent extends ecs.PredictedComponent new: (name) => super(name, {vel: vec2(0,0), pos:vec2(0,0), accel: vec2(0,0), cast_end: 0, can_reel:false}, "net", { accel:() => - vec2(@net.properties.accel) * (world.level.on_land(@properties.pos) and 1 or 0.5) * (@net.properties.drown and 0 or 1) + vec2(@net.properties.accel) * (world.level.on_land(@properties.pos) and 1 or 0.5) vel: () => --print("Net is ", @net.properties) delta = world.sync_time! - @net.properties.last_update @@ -228,7 +227,7 @@ class PlayerPredictedComponent extends ecs.PredictedComponent if land @node\action("stepsfx", am.play(60861008 + math.random(10) * 100, false, 1, settings.volume)) else - @node\action("stepsfx", am.play(3444209 + math.random(8) * 10, false, 1, settings.volume)) + @node\action("stepsfx", am.play(78618302 + math.random(8) * 10, false, 1, settings.volume)) @last_step = am.current_time! if @properties.cast_end > 0 and @properties.cast_end < 0.1 @node\action("castsfx", am.play(41228309, false, 1, settings.volume)) |
