mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Enable server to require i-mic-fps.rb without launching game, fixed missing update method from connection/server, update gemfile to add releasy and rake
This commit is contained in:
29
i-mic-fps.rb
29
i-mic-fps.rb
@@ -129,17 +129,20 @@ require_relative "lib/window"
|
||||
require_relative "lib/tools/asset_viewer"
|
||||
require_relative "lib/tools/map_editor"
|
||||
|
||||
if ARGV.join.include?("--profile")
|
||||
begin
|
||||
require "ruby-prof"
|
||||
RubyProf.start
|
||||
IMICFPS::Window.new.show
|
||||
result = RubyProf.stop
|
||||
printer = RubyProf::MultiPrinter.new(result)
|
||||
printer.print(path: ".", profile: "profile", min_percent: 2)
|
||||
rescue LoadError
|
||||
puts "ruby-prof not installed!"
|
||||
# Don't launch game if __FILE__ != launching command
|
||||
if __FILE__ == $0
|
||||
if ARGV.join.include?("--profile")
|
||||
begin
|
||||
require "ruby-prof"
|
||||
RubyProf.start
|
||||
IMICFPS::Window.new.show
|
||||
result = RubyProf.stop
|
||||
printer = RubyProf::MultiPrinter.new(result)
|
||||
printer.print(path: ".", profile: "profile", min_percent: 2)
|
||||
rescue LoadError
|
||||
puts "ruby-prof not installed!"
|
||||
end
|
||||
else
|
||||
IMICFPS::Window.new.show
|
||||
end
|
||||
else
|
||||
IMICFPS::Window.new.show
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user