mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 07:32:35 +00:00
Fixed crash when jumping
This commit is contained in:
@@ -134,7 +134,7 @@ class IMICFPS
|
||||
end
|
||||
|
||||
def jump
|
||||
if InputMapper.down?(:jump) && window.current_state.collision_manager.on_ground?(self)
|
||||
if InputMapper.down?(:jump) && window.current_state.map.collision_manager.on_ground?(self)
|
||||
@velocity.y = 1.5
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,6 +3,7 @@ class IMICFPS
|
||||
include EntityManager
|
||||
include LightManager
|
||||
|
||||
attr_reader :collision_manager
|
||||
attr_reader :gravity
|
||||
def initialize(map_loader:, gravity: IMICFPS::GRAVITY)
|
||||
@map_loader = map_loader
|
||||
|
||||
Reference in New Issue
Block a user