Skip to content

Commit

Permalink
[COMPRESSED CHARS] Reduce compressed chars by replacing 0. -> 0 and 1…
Browse files Browse the repository at this point in the history
…. -> 1

Compressed chars are now back under 100%: 15607 / 15616 (99.94%)
  • Loading branch information
hsandt committed Apr 17, 2021
1 parent 693ac58 commit 2980e06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/ingame/playercharacter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ function player_char:setup()
-- will trigger change event
self.ground_tile_location = location(-1, -1)
self.position = vector(-1, -1)
self.ground_speed = 0.
self.horizontal_control_lock_timer = 0.
self.ground_speed = 0
self.horizontal_control_lock_timer = 0
self.velocity = vector.zero()
--#if cheat
self.debug_velocity = vector.zero()
--#endif

-- slope_angle starts at 0 instead of nil to match standing state above
-- (if spawning in the air, fine, next update will reset angle to nil)
self.slope_angle = 0.
self.slope_angle = 0
--#if original_slope_features
self.ascending_slope_time = 0.
self.ascending_slope_time = 0
--#endif

self.move_intention = vector.zero()
Expand All @@ -116,8 +116,8 @@ function player_char:setup()
self.can_interrupt_jump = false

self.anim_spr:play("idle")
self.anim_run_speed = 0.
self.continuous_sprite_angle = 0.
self.anim_run_speed = 0
self.continuous_sprite_angle = 0
self.should_play_spring_jump = false
self.brake_anim_phase = 0

Expand Down Expand Up @@ -292,7 +292,7 @@ end
-- if force_upward_sprite is true, set sprite angle to 0
-- else, set sprite angle to angle (if not nil)
function player_char:set_slope_angle_with_quadrant(angle, force_upward_sprite)
assert(angle == nil or 0. <= angle and angle <= 1., "player_char:set_slope_angle_with_quadrant: angle is "..tostr(angle)..", should be nil or between 0 and 1 (apply % 1 is needed)")
assert(angle == nil or 0 <= angle and angle <= 1, "player_char:set_slope_angle_with_quadrant: angle is "..tostr(angle)..", should be nil or between 0 and 1 (apply % 1 is needed)")

self.slope_angle = angle

Expand Down

0 comments on commit 2980e06

Please sign in to comment.