diff --git a/bin/omega-server b/bin/omega-server index 5940f9ac..231342a5 100755 --- a/bin/omega-server +++ b/bin/omega-server @@ -94,6 +94,8 @@ def main() opts.on("-c", "--constraints", "Enable entity constraints") do enforce_constraints = true end + + # TODO logging filter option end # parse cmd line diff --git a/lib/motel/mixins/location/has_coordinates.rb b/lib/motel/mixins/location/has_coordinates.rb index 25ff432c..f691f74a 100644 --- a/lib/motel/mixins/location/has_coordinates.rb +++ b/lib/motel/mixins/location/has_coordinates.rb @@ -98,6 +98,15 @@ def distance_from(cx, cy, cz) Math.sqrt(dx ** 2 + dy ** 2 + dz ** 2) end + # Return normalized direction vector from this location's coordinates to specified ones + def direction_to(tx, ty, tz) + dx = x - tx + dy = y - ty + dz = z - tz + d = Math.sqrt(dx ** 2 + dy ** 2 + dz ** 2) + [dx / d, dy / d, dz / d] + end + # Add specified quantities to each coordinate component and return new location # # @param [Array,Array] values values to add to x,y,z coordinates respectively diff --git a/lib/motel/rjr/inspect.rb b/lib/motel/rjr/inspect.rb index 79e8869c..34ad7946 100644 --- a/lib/motel/rjr/inspect.rb +++ b/lib/motel/rjr/inspect.rb @@ -15,6 +15,8 @@ module Motel::RJR get_status = proc { by_strategy = Motel::MovementStrategies.constants.collect { |s| + # FIXME this is pulling in all movement strategy mixins, + # need to restrict to just strategies themselves ms = Motel::MovementStrategies.const_get(s) num = registry.entities.select { |e| e.is_a?(Motel::Location) && e.ms.is_a?(ms) diff --git a/omega.yml b/omega.yml index 08648e18..55dd6f2b 100644 --- a/omega.yml +++ b/omega.yml @@ -2,7 +2,7 @@ omega_url: 'http://localhost/womega/' backup_dir: './backups/' -log_level: 'debug' +log_level: 'info' # logging filters - specify regexes to exclude from the omega logs #log_filters: ['users::login', 'subscribe_to'] diff --git a/site/source/javascripts/omega/callbacks/motel.js b/site/source/javascripts/omega/callbacks/motel.js index f367edac..22d260cd 100644 --- a/site/source/javascripts/omega/callbacks/motel.js +++ b/site/source/javascripts/omega/callbacks/motel.js @@ -17,6 +17,8 @@ Omega.Callbacks.motel = function(evnt, event_args){ if(entity == null) return; var new_loc = new Omega.Location(event_args[0]); + /// TODO accomodate for lag, need timestamp from server + // update last moved entity.last_moved = new Date(); diff --git a/site/source/javascripts/omega/ship/gfx/init.js b/site/source/javascripts/omega/ship/gfx/init.js index c94de689..f9dbb4c2 100644 --- a/site/source/javascripts/omega/ship/gfx/init.js +++ b/site/source/javascripts/omega/ship/gfx/init.js @@ -154,6 +154,8 @@ Omega.ShipGfxInitializer = { var missiles = new Omega.ShipMissiles({type : _this.type, template: template}); + /// TODO update missiles from gfx stub missiles before replacing + /// (also w/ mesh and missle bays) _this.missiles = missiles; _this.missiles.omega_entity = _this; diff --git a/site/source/javascripts/ui/canvas/mixins/entities.js b/site/source/javascripts/ui/canvas/mixins/entities.js index e5aeb0e3..cf3f163f 100644 --- a/site/source/javascripts/ui/canvas/mixins/entities.js +++ b/site/source/javascripts/ui/canvas/mixins/entities.js @@ -58,6 +58,7 @@ Omega.UI.CanvasEntitiesManager = { for(var ec = 0; ec < entity.components.length; ec++){ var component = entity.components[ec]; scene.remove(component); + /// TODO renderer.deallocate(component); var index = this.rendered_in.indexOf(component); if(index != -1) this.rendered_in.splice(index, 1); diff --git a/spec/motel/location_spec.rb b/spec/motel/location_spec.rb index 36bc27a2..9b1b5761 100644 --- a/spec/motel/location_spec.rb +++ b/spec/motel/location_spec.rb @@ -1,6 +1,6 @@ -# location module tests +# Location Module Tests # -# Copyright (C) 2010-2013 Mohammed Morsi +# Copyright (C) 2010-2014 Mohammed Morsi # Licensed under the AGPLv3 http://www.gnu.org/licenses/agpl.txt require 'spec_helper'