You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(11) |
Apr
(47) |
May
(14) |
Jun
|
Jul
(73) |
Aug
(4) |
Sep
(2) |
Oct
(60) |
Nov
(48) |
Dec
(66) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(1) |
Mar
(27) |
Apr
(82) |
May
(89) |
Jun
(91) |
Jul
(44) |
Aug
(53) |
Sep
(113) |
Oct
(20) |
Nov
(37) |
Dec
(10) |
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(21) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(76) |
Feb
(89) |
Mar
(52) |
Apr
(11) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(27) |
2010 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
(14) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(11) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <Ult...@us...> - 2009-02-07 18:34:31
|
Revision: 1001 http://opengate.svn.sourceforge.net/opengate/?rev=1001&view=rev Author: Ultrasick Date: 2009-02-07 18:34:25 +0000 (Sat, 07 Feb 2009) Log Message: ----------- fixed content of typhoon.xml I think we will run into troubles. The typhoon ship does still exist in Jossh but not in Jumpgate anymore. In Jumpgate now exist a few new ships but they don't exist in Jossh jet (if I saw that correctly). Will be hard to get the data about the ships. Modified Paths: -------------- trunk/data/ships/quantar/typhoon/typhoon.xml Modified: trunk/data/ships/quantar/typhoon/typhoon.xml =================================================================== --- trunk/data/ships/quantar/typhoon/typhoon.xml 2009-02-07 17:06:52 UTC (rev 1000) +++ trunk/data/ships/quantar/typhoon/typhoon.xml 2009-02-07 18:34:25 UTC (rev 1001) @@ -1,36 +1,30 @@ <?xml version="1.0"?> -<ship> - <!-- Naming --> +<container> + <object_id>876</object_id> <category_id>9</category_id> - <faction>Quantar</faction> - <name>Typhoon</name> - - <!-- Generic Data --> - <class>Bussard Mining Scoop</class> - <techlevel>XXX</techlevel> - <size>XXX</size> + <faction_id>2</faction_id> + <name_en>Typhoon</name_en> + <name_de>Typhoon</name_de> + <production_center>Quantar Core</production_center> + <production_center>Quantar TriPoint</production_center> + <production_center>Quantar Corridor</production_center> + <classification_en>fighter</classification_en> + <classification_de>J\xE4ger</classification_de> + <required_rank>26</required_rank> <mass>19560</mass> - - <!-- Sizes --> - <capacitorsize>3</capacitorsize> - <ecmsize>2</ecmsize> - <engines>2</engines> - <enginesize>3</enginesize> - <guns>4</guns> - <gunsize>3:2:3:2</gunsize> - <missiles>3</missiles> - <missilesize>4:2:2</missilesize> - <modx>4</modx> - <powerplantsize>3</powerplantsize> - <radarsize>2</radarsize> - <shieldsize>2</shieldsize> + <amount_of_missile_holders>3</amount_of_missile_holders> + <missile_sizes>1x4, 2x1</missile_sizes> + <amount_of_modification_slots>4</amount_of_modification_slots> + <maximum_powerplant_size>3</maximum_powerplant_size> + <maximum_radar_size>2</maximum_radar_size> + <maximum_ECM_size>2</maximum_ECM_size> + <maximum_shield_size>2</maximum_shield_size> + <maximum_capacitor_size>3</maximum_capacitor_size> + <cargo_hold>16</cargo_hold> <armor>14490</armor> - <cargocapacity>16</cargocapacity> - - <!-- Movement --> - <dragfactor>20.4</dragfactor> - <pitch>0.001309</pitch> <!-- 75.0 in jossh --> - <roll>0.001047</roll> <!-- 60.0 in jossh --> - <yaw>0.000873</yaw> <!-- 50.0 in jossh --> -</ship> + <maximum_yaw>50</maximum_yaw> + <drag_factor>20.4</drag_factor> + <maximum_pitch>75</maximum_pitch> + <maximum_roll>60</maximum_roll> +</container> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-07 17:06:58
|
Revision: 1000 http://opengate.svn.sourceforge.net/opengate/?rev=1000&view=rev Author: Ultrasick Date: 2009-02-07 17:06:52 +0000 (Sat, 07 Feb 2009) Log Message: ----------- fixed a misspelled word Modified Paths: -------------- doc/meta_server/how_to_request_property.odt doc/meta_server/how_to_request_property.pdf Modified: doc/meta_server/how_to_request_property.odt =================================================================== (Binary files differ) Modified: doc/meta_server/how_to_request_property.pdf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-07 14:48:45
|
Revision: 999 http://opengate.svn.sourceforge.net/opengate/?rev=999&view=rev Author: Ultrasick Date: 2009-02-07 14:48:42 +0000 (Sat, 07 Feb 2009) Log Message: ----------- adding template files for the medal "iron will" Added Paths: ----------- templates/data/medals/ templates/data/medals/iron_will/ templates/data/medals/iron_will/bronze.png templates/data/medals/iron_will/gold.png templates/data/medals/iron_will/original.pspimage templates/data/medals/iron_will/silver.png Added: templates/data/medals/iron_will/bronze.png =================================================================== (Binary files differ) Property changes on: templates/data/medals/iron_will/bronze.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: templates/data/medals/iron_will/gold.png =================================================================== (Binary files differ) Property changes on: templates/data/medals/iron_will/gold.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: templates/data/medals/iron_will/original.pspimage =================================================================== (Binary files differ) Property changes on: templates/data/medals/iron_will/original.pspimage ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: templates/data/medals/iron_will/silver.png =================================================================== (Binary files differ) Property changes on: templates/data/medals/iron_will/silver.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-07 14:46:24
|
Revision: 998 http://opengate.svn.sourceforge.net/opengate/?rev=998&view=rev Author: Ultrasick Date: 2009-02-07 14:46:21 +0000 (Sat, 07 Feb 2009) Log Message: ----------- adding a template file for the "show all" button on the market screen Added Paths: ----------- templates/data/gui/screens/station/content/market/buttons/show_all.pspimage Added: templates/data/gui/screens/station/content/market/buttons/show_all.pspimage =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/content/market/buttons/show_all.pspimage ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-07 14:45:09
|
Revision: 997 http://opengate.svn.sourceforge.net/opengate/?rev=997&view=rev Author: Ultrasick Date: 2009-02-07 14:44:51 +0000 (Sat, 07 Feb 2009) Log Message: ----------- adding value for market_user_id which is needed to request the property on the market Modified Paths: -------------- trunk/data/stations/tauseti_wake.xml Property Changed: ---------------- trunk/data/stations/tauseti_wake.xml Modified: trunk/data/stations/tauseti_wake.xml =================================================================== (Binary files differ) Property changes on: trunk/data/stations/tauseti_wake.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-07 14:43:51
|
Revision: 996 http://opengate.svn.sourceforge.net/opengate/?rev=996&view=rev Author: Ultrasick Date: 2009-02-07 14:43:48 +0000 (Sat, 07 Feb 2009) Log Message: ----------- making the request more general to request also the property on the market Added Paths: ----------- doc/meta_server/how_to_request_property.odt doc/meta_server/how_to_request_property.pdf Removed Paths: ------------- doc/meta_server/how_to_request_private_property.odt doc/meta_server/how_to_request_private_property.pdf Deleted: doc/meta_server/how_to_request_private_property.odt =================================================================== (Binary files differ) Deleted: doc/meta_server/how_to_request_private_property.pdf =================================================================== (Binary files differ) Added: doc/meta_server/how_to_request_property.odt =================================================================== (Binary files differ) Property changes on: doc/meta_server/how_to_request_property.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: doc/meta_server/how_to_request_property.pdf =================================================================== (Binary files differ) Property changes on: doc/meta_server/how_to_request_property.pdf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-01 17:52:26
|
Revision: 995 http://opengate.svn.sourceforge.net/opengate/?rev=995&view=rev Author: Ultrasick Date: 2009-02-01 17:52:14 +0000 (Sun, 01 Feb 2009) Log Message: ----------- using orange color instead of blue for selected items now +adding 3 more template files for the market screen Modified Paths: -------------- templates/data/gui/screens/station/content/market/buttons/sort/alphabetically.pspimage templates/data/gui/screens/station/content/market/buttons/sort/costs.pspimage templates/data/gui/screens/station/content/market/buttons/sort/size.pspimage Added Paths: ----------- templates/data/gui/screens/station/content/market/buttons/sort/ascending.pspimage templates/data/gui/screens/station/content/market/buttons/sort/quantity.pspimage templates/data/gui/screens/station/content/market/buttons/sort/rank.pspimage Modified: templates/data/gui/screens/station/content/market/buttons/sort/alphabetically.pspimage =================================================================== (Binary files differ) Added: templates/data/gui/screens/station/content/market/buttons/sort/ascending.pspimage =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/content/market/buttons/sort/ascending.pspimage ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: templates/data/gui/screens/station/content/market/buttons/sort/costs.pspimage =================================================================== (Binary files differ) Added: templates/data/gui/screens/station/content/market/buttons/sort/quantity.pspimage =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/content/market/buttons/sort/quantity.pspimage ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: templates/data/gui/screens/station/content/market/buttons/sort/rank.pspimage =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/content/market/buttons/sort/rank.pspimage ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: templates/data/gui/screens/station/content/market/buttons/sort/size.pspimage =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-01 17:08:06
|
Revision: 994 http://opengate.svn.sourceforge.net/opengate/?rev=994&view=rev Author: Ultrasick Date: 2009-02-01 17:07:59 +0000 (Sun, 01 Feb 2009) Log Message: ----------- adding required rank to prevent hacks Modified Paths: -------------- trunk/data/commodities/aluminium.xml trunk/data/commodities/ammunition.xml trunk/data/commodities/antimony.xml trunk/data/commodities/armor.xml trunk/data/commodities/barium.xml trunk/data/commodities/boron.xml trunk/data/commodities/cesium.xml trunk/data/commodities/chemicals.xml trunk/data/commodities/chromium.xml trunk/data/commodities/copper.xml trunk/data/commodities/cpus.xml trunk/data/commodities/electronics.xml trunk/data/commodities/fiber_optics.xml trunk/data/commodities/fuel_cells.xml trunk/data/commodities/gallium.xml trunk/data/commodities/gold.xml trunk/data/commodities/helium.xml trunk/data/commodities/ice.xml trunk/data/commodities/iron.xml trunk/data/commodities/laser_components.xml trunk/data/commodities/lumber.xml trunk/data/commodities/magnetic_components.xml trunk/data/commodities/manufactured_foods.xml trunk/data/commodities/medical_supplies.xml trunk/data/commodities/nitrogen.xml trunk/data/commodities/octavia_light.xml trunk/data/commodities/organic_foods.xml trunk/data/commodities/plutonium.xml trunk/data/commodities/power_converters.xml trunk/data/commodities/prostheses.xml trunk/data/commodities/ram.xml trunk/data/commodities/rubber.xml trunk/data/commodities/squadrok_biomass.xml trunk/data/commodities/tauseti_flashback.xml trunk/data/commodities/unsigned_box.xml trunk/data/commodities/uranium.xml trunk/data/commodities/water.xml trunk/data/commodities/xenon.xml trunk/data/commodities/zinc.xml Modified: trunk/data/commodities/aluminium.xml =================================================================== --- trunk/data/commodities/aluminium.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/aluminium.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -12,4 +12,5 @@ <description_de>Betrachtet man die Fakten, dann ist Aluminium nicht das leichteste und geeignetste Metall f\xFCr die Raumfahrt. Dennoch erzeugt schon alleine die Verwendung des Begriffs "Aluminium" einen nicht zu vernachl\xE4ssigenden Werbeeffekt, wenn das Ziel darin besteht, die geringe Masse und Tr\xE4gheit des Endprodukts hervorzuheben. Da Aluminium in unserer Galaxy sehr h\xE4ufig vorkommt, entstehen selten Engp\xE4sse bei der Herstellung. Man m\xFCsste sogar erwarten, dass dieses Element - verglichen mit anderen Elementen - recht g\xFCnstig auf dem Markt zu finden ist. Jedoch kommt Aluminium nie als Reinstoff vor sondern immer in Verbindung mit anderen Elementen. Die Elektrolyse ben\xF6tigt allerdings sehr viel Energie, was die Endkosten ma\xDFgeblich beeinflusst.</description_de> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/ammunition.xml =================================================================== --- trunk/data/commodities/ammunition.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/ammunition.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -17,4 +17,5 @@ <required_component>explosives</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/antimony.xml =================================================================== --- trunk/data/commodities/antimony.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/antimony.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>903.78</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/armor.xml =================================================================== --- trunk/data/commodities/armor.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/armor.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -16,4 +16,5 @@ <required_component>synthetics</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/barium.xml =================================================================== --- trunk/data/commodities/barium.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/barium.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>1000</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/boron.xml =================================================================== --- trunk/data/commodities/boron.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/boron.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <mass>2460</mass> <melting_point>2349</melting_point> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/cesium.xml =================================================================== --- trunk/data/commodities/cesium.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/cesium.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>301.59</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/chemicals.xml =================================================================== --- trunk/data/commodities/chemicals.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/chemicals.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -20,4 +20,5 @@ <description_de>Industrielle Chemikalien haben sehr unterschiedliche Verwendungszwecke. Mache werden bei der Schiffsproduktion zur Beschichtung von Panzerplatten verwendet, andere zur Reinigung der Raumstationen und wieder andere werden sogar bei der Herstellung synthetischer Lebensmittel verwendet. Da die verschiedenen Stoffe mittlerweile ausreichend sicher verpackt werden, gelten sie nicht mehr als Gefahrengut und k\xF6nnen damit auch von TRI Zivilisten bedenkenlos transportiert werden.</description_de> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/chromium.xml =================================================================== --- trunk/data/commodities/chromium.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/chromium.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>2180</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/copper.xml =================================================================== --- trunk/data/commodities/copper.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/copper.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>1357.77</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/cpus.xml =================================================================== --- trunk/data/commodities/cpus.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/cpus.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -17,4 +17,5 @@ <description_de>Jegliche Bordelektronik ist mittlerweile mit einem Prozessor ausgestattet. W\xE4hrend die Schiffselektronik hohe Anspr\xFCche an die CPU stellt wird die CPU einer Lenkrakete lediglich f\xFCr eine kurzzeitige Navigation ben\xF6tigt und dann durch den Aufschlag und den Sprengsatz zerst\xF6rt. Die zentrale Verarbeitungseinheit (CPU) wird wegen der hohen Komplexit\xE4t auch gerne als das Herzst\xFCck der Elektronik bezeichnet. Entsprechend begehrt ist diese Ware in der Elektronikindustrie was gew\xF6hnlich zu hohen Verkaufszahlen auf dem Markt f\xFChrt.</description_de> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/electronics.xml =================================================================== --- trunk/data/commodities/electronics.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/electronics.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -18,4 +18,5 @@ <required_component>synthetics</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/fiber_optics.xml =================================================================== --- trunk/data/commodities/fiber_optics.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/fiber_optics.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -15,4 +15,5 @@ <required_component>synthetics</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/fuel_cells.xml =================================================================== --- trunk/data/commodities/fuel_cells.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/fuel_cells.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -19,4 +19,5 @@ <description_de>Brennstoffzellen sind Energieumwandler, die chemische Energie in elektrische Energie wandeln k\xF6nnen. Als chemische Energiequellen verwendet man meist den aus dem All gesammelten Wasserstoff und verbindet diesen mit Sauerstoff in der Zelle zu Wasser. Der Vorteil einer leistungsstarken Brennstoffzelle im Vergleich zu einem Fusionsreaktor besteht darin, dass keine Radioaktivit\xE4t anf\xE4llt und au\xDFerdem das Endprodukt der Wandlung, das Wasser, durch Energie wieder zu Wasserstoff und Sauerstoff getrennt werden kann. Brennstoffzellen k\xF6nnen daher wieder aufgeladen werden, w\xE4hrend Fussionsreaktoren mit neuem Brennmaterial versorgt werden m\xFCssen. Leider reicht bis heute auch die st\xE4rkste Brennstoffzelle bei Weitem nicht aus, um Schiffstriebwerke betreiben zu k\xF6nnen. Sie werden jedoch oft in Drohnen und Satelliten zur Energiebereitstellung eingesetzt.</description_de> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/gallium.xml =================================================================== --- trunk/data/commodities/gallium.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/gallium.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>302.91</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/gold.xml =================================================================== --- trunk/data/commodities/gold.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/gold.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -12,4 +12,5 @@ <description_de>In l\xE4ngst vergangenen Zeiten diente Gold lediglich als Zahlungsmittel. Gl\xFCcklicherweise wird dieses wertvolle Mineral heute nicht mehr unn\xFCtzigerweise in den Geldbeuteln der Menschen umhergetragen. Bei einigen Handelswaren werden besonderst hohe Anforderungen an die Qualit\xE4t gestellt. Wegen der hohen Zuverl\xE4ssigkeit der Eigenschaften wird Gold daher in der Mikroelektronik verwendet. Au\xDFerdem wird es gro\xDFfl\xE4chig zur W\xE4rmereflektion bei Sonden, Drohnen und Satelliten eingesetzt, die Sonnenaktivit\xE4ten beobachten und damit oft lange und nahe einer hei\xDFen Quelle sind.</description_de> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/helium.xml =================================================================== --- trunk/data/commodities/helium.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/helium.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>0.95</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/ice.xml =================================================================== --- trunk/data/commodities/ice.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/ice.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>273.15</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/iron.xml =================================================================== --- trunk/data/commodities/iron.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/iron.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>1811</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/laser_components.xml =================================================================== --- trunk/data/commodities/laser_components.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/laser_components.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -17,4 +17,5 @@ <melting_point>varies</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/lumber.xml =================================================================== --- trunk/data/commodities/lumber.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/lumber.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <production_center>various</production_center> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/magnetic_components.xml =================================================================== --- trunk/data/commodities/magnetic_components.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/magnetic_components.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -15,4 +15,5 @@ <required_component>machined parts</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/manufactured_foods.xml =================================================================== --- trunk/data/commodities/manufactured_foods.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/manufactured_foods.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -20,4 +20,5 @@ <melting_point>varies</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/medical_supplies.xml =================================================================== --- trunk/data/commodities/medical_supplies.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/medical_supplies.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -20,4 +20,5 @@ <description_de>Verbandsmaterialien, Spritzen, Impfstoffe und und und. In den weis/roten Containern findet sich alles M\xF6gliche zur medizinischen Versorgung wieder. Ob nun f\xFCr den Fingernagelbruch des Space Cowboys oder den Arztkoffer der Sanit\xE4tsabteilung. Auch kleinere medizinische Instrumente wie Blutdruck- und Blutzuckermessger\xE4te k\xF6nnen im Container verstaut sein. Da auch dem gr\xF6\xDFten Helden hin und wieder eine kleine Panne passiert sind diese Handelswaren allerorts begehrte G\xFCter.</description_de> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/nitrogen.xml =================================================================== --- trunk/data/commodities/nitrogen.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/nitrogen.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>63.14</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/octavia_light.xml =================================================================== --- trunk/data/commodities/octavia_light.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/octavia_light.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -13,4 +13,5 @@ <melting_point>273.15</melting_point> <faction_id>3</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/organic_foods.xml =================================================================== --- trunk/data/commodities/organic_foods.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/organic_foods.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -15,4 +15,5 @@ <required_component>grain</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/plutonium.xml =================================================================== --- trunk/data/commodities/plutonium.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/plutonium.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -13,4 +13,5 @@ <required_component>synthetics</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/power_converters.xml =================================================================== --- trunk/data/commodities/power_converters.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/power_converters.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -17,4 +17,5 @@ <required_component>machined parts</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/prostheses.xml =================================================================== --- trunk/data/commodities/prostheses.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/prostheses.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -14,4 +14,5 @@ <required_component>carbon</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/ram.xml =================================================================== --- trunk/data/commodities/ram.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/ram.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -15,4 +15,5 @@ <required_component>gold</required_component> <required_component>silicon</required_component> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/rubber.xml =================================================================== --- trunk/data/commodities/rubber.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/rubber.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -16,4 +16,5 @@ <required_component>synthetics</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/squadrok_biomass.xml =================================================================== --- trunk/data/commodities/squadrok_biomass.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/squadrok_biomass.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -12,4 +12,5 @@ <melting_point>unknown</melting_point> <faction_id>4</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/tauseti_flashback.xml =================================================================== --- trunk/data/commodities/tauseti_flashback.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/tauseti_flashback.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -15,4 +15,5 @@ <description_de>"Man sagt, das beste Getr\xE4nk, das es gibt, ist der Tauseti FlashBack. Die Wirkung eines Tauseti FlashBack ist so, als w\xFCrde einem das Hirn mit einer Zitronenscheibe rausgeschlagen und anschlie\xDFend um einen rie\xDFigen Squadrox S-23 gewickelt werden."</description_de> <faction_id>1</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/unsigned_box.xml =================================================================== --- trunk/data/commodities/unsigned_box.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/unsigned_box.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <faction_id>0</faction_id> <production_center>various</production_center> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/uranium.xml =================================================================== --- trunk/data/commodities/uranium.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/uranium.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>1405</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/water.xml =================================================================== --- trunk/data/commodities/water.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/water.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -18,4 +18,5 @@ <required_component>ice</required_component> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/xenon.xml =================================================================== --- trunk/data/commodities/xenon.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/xenon.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -12,4 +12,5 @@ <melting_point>161.4</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file Modified: trunk/data/commodities/zinc.xml =================================================================== --- trunk/data/commodities/zinc.xml 2009-02-01 14:25:19 UTC (rev 993) +++ trunk/data/commodities/zinc.xml 2009-02-01 17:07:59 UTC (rev 994) @@ -11,4 +11,5 @@ <melting_point>692.68</melting_point> <faction_id>0</faction_id> <size>1</size> + <required_rank>0</required_rank> </container> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-01 14:25:26
|
Revision: 993 http://opengate.svn.sourceforge.net/opengate/?rev=993&view=rev Author: Ultrasick Date: 2009-02-01 14:25:19 +0000 (Sun, 01 Feb 2009) Log Message: ----------- adding size value to prevent hacks + changing mime type to text. application/xml would be the right one but svn can handle text better Modified Paths: -------------- trunk/data/commodities/aluminium.xml trunk/data/commodities/ammunition.xml trunk/data/commodities/antimony.xml trunk/data/commodities/armor.xml trunk/data/commodities/barium.xml trunk/data/commodities/boron.xml trunk/data/commodities/cesium.xml trunk/data/commodities/chemicals.xml trunk/data/commodities/chromium.xml trunk/data/commodities/copper.xml trunk/data/commodities/cpus.xml trunk/data/commodities/electronics.xml trunk/data/commodities/fiber_optics.xml trunk/data/commodities/fuel_cells.xml trunk/data/commodities/gallium.xml trunk/data/commodities/gold.xml trunk/data/commodities/helium.xml trunk/data/commodities/ice.xml trunk/data/commodities/iron.xml trunk/data/commodities/laser_components.xml trunk/data/commodities/lumber.xml trunk/data/commodities/magnetic_components.xml trunk/data/commodities/manufactured_foods.xml trunk/data/commodities/medical_supplies.xml trunk/data/commodities/nitrogen.xml trunk/data/commodities/octavia_light.xml trunk/data/commodities/organic_foods.xml trunk/data/commodities/plutonium.xml trunk/data/commodities/power_converters.xml trunk/data/commodities/prostheses.xml trunk/data/commodities/ram.xml trunk/data/commodities/rubber.xml trunk/data/commodities/squadrok_biomass.xml trunk/data/commodities/tauseti_flashback.xml trunk/data/commodities/unsigned_box.xml trunk/data/commodities/uranium.xml trunk/data/commodities/water.xml trunk/data/commodities/xenon.xml trunk/data/commodities/zinc.xml Property Changed: ---------------- trunk/data/commodities/aluminium.xml trunk/data/commodities/ammunition.xml trunk/data/commodities/antimony.xml trunk/data/commodities/armor.xml trunk/data/commodities/barium.xml trunk/data/commodities/boron.xml trunk/data/commodities/cesium.xml trunk/data/commodities/chemicals.xml trunk/data/commodities/chromium.xml trunk/data/commodities/copper.xml trunk/data/commodities/cpus.xml trunk/data/commodities/electronics.xml trunk/data/commodities/fiber_optics.xml trunk/data/commodities/fuel_cells.xml trunk/data/commodities/gold.xml trunk/data/commodities/helium.xml trunk/data/commodities/ice.xml trunk/data/commodities/iron.xml trunk/data/commodities/laser_components.xml trunk/data/commodities/lumber.xml trunk/data/commodities/magnetic_components.xml trunk/data/commodities/manufactured_foods.xml trunk/data/commodities/medical_supplies.xml trunk/data/commodities/nitrogen.xml trunk/data/commodities/octavia_light.xml trunk/data/commodities/organic_foods.xml trunk/data/commodities/plutonium.xml trunk/data/commodities/power_converters.xml trunk/data/commodities/prostheses.xml trunk/data/commodities/ram.xml trunk/data/commodities/rubber.xml trunk/data/commodities/squadrok_biomass.xml trunk/data/commodities/tauseti_flashback.xml trunk/data/commodities/unsigned_box.xml trunk/data/commodities/uranium.xml trunk/data/commodities/water.xml trunk/data/commodities/xenon.xml trunk/data/commodities/zinc.xml Modified: trunk/data/commodities/aluminium.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/aluminium.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/ammunition.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/ammunition.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/antimony.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/antimony.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/armor.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/armor.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/barium.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/barium.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/boron.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/boron.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/cesium.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/cesium.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/chemicals.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/chemicals.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/chromium.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/chromium.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/copper.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/copper.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/cpus.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/cpus.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/electronics.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/electronics.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/fiber_optics.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/fiber_optics.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/fuel_cells.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/fuel_cells.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/gallium.xml =================================================================== --- trunk/data/commodities/gallium.xml 2009-02-01 14:19:44 UTC (rev 992) +++ trunk/data/commodities/gallium.xml 2009-02-01 14:25:19 UTC (rev 993) @@ -10,4 +10,5 @@ <mass>5904</mass> <melting_point>302.91</melting_point> <faction_id>0</faction_id> + <size>1</size> </container> \ No newline at end of file Modified: trunk/data/commodities/gold.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/gold.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/helium.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/helium.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/ice.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/ice.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/iron.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/iron.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/laser_components.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/laser_components.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/lumber.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/lumber.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/magnetic_components.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/magnetic_components.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/manufactured_foods.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/manufactured_foods.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/medical_supplies.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/medical_supplies.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/nitrogen.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/nitrogen.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/octavia_light.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/octavia_light.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/organic_foods.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/organic_foods.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/plutonium.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/plutonium.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/power_converters.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/power_converters.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/prostheses.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/prostheses.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/ram.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/ram.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/rubber.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/rubber.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/squadrok_biomass.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/squadrok_biomass.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/tauseti_flashback.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/tauseti_flashback.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/unsigned_box.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/unsigned_box.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/uranium.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/uranium.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/water.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/water.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/xenon.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/xenon.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml Modified: trunk/data/commodities/zinc.xml =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/zinc.xml ___________________________________________________________________ Deleted: svn:mime-type - application/xml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-01 14:19:54
|
Revision: 992 http://opengate.svn.sourceforge.net/opengate/?rev=992&view=rev Author: Ultrasick Date: 2009-02-01 14:19:44 +0000 (Sun, 01 Feb 2009) Log Message: ----------- adding a few template images for the "sort by ..." buttons in the market screen Added Paths: ----------- templates/data/gui/screens/station/content/market/buttons/sort/ templates/data/gui/screens/station/content/market/buttons/sort/alphabetically.pspimage templates/data/gui/screens/station/content/market/buttons/sort/costs.pspimage templates/data/gui/screens/station/content/market/buttons/sort/size.pspimage Added: templates/data/gui/screens/station/content/market/buttons/sort/alphabetically.pspimage =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/content/market/buttons/sort/alphabetically.pspimage ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: templates/data/gui/screens/station/content/market/buttons/sort/costs.pspimage =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/content/market/buttons/sort/costs.pspimage ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: templates/data/gui/screens/station/content/market/buttons/sort/size.pspimage =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/content/market/buttons/sort/size.pspimage ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-01 10:24:37
|
Revision: 991 http://opengate.svn.sourceforge.net/opengate/?rev=991&view=rev Author: Ultrasick Date: 2009-02-01 10:24:34 +0000 (Sun, 01 Feb 2009) Log Message: ----------- Renaming template file. This wasn't the opengate logo but the logo of TRI Added Paths: ----------- templates/data/gui/docked/base/tri_logo.png Removed Paths: ------------- templates/data/gui/docked/base/Opengate logo.png Deleted: templates/data/gui/docked/base/Opengate logo.png =================================================================== (Binary files differ) Added: templates/data/gui/docked/base/tri_logo.png =================================================================== (Binary files differ) Property changes on: templates/data/gui/docked/base/tri_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-01 10:18:52
|
Revision: 990 http://opengate.svn.sourceforge.net/opengate/?rev=990&view=rev Author: Ultrasick Date: 2009-02-01 10:18:48 +0000 (Sun, 01 Feb 2009) Log Message: ----------- more file motion Added Paths: ----------- templates/data/gui/screens/station/surrounding/laser/ templates/data/gui/screens/station/surrounding/laser/logos/ templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/ templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/bearbeiten.php templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/functions.php templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/laden.php templates/data/gui/screens/station/surrounding/laser/logos/datensaetze/ templates/data/gui/screens/station/surrounding/laser/logos/datensaetze/tauseti.png templates/data/gui/screens/station/surrounding/laser/logos/index.php templates/data/gui/screens/station/surrounding/laser/logos/test.htm templates/data/gui/screens/station/surrounding/top/ templates/data/gui/screens/station/surrounding/top/light/ templates/data/gui/screens/station/surrounding/top/light/algorithmen/ templates/data/gui/screens/station/surrounding/top/light/algorithmen/bearbeiten.php templates/data/gui/screens/station/surrounding/top/light/algorithmen/functions.php templates/data/gui/screens/station/surrounding/top/light/algorithmen/laden.php templates/data/gui/screens/station/surrounding/top/light/bild_resultat.png templates/data/gui/screens/station/surrounding/top/light/index.php templates/data/gui/screens/station/surrounding/top/light/vorgabe.png Removed Paths: ------------- templates/data/gui/docked/base/php/ templates/data/gui/screens/station/create_a_laser_logo/ Added: templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/bearbeiten.php =================================================================== --- templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/bearbeiten.php (rev 0) +++ templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/bearbeiten.php 2009-02-01 10:18:48 UTC (rev 990) @@ -0,0 +1,43 @@ +<? +$x = 0; +$y = 0; + +while($y<>$Bild_H\xF6he){ + while($x<>$Bild_Breite){ + # Pixel einlesen + $Pixel = pixel_read($Bild_Vorgabe, $x, $y); + + $rot = $Pixel['red']; + $gr\xFCn = $Pixel['green']; + $blau = $Pixel['blue']; + $alpha = $Pixel['alpha']; + + # neuen Alphawert berechnen + $alpha = (($rot/255 + $gr\xFCn/255 + $blau/255) / 3) * 127; + + # neue Farbwerte festlegen + $rot = 255; + $gr\xFCn = 0; + $blau = 0; + + $x_Verarbeitet = sin(($Durchlauf/360)*2*$Pi) * (($Bild_Breite/2) - $x) + ($Bild_Breite/2) + 5; + + # Farbwerte abspeichern + pixel_write($Bild_Verarbeitet, $x_Verarbeitet - 1, $y, $rot, $gr\xFCn, $blau, $alpha); + pixel_write($Bild_Verarbeitet, $x_Verarbeitet, $y, $rot, $gr\xFCn, $blau, $alpha); + pixel_write($Bild_Verarbeitet, $x_Verarbeitet + 1, $y, $rot, $gr\xFCn, $blau, $alpha); + + # Auf der x-Achse 1 weiter springen + $x++; + } + + # x-Achse zur\xFCcksetzen + $x = 0; + + # Auf der y-Achse 1 weiter springen + $y++; +} + +# Bild abspeichern +ImagePNG($Bild_Verarbeitet, $Durchlauf . '.png'); +?> \ No newline at end of file Property changes on: templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/bearbeiten.php ___________________________________________________________________ Added: svn:eol-style + native Added: templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/functions.php =================================================================== --- templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/functions.php (rev 0) +++ templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/functions.php 2009-02-01 10:18:48 UTC (rev 990) @@ -0,0 +1,15 @@ +<? +# Pixel einladen [Start] + function pixel_read($Bild, $x, $y){ + # Pixel einlesen + return imagecolorsforindex($Bild, imagecolorat($Bild, $x, $y)); + } +# Pixel einladen [Ende] + +# Pixel speichern [Start] + function pixel_write($Bild, $x, $y, $rot, $gr\xFCn, $blau, $alpha){ + $Farbe = imagecolorallocatealpha($Bild, $rot, $gr\xFCn, $blau, $alpha); + ImageFilledRectangle($Bild, $x, $y, $x, $y, $Farbe); + } +# Pixel speichern [Ende] +?> \ No newline at end of file Property changes on: templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/functions.php ___________________________________________________________________ Added: svn:eol-style + native Added: templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/laden.php =================================================================== --- templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/laden.php (rev 0) +++ templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/laden.php 2009-02-01 10:18:48 UTC (rev 990) @@ -0,0 +1,21 @@ +<? +$Pi = 3.14159265; + +# Bilddimensionen abfragen (Breite und H\xF6he) [Start] + $Bild_Daten = getimagesize('datensaetze/' . $Datensatz . '.png'); + $Bild_Breite = $Bild_Daten[0]; + $Bild_H\xF6he = $Bild_Daten[1]; + unset($Bild_Daten); +# Bilddimensionen abfragen (Breite und H\xF6he) [Ende] + +# Vorgabebild in den Speicher laden +$Bild_Vorgabe = imageCreateFromPNG('datensaetze/' . $Datensatz . '.png'); + +# Leeres Bild f\xFCr Ausgabe im Speicher anlegen +$Bild_Verarbeitet = ImageCreateTrueColor($Bild_Breite + 10, $Bild_H\xF6he); +ImageSaveAlpha($Bild_Verarbeitet, true); + +# Bild mit Transparenz f\xFCllen +$Transparenz = imagecolorallocatealpha($Bild_Verarbeitet, 255, 0, 0, 127); +ImageFill($Bild_Verarbeitet, 0, 0, $Transparenz); +?> \ No newline at end of file Property changes on: templates/data/gui/screens/station/surrounding/laser/logos/algorithmen/laden.php ___________________________________________________________________ Added: svn:eol-style + native Added: templates/data/gui/screens/station/surrounding/laser/logos/datensaetze/tauseti.png =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/surrounding/laser/logos/datensaetze/tauseti.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: templates/data/gui/screens/station/surrounding/laser/logos/index.php =================================================================== --- templates/data/gui/screens/station/surrounding/laser/logos/index.php (rev 0) +++ templates/data/gui/screens/station/surrounding/laser/logos/index.php 2009-02-01 10:18:48 UTC (rev 990) @@ -0,0 +1,25 @@ +<? +$Durchlauf++; + +if($Durchlauf==361){ + exit; +} + +$Datensatz = 'tauseti'; + +# Seite neu laden +echo '<html><head><meta http-equiv=refresh content="0; URL=\'index.php?Durchlauf=' . $Durchlauf . '\'"></head><body>'; + +# Funktionen einladen +require('algorithmen/functions.php'); + +# Algorithmus: laden +require('algorithmen/laden.php'); + +# Algorithmus: bearbeiten +require('algorithmen/bearbeiten.php'); + +# Bild anzeigen +echo '<img src="' . $Durchlauf . '.png"></p>'; +?> +</body></html> \ No newline at end of file Property changes on: templates/data/gui/screens/station/surrounding/laser/logos/index.php ___________________________________________________________________ Added: svn:eol-style + native Added: templates/data/gui/screens/station/surrounding/laser/logos/test.htm =================================================================== --- templates/data/gui/screens/station/surrounding/laser/logos/test.htm (rev 0) +++ templates/data/gui/screens/station/surrounding/laser/logos/test.htm 2009-02-01 10:18:48 UTC (rev 990) @@ -0,0 +1,26 @@ +<html> +<head> + + <script language="JavaScript" type="text/javascript"><!-- + var Durchlauf = 0; + + function showit(){ + Durchlauf = eval(Durchlauf + 1); + + document.getElementById("Bild").src = Durchlauf + ".png"; + + if(Durchlauf==360){ + Durchlauf = 0; + } + + window.setTimeout("showit()", 15); + } + // --></script> + +</head> +<body onLoad="javascript:showit()" bgcolor=black> + + <img id=Bild> + +</body> +</html> \ No newline at end of file Property changes on: templates/data/gui/screens/station/surrounding/laser/logos/test.htm ___________________________________________________________________ Added: svn:eol-style + native Added: templates/data/gui/screens/station/surrounding/top/light/algorithmen/bearbeiten.php =================================================================== --- templates/data/gui/screens/station/surrounding/top/light/algorithmen/bearbeiten.php (rev 0) +++ templates/data/gui/screens/station/surrounding/top/light/algorithmen/bearbeiten.php 2009-02-01 10:18:48 UTC (rev 990) @@ -0,0 +1,43 @@ +<? +$x = 0; +$y = 0; + +while($y<>$Bild_H\xF6he){ + while($x<>$Bild_Breite){ + # Pixel einlesen + pixel_read($x, $y); + + $rot = $Bild_Pixel['red']; + $gr\xFCn = $Bild_Pixel['green']; + $blau = $Bild_Pixel['blue']; + $alpha = $Bild_Pixel['alpha']; + + # Neue Farbwerte berechnen + if($alpha==0){ + $alpha = $blau + 14; + + if($alpha>127){ + $alpha = 127; + echo 'overflow, '; + } + } + $gr\xFCn = 0; + $blau = 0; + + # Farbwerte abspeichern + pixel_write($x, $y, $rot, $gr\xFCn, $blau, $alpha); + + # Auf der x-Achse 1 weiter springen + $x++; + } + + # x-Achse zur\xFCcksetzen + $x = 0; + + # Auf der y-Achse 1 weiter springen + $y++; +} + +# Bild abspeichern +ImagePNG($Bild_Verarbeitet, 'bild_resultat.png'); +?> \ No newline at end of file Property changes on: templates/data/gui/screens/station/surrounding/top/light/algorithmen/bearbeiten.php ___________________________________________________________________ Added: svn:eol-style + native Added: templates/data/gui/screens/station/surrounding/top/light/algorithmen/functions.php =================================================================== --- templates/data/gui/screens/station/surrounding/top/light/algorithmen/functions.php (rev 0) +++ templates/data/gui/screens/station/surrounding/top/light/algorithmen/functions.php 2009-02-01 10:18:48 UTC (rev 990) @@ -0,0 +1,19 @@ +<? +# Pixel einladen [Start] + function pixel_read($x, $y){ + global $Bild_Pixel, $Bild; + + # Pixel einlesen + $Bild_Pixel = imagecolorsforindex($Bild, imagecolorat($Bild, $x, $y)); + } +# Pixel einladen [Ende] + +# Pixel speichern [Start] + function pixel_write($x, $y, $rot, $gr\xFCn, $blau, $alpha){ + global $Bild_Verarbeitet; + + $Farbe = imagecolorallocatealpha($Bild_Verarbeitet, $rot, $gr\xFCn, $blau, $alpha); + ImageFilledRectangle($Bild_Verarbeitet, $x, $y, $x, $y, $Farbe); + } +# Pixel speichern [Ende] +?> \ No newline at end of file Property changes on: templates/data/gui/screens/station/surrounding/top/light/algorithmen/functions.php ___________________________________________________________________ Added: svn:eol-style + native Added: templates/data/gui/screens/station/surrounding/top/light/algorithmen/laden.php =================================================================== --- templates/data/gui/screens/station/surrounding/top/light/algorithmen/laden.php (rev 0) +++ templates/data/gui/screens/station/surrounding/top/light/algorithmen/laden.php 2009-02-01 10:18:48 UTC (rev 990) @@ -0,0 +1,20 @@ +<? +# Bilddimensionen abfragen (Breite und H\xF6he) [Start] + $Bild_Daten = getimagesize('vorgabe.png'); + $Bild_Breite = $Bild_Daten[0]; + $Bild_H\xF6he = $Bild_Daten[1]; + $Bild_Typ = $Bild_Daten[2]; + unset($Bild_Daten); +# Bilddimensionen abfragen (Breite und H\xF6he) [Ende] + +# Bild in den Speicher laden +$Bild = imageCreateFromPNG('vorgabe.png'); + +# Leeres Bild f\xFCr Ausgabe im Speicher anlegen +$Bild_Verarbeitet = ImageCreateTrueColor($Bild_Breite, $Bild_H\xF6he); +imagesavealpha($Bild_Verarbeitet, true); +imagealphablending($Bild_Verarbeitet, true); + +$Transparenz = imagecolorallocatealpha($Bild_Verarbeitet, 255, 0, 0, 127); +imagefill($Bild_Verarbeitet, 0, 0, $Transparenz); +?> \ No newline at end of file Property changes on: templates/data/gui/screens/station/surrounding/top/light/algorithmen/laden.php ___________________________________________________________________ Added: svn:eol-style + native Added: templates/data/gui/screens/station/surrounding/top/light/bild_resultat.png =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/surrounding/top/light/bild_resultat.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: templates/data/gui/screens/station/surrounding/top/light/index.php =================================================================== --- templates/data/gui/screens/station/surrounding/top/light/index.php (rev 0) +++ templates/data/gui/screens/station/surrounding/top/light/index.php 2009-02-01 10:18:48 UTC (rev 990) @@ -0,0 +1,14 @@ +<? +# Funktionen einladen +require('algorithmen/functions.php'); + +# Algorithmus: Laden +require('algorithmen/laden.php'); + +# Algorithmus: bearbeiten +require('algorithmen/bearbeiten.php'); + +# Bilder anzeigen +echo '<p>vorher: <img src="vorgabe.png"><br> +nachher:<img src="bild_resultat.png"></p>'; +?> \ No newline at end of file Property changes on: templates/data/gui/screens/station/surrounding/top/light/index.php ___________________________________________________________________ Added: svn:eol-style + native Added: templates/data/gui/screens/station/surrounding/top/light/vorgabe.png =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/surrounding/top/light/vorgabe.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-01 10:11:15
|
Revision: 989 http://opengate.svn.sourceforge.net/opengate/?rev=989&view=rev Author: Ultrasick Date: 2009-02-01 10:11:11 +0000 (Sun, 01 Feb 2009) Log Message: ----------- removing empty directory Removed Paths: ------------- templates/data/gui/docked/base/market/icos/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-02-01 10:10:03
|
Revision: 988 http://opengate.svn.sourceforge.net/opengate/?rev=988&view=rev Author: Ultrasick Date: 2009-02-01 10:09:53 +0000 (Sun, 01 Feb 2009) Log Message: ----------- moving and renaming some template files Added Paths: ----------- templates/data/gui/screens/station/content/market/icons/categories/ templates/data/gui/screens/station/content/market/icons/categories/capacitors.pspimage templates/data/gui/screens/station/content/market/icons/categories/commodities.pspimage templates/data/gui/screens/station/content/market/icons/categories/ecms.pspimage templates/data/gui/screens/station/content/market/icons/categories/engines.pspimage templates/data/gui/screens/station/content/market/icons/categories/guns.pspimage templates/data/gui/screens/station/content/market/icons/categories/missiles.pspimage templates/data/gui/screens/station/content/market/icons/categories/modifications.pspimage templates/data/gui/screens/station/content/market/icons/categories/power_plants.pspimage templates/data/gui/screens/station/content/market/icons/categories/private_storage_room.pspimage templates/data/gui/screens/station/content/market/icons/categories/radars.pspimage templates/data/gui/screens/station/content/market/icons/categories/shields.pspimage templates/data/gui/screens/station/content/market/icons/sizes.pspimage Removed Paths: ------------- templates/data/gui/docked/base/market/icos/categories/capacitors.pspimage templates/data/gui/docked/base/market/icos/categories/commodities.pspimage templates/data/gui/docked/base/market/icos/categories/ecms.pspimage templates/data/gui/docked/base/market/icos/categories/engines.pspimage templates/data/gui/docked/base/market/icos/categories/guns.pspimage templates/data/gui/docked/base/market/icos/categories/missiles.pspimage templates/data/gui/docked/base/market/icos/categories/modifications.pspimage templates/data/gui/docked/base/market/icos/categories/power_plants.pspimage templates/data/gui/docked/base/market/icos/categories/private_storage_room.pspimage templates/data/gui/docked/base/market/icos/categories/radars.pspimage templates/data/gui/docked/base/market/icos/categories/shields.pspimage templates/data/gui/screens/station/content/market/icons/size.pspimage Deleted: templates/data/gui/docked/base/market/icos/categories/capacitors.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/commodities.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/ecms.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/engines.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/guns.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/missiles.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/modifications.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/power_plants.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/private_storage_room.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/radars.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/icos/categories/shields.pspimage =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/capacitors.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/capacitors.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/commodities.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/commodities.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/ecms.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/ecms.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/engines.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/engines.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/guns.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/guns.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/missiles.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/missiles.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/modifications.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/modifications.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/power_plants.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/power_plants.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/private_storage_room.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/private_storage_room.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/radars.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/radars.pspimage) =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/categories/shields.pspimage (from rev 970, templates/data/gui/docked/base/market/icos/categories/shields.pspimage) =================================================================== (Binary files differ) Deleted: templates/data/gui/screens/station/content/market/icons/size.pspimage =================================================================== (Binary files differ) Copied: templates/data/gui/screens/station/content/market/icons/sizes.pspimage (from rev 970, templates/data/gui/screens/station/content/market/icons/size.pspimage) =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-01-31 20:21:44
|
Revision: 987 http://opengate.svn.sourceforge.net/opengate/?rev=987&view=rev Author: Ultrasick Date: 2009-01-31 20:21:35 +0000 (Sat, 31 Jan 2009) Log Message: ----------- fixing some sizes Modified Paths: -------------- templates/data/gui/screens/station/content/market/backgrounds/cargo_status.pspimage templates/data/gui/screens/station/content/market/backgrounds/infobox.pspimage Modified: templates/data/gui/screens/station/content/market/backgrounds/cargo_status.pspimage =================================================================== (Binary files differ) Modified: templates/data/gui/screens/station/content/market/backgrounds/infobox.pspimage =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-01-31 20:09:16
|
Revision: 986 http://opengate.svn.sourceforge.net/opengate/?rev=986&view=rev Author: Ultrasick Date: 2009-01-31 20:09:04 +0000 (Sat, 31 Jan 2009) Log Message: ----------- removing duplicates + moving template for the cargo status background image Added Paths: ----------- templates/data/gui/screens/station/content/market/backgrounds/cargo_status.pspimage Removed Paths: ------------- templates/data/gui/docked/base/market/green_backgrounds/cargo_status.pspimage templates/data/gui/docked/base/market/green_backgrounds/categories.pspimage templates/data/gui/docked/base/market/green_backgrounds/infobox.pspimage Deleted: templates/data/gui/docked/base/market/green_backgrounds/cargo_status.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/green_backgrounds/categories.pspimage =================================================================== (Binary files differ) Deleted: templates/data/gui/docked/base/market/green_backgrounds/infobox.pspimage =================================================================== (Binary files differ) Added: templates/data/gui/screens/station/content/market/backgrounds/cargo_status.pspimage =================================================================== (Binary files differ) Property changes on: templates/data/gui/screens/station/content/market/backgrounds/cargo_status.pspimage ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-01-31 18:42:16
|
Revision: 985 http://opengate.svn.sourceforge.net/opengate/?rev=985&view=rev Author: Ultrasick Date: 2009-01-31 18:41:56 +0000 (Sat, 31 Jan 2009) Log Message: ----------- adding documentation about how to request private property from the meta server (e.g. the stuff that is in the cargo hold, the ship, the ship equipment of the user etc.) Added Paths: ----------- doc/meta_server/how_to_request_private_property.odt doc/meta_server/how_to_request_private_property.pdf Added: doc/meta_server/how_to_request_private_property.odt =================================================================== (Binary files differ) Property changes on: doc/meta_server/how_to_request_private_property.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: doc/meta_server/how_to_request_private_property.pdf =================================================================== (Binary files differ) Property changes on: doc/meta_server/how_to_request_private_property.pdf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-01-31 18:40:08
|
Revision: 984 http://opengate.svn.sourceforge.net/opengate/?rev=984&view=rev Author: Ultrasick Date: 2009-01-31 18:39:58 +0000 (Sat, 31 Jan 2009) Log Message: ----------- removing duplicate file (see doc/Doxyfile) Removed Paths: ------------- trunk/doc/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-01-30 19:21:29
|
Revision: 983 http://opengate.svn.sourceforge.net/opengate/?rev=983&view=rev Author: Ultrasick Date: 2009-01-30 19:21:17 +0000 (Fri, 30 Jan 2009) Log Message: ----------- adding commodity "gallium" Added Paths: ----------- templates/data/commodities/gallium.blend trunk/data/commodities/gallium.xml trunk/data/commodities/gallium_big.png trunk/data/commodities/gallium_small.png Added: templates/data/commodities/gallium.blend =================================================================== (Binary files differ) Property changes on: templates/data/commodities/gallium.blend ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/data/commodities/gallium.xml =================================================================== --- trunk/data/commodities/gallium.xml (rev 0) +++ trunk/data/commodities/gallium.xml 2009-01-30 19:21:17 UTC (rev 983) @@ -0,0 +1,13 @@ +<?xml version="1.0"?> + +<container> + <object_id>875</object_id> + <category_id>1</category_id> + <class_id>12</class_id> + <name_de>Gallium</name_de> + <name_en>gallium</name_en> + <production_center>mining industry</production_center> + <mass>5904</mass> + <melting_point>302.91</melting_point> + <faction_id>0</faction_id> +</container> \ No newline at end of file Property changes on: trunk/data/commodities/gallium.xml ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/data/commodities/gallium_big.png =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/gallium_big.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/data/commodities/gallium_small.png =================================================================== (Binary files differ) Property changes on: trunk/data/commodities/gallium_small.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-01-30 17:41:51
|
Revision: 982 http://opengate.svn.sourceforge.net/opengate/?rev=982&view=rev Author: Ultrasick Date: 2009-01-30 17:41:42 +0000 (Fri, 30 Jan 2009) Log Message: ----------- renamed and moved svg to png converting script from trunk to templates Added Paths: ----------- templates/data/rankings/svg_to_png.sh Removed Paths: ------------- trunk/data/rankings/convert.sh Added: templates/data/rankings/svg_to_png.sh =================================================================== --- templates/data/rankings/svg_to_png.sh (rev 0) +++ templates/data/rankings/svg_to_png.sh 2009-01-30 17:41:42 UTC (rev 982) @@ -0,0 +1,14 @@ +#!/bin/sh + +# Author: Christoph Brill (eg...@us...) +# Little script to convert all svg images to png ones (depends on librsvg and pngcrush) + +for inname in *.svg; do + outname=`echo $inname | sed -e 's:\.svg:\.png:g'` + if [ -f $outname ]; then + mv $outname $outname.old + fi + rsvg-convert --format=png --width=32 --height=32 $inname > $outname; + pngcrush -q $outname $outname.new + mv $outname.new $outname +done Property changes on: templates/data/rankings/svg_to_png.sh ___________________________________________________________________ Added: svn:eol-style + native Deleted: trunk/data/rankings/convert.sh =================================================================== --- trunk/data/rankings/convert.sh 2009-01-30 17:28:33 UTC (rev 981) +++ trunk/data/rankings/convert.sh 2009-01-30 17:41:42 UTC (rev 982) @@ -1,14 +0,0 @@ -#!/bin/sh - -# Author: Christoph Brill (eg...@us...) -# Little script to convert all svg images to png ones (depends on librsvg and pngcrush) - -for inname in *.svg; do - outname=`echo $inname | sed -e 's:\.svg:\.png:g'` - if [ -f $outname ]; then - mv $outname $outname.old - fi - rsvg-convert --format=png --width=32 --height=32 $inname > $outname; - pngcrush -q $outname $outname.new - mv $outname.new $outname -done This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-01-30 17:28:44
|
Revision: 981 http://opengate.svn.sourceforge.net/opengate/?rev=981&view=rev Author: Ultrasick Date: 2009-01-30 17:28:33 +0000 (Fri, 30 Jan 2009) Log Message: ----------- adding documentation how to request the experience points from the meta server Added Paths: ----------- doc/meta_server/how_to_request_the_points.odt doc/meta_server/how_to_request_the_points.pdf Added: doc/meta_server/how_to_request_the_points.odt =================================================================== (Binary files differ) Property changes on: doc/meta_server/how_to_request_the_points.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: doc/meta_server/how_to_request_the_points.pdf =================================================================== (Binary files differ) Property changes on: doc/meta_server/how_to_request_the_points.pdf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2009-01-28 22:28:51
|
Revision: 980 http://opengate.svn.sourceforge.net/opengate/?rev=980&view=rev Author: spom_spom Date: 2009-01-28 22:28:39 +0000 (Wed, 28 Jan 2009) Log Message: ----------- next steps of reorganization done (fireing stuff, thruster) still open: networking Modified Paths: -------------- trunk/src/GunObject.cpp trunk/src/GunObject.h trunk/src/Hud.cpp trunk/src/Makefile.am trunk/src/OpcodeWrapper.cpp trunk/src/Opengate.h trunk/src/RadarObject.cpp trunk/src/Sector.cpp trunk/src/Sector.h trunk/src/SectorAvatarObject.cpp trunk/src/SectorAvatarObject.h trunk/src/SectorChildObject.h trunk/src/SectorMovableObject.cpp trunk/src/SectorMovableObject.h trunk/src/SectorObjectVessel.cpp trunk/src/SectorVesselObject.cpp trunk/src/SectorVesselObject.h trunk/src/UnDockedState.cpp Added Paths: ----------- trunk/src/SectorProjectileObject.cpp trunk/src/SectorProjectileObject.h Modified: trunk/src/GunObject.cpp =================================================================== --- trunk/src/GunObject.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/GunObject.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -20,25 +20,38 @@ #include "GunObject.h" #include "Equipment.h" +#include "Sector.h" +#include "SectorMovableObject.h" #include "OpenALSoundManager.h" + + #include <OgreEntity.h> +#include <OgreParticleEmitter.h> +#include <OgreParticleSystem.h> +#include <OgreSceneManager.h> +#include <OgreSceneNode.h> namespace OpenGate{ -GunObject::GunObject( Gun * gun, SectorObject * parent, Ogre::SceneNode * mountPoint, Uint32 & capacity ) - : gun_( gun ), parent_( parent ), mountPoint_( mountPoint ), capacity_( &capacity ) { +GunObject::GunObject( Gun * gun ) + : gun_( gun ), parent_( NULL ), mountPoint_( NULL ), gunSound_( NULL ) { delayTime_ = 0; - gunSound_ = OpenALSoundManager::getSingleton().createSoundSourceFromRessource( "sounds/defaultLaser", - mountPoint->getName() + "/Sound" ); - if ( gunSound_ ) gunSound_->setRolloff( 0.04 ); - } GunObject::~GunObject(){ OpenALSoundManager::getSingleton().destroySoundSource( gunSound_ ); } +void GunObject::mount( SectorMovableObject * parent, Ogre::SceneNode * mountPoint ){ + parent_ = parent; + mountPoint_ = mountPoint; + gunSound_ = OpenALSoundManager::getSingleton().createSoundSourceFromRessource( "sounds/defaultLaser", + mountPoint->getName() + "/Sound" ); + + if ( gunSound_ ) gunSound_->setRolloff( 0.04 ); +} + void GunObject::update( const Ogre::Real elapsedTime ){ delayTime_ -= elapsedTime; } @@ -47,10 +60,10 @@ return mountPoint_->_getDerivedPosition(); } -bool GunObject::fire(){ +bool GunObject::fire( Uint32 & capacity ){ if ( delayTime_ < 0 ){ - if ( *capacity_ > gun_->powerConsumption() ){ - *capacity_ -= gun_->powerConsumption(); + if ( capacity > gun_->powerConsumption() ){ + capacity -= gun_->powerConsumption(); delayTime_ = gun_->fireDelay(); if ( gunSound_ ){ gunSound_->setPosition( mountPoint_->_getDerivedPosition() ); @@ -64,4 +77,44 @@ return false; } +EngineObject::EngineObject( Engine * engineBluePrint ) + : engineBluePrint_( engineBluePrint ), parent_( NULL ){ + thrustRate_ = 0.0; + thrusterParticles_ = NULL; +} + +EngineObject::~EngineObject(){ +} + +void EngineObject::mount( SectorMovableObject * parent, Ogre::SceneNode * mountPoint ){ + parent_ = parent; + thrusterParticles_ = parent->sector()->sceneManager()->createParticleSystem( mountPoint->getName() + "/Thruster" ); + thrusterParticles_->setMaterialName( "Examples/Flare" ); + thrusterParticles_->setDefaultDimensions( 2, 1 ); + + pEmit_ = thrusterParticles_->addEmitter( "Point" ); +// pEmit->setDirection( mainNode_->getOrientation().zAxis() ); +// pEmit->setPosition( ( mainNodeEntityRot_->getOrientation() * engineMountPoints[ i ] ) * mainNodeEntityScale_->getScale() ); + pEmit_->setColour( Ogre::ColourValue::Blue, Ogre::ColourValue::Green ); + + mountPoint->attachObject( thrusterParticles_ ); +} + +void EngineObject::setThrustRate( double thrustRate ){ + thrustRate_ = thrustRate; + + if ( thrusterParticles_ ){ + pEmit_->setTimeToLive( thrustRate_ / 3000.0 * 100.0 ); + pEmit_->setEmissionRate( thrustRate_ * 10.0 * 100.0 ); + pEmit_->setParticleVelocity( thrustRate_ * 5.0 * 100.0 ); + } +} + +Uint32 EngineObject::thrust( Uint32 & powerLine ){ + Uint32 engineIn = min( (Uint32)rint( thrustRate_ * engineBluePrint_->powerConsumption() ), powerLine ); + powerLine -= engineIn; + return (Uint32)rint( engineBluePrint_->efficiency() * engineIn ); +} + + } // namespace OpenGate Modified: trunk/src/GunObject.h =================================================================== --- trunk/src/GunObject.h 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/GunObject.h 2009-01-28 22:28:39 UTC (rev 980) @@ -21,49 +21,70 @@ #ifndef _OPENGATE_GUNOBJECT__H #define _OPENGATE_GUNOBJECT__H -//#include <OgrePrerequisites.h> -#include <OgreSceneNode.h> +#include "Opengate.h" -#include "common.h" +#include <OgreVector3.h> namespace OpenGate{ -class SectorObject; -class OpenALSoundSource; -class Gun; - class GunObject{ public: - GunObject( Gun * gun, SectorObject * parent, Ogre::SceneNode * mountPoint, Uint32 & capacity ); + GunObject( Gun * gun ); - ~GunObject( ); + ~GunObject( ); - void update( const Ogre::Real elapsedTime ); + void mount( SectorMovableObject * parent, Ogre::SceneNode * mountPoint ); + + void update( const Ogre::Real elapsedTime ); - bool fire(); + bool fire( Uint32 & capacity ); - inline Gun * gun(){ return gun_;} + inline Gun * gun(){ return gun_;} - inline Gun * gun() const { return gun_;} + inline Gun * gun() const { return gun_;} + + inline SectorMovableObject * parent() { return parent_; } - // void setMountPosition( const Ogre::Vector3 & mountPosition ) { mountPosition_ = mountPosition; } - Ogre::Vector3 mountPosition() const; + // void setMountPosition( const Ogre::Vector3 & mountPosition ) { mountPosition_ = mountPosition; } + Ogre::Vector3 mountPosition() const; - inline Ogre::SceneNode * sceneNode() { return mountPoint_; } + inline Ogre::SceneNode * sceneNode() { return mountPoint_; } - inline Ogre::SceneNode & sceneNode() const { return *mountPoint_; } + inline Ogre::SceneNode & sceneNode() const { return *mountPoint_; } protected: - Gun * gun_; - SectorObject * parent_; - Ogre::SceneNode * mountPoint_; - Uint32 * capacity_; - Ogre::Real delayTime_; - Ogre::Vector3 mountPosition_; - OpenALSoundSource * gunSound_; + Gun * gun_; + SectorMovableObject * parent_; + Ogre::SceneNode * mountPoint_; + Ogre::Real delayTime_; + Ogre::Vector3 mountPosition_; + OpenALSoundSource * gunSound_; }; +class EngineObject{ +public: + EngineObject( Engine * engineBluePrint ); + + ~EngineObject( ); + + void mount( SectorMovableObject * parent, Ogre::SceneNode * mountPoint ); + + void setThrustRate( double rate ); + + inline double thrustRate( double rate ){ return thrustRate_; } + + Uint32 thrust( Uint32 & powerLine ); + +protected: + Engine * engineBluePrint_; + SectorMovableObject * parent_; + double thrustRate_; + + Ogre::ParticleEmitter * pEmit_; + Ogre::ParticleSystem * thrusterParticles_; +}; + } //namespace OpenGate #endif Modified: trunk/src/Hud.cpp =================================================================== --- trunk/src/Hud.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/Hud.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -291,13 +291,12 @@ velocityProgress_->setYPosition( CEGUI::UDim( 0.5, velocityProgressHeight_/2.0 - height ) ); velocityProgress_->setHeight( CEGUI::UDim( 0.0, height ) ); velocityProgressImg_->setYPosition( CEGUI::UDim( 0, -velocityProgressHeight_ + height ) ); - // -// height = avatar_->capacityRate() * capacitorProgressHeight_; -// // std::cout << height << " " << capacitorProgressHeight_ << " " << avatar_->capacity() << " " << avatar_->maxCapacity() << std::endl; -// capacitorProgress_->setYPosition( CEGUI::UDim( 0.5, capacitorProgressHeight_/2.0 - height ) ); -// capacitorProgress_->setHeight( CEGUI::UDim( 0.0, height ) ); -// capacitorProgressImg_->setYPosition( CEGUI::UDim( 0, -capacitorProgressHeight_ + height ) ); - // + + height = avatar_->capacityRate() * capacitorProgressHeight_; + capacitorProgress_->setYPosition( CEGUI::UDim( 0.5, capacitorProgressHeight_/2.0 - height ) ); + capacitorProgress_->setHeight( CEGUI::UDim( 0.0, height ) ); + capacitorProgressImg_->setYPosition( CEGUI::UDim( 0, -capacitorProgressHeight_ + height ) ); + height = avatar_->thrustRate() * thrustProgressHeight_; thrustProgress_->setYPosition( CEGUI::UDim( 0.5, thrustProgressHeight_/2.0 - height ) ); thrustProgress_->setHeight( CEGUI::UDim( 0.0, height ) ); Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/Makefile.am 2009-01-28 22:28:39 UTC (rev 980) @@ -118,6 +118,8 @@ SectorObjectMissile.cpp \ SectorObjectVessel.h \ SectorObjectVessel.cpp \ + SectorProjectileObject.h \ + SectorProjectileObject.cpp \ ShipConfigDialog.h \ ShipConfigDialog.cpp \ Station.h \ Modified: trunk/src/OpcodeWrapper.cpp =================================================================== --- trunk/src/OpcodeWrapper.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/OpcodeWrapper.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -158,13 +158,17 @@ OgreOpcode::CollisionObject * col1 = rayPickReport[ i ]->this_object; OgreOpcode::CollisionObject * col2 = rayPickReport[ i ]->other_object; - std::cout << "checkCollideRay: " << i << " " - << static_cast< SectorCollisionObject * >( col1->getClientData() )->name() << "<->" - << static_cast< SectorCollisionObject * >( col2->getClientData() )->name() << std::endl; - -// if ( obj->rtti() == PROJECTILE_RTTI ){ -// if ( dynamic_cast< Projectile * >( obj )->parent() != -// static_cast< BaseObject * >( col1->getClientData() ) ){ + if ( col1->getClientData() == col2->getClientData() ){ + obj->collide( static_cast< SectorCollisionObject * >( col1->getClientData() ) ); + static_cast< SectorCollisionObject * >( col1->getClientData() )->collide( obj ); + } else { + std::cout << "checkCollideRay: " << i << " " + << static_cast< SectorCollisionObject * >( col1->getClientData() )->name() << "<->" + << static_cast< SectorCollisionObject * >( col2->getClientData() )->name() << std::endl; + } + +// if ( obj->rtti() == SECTOR_PROJECTILE_OBJECT_RTTI ){ +// if ( dynamic_cast< Projectile * >( obj )->parent() != static_cast< BaseObject * >( col1->getClientData() ) ){ // obj->mainNode()->setPosition( rayPickReport[ i ]->contact ); // obj->collide( static_cast< BaseObject * >( col2->getClientData() ) ); // static_cast< BaseObject * >( col1->getClientData() )->collide( obj ); Modified: trunk/src/Opengate.h =================================================================== --- trunk/src/Opengate.h 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/Opengate.h 2009-01-28 22:28:39 UTC (rev 980) @@ -46,9 +46,10 @@ #define SECTOR_MISSILE_OBJECT_RTTI 9 #define SECTOR_MOVABLE_OBJECT_RTTI 10 #define SECTOR_PAD_OBJECT_RTTI 11 -#define SECTOR_STATION_OBJECT_RTTI 12 -#define SECTOR_STATION_PAD_OBJECT_RTTI 13 -#define SECTOR_VESSEL_OBJECT_RTTI 14 +#define SECTOR_PROJECTILE_OBJECT_RTTI 12 +#define SECTOR_STATION_OBJECT_RTTI 13 +#define SECTOR_STATION_PAD_OBJECT_RTTI 14 +#define SECTOR_VESSEL_OBJECT_RTTI 15 #define SECTOROBJECTENVIRONMENT_RTTI 1000010 #define PROJECTILE_RTTI 100001 @@ -71,6 +72,7 @@ class DockedState; class Gun; +class Engine; class Hud; class LogManager; @@ -81,6 +83,7 @@ class Projectile; class RadarObject; class GunObject; +class EngineObject; class ResourceManager; @@ -96,6 +99,7 @@ class SectorMissileObject; class SectorMovableObject; class SectorPadObject; +class SectorProjectileObject; class SectorStationObject; class SectorStationPadObject; class SectorVesselObject; Modified: trunk/src/RadarObject.cpp =================================================================== --- trunk/src/RadarObject.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/RadarObject.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -35,6 +35,7 @@ : name_( name ){ int dotAWidth = 10; int dotAHeight = 4; + isShown_ = false; dotA_ = Ogre::OverlayManager::getSingleton().createOverlayElement( "Panel", "Radar/Map/DotA_" + name_ ); dotA_->setMaterialName( "BaseWhite" ); dotA_->setMetricsMode( Ogre::GMM_PIXELS ); @@ -51,6 +52,7 @@ } RadarViewable::~RadarViewable(){ + Ogre::OverlayManager::getSingleton().destroyOverlayElement( "Radar/Map/DotA_" + name_ ); Ogre::OverlayManager::getSingleton().destroyOverlayElement( "Radar/Map/DotB_" + name_ ); } Modified: trunk/src/Sector.cpp =================================================================== --- trunk/src/Sector.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/Sector.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -26,6 +26,7 @@ #include "Avatar.h" #include "EntityManager.h" +#include "GunObject.h" #include "LogManager.h" #include "Missile.h" #include "OpcodeWrapper.h" @@ -37,6 +38,7 @@ #include "SectorExplosionObject.h" #include "SectorMeshObject.h" #include "SectorMissileObject.h" +#include "SectorProjectileObject.h" #include "SectorStationObject.h" #include "SectorStationPadObject.h" #include "UnDockedState.h" @@ -248,7 +250,6 @@ } void Sector::createExplosion( SectorMeshObject * object ){ - std::cout << "Sector::createExplosion( const Ogre::Vector3 & pos )" << std::endl; SectorExplosionObject * obj; std::string heapName( "Explosion" ); @@ -264,6 +265,11 @@ insertCollObject_( obj ); } +void Sector::createProjectile( GunObject * obj, int shots ){ + SectorProjectileObject * ammo = new SectorProjectileObject( obj->parent()->name() + "Ammo_" + toStr( shots ), this, obj ); + insertCollObject_( ammo ); +} + void Sector::objectDocked( SectorMovableObject * obj, SectorStationObject * station ){ std::cout << obj->name() << " docked at " << station->name() << std::endl; switch ( obj->rtti() ){ Modified: trunk/src/Sector.h =================================================================== --- trunk/src/Sector.h 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/Sector.h 2009-01-28 22:28:39 UTC (rev 980) @@ -82,6 +82,9 @@ /*! Create an explosion related to a given SectorMeshObject */ void createExplosion( SectorMeshObject * obj ); + /*! Create an explosion related to a given SectorMeshObject */ + void createProjectile( GunObject * obj, int shots ); + /*! Someone has docked */ void objectDocked( SectorMovableObject * obj, SectorStationObject * station ); Modified: trunk/src/SectorAvatarObject.cpp =================================================================== --- trunk/src/SectorAvatarObject.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/SectorAvatarObject.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -58,7 +58,7 @@ thrustRate_ += ( thrustChange_ * 0.8 * elapsedTime ); thrustRate_ = max( thrustRate_, 0.0 ); thrustRate_ = min( 1.0, thrustRate_ ); - + setThrustRate( thrustRate_ ); return SectorVesselObject::update( elapsedTime ); } @@ -78,9 +78,6 @@ } } -void SectorAvatarObject::setFirePressed( bool pressed ){ -} - void SectorAvatarObject::fireMissile( Missile * missile, SectorMeshObject * target ){ SectorMissileObject * obj = sector_->createMissileObject( missile ); Modified: trunk/src/SectorAvatarObject.h =================================================================== --- trunk/src/SectorAvatarObject.h 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/SectorAvatarObject.h 2009-01-28 22:28:39 UTC (rev 980) @@ -59,8 +59,7 @@ // /*! Returns the relative shield. */ // inline Ogre::Real shieldRate() const { if ( maxShield() > 0 ) return (float)shield_ / maxShield(); else return 0.0; } - void setFirePressed( bool pressed ); - + void fireMissile( Missile * missile, SectorMeshObject * target = NULL ); protected: Modified: trunk/src/SectorChildObject.h =================================================================== --- trunk/src/SectorChildObject.h 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/SectorChildObject.h 2009-01-28 22:28:39 UTC (rev 980) @@ -48,8 +48,6 @@ SectorCollisionObject * parent_; }; - class SectorProjectileObject : public SectorChildObject { - }; } //namespace OpenGate Modified: trunk/src/SectorMovableObject.cpp =================================================================== --- trunk/src/SectorMovableObject.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/SectorMovableObject.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -20,12 +20,15 @@ #include "SectorMovableObject.h" +#include "Equipment.h" +#include "GunObject.h" #include "LogManager.h" #include "Missile.h" #include "Moveable.h" #include "OpcodeWrapper.h" #include "ResourceManager.h" #include "SectorMissileObject.h" +#include "SectorProjectileObject.h" #include <OgreRay.h> #include <OgreSceneNode.h> @@ -64,7 +67,7 @@ lifeTime_ = 0.0; speed_ = 0.0; maxSpeed_ = movable_->maxSpeed(); - thrustRate_ = 0.0; + setThrustRate( 0.0 ); thrust_ = 0; mass_ = movable_->mass(); @@ -89,8 +92,11 @@ obj->mainNode()->getPosition() ).normalisedCopy() * 3.0 ); break; case SECTOR_MISSILE_OBJECT_RTTI: - hitByAmmo( dynamic_cast < SectorMissileObject *>( obj )->missile()->damage() ); - break; + hitByAmmo( dynamic_cast < SectorMissileObject *>( obj )->missile()->damage() ); + break; + case SECTOR_PROJECTILE_OBJECT_RTTI: + hitByAmmo( dynamic_cast < SectorProjectileObject *>( obj )->gun()->gun()->damage() ); + break; default: std::cout << "SectorMovableObject: " << this->name() << " collide with " << obj->rtti() << " " << obj->name() << std::endl; Modified: trunk/src/SectorMovableObject.h =================================================================== --- trunk/src/SectorMovableObject.h 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/SectorMovableObject.h 2009-01-28 22:28:39 UTC (rev 980) @@ -53,7 +53,7 @@ inline double lifeTime() const { return lifeTime_; } /*! Set the relative thrust values from 0 to 1*/ - inline void setThrustRate( Ogre::Real rate ) { thrustRate_ = rate; } + inline virtual void setThrustRate( double rate ) { thrustRate_ = rate; } /*! Return the relative thrust values from 0 to 1*/ inline Ogre::Real thrustRate() const { return thrustRate_; } Modified: trunk/src/SectorObjectVessel.cpp =================================================================== --- trunk/src/SectorObjectVessel.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/SectorObjectVessel.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -52,11 +52,10 @@ Ogre::SceneNode * mountPoint = mainNodeEntityRot_->createChildSceneNode( name_ + "_GunMountPoint" + toStr( i ) ); - GunObject *gun = new GunObject( ResourceManager::getSingleton().entityManager->gun( "Bender" ), - this, mountPoint, capacity_ ); + mountPoint->setPosition( it->second[ i ] ); - activeGuns_.push_back( gun ); + // activeGuns_.push_back( gun ); } } @@ -170,16 +169,16 @@ } void SectorObjectVessel::fire( Ogre::Real elapsedTime ){ - if ( firePressed_ ){ - for ( std::list< GunObject * >::iterator it = activeGuns_.begin(); it != activeGuns_.end(); it++ ){ - if ( (*it)->fire() ){ - Projectile * pro = new Projectile( this, shotsFired_, *(*it), (*it)->mountPosition() ); - addProjectile( pro ); - // sector_->sendProjectile( *pro ); - shotsFired_++; - } - } - } +// if ( firePressed_ ){ +// for ( std::list< GunObject * >::iterator it = activeGuns_.begin(); it != activeGuns_.end(); it++ ){ +// if ( (*it)->fire() ){ +// Projectile * pro = new Projectile( this, shotsFired_, *(*it), (*it)->mountPosition() ); +// addProjectile( pro ); +// // sector_->sendProjectile( *pro ); +// shotsFired_++; +// } +// } +// } } void SectorObjectVessel::hitByAmmo( Uint32 damage ){ Added: trunk/src/SectorProjectileObject.cpp =================================================================== --- trunk/src/SectorProjectileObject.cpp (rev 0) +++ trunk/src/SectorProjectileObject.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -0,0 +1,117 @@ +/*************************************************************************** + * Copyright (C) 2009 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "SectorProjectileObject.h" + +#include "Equipment.h" +#include "GunObject.h" +#include "OpcodeWrapper.h" +#include "ResourceManager.h" +#include "Sector.h" +#include "SectorMovableObject.h" + +#include <OgreBillboard.h> +#include <OgreBillboardSet.h> +#include <OgreSceneManager.h> +#include <OgreSceneNode.h> + +namespace OpenGate{ + +SectorProjectileObject::SectorProjectileObject( const std::string & name, Sector * sector, GunObject * gun, Ogre::SceneNode * parentNode ) + : SectorCollisionObject( name, sector, parentNode ), gun_( gun ){ + reset(); +} + +SectorProjectileObject::~SectorProjectileObject( ){ + +} + +void SectorProjectileObject::reset(){ + maxLifeTime_ = gun_->gun()->lifeTime(); + ammoHit_ = false; +} + +bool SectorProjectileObject::update( Ogre::Real elapsedTime ){ + maxLifeTime_ -= elapsedTime; + if ( maxLifeTime_ < 0.0 ) return false; + + if ( !ammoHit_ ){ + Ogre::Ray ray( mainNode_->getPosition(), vel_.normalisedCopy() ); + + if ( !ResourceManager::getSingleton().collisionManager->checkCollideRay( this, ray, (vel_ * elapsedTime).length() ) ){ + //! don't hit + mainNode_->translate( vel_ * elapsedTime ); + } + } + + return true; +} + +void SectorProjectileObject::collide( SectorCollisionObject * obj ){ + std::cout << "SectorProjectileObject::collide( SectorCollisionObject * obj) " << name_ << " hit -> " << obj->name() << std::endl; + //** show us a small visible feedback, should emitted a small explosion or shield effectt by the target himself + if ( bullet_ ){ + vel_ *= 0.0; + bullet_->getBillboard( 0 )->setColour( Ogre::ColourValue(0.0, 1.0, 0.0) ); + bullet_->getBillboard( 0 )->setDimensions( 5, 5 ); +// lifeTime_ = max( lifeTime_, maxLifeTime_ - 0.1f ); + maxLifeTime_ = 0.1; + } + + ammoHit_ = true; +} + +void SectorProjectileObject::activate_(){ + reset(); + vel_ = gun_->gun()->speed() * -gun_->parent()->mainNode()->getOrientation().zAxis().normalisedCopy() + gun_->parent()->velocity(); + vel_ = vel_ / 10.0 ; + maxLifeTime_ *= 100.0; + mainNode_->setPosition( gun_->mountPosition() ); + + int maxBB = 20; + bullet_ = sector_->sceneManager()->createBillboardSet( name_ + "/BBS", maxBB ); + bullet_->setMaterialName("Bullet"); + + Ogre::Billboard *bb; + // bb = bullet_->createBillboard( Ogre::Vector3::ZERO, Ogre::ColourValue( 1.0f, 1.0f, 1.0f) ); + // bb->setDimensions( 1.0, 0.2 ); + // bb->setRotation ( Ogre::Radian( 0 ) ); + + for ( int i = 0; i < maxBB; i ++ ){ + bb = bullet_->createBillboard( Ogre::Vector3::ZERO, Ogre::ColourValue( 0.5f, 0.5f, 0.5f) ); + bb->setDimensions( 1.0 - i * 1.0/maxBB* 0.5 , 1.0 - i * 1.0/maxBB * 0.5 ); + bb->setRotation ( Ogre::Radian( i*10.0 ) ); + bb->setPosition( vel_.normalisedCopy() * i * 0.5 ); + } + mainNode_->attachObject( bullet_ ); +} + +void SectorProjectileObject::deactivate_(){ + vel_ = Ogre::Vector3::ZERO; + if ( bullet_ ){ + mainNode_->detachObject( bullet_ ); + sector_->sceneManager()->destroyBillboardSet( bullet_ ); + } +} + +} //namespace OpenGate + + + Added: trunk/src/SectorProjectileObject.h =================================================================== --- trunk/src/SectorProjectileObject.h (rev 0) +++ trunk/src/SectorProjectileObject.h 2009-01-28 22:28:39 UTC (rev 980) @@ -0,0 +1,72 @@ +/*************************************************************************** + * Copyright (C) 2009 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _OPENGATE_SECTORPROJECTILEOBJECT__H +#define _OPENGATE_SECTORPROJECTILEOBJECT__H + +#include "Opengate.h" +#include "SectorCollisionObject.h" + +#include <OgreVector3.h> + +namespace OpenGate{ + +//! A Projectile, that fligh through the sector and hurt SectorMovableObjects +class SectorProjectileObject : public SectorCollisionObject { +public: + /*! Construct SectorProjectileObject */ + SectorProjectileObject( const std::string & name, Sector * sector, GunObject * gun, Ogre::SceneNode * parentNode = NULL ); + + /*! Default destructor */ + virtual ~SectorProjectileObject( ); + + /*! Abstract method for runtime identification */ + virtual int rtti( ) const { return SECTOR_PROJECTILE_OBJECT_RTTI; } + + /*! Update function */ + virtual bool update( Ogre::Real elapsedTime ); + + /*! Method for collision handling, called during a collision by opcodewrapper */ + virtual void collide( SectorCollisionObject * object ); + + virtual void reset(); + + inline GunObject * gun() const { return gun_; } + +protected: + virtual void activate_(); + + virtual void deactivate_(); + + GunObject * gun_; + + double maxLifeTime_; + Ogre::Vector3 vel_; + bool ammoHit_; + + Ogre::BillboardSet * bullet_; + +}; + +} //namespace OpenGate + +#endif //_OPENGATE_SECTORPROJECTILEOBJECT__H + + Modified: trunk/src/SectorVesselObject.cpp =================================================================== --- trunk/src/SectorVesselObject.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/SectorVesselObject.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -21,11 +21,14 @@ #include "SectorVesselObject.h" #include "AiManager.h" +#include "EntityManager.h" #include "Equipment.h" +#include "GunObject.h" #include "LogManager.h" #include "Moveable.h" #include "OpcodeWrapper.h" #include "ResourceManager.h" +#include "Sector.h" #include "Vessel.h" #include <OgreSceneNode.h> @@ -34,6 +37,31 @@ SectorVesselObject::SectorVesselObject( const std::string & name, Sector * sector, Vessel * vessel ) : SectorMovableObject( name, sector, vessel ), controler_ ( NULL ){ + + std::map < int, std::vector < Ogre::Vector3 > > gunMountPoints( this->vessel()->gunMountPoints() ); + + for ( std::map < int, std::vector < Ogre::Vector3 > >::iterator it = gunMountPoints.begin(); + it != gunMountPoints.end(); it ++ ){ + + for ( uint i = 0; i < it->second.size(); i ++ ){ + Ogre::SceneNode * mountPoint = entityRotNode_->createChildSceneNode( name_ + "_GunMountPoint" + toStr( i ) ); + mountPoint->setPosition( it->second[ i ] ); + + GunObject *gun = new GunObject( ResourceManager::getSingleton().entityManager->gun( "Bender" ) ); + activeGuns_.push_back( gun ); + gun->mount( this, mountPoint ); + } + } + + std::vector < Ogre::Vector3 > engineMountPoints( this->vessel()->engineMountPoints() ); + for ( uint i = 0; i < engineMountPoints.size(); i ++ ){ + Ogre::SceneNode * mountPoint = entityRotNode_->createChildSceneNode( name_ + "_EngineMountPoint" + toStr( i ) ); + mountPoint->setPosition( engineMountPoints[ i ] ); + + EngineObject * engine = new EngineObject( this->vessel()->engine() ); + engines_.push_back( engine ); + engine->mount( this, mountPoint ); + } reset(); } @@ -42,6 +70,15 @@ ResourceManager::getSingleton().aiManager->stopAiObject( controler_ ); controler_ = NULL; } + + for ( std::list < GunObject * >::iterator it = activeGuns_.begin(); it != activeGuns_.end(); it++){ + GunObject *gun = (*it); + // activeGuns_.remove( *(it++) ); + entityRotNode_->removeAndDestroyChild( gun->sceneNode()->getName() ); + delete gun; + } + activeGuns_.clear(); + } void SectorVesselObject::reset( ){ @@ -56,12 +93,14 @@ controler_ = NULL; statusChanged_ = false; + shotsFired_ = 0; + firePressed_ = false; } -void SectorVesselObject::collide( SectorCollisionObject * object ){ - SectorMovableObject::collide( object ); +Vessel * SectorVesselObject::SectorVesselObject::vessel() { + return dynamic_cast < Vessel * > ( movable_ ); } - + bool SectorVesselObject::update( Ogre::Real elapsedTime ){ if ( armor_ <= 0 ) explode(); @@ -70,45 +109,33 @@ return SectorMovableObject::update( elapsedTime ); } -Vessel * SectorVesselObject::SectorVesselObject::vessel() { - return dynamic_cast < Vessel * > ( movable_ ); +void SectorVesselObject::collide( SectorCollisionObject * object ){ + SectorMovableObject::collide( object ); } -void SectorVesselObject::hitByAmmo( Uint32 damage ){ - - long shield = (long)shield_ - damage; - long armor = armor_; - - - if ( shield < 0 ){ - armor += shield; - shield_ = 0; - armor_ = max( (long)0, armor ); - } else { - shield_ = shield; - } - statusChanged_ = true; - - std::cout << "hitByAmmo " << damage << " " << shield_ << " " << shield << " " << armor_ << " " << armor << std::endl; -} - bool SectorVesselObject::updatePowerGrid( Ogre::Real elapsedTime ){ Uint32 powerLine = 0; if ( this->vessel()->powerPlant() ) powerLine = this->vessel()->powerPlant()->powerOutput(); - Uint32 engineIn = 0; - if ( this->vessel()->engine() ) { - engineIn = (Uint32)rint( this->vessel()->engine()->powerConsumption() * thrustRate_ ); - engineIn = min( engineIn, powerLine ); - thrust_ = (Uint32)rint( engineIn * this->vessel()->engine()->efficiency() ); - } else { - thrust_ = 0; + //engine_->thrust( powerLine, thrustRate_ ); +// Uint32 engineIn = 0; +// if ( this->vessel()->engine() ) { +// engineIn = (Uint32)rint( this->vessel()->engine()->powerConsumption() * thrustRate_ ); +// engineIn = min( engineIn, powerLine ); +// thrust_ = (Uint32)rint( engineIn * this->vessel()->engine()->efficiency() ); +// } else { +// thrust_ = 0; +// } +// if ( afterburnerPressed_ ) thrust_ *= 1.2; +// +// powerLine -= engineIn; +// powerLine = max( Uint32(0), powerLine ); + thrust_ = 0; + for ( std::list < EngineObject * >::iterator it = engines_.begin(); it!= engines_.end(); it++){ + thrust_ += (*it)->thrust( powerLine ); } - if ( afterburnerPressed_ ) thrust_ *= 1.2; - - powerLine -= engineIn; - powerLine = max( Uint32(0), powerLine ); - + + Uint32 shieldIn = 0; if ( this->vessel()->shield() ){ shieldIn = min( this->vessel()->shield()->powerConsumption(), powerLine ); @@ -125,9 +152,49 @@ capacity_ += (Uint32)rint( (Ogre::Real)powerLine * this->vessel()->capacitor()->efficiency() * elapsedTime ); capacity_ = min( capacity_, this->vessel()->capacitor()->capacity() ); } + + + for ( std::list < GunObject * >::iterator it = activeGuns_.begin(); it!= activeGuns_.end(); it++){ + (*it)->update( elapsedTime ); + } + + if ( firePressed_ ){ + for ( std::list< GunObject * >::iterator it = activeGuns_.begin(); it != activeGuns_.end(); it++ ){ + if ( (*it)->fire( capacity_ ) ){ + sector_->createProjectile( *it, shotsFired_ ); + shotsFired_++; + } + } + } + return true; } - + +void SectorVesselObject::setThrustRate( double rate ){ + for ( std::list < EngineObject * >::iterator it = engines_.begin(); it!= engines_.end(); it++){ + (*it)->setThrustRate( rate ); + } + thrustRate_ = rate; +} + +void SectorVesselObject::hitByAmmo( Uint32 damage ){ + + long shield = (long)shield_ - damage; + long armor = armor_; + + + if ( shield < 0 ){ + armor += shield; + shield_ = 0; + armor_ = max( (long)0, armor ); + } else { + shield_ = shield; + } + statusChanged_ = true; + + std::cout << "hitByAmmo " << damage << " " << shield_ << " " << shield << " " << armor_ << " " << armor << std::endl; +} + } //namespace OpenGate Modified: trunk/src/SectorVesselObject.h =================================================================== --- trunk/src/SectorVesselObject.h 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/SectorVesselObject.h 2009-01-28 22:28:39 UTC (rev 980) @@ -58,12 +58,20 @@ /*! Return a ptr to the controler*/ AiObject * controler( ){ return controler_; } + virtual void setThrustRate( double rate ); + /*! The vessel takes some damage */ virtual void hitByAmmo( Uint32 damage ); /*! Handle fire button pressed */ - //void fire( Ogre::Real elapsedTime ); + inline void setFirePressed( bool pressed ){ firePressed_ = pressed; } + /*! Return fire button pressed */ + inline bool firePressed( ) const { return firePressed_; } + + /*! Returns the relative speed */ + inline Ogre::Real capacityRate() const { if ( maxCapacity_ > 0 ) return ( (Ogre::Real)capacity_ / maxCapacity_ ); else return 0.0; } + /*! Fire a missile to the target */ //void fireMissile( SectorCollisionObject * target, Missile * missile); @@ -71,14 +79,17 @@ //virtual void launch(); protected: - AiObject * controler_; + std::list < GunObject * > activeGuns_; + std::list < EngineObject * > engines_; Uint32 capacity_; Uint32 maxCapacity_; bool statusChanged_; - + + long shotsFired_; + bool firePressed_; }; } //namespace OpenGate Modified: trunk/src/UnDockedState.cpp =================================================================== --- trunk/src/UnDockedState.cpp 2009-01-28 16:41:43 UTC (rev 979) +++ trunk/src/UnDockedState.cpp 2009-01-28 22:28:39 UTC (rev 980) @@ -481,9 +481,8 @@ bool UnDockedState::mouseReleased( const OIS::MouseEvent &e , OIS::MouseButtonID id ){ if ( !configMode_ ){ if ( sector_->avatarObject() != NULL ){ - // std::cout << "Mouse Button: " << id << std::endl; if ( id == 0 ){ - // sector_->avatarObject()->setFirePressed( false); + sector_->avatarObject()->setFirePressed( false); } } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ult...@us...> - 2009-01-28 16:41:45
|
Revision: 979 http://opengate.svn.sourceforge.net/opengate/?rev=979&view=rev Author: Ultrasick Date: 2009-01-28 16:41:43 +0000 (Wed, 28 Jan 2009) Log Message: ----------- I've cut away some transparent parts, no visual changes Modified Paths: -------------- templates/data/logos/amananth/transparent_background.png Modified: templates/data/logos/amananth/transparent_background.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2009-01-25 23:35:54
|
Revision: 978 http://opengate.svn.sourceforge.net/opengate/?rev=978&view=rev Author: spom_spom Date: 2009-01-25 23:35:50 +0000 (Sun, 25 Jan 2009) Log Message: ----------- next steps of reorganization done (autodocking, radar) still open: fireing stuff, network Modified Paths: -------------- trunk/data/materials/gradientshader.material trunk/data/misc/test.sector trunk/src/AiCommands.cpp trunk/src/AiManager.cpp trunk/src/AiObject.cpp trunk/src/AiObject.h trunk/src/Hud.cpp trunk/src/OpcodeWrapper.cpp trunk/src/Opengate.h trunk/src/RadarObject.cpp trunk/src/RadarObject.h trunk/src/Sector.cpp trunk/src/Sector.h trunk/src/SectorBaseObject.h trunk/src/SectorMeshObject.cpp trunk/src/SectorMeshObject.h trunk/src/SectorMissileObject.cpp trunk/src/SectorMissileObject.h trunk/src/SectorMovableObject.cpp trunk/src/SectorMovableObject.h trunk/src/SectorStationObject.cpp trunk/src/SectorVesselObject.cpp trunk/src/SectorVesselObject.h trunk/src/ShipConfigDialog.cpp trunk/src/UnDockedState.cpp Modified: trunk/data/materials/gradientshader.material =================================================================== --- trunk/data/materials/gradientshader.material 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/data/materials/gradientshader.material 2009-01-25 23:35:50 UTC (rev 978) @@ -35,7 +35,7 @@ pass { scene_blend alpha_blend - depth_write off + depth_write on vertex_program_ref shader/gradientVP_Unified { param_named_auto customParamColour custom 0 @@ -46,4 +46,4 @@ } } } -} \ No newline at end of file +} Modified: trunk/data/misc/test.sector =================================================================== --- trunk/data/misc/test.sector 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/data/misc/test.sector 2009-01-25 23:35:50 UTC (rev 978) @@ -4,7 +4,7 @@ <ambient a="1" r="0.1" b="0.1" g="0.1"></ambient> </environment> <station name="Tauseti Wake"> - <position y="0" x="0" z="-2000"></position> + <position y="0" x="0" z="4000"></position> </station> <beacon> <position y="0" x="-650" z="800"></position> Modified: trunk/src/AiCommands.cpp =================================================================== --- trunk/src/AiCommands.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/AiCommands.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -22,7 +22,7 @@ #include "common.h" #include "AiObject.h" #include "AiCommands.h" -#include "SectorObjectVessel.h" +#include "SectorVesselObject.h" #include "Moveable.h" #include <OgreSceneNode.h> @@ -40,7 +40,7 @@ addCommand( new AiCommandPitch( ai_, 180.0 ) ); addCommand( new AiCommandStop( ai_ ) ); } else { - if ( ai_->vesselObject( ) ) ai_->vesselObject( )->setBreakPressed( true ); + if ( ai_->vesselObject( ) ) ai_->vesselObject( )->setBrakePressed( true ); // std::cout << "braking speed: " << ai_->vesselObject( )->speed() << std::endl; // std::cout << "braking time est: " << ai_->brakingTime( ai_->vesselObject( )->speed() ) << std::endl; // std::cout << "braking way est: " << ai_->brakingDistance( ai_->vesselObject( )->speed() ) << std::endl; @@ -56,7 +56,7 @@ void AiCommandStop::AiCommandStop::stop(){ std::cout << "AiCommandStop stop" << std::endl; if ( ai_->vesselObject( ) ) { - ai_->vesselObject( )->setBreakPressed( false ); + ai_->vesselObject( )->setBrakePressed( false ); // std::cout << "braking time real: " << runtime_ << std::endl; // std::cout << "braking way real: " // << ( ai_->vesselObject( )->mainNode()->_getDerivedPosition()- startPos_ ).length() Modified: trunk/src/AiManager.cpp =================================================================== --- trunk/src/AiManager.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/AiManager.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -19,19 +19,20 @@ ***************************************************************************/ #include "AiManager.h" + +#include "common.h" + #include "AiObject.h" +#include "Avatar.h" +#include "EntityManager.h" +#include "GameStateManager.h" -#include "common.h" #include "ResourceManager.h" -#include "EntityManager.h" -#include "Vessel.h" -#include "SectorObjectVessel.h" #include "Sector.h" +#include "SectorVesselObject.h" +#include "Station.h" #include "UnDockedState.h" -#include "GameStateManager.h" -#include "Avatar.h" -#include "Station.h" -#include "OgreSceneNode.h" +#include "Vessel.h" #include "networkClient.h" #include <iostream> @@ -40,6 +41,8 @@ #include <boost/thread.hpp> +#include <OgreSceneNode.h> + namespace OpenGate{ AiManager::AiManager( ResourceManager * resources ) : resources_( resources ){ @@ -101,27 +104,27 @@ } AiObject * AiManager::spawnAi( ){ - std::string name( "aiMan-" ); if ( resources_ ){ + if ( resources_->gameStateRoot->activeState( )->name() == "UnDockedState" ){ + + std::string name( "aiMan-" ); + if ( resources_->avatar ) name += resources_->avatar->name(); - } - AiObject * ai = createAiObject( name ); + + AiObject * ai = createAiObject( name ); - SectorObjectVessel *obj = NULL; - if ( resources_ ){ - if ( resources_->gameStateRoot->activeState( )->name() == "UnDockedState" ){ - - + SectorVesselObject * obj = dynamic_cast < UnDockedState *>(resources_->gameStateRoot->activeState() )->sector()->createVesselObject( + new Vessel( *resources_->entityManager->vessel( "apteryx" ) ) + ); + obj->vessel( )->setPowerPlant( resources_->entityManager->powerPlant( "Spud" ) ); obj->vessel( )->setEngine( resources_->entityManager->engine( "T-E-15" ) ); obj->vessel( )->setRadar( resources_->entityManager->radar( "Outlook" ) ); obj->vessel( )->setShield( resources_->entityManager->shield( "Kydango" ) ); obj->vessel( )->setCapacitor( resources_->entityManager->capacitor( "Sponge" ) ); std::cout << "AiManager::spawnAi( ): " << obj->name() << std::endl; - } else { - std::cout << "AiManager::spawnAi( ): spawn only in undockedState" << std::endl; - } - } + + //-250, 0, 500 ai->setVesselObject( obj ); Ogre::Real xmin = -150.0, xmax = -200.0; @@ -132,7 +135,7 @@ obj->mainNode()->setPosition( Ogre::Math::RangeRandom( xmin, xmax ), Ogre::Math::RangeRandom( ymin, ymax ), Ogre::Math::RangeRandom( zmin, zmax ) ); - obj->launch(); + // obj->launch(); // obj->mainNode()->setPosition( // dynamic_cast < UnDockedState *>(resources_->gameStateRoot->activeState() // )->sector()->station()->launchPadPosition() + @@ -143,12 +146,20 @@ // dynamic_cast < UnDockedState *>(resources_->gameStateRoot->activeState() // )->sector()->station()->launchPadOrientation() ); - // ai->land( dynamic_cast < UnDockedState *>(resources_->gameStateRoot->activeState() )->sector()->station() ); + SectorStationObject *station = *dynamic_cast < UnDockedState *>(resources_->gameStateRoot->activeState() )->sector()->sectorStationObjects().begin(); + ai->land( station ); } startAiObject( ai ); - return ai; + + } else { + std::cout << "AiManager::spawnAi( ): spawn only in undockedState" << std::endl; + } + } else { + std::cout << "AiManager::spawnAi( ): resources manager not defined" << std::endl; + } + return NULL; } AiObject * AiManager::createAiObject( const std::string & name ){ @@ -180,7 +191,7 @@ void AiManager::eraseAiObject_( AiObject * ai ){ boost::mutex::scoped_lock lock( eraseMutex_ ); - SectorObjectVessel *obj = ai->vesselObject( ); + SectorVesselObject *obj = ai->vesselObject( ); if ( obj ){ __D( obj->name() ) obj->setControler( NULL ); } Modified: trunk/src/AiObject.cpp =================================================================== --- trunk/src/AiObject.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/AiObject.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -18,16 +18,20 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include "AiObject.h" #include "common.h" -#include "AiObject.h" + #include "AiCommands.h" -#include "SectorObjectVessel.h" #include "Moveable.h" -#include "Vessel.h" #include "Sector.h" +#include "SectorVesselObject.h" +#include "SectorStationObject.h" +#include "SectorStationPadObject.h" #include "Station.h" +#include "Vessel.h" + #include <OgreTimer.h> #include <OgreVector3.h> @@ -73,7 +77,7 @@ for_each( cmdQueue_.begin(), cmdQueue_.end(), deletePtr() ); cmdQueue_.clear(); } -void AiObject::setVesselObject( SectorObjectVessel * obj ){ +void AiObject::setVesselObject( SectorVesselObject * obj ){ vesselObject_ = obj; if ( obj ){ vesselObject_->setControler( this ); @@ -174,19 +178,19 @@ cmdQueue_.push_back( new AiCommandLookAt( this, Ogre::Vector3( 0.0, 0.0, 1.0 ) ) ); } -void AiObject::land( StationObject * station ){ +void AiObject::land( SectorStationObject * station ){ if ( station ){ cmdQueue_.push_back( new AiCommandWait( this, 1.0 ) ); -// std::cout << "station docking pad: " << station.dockPadPosition( ) << std::endl; + std::cout << "station docking pad: " << station->dockPad()->position( true ) << std::endl; // std::cout << "station ring end:" << station.dockingRingEnd( ) << std::endl; // std::cout << "station ring start:" << station.dockingRingStart( ) << std::endl; // station->sector()->koordAxis()->setPosition( station.dockPadPosition( ) ); // std::cout << "station launch pad: " << station.launchPadPosition( ) << std::endl; - //cmdQueue_.push_back( new AiCommandApproach( this, station.dockingRingStart( ), true ) ); - cmdQueue_.push_back( new AiCommandApproach( this, station->dockingRingStart( ), true ) ); + + cmdQueue_.push_back( new AiCommandApproach( this, station->dockPad()->position( true ) + 1000.0* station->dockPad()->direction( true ), true ) ); cmdQueue_.push_back( new AiCommandWait( this, 1.0 ) ); - cmdQueue_.push_back( new AiCommandApproach( this, station->dockPadPosition( ), true ) ); + cmdQueue_.push_back( new AiCommandApproach( this, station->dockPad()->position( true ), true ) ); } else { std::cerr << "Station is not valid" << std::endl; } @@ -235,15 +239,15 @@ double AiObject::maxSpeed( double thrustRate ) const { //** vmax(th,d):=sqrt( th/d ) ** P double d = vesselObject_->movable()->dragFactor(); - double th = vesselObject_->maxThrust() * thrustRate; + double th = vesselObject_->vessel()->maxThrust() * thrustRate; return sqrt( th / d ); } double AiObject::speedAfterTime( double time, double thrustRate ) const { //** v[ t ] := vmax * tanh( th / m / vmax * t ) ** P // double d = vesselObject_->vessel()->dragFactor(); - double m = vesselObject_->mass(); - double th = vesselObject_->maxThrust() * thrustRate; + double m = vesselObject_->vessel()->mass(); + double th = vesselObject_->vessel()->maxThrust() * thrustRate; double vmax = maxSpeed( thrustRate ); double v = vmax * std::tanh( th / m / vmax * time ); // std::cout << " th: " << th << "; m: " << m << "; d: " << d << "; vmax: " << vmax << "; t: " << time @@ -256,8 +260,8 @@ //** s[t]:=integrate(v[t], t) //** s = vmax^2/a * log( cosh( a / vmax * t ) ) ** P // double d = vesselObject_->vessel()->dragFactor(); - double m = vesselObject_->mass(); - double th = vesselObject_->maxThrust() * thrustRate; + double m = vesselObject_->vessel()->mass(); + double th = vesselObject_->vessel()->maxThrust() * thrustRate; double vmax = maxSpeed( thrustRate ); double a = th / m; double s = ( vmax * vmax ) / a * std::log( std::cosh( a / vmax * time ) ); @@ -267,7 +271,7 @@ } double AiObject::brakingTime( double v ) const { double d = vesselObject_->vessel()->dragFactor(); - double m = vesselObject_->mass(); + double m = vesselObject_->vessel()->mass(); double a = vesselObject_->brakingAcc(); // double th = m * a; //std::cout << " th: " << th << "; m: " << m << "; d: " << d << "; v: " << v << "; t: " << time << std::endl; @@ -277,7 +281,7 @@ double AiObject::brakingDistance( double v ) const { double d = vesselObject_->vessel()->dragFactor(); - double m = vesselObject_->mass(); + double m = vesselObject_->vessel()->mass(); double a = vesselObject_->brakingAcc(); // double th = m * a; @@ -293,8 +297,8 @@ //** t(th,d,m,v):=( m * atanh( v / vmax ) ) / sqrt( d * th ) double d = vesselObject_->vessel()->dragFactor(); - double m = vesselObject_->mass(); - double th = vesselObject_->maxThrust() * thrustRate; + double m = vesselObject_->vessel()->mass(); + double th = vesselObject_->vessel()->maxThrust() * thrustRate; double vmax = maxSpeed( thrustRate ); v = min( v, 0.99 * vmax ); Modified: trunk/src/AiObject.h =================================================================== --- trunk/src/AiObject.h 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/AiObject.h 2009-01-25 23:35:50 UTC (rev 978) @@ -21,6 +21,8 @@ #ifndef _OPENGATE_AIOBJECT__H #define _OPENGATE_AIOBJECT__H +#include "Opengate.h" + #include <string> #include <vector> #include <set> @@ -37,13 +39,6 @@ namespace OpenGate{ -class ResourceManager; -class SectorObjectVessel; -class StationObject; -class AiManager; -class AiObject; -class AiCommand; - class AiObject{ public: AiObject( uint id ); @@ -57,10 +52,10 @@ virtual void run(); /*! Set the instance which is controled by this ai */ - void setVesselObject( SectorObjectVessel * obj ); + void setVesselObject( SectorVesselObject * obj ); /*! Get the instance which is controled by this ai */ - inline SectorObjectVessel * vesselObject( ){ return vesselObject_; } + inline SectorVesselObject * vesselObject( ){ return vesselObject_; } bool isAlive() const { return isAlive_; } @@ -78,7 +73,7 @@ void test( ); - void land( StationObject * station ); + void land( SectorStationObject * station ); /*! Idle and look every second for new orders */ //bool cmdIdle( ); @@ -121,7 +116,7 @@ uint id_; //! the graphical representation - SectorObjectVessel * vesselObject_; + SectorVesselObject * vesselObject_; std::deque< AiCommand * > cmdQueue_; Modified: trunk/src/Hud.cpp =================================================================== --- trunk/src/Hud.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/Hud.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -85,7 +85,6 @@ Ogre::SceneNode * flightArrowTrans = flightArrowNode_->createChildSceneNode( "FlightArrow/TransNode" ); Ogre::Entity * flightArrowEntity = sceneMgr_->createEntity( "FlightArrow/Entity", "arrow.mesh" ); flightArrowEntity->setMaterialName( "SimpleHUD/FlightArrow" ); -//flightArrowEntity->setRenderQueueGroup(Ogre::RENDER_QUEUE_OVERLAY); flightArrowTrans->attachObject( flightArrowEntity ); flightArrowTrans->pitch( Ogre::Degree( -90 ) ); flightArrowTrans->scale( 0.01, 0.01, 0.01 ); @@ -95,7 +94,6 @@ Ogre::SceneNode * targetArrowTrans = targetArrowNode_->createChildSceneNode( "TargetArrow/TransNode" ); Ogre::Entity * targetArrowEntity = sceneMgr_->createEntity( "TargetArrow/Entity", "arrow.mesh" ); targetArrowEntity->setMaterialName( "SimpleHUD/FlightArrow" ); -//flightArrowEntity->setRenderQueueGroup(Ogre::RENDER_QUEUE_OVERLAY); targetArrowTrans->attachObject( targetArrowEntity ); targetArrowTrans->pitch( Ogre::Degree( -90 ) ); targetArrowTrans->scale( 0.01, 0.01, 0.01 ); @@ -270,23 +268,21 @@ //! End update targeting pointer and duelist pointers; targetDistanceText_->setText( "D" + Ogre::StringConverter::toString( round( distToTarget.length(), 0 ) ) ); -// -// if ( target_->rtti() == SECTOROBJECTMOVABLE_RTTI || -// target_->rtti() == SECTOROBJECTVESSEL_RTTI || -// target_->rtti() == SECTOROBJECTMISSILE_RTTI ){ -// -// targetVelocity_->setText( "V" + Ogre::StringConverter::toString( round( -// dynamic_cast< SectorObjectMovable *>( target_ )->speed(), 2 ), 4 ) ); -// targetShieldText_->setText( "S" + Ogre::StringConverter::toString( round( -// dynamic_cast< SectorObjectMovable *>( target_ )->shieldRate() * 100.0f, 1), 4 ) ); -// targetArmorText_->setText( "A" + Ogre::StringConverter::toString( round( -// dynamic_cast< SectorObjectMovable *>( target_ )->armorRate() * 100.0f, 1), 4 ) ); -// -// } else{ -// targetVelocity_->setText( "" ); -// targetShieldText_->setText( "" ); -// targetArmorText_->setText( "" ); -// } + + if ( target_->rtti() == SECTOR_MOVABLE_OBJECT_RTTI || + target_->rtti() == SECTOR_VESSEL_OBJECT_RTTI || + target_->rtti() == SECTOR_MISSILE_OBJECT_RTTI ){ + + SectorMovableObject * targ = dynamic_cast< SectorMovableObject *>( target_ ); + targetVelocity_->setText( "V" + Ogre::StringConverter::toString( round((Ogre::Real)targ->speed(), 2 ), 4 ) ); + targetShieldText_->setText( "S" + Ogre::StringConverter::toString( round( (Ogre::Real)targ->shield() / targ->maxShield() * 100.0f, 1), 4 ) ); + targetArmorText_->setText( "A" + Ogre::StringConverter::toString( round( (Ogre::Real)targ->armor() / targ->maxArmor() * 100.0f, 1), 4 ) ); + + } else { + targetVelocity_->setText( "" ); + targetShieldText_->setText( "" ); + targetArmorText_->setText( "" ); + } } else { //! else !target_ if ( targetArrowNode_ ) targetArrowNode_->setVisible( false ); } Modified: trunk/src/OpcodeWrapper.cpp =================================================================== --- trunk/src/OpcodeWrapper.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/OpcodeWrapper.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -144,7 +144,7 @@ bool OpcodeCollisionDetection::checkCollideRay( SectorCollisionObject * obj, const Ogre::Ray & ray, double rayLength ){ if ( active_ ){ - if ( !obj->destroyRequest() ){ + if ( !obj->isDestroyRequest() ){ OgreOpcode::CollisionPair ** rayPickReport; uint nColl = collideInSectorContext_->rayCheck( ray, rayLength, OgreOpcode::COLLTYPE_EXACT, Modified: trunk/src/Opengate.h =================================================================== --- trunk/src/Opengate.h 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/Opengate.h 2009-01-25 23:35:50 UTC (rev 978) @@ -63,6 +63,9 @@ class AiObject; +class AiCommand; +class AiManager; + class Avatar; class BaseObject; class DockedState; Modified: trunk/src/RadarObject.cpp =================================================================== --- trunk/src/RadarObject.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/RadarObject.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -25,8 +25,37 @@ #include "SectorAvatarObject.h" #include "SectorMeshObject.h" +#include <OgreOverlayContainer.h> +#include <OgreOverlayElement.h> +#include <OgreOverlayManager.h> + namespace OpenGate{ +RadarViewable::RadarViewable( const std::string & name ) + : name_( name ){ + int dotAWidth = 10; + int dotAHeight = 4; + dotA_ = Ogre::OverlayManager::getSingleton().createOverlayElement( "Panel", "Radar/Map/DotA_" + name_ ); + dotA_->setMaterialName( "BaseWhite" ); + dotA_->setMetricsMode( Ogre::GMM_PIXELS ); + dotA_->setWidth( dotAWidth ); + dotA_->setHeight( dotAHeight ); + dotA_->setColour( Ogre::ColourValue( 1.0f, 0.0f, 0.0f ) ); + + dotB_ = Ogre::OverlayManager::getSingleton().createOverlayElement( "Panel", "Radar/Map/DotB_" + name_ ); + dotB_->setMaterialName( "BaseWhite" ); + dotB_->setMetricsMode( Ogre::GMM_PIXELS ); + dotB_->setWidth( 1 ); + dotB_->setHeight( 1 ); + dotB_->setColour( Ogre::ColourValue( 1.0f, 0.0f, 0.0f ) ); +} + +RadarViewable::~RadarViewable(){ + Ogre::OverlayManager::getSingleton().destroyOverlayElement( "Radar/Map/DotA_" + name_ ); + Ogre::OverlayManager::getSingleton().destroyOverlayElement( "Radar/Map/DotB_" + name_ ); +} + + RadarObject::RadarObject( Sector * sector, Hud * hud ) : sector_( sector ), hud_( hud ), avatar_( NULL ), target_( NULL ){ @@ -36,6 +65,13 @@ } avatar_ = sector_->avatarObject(); + + Ogre::Overlay * radar = Ogre::OverlayManager::getSingleton().getByName( "Radar" ); + radarMap_ = radar->getChild( "Radar/Map" ); + + radarWidth_ = radarMap_->getWidth() * Ogre::OverlayManager::getSingleton().getViewportWidth(); + radarHeight_ = radarMap_->getHeight() * Ogre::OverlayManager::getSingleton().getViewportHeight(); + changeRange( 5000.0 ); } @@ -43,17 +79,67 @@ objects_.clear(); } +void RadarObject::changeRange( double range ){ + radarRange_ = range; + xScale_ = radarRange_ / ( radarWidth_ / 2.0 ); + yScale_ = radarRange_ / ( radarHeight_ / 2.0 ); +} + void RadarObject::update( const Ogre::Real elapsedTime ){ - + for ( std::map< SectorMeshObject *, RadarViewable * >::iterator it = objects_.begin(), itmax = objects_.end(); it != itmax; it ++ ){ + if ( it->first != avatar_ ){ + SectorMeshObject * rObj = it->first; + RadarViewable * rVie = it->second; + + Ogre::Vector3 relativPosition( rObj->mainNode()->getPosition( ) - avatar_->mainNode()->getPosition( ) ); + Ogre::OverlayElement * dotA = rVie->dotA(); + Ogre::OverlayElement * dotB = rVie->dotB(); + + if ( relativPosition.length() < radarRange_ ){ + + Ogre::Quaternion q; q.FromAngleAxis( -avatar_->mainNode()->getOrientation( ).getYaw(), Ogre::Vector3::UNIT_Y ); + relativPosition = q * relativPosition; + + Ogre::Plane viewPlane( avatar_->mainNode()->getOrientation().yAxis().normalisedCopy(), + avatar_->mainNode()->getPosition() ); + + float distToPlane = viewPlane.getDistance( rObj->mainNode()->getPosition( ) ) / yScale_; + + dotA->setPosition( radarWidth_ / 2.0 + relativPosition[ 0 ] / xScale_ - rVie->dotAWidth() / 2.0, + radarHeight_ / 2.0 + relativPosition[ 2 ] / yScale_ - rVie->dotAHeight() / 2.0 - distToPlane ); + + if ( distToPlane < 0 ) distToPlane = 0; + + dotB->setHeight( fabs( distToPlane ) ); + dotB->setPosition( radarWidth_ / 2.0 + relativPosition[ 0 ] / xScale_, + - distToPlane + radarHeight_ / 2.0 + relativPosition[ 2 ] / yScale_ ); + + if ( !rVie->isVisible() ){ + radarMap_->addChild( dotA ); + radarMap_->addChild( dotB ); + rVie->show(); + } + } else { //! else out of range + if ( rVie->isVisible() ){ + radarMap_->removeChild( dotA->getName() ); + radarMap_->removeChild( dotB->getName() ); + rVie->hide(); + } + } //! end else out of range + } + } } void RadarObject::addObject( SectorMeshObject * obj ){ std::cout << "RadarObject::addObject( "<< obj->name() << std::endl; - objects_.insert( obj ); + objects_.insert( std::pair< SectorMeshObject*, RadarViewable* >( obj, new RadarViewable( obj->name() ) ) ); } void RadarObject::delObject( SectorMeshObject * obj ){ + std::map< SectorMeshObject *, RadarViewable * >::iterator itTarget = objects_.find( obj ); + if ( itTarget != objects_.end() ) delete itTarget->second; objects_.erase( obj ); + if ( target_ == obj ) findNextTarget(); } @@ -69,14 +155,14 @@ SectorMeshObject * RadarObject::findTarget_( bool reverse, bool forbidAvatarSelection ){ if ( objects_.size() == 1 ){ - return *objects_.begin(); + return objects_.begin()->first; } if ( objects_.size() > 0 ){ if ( !target_ ) { - return *objects_.begin(); + return objects_.begin()->first; } else { - std::set< SectorMeshObject * >::iterator itTarget = objects_.find( target_ ); + std::map< SectorMeshObject *, RadarViewable * >::iterator itTarget = objects_.find( target_ ); if ( itTarget == objects_.end() ) itTarget = objects_.begin(); @@ -91,8 +177,8 @@ // if ( (*itTarget)->selectable() ) { if ( forbidAvatarSelection ){ - if ( (*itTarget) != avatar_ ) return (*itTarget); - } else return (*itTarget); + if ( itTarget->first != avatar_ ) return itTarget->first; + } else return itTarget->first; } } } Modified: trunk/src/RadarObject.h =================================================================== --- trunk/src/RadarObject.h 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/RadarObject.h 2009-01-25 23:35:50 UTC (rev 978) @@ -27,7 +27,33 @@ class RadarViewable{ public: + RadarViewable( const std::string & name ); + + ~RadarViewable(); + + inline int dotAWidth() const { return dotAWidth_ ; } + + inline int dotAHeight() const { return dotAHeight_ ; } + + inline Ogre::OverlayElement * dotA() const { return dotA_; } + + inline Ogre::OverlayElement * dotB() const { return dotB_; } + + inline void show() { isShown_ = true; } + + inline void hide() { isShown_ = false; } + + inline bool isVisible() const { return isShown_; } + protected: + std::string name_; + Ogre::OverlayElement * dotA_; + Ogre::OverlayElement * dotB_; + + int dotAWidth_; + int dotAHeight_; + + bool isShown_; }; class RadarObject{ @@ -48,6 +74,8 @@ SectorMeshObject * target( ) { return target_; } + void changeRange( double range ); + protected: SectorMeshObject * findTarget_( bool reverse = false, bool forbidAvatarSelection = true ); @@ -57,7 +85,14 @@ SectorAvatarObject * avatar_; SectorMeshObject * target_; - std::set < SectorMeshObject * > objects_; + std::map < SectorMeshObject *, RadarViewable * > objects_; + + Ogre::OverlayContainer * radarMap_; + double radarRange_; + float radarWidth_; + float radarHeight_; + float xScale_; + float yScale_; }; } //namespace OpenGate Modified: trunk/src/Sector.cpp =================================================================== --- trunk/src/Sector.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/Sector.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -40,6 +40,7 @@ #include "SectorStationObject.h" #include "SectorStationPadObject.h" #include "UnDockedState.h" +#include "Vessel.h" #include <OgreEntity.h> #include <OgreManualObject.h> @@ -185,9 +186,9 @@ return obj; } -SectorAvatarObject * Sector::createAvatarObject( Avatar & avatar ){ - log_->info( std::string( "Sector::createAvatarObject: " ) + avatar.name() ); - avatar_ = new SectorAvatarObject( avatar.name(), this, avatar.vessel() ); +SectorAvatarObject * Sector::createAvatarObject( Avatar * avatar ){ + log_->info( std::string( "Sector::createAvatarObject: " ) + avatar->name() ); + avatar_ = new SectorAvatarObject( avatar->name(), this, avatar->vessel() ); avatar_->reset(); bool hasStation = false; @@ -212,7 +213,23 @@ insertMeshObject_( avatar_ ); return avatar_; } - + +SectorVesselObject * Sector::createVesselObject( Vessel * vessel ){ + SectorVesselObject * obj; + if ( objectHeap_[ vessel->name() ].empty() ){ + obj = new SectorVesselObject( vessel->name() + "_" + toStr( childIDCounter_ ), this, vessel ); + childIDCounter_++; + log_->debug( "Sector::createVesselObject new " + obj->name() ); + } else { + obj = dynamic_cast< SectorVesselObject * >( objectHeap_[ vessel->name() ].front() ); + objectHeap_[ vessel->name() ].pop_front(); + obj->reset(); + log_->debug( "Sector::createVesselObject reuse " + obj->name() ); + } + insertMeshObject_( obj ); + return obj; +} + SectorMissileObject * Sector::createMissileObject( Missile * missile ){ SectorMissileObject * obj; @@ -247,10 +264,12 @@ insertCollObject_( obj ); } - void Sector::objectDocked( SectorMovableObject * obj, SectorStationObject * station ){ std::cout << obj->name() << " docked at " << station->name() << std::endl; switch ( obj->rtti() ){ + case SECTOR_VESSEL_OBJECT_RTTI: + obj->destroy(); + break; case SECTOR_AVATAR_OBJECT_RTTI: if ( listener_ ) listener_->changeToDockedState(); break; Modified: trunk/src/Sector.h =================================================================== --- trunk/src/Sector.h 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/Sector.h 2009-01-25 23:35:50 UTC (rev 978) @@ -56,6 +56,8 @@ const std::set< SectorMeshObject * > & sectorMeshObjects() const { return sectorMeshObjects_; } + const std::set< SectorStationObject * > & sectorStationObjects() const { return sectorStations_; } + /*! Return handle to the avatarObject */ inline SectorAvatarObject * avatarObject() { return avatar_; } @@ -68,8 +70,11 @@ /*! Create a station within the sector */ SectorStationObject * createStationObject( const Ogre::String & stationName ); + /*! Create a Vessle */ + SectorVesselObject * createVesselObject( Vessel * vessel ); + /*! Create a player related avatar */ - SectorAvatarObject * createAvatarObject( Avatar & avatar ); + SectorAvatarObject * createAvatarObject( Avatar * avatar ); /*! Create a missle */ SectorMissileObject * createMissileObject( Missile * misssile ); Modified: trunk/src/SectorBaseObject.h =================================================================== --- trunk/src/SectorBaseObject.h 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorBaseObject.h 2009-01-25 23:35:50 UTC (rev 978) @@ -51,15 +51,16 @@ /*! Return a ptr to main OgreSceneNode for this SectorObject. */ inline Ogre::SceneNode * mainNode() { return mainNode_; } + inline bool isDestroyRequest() const { return destroyRequest_; } + + //** END GETer/SETer + +protected: /*! Mark the object for destruction \n To keep destruction thread safe, we just notify and let update return false, so the sector update cycle do the destruction job */ - inline void setDestroyRequest( bool dest = true ) { destroyRequest_ = dest; } - - /*! Return if the object is marked for destruction */ - inline bool destroyRequest() const { return destroyRequest_; } - //** END GETer/SETer + inline void setDestroyRequest_( bool dest = true ) { destroyRequest_ = dest; } + -protected: std::string name_; Sector * sector_; Ogre::SceneNode * mainNode_; Modified: trunk/src/SectorMeshObject.cpp =================================================================== --- trunk/src/SectorMeshObject.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorMeshObject.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -71,7 +71,7 @@ } void SectorMeshObject::setBaseScale( const Ogre::Real & scale ){ - if ( scale > 1e-4 ) entityScaleNode_->scale( Ogre::Vector3( scale, scale, scale) ); + if ( scale > 1e-4 ) entityScaleNode_->scale( Ogre::Vector3( scale, scale, scale ) ); } void SectorMeshObject::setBaseRot( const Ogre::Real & yaw, const Ogre::Real & pitch, const Ogre::Real & roll ){ @@ -132,10 +132,15 @@ // baseSize_ = size; // baseScale_ = scale; } - + +void SectorMeshObject::destroy(){ + unsubscribeToObservers(); + this->setDestroyRequest_(); +} + void SectorMeshObject::explode() { sector_->createExplosion( this ); - this->setDestroyRequest(); + destroy(); } void SectorMeshObject::setTarget( SectorMeshObject * target ){ Modified: trunk/src/SectorMeshObject.h =================================================================== --- trunk/src/SectorMeshObject.h 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorMeshObject.h 2009-01-25 23:35:50 UTC (rev 978) @@ -86,6 +86,9 @@ /*! Destroy the mesh object and emit explosion*/ virtual void explode(); + /*! Destroy the object without explosion */ + virtual void destroy(); + protected: Ogre::SceneNode * entityScaleNode_; // Main character node for base size Ogre::SceneNode * entityRotNode_; // Main character node for base rotation Modified: trunk/src/SectorMissileObject.cpp =================================================================== --- trunk/src/SectorMissileObject.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorMissileObject.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -65,9 +65,9 @@ bool SectorMissileObject::update( Ogre::Real elapsedTime ){ maxLifetime_ -= elapsedTime; - if ( maxLifetime_ < 0.0 ) setDestroyRequest(); - - if ( target_ != NULL && elapsedTime > 1e-4 ) { + if ( maxLifetime_ < 0.0 ) { + destroy(); + } else if ( target_ != NULL && elapsedTime > 1e-4 && !isDestroyRequest() ) { Ogre::Vector3 currDir = mainNode_->getOrientation() * Ogre::Vector3::NEGATIVE_UNIT_Z; currDir.normalise(); @@ -110,7 +110,7 @@ pitchTo = rot.getPitch(); rollTo = rot.getRoll(); } - Ogre::Real rotFric = rotFriction_(); + Ogre::Real rotFric = rotFriction(); Ogre::Real scaledYaw = yawTo.valueDegrees() / ( elapsedTime * rotFric * movable_->yaw() ); Ogre::Real scaledPitch = pitchTo.valueDegrees() / ( elapsedTime * rotFric * movable_->pitch() ); // Ogre::Real scaledRoll = rollTo.valueDegrees() / ( elapsedTime * rotFric * moveable_->yaw() ); Modified: trunk/src/SectorMissileObject.h =================================================================== --- trunk/src/SectorMissileObject.h 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorMissileObject.h 2009-01-25 23:35:50 UTC (rev 978) @@ -47,7 +47,7 @@ Missile * missile(); /*! Start the missile */ - void launch(); + virtual void launch(); virtual void reset(); Modified: trunk/src/SectorMovableObject.cpp =================================================================== --- trunk/src/SectorMovableObject.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorMovableObject.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -21,9 +21,11 @@ #include "SectorMovableObject.h" #include "LogManager.h" +#include "Missile.h" #include "Moveable.h" #include "OpcodeWrapper.h" #include "ResourceManager.h" +#include "SectorMissileObject.h" #include <OgreRay.h> #include <OgreSceneNode.h> @@ -67,9 +69,10 @@ thrust_ = 0; mass_ = movable_->mass(); armor_ = movable_->armor(); + maxArmor_ = movable_->armor(); shield_ = 0; - setDestroyRequest( false ); + setDestroyRequest_( false ); } void SectorMovableObject::collide( SectorCollisionObject * obj ){ @@ -85,9 +88,9 @@ mainNode_->translate( ( mainNode_->getPosition() - obj->mainNode()->getPosition() ).normalisedCopy() * 3.0 ); break; -// case SECTOROBJECTMISSILE_RTTI: -// hitByAmmo( dynamic_cast < SectorObjectMissile *>( obj )->missile()->damage() ); -// break; + case SECTOR_MISSILE_OBJECT_RTTI: + hitByAmmo( dynamic_cast < SectorMissileObject *>( obj )->missile()->damage() ); + break; default: std::cout << "SectorMovableObject: " << this->name() << " collide with " << obj->rtti() << " " << obj->name() << std::endl; @@ -101,7 +104,7 @@ if ( elapsedTime < 0.001 ) return true; lifeTime_ += elapsedTime; - Ogre::Real rotFric = rotFriction_(); + Ogre::Real rotFric = rotFriction(); mainNode_->yaw( Ogre::Degree( yaw_ * ( elapsedTime * rotFric * movable_->yaw() ) ), rotRelativeTo_ ); mainNode_->pitch( Ogre::Degree( pitch_ * ( elapsedTime * rotFric * movable_->pitch() ) ), rotRelativeTo_ ); mainNode_->roll( Ogre::Degree( roll_ * ( elapsedTime * rotFric * movable_->roll() ) ), rotRelativeTo_ ); @@ -163,6 +166,8 @@ return movable_->dragFactor() * speed_ * speed_; } +void SectorMovableObject::launch(){ +} } //namespace OpenGate Modified: trunk/src/SectorMovableObject.h =================================================================== --- trunk/src/SectorMovableObject.h 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorMovableObject.h 2009-01-25 23:35:50 UTC (rev 978) @@ -73,6 +73,9 @@ /*! Returns the current armor */ inline Uint32 armor() const { return armor_; } + /*! Returns the maximum armor */ + inline Uint32 maxArmor() const { return maxArmor_; } + /*! Returns the current shield */ inline Uint32 shield() const { return shield_; } @@ -91,6 +94,9 @@ inline void setScaledRoll( float rot ){ roll_ = rot; } inline Ogre::Real scaledRoll() const { return roll_; } + /*! Calculate friction factor for yaw, pitch, roll, friction increase by thrust */ + inline Ogre::Real rotFriction(){ return 0.4 + ( 0.6 * ( 1.0 - thrustRate() ) ); } + /*! Fixed braking acceleration.*/ inline Ogre::Real brakingAcc(){ return 5.0; } @@ -109,11 +115,15 @@ /*! Reset all values for this object. */ virtual void reset( ); + /*! Launch the movable*/ + virtual void launch(); + + /*! The object is hit by somewhat that makes damage, have to be specialised by derived objects*/ + virtual void hitByAmmo( Uint32 damage ){} // void setRotTransformSpace( const Ogre::TransformSpace relativRot ) { = relativRot; } protected: - /*! Calculate friction factor for yaw, pitch, roll, friction increase by thrust */ - inline Ogre::Real rotFriction_(){ return 0.4 + ( 0.6 * ( 1.0 - thrustRate() ) ); } + /*! Calculate friction factor for translate increase by speed */ Ogre::Real transFriction_(); @@ -141,10 +151,13 @@ double thrustRate_; Uint32 mass_; + Uint32 thrust_; Uint32 maxThrust_; + Uint32 armor_; Uint32 maxArmor_; + Uint32 shield_; Uint32 maxShield_; }; Modified: trunk/src/SectorStationObject.cpp =================================================================== --- trunk/src/SectorStationObject.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorStationObject.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -40,6 +40,7 @@ : SectorMeshObject( station->name(), sector, parentNode ), station_( station ) { setMesh( station_->meshName() ); + setBaseRot( station_->baseYaw(), station_->basePitch(), station_->baseRoll() ); setBaseScale( station_->baseScale() ); setBaseSize( station_->baseSize() ); Modified: trunk/src/SectorVesselObject.cpp =================================================================== --- trunk/src/SectorVesselObject.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorVesselObject.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -18,10 +18,9 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "Opengate.h" - #include "SectorVesselObject.h" +#include "AiManager.h" #include "Equipment.h" #include "LogManager.h" #include "Moveable.h" @@ -39,6 +38,10 @@ } SectorVesselObject::~SectorVesselObject( ){ + if ( controler_ ) { + ResourceManager::getSingleton().aiManager->stopAiObject( controler_ ); + controler_ = NULL; + } } void SectorVesselObject::reset( ){ @@ -47,10 +50,12 @@ mass_ = this->vessel()->totalMass(); maxThrust_ = this->vessel()->maxThrust(); maxShield_ = this->vessel()->maxShield(); + shield_ = maxShield_; maxCapacity_ = this->vessel()->capacity(); capacity_ = maxCapacity_; controler_ = NULL; + statusChanged_ = false; } void SectorVesselObject::collide( SectorCollisionObject * object ){ @@ -58,6 +63,8 @@ } bool SectorVesselObject::update( Ogre::Real elapsedTime ){ + if ( armor_ <= 0 ) explode(); + updatePowerGrid( elapsedTime ); return SectorMovableObject::update( elapsedTime ); @@ -67,6 +74,24 @@ return dynamic_cast < Vessel * > ( movable_ ); } +void SectorVesselObject::hitByAmmo( Uint32 damage ){ + + long shield = (long)shield_ - damage; + long armor = armor_; + + + if ( shield < 0 ){ + armor += shield; + shield_ = 0; + armor_ = max( (long)0, armor ); + } else { + shield_ = shield; + } + statusChanged_ = true; + + std::cout << "hitByAmmo " << damage << " " << shield_ << " " << shield << " " << armor_ << " " << armor << std::endl; +} + bool SectorVesselObject::updatePowerGrid( Ogre::Real elapsedTime ){ Uint32 powerLine = 0; if ( this->vessel()->powerPlant() ) powerLine = this->vessel()->powerPlant()->powerOutput(); Modified: trunk/src/SectorVesselObject.h =================================================================== --- trunk/src/SectorVesselObject.h 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/SectorVesselObject.h 2009-01-25 23:35:50 UTC (rev 978) @@ -59,7 +59,7 @@ AiObject * controler( ){ return controler_; } /*! The vessel takes some damage */ - //virtual void hitByAmmo( Uint32 damage ); + virtual void hitByAmmo( Uint32 damage ); /*! Handle fire button pressed */ //void fire( Ogre::Real elapsedTime ); @@ -76,6 +76,8 @@ Uint32 capacity_; Uint32 maxCapacity_; + + bool statusChanged_; }; Modified: trunk/src/ShipConfigDialog.cpp =================================================================== --- trunk/src/ShipConfigDialog.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/ShipConfigDialog.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -214,7 +214,7 @@ void ShipConfigDialog::update( Ogre::Real timeElapsed ){ if ( visible_ ){ - rttNode_->yaw( Ogre::Degree( timeElapsed * 45 ) ); + //rttNode_->yaw( Ogre::Degree( timeElapsed * 45 ) ); } } Modified: trunk/src/UnDockedState.cpp =================================================================== --- trunk/src/UnDockedState.cpp 2009-01-25 14:46:55 UTC (rev 977) +++ trunk/src/UnDockedState.cpp 2009-01-25 23:35:50 UTC (rev 978) @@ -36,8 +36,9 @@ #include "KeyMap.h" #include "OpenALSoundManager.h" #include "RadarObject.h" -#include "SectorObjectAvatar.h" #include "SectorAvatarObject.h" +#include "SectorStationObject.h" + #include "EntityManager.h" #include "Station.h" #include "OpcodeWrapper.h" @@ -115,7 +116,7 @@ sector_ = new Sector( sceneMgr_, network_ ); sector_->setListener( this ); sector_->populate( "test.sector" ); - sector_->createAvatarObject( *resources_->avatar ); + sector_->createAvatarObject( resources_->avatar ); hud_ = new Hud( overlayRootWindow_, sector_->avatarObject() ); radar_ = new RadarObject( sector_, hud_ ); @@ -906,7 +907,8 @@ if ( !sector_->avatarObject()->controler() ){ log_->info( "Docking started." ); AiObject * ai = resources_->aiManager->createAiObject( "autodocker" ); - + ai->setVesselObject( sector_->avatarObject() ); + ai->land( dynamic_cast< SectorStationObject * >(radar_->target() ) ); resources_->aiManager->startAiObject( ai ); } else { log_->info( "Docking aborted." ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2009-01-25 14:47:07
|
Revision: 977 http://opengate.svn.sourceforge.net/opengate/?rev=977&view=rev Author: spom_spom Date: 2009-01-25 14:46:55 +0000 (Sun, 25 Jan 2009) Log Message: ----------- next steps of reorganization done (explosion, missiles, targeting) still open: fireing stuff, radar, network Modified Paths: -------------- trunk/data/misc/test.sector trunk/data/missiles/bee.xml trunk/data/missiles/firefly.xml trunk/data/stations/tauseti_wake.xml trunk/src/DockedState.h trunk/src/Entity.cpp trunk/src/Entity.h trunk/src/EntityManager.cpp trunk/src/Hud.cpp trunk/src/Hud.h trunk/src/Makefile.am trunk/src/Missile.cpp trunk/src/OpcodeWrapper.cpp trunk/src/Opengate.h trunk/src/Sector.cpp trunk/src/Sector.h trunk/src/SectorAvatarObject.cpp trunk/src/SectorAvatarObject.h trunk/src/SectorCollisionObject.cpp trunk/src/SectorCollisionObject.h trunk/src/SectorMeshObject.cpp trunk/src/SectorMeshObject.h trunk/src/SectorMovableObject.cpp trunk/src/SectorMovableObject.h trunk/src/SectorStationObject.cpp trunk/src/UnDockedState.cpp trunk/src/UnDockedState.h Added Paths: ----------- trunk/src/RadarObject.cpp trunk/src/RadarObject.h trunk/src/SectorExplosionObject.cpp trunk/src/SectorExplosionObject.h trunk/src/SectorMissileObject.cpp trunk/src/SectorMissileObject.h Modified: trunk/data/misc/test.sector =================================================================== --- trunk/data/misc/test.sector 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/data/misc/test.sector 2009-01-25 14:46:55 UTC (rev 977) @@ -4,23 +4,8 @@ <ambient a="1" r="0.1" b="0.1" g="0.1"></ambient> </environment> <station name="Tauseti Wake"> - <position y="0" x="0" z="-1480"></position> + <position y="0" x="0" z="-2000"></position> </station> - <sectorobject name="ring"> - <position y="-100" x="0" z="-100"></position> - <scale y="35" x="35" z="35"></scale> - <entity meshFile="ring.mesh" material-0="ring/main" numSubEntities="1"></entity> - </sectorobject> - <sectorobject name="ring1"> - <position y="0" x="0" z="-100"></position> - <scale y="35" x="35" z="35"></scale> - <entity meshFile="ring.mesh" material-0="ring/main" numSubEntities="1"></entity> - </sectorobject> - <sectorobject name="ring2"> - <position y="100" x="0" z="-100"></position> - <scale y="35" x="35" z="35"></scale> - <entity meshFile="ring.mesh" material-0="ring/main" numSubEntities="1"></entity> - </sectorobject> <beacon> <position y="0" x="-650" z="800"></position> </beacon> Modified: trunk/data/missiles/bee.xml =================================================================== --- trunk/data/missiles/bee.xml 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/data/missiles/bee.xml 2009-01-25 14:46:55 UTC (rev 977) @@ -5,7 +5,7 @@ <name_de>bee</name_de> <name_en>bee</name_en> <mesh>firefly</mesh> - <category_id>11</category_id> + <category_id>13</category_id> <faction_id>3</faction_id> <description_en>Offense anti vessel missile for small ships</description_en> <!-- <production_center>Octavius Great Pillars</production_center> Modified: trunk/data/missiles/firefly.xml =================================================================== --- trunk/data/missiles/firefly.xml 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/data/missiles/firefly.xml 2009-01-25 14:46:55 UTC (rev 977) @@ -13,9 +13,9 @@ <required_rank>12</required_rank> <size>2</size> <mass>205</mass> - <maximum_thrust>82000</maximum_thrust> - <maximum_pitch>87</maximum_pitch> - <maximum_yaw>87</maximum_yaw> + <thrust>82000</thrust> + <pitch>87</pitch> + <yaw>87</yaw> <drag_factor>0.21</drag_factor> <damage>4250</damage> <life_time>20</life_time> @@ -25,4 +25,4 @@ <required_component>explosives</required_component> <required_component>carbon</required_component> <required_political_status>28</required_political_status> -</container> \ No newline at end of file +</container> Modified: trunk/data/stations/tauseti_wake.xml =================================================================== (Binary files differ) Modified: trunk/src/DockedState.h =================================================================== --- trunk/src/DockedState.h 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/DockedState.h 2009-01-25 14:46:55 UTC (rev 977) @@ -35,7 +35,7 @@ class MarketDialog; /*! - * \brief This class defines the gamestate the gamestate when the user is docked + * \brief This class defines the gamestate when the user is docked * * When a user is currently docked at a station, this gamestate is active. The * user is not able to move his ship or to fire weapons. But he is able to trade Modified: trunk/src/Entity.cpp =================================================================== --- trunk/src/Entity.cpp 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/Entity.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -139,6 +139,7 @@ baseYaw_ = 0.0; basePitch_ = 0.0; baseRoll_ = 0.0; + baseScale_ = 0.0; } MeshEntity::~MeshEntity(){} @@ -146,10 +147,11 @@ void MeshEntity::readPropertiesFromXML( TiXmlHandle & hRoot ){ Entity::readPropertiesFromXML( hRoot ); - readXMLNode< float >( hRoot, "base_yaw", this, &OpenGate::MeshEntity::setBaseYaw, false ); - readXMLNode< float >( hRoot, "base_pitch", this, &OpenGate::MeshEntity::setBasePitch, false ); - readXMLNode< float >( hRoot, "base_roll", this, &OpenGate::MeshEntity::setBaseRoll, false ); - readXMLNode< float >( hRoot, "base_size", this, &OpenGate::MeshEntity::setBaseSize, false ); + readXMLNode< float >( hRoot, "base_yaw baseyaw", this, &OpenGate::MeshEntity::setBaseYaw, false ); + readXMLNode< float >( hRoot, "base_pitch basepitch", this, &OpenGate::MeshEntity::setBasePitch, false ); + readXMLNode< float >( hRoot, "base_roll baseroll", this, &OpenGate::MeshEntity::setBaseRoll, false ); + readXMLNode< float >( hRoot, "base_size basesize", this, &OpenGate::MeshEntity::setBaseSize, false ); + readXMLNode< float >( hRoot, "base_scale basescale", this, &OpenGate::MeshEntity::setBaseScale, false ); // readXMLNode< float >( hRoot, "basesize", this, &OpenGate::MeshEntity::setBaseSize, false ); TiXmlElement * pElem; Modified: trunk/src/Entity.h =================================================================== --- trunk/src/Entity.h 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/Entity.h 2009-01-25 14:46:55 UTC (rev 977) @@ -173,6 +173,10 @@ /*! If size is a scalar value, the length of the entity.*/ inline void setBaseSize( float size ){ baseSize_[ 2 ] = size; } inline const Ogre::Vector3 & baseSize( ) const { return baseSize_; } + + /*! If size is a scalar value, the length of the entity.*/ + inline void setBaseScale( float scale ){ baseScale_ = scale; } + inline const Ogre::Real baseScale( ) const { return baseScale_; } /*! Base sizes are necessary for resizing the ogremesh */ inline void setBaseYaw( Ogre::Real baseYaw ){ baseYaw_ = baseYaw; } @@ -197,6 +201,7 @@ Ogre::Real baseYaw_; Ogre::Real basePitch_; Ogre::Real baseRoll_; + Ogre::Real baseScale_; Ogre::MeshPtr pMesh_; Modified: trunk/src/EntityManager.cpp =================================================================== --- trunk/src/EntityManager.cpp 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/EntityManager.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -229,7 +229,7 @@ case 8: entity = new Radar(); break; case 9: entity = new Vessel(); break; case 10: entity = new Gun(); break; - case 11: entity = new Missile(); break; + case 13: entity = new Missile(); break; default: log_->fatal( fileName + " category_id " + toStr( category ) + " unknown." ); return NULL; Modified: trunk/src/Hud.cpp =================================================================== --- trunk/src/Hud.cpp 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/Hud.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -21,6 +21,7 @@ #include "Hud.h" #include "Avatar.h" +#include "RadarObject.h" #include "ResourceManager.h" #include "Sector.h" #include "SectorAvatarObject.h" @@ -32,6 +33,7 @@ #include <OgreFontManager.h> #include <OgreRoot.h> #include <OgreRenderWindow.h> +#include <OgreOverlayContainer.h> #include <OgreOverlayManager.h> #include <OgreStringConverter.h> #include <OgreTextAreaOverlayElement.h> @@ -43,10 +45,15 @@ namespace OpenGate{ -Hud::Hud( CEGUI::Window * overlayRoot, SectorAvatarObject * avatar ) : overlayRootWindow_( overlayRoot ), avatar_( avatar ){ +Hud::Hud( CEGUI::Window * overlayRoot, SectorAvatarObject * avatar ) : overlayRootWindow_( overlayRoot ), avatar_( avatar ), target_( NULL ){ resources_ = ResourceManager::getSingletonPtr(); sceneMgr_ = avatar_->sector()->sceneManager(); + mainCamera_ = sceneMgr_->getCamera( "MainCamera" ); + + flightArrowNode_ = NULL; + targetArrowNode_ = NULL; + init(); show(); } @@ -57,6 +64,11 @@ flightArrowNode_->removeAndDestroyChild( "FlightArrow/TransNode" ); Ogre::SceneNode * par = flightArrowNode_->getParentSceneNode(); par->removeAndDestroyChild( flightArrowNode_->getName() ); + + avatar_->sector()->sceneManager()->destroyEntity( "TargetArrow/Entity" ); + targetArrowNode_->removeAndDestroyChild( "TargetArrow/TransNode" ); + par = targetArrowNode_->getParentSceneNode(); + par->removeAndDestroyChild( targetArrowNode_->getName() ); } void Hud::init( ){ @@ -68,6 +80,7 @@ //** OGRE 3D stuff in front of the camera Ogre::SceneNode * mainCameraNode = sceneMgr_->getSceneNode( "MainCamera" ); + flightArrowNode_ = mainCameraNode->createChildSceneNode( "FlightArrow/MainNode" ); Ogre::SceneNode * flightArrowTrans = flightArrowNode_->createChildSceneNode( "FlightArrow/TransNode" ); Ogre::Entity * flightArrowEntity = sceneMgr_->createEntity( "FlightArrow/Entity", "arrow.mesh" ); @@ -78,6 +91,16 @@ flightArrowTrans->scale( 0.01, 0.01, 0.01 ); flightArrowNode_->setPosition( 0.0, 0.08, -1.2 ); + targetArrowNode_ = mainCameraNode->createChildSceneNode( "TargetArrow/MainNode" ); + Ogre::SceneNode * targetArrowTrans = targetArrowNode_->createChildSceneNode( "TargetArrow/TransNode" ); + Ogre::Entity * targetArrowEntity = sceneMgr_->createEntity( "TargetArrow/Entity", "arrow.mesh" ); + targetArrowEntity->setMaterialName( "SimpleHUD/FlightArrow" ); +//flightArrowEntity->setRenderQueueGroup(Ogre::RENDER_QUEUE_OVERLAY); + targetArrowTrans->attachObject( targetArrowEntity ); + targetArrowTrans->pitch( Ogre::Degree( -90 ) ); + targetArrowTrans->scale( 0.01, 0.01, 0.01 ); + targetArrowNode_->setPosition( 0.0, -0.08, -1.2 ); + targetArrowNode_->setVisible( false ); //** OGRE overlay based stuff overlayName_ = "SimpleHUD"; @@ -182,6 +205,16 @@ } +void Hud::setTarget( SectorMeshObject * target ){ + target_ = target; + if ( target_ ){ + targetArrowNode_->setVisible( true ); +// hudOverlay_->getChild( overlayName_ + "/TargetPointer" )->show(); + Ogre::OverlayManager::getSingleton().getOverlayElement( overlayName_ + + "/MainPanel/TextTargetName" )->setCaption( target_->name() ); + } +} + void Hud::update( Ogre::Real elapsedTime ){ @@ -200,47 +233,44 @@ if ( flightArrowNode_ ) { if ( fabs( avatar_->speed() ) > 1e-1 ){ flightArrowNode_->setVisible( true ); - //flightArrowNode_->setOrientation( flightOrient ); flightArrowNode_->setDirection( flightDir, Ogre::Node::TS_WORLD ); } else { flightArrowNode_->setVisible( false ); } } -// if ( target_ != NULL ) { -// Ogre::Vector3 distToTarget( ( target_->mainNode()->getPosition() - -// avatar_->mainNode()->getPosition() ) ); + if ( target_ != NULL ) { + Ogre::Vector3 distToTarget( ( target_->mainNode()->getPosition() - avatar_->mainNode()->getPosition() ) ); + + if ( targetArrowNode_ ) { + targetArrowNode_->setVisible( true ); + targetArrowNode_->setDirection( distToTarget.normalisedCopy(), Ogre::Node::TS_WORLD ); + } // -// // if ( avatar_->targetArrow() ) { -// // avatar_->targetArrow()->setVisible( true ); -// // avatar_->targetArrow()->setOrientation( flightOrient ); -// // avatar_->targetArrow()->setDirection( distToTarget.normalisedCopy(), Ogre::Node::TS_WORLD ); -// // } -// -// //** Start update targeting pointer and duelist pointers; -// Ogre::Vector3 targetScreenPos; + //! Start update targeting pointer and duelist pointers; + Ogre::Vector3 targetScreenPos; // target_->mainNode()->needUpdate(); // -// Ogre::Vector3 targetPos( target_->mainNode()->getPosition() ); + Ogre::Vector3 targetPos( target_->mainNode()->getPosition() ); + + bool targetVisible = projectionPos_( mainCamera_, targetPos, targetScreenPos ); + if ( targetVisible ){ + targetCursor_->show(); + targetCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, + -targetCursorHalfWidth_ ), + CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, + -targetCursorHalfHeight_ ) ) ); + } else { + targetCursor_->hide(); + } // -// bool targetVisible = projectionPos_( mainCamera_, targetPos, targetScreenPos ); -// if ( targetVisible ){ -// targetCursor_->show(); -// targetCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, -// -targetCursorHalfWidth_ ), -// CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, -// -targetCursorHalfHeight_ ) ) ); -// } else { -// targetCursor_->hide(); -// } -// // //Ogre::Real ammoTimeToTarget( distToTarget.length() / avatar_->ammoSpeed() ); + + + //! End update targeting pointer and duelist pointers; + + targetDistanceText_->setText( "D" + Ogre::StringConverter::toString( round( distToTarget.length(), 0 ) ) ); // -// -// //** End update targeting pointer and duelist pointers; -// -// targetDistanceText_->setText( "D" + Ogre::StringConverter::toString( round( distToTarget.length(), 0 ) ) ); -// // if ( target_->rtti() == SECTOROBJECTMOVABLE_RTTI || // target_->rtti() == SECTOROBJECTVESSEL_RTTI || // target_->rtti() == SECTOROBJECTMISSILE_RTTI ){ @@ -257,9 +287,9 @@ // targetShieldText_->setText( "" ); // targetArmorText_->setText( "" ); // } -// } else { -// // if ( avatar_->targetArrow() ) avatar_->targetArrow()->setVisible( false ); -// } + } else { //! else !target_ + if ( targetArrowNode_ ) targetArrowNode_->setVisible( false ); + } Ogre::Real height = avatar_->speedRate() * velocityProgressHeight_; velocityProgress_->setYPosition( CEGUI::UDim( 0.5, velocityProgressHeight_/2.0 - height ) ); Modified: trunk/src/Hud.h =================================================================== --- trunk/src/Hud.h 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/Hud.h 2009-01-25 14:46:55 UTC (rev 977) @@ -44,6 +44,8 @@ void hide(); + void setTarget( SectorMeshObject * target ); + protected: bool projectionPos_( Ogre::Camera * cam, const Ogre::Vector3 & pos, Ogre::Vector3 & screenPos ); @@ -57,9 +59,10 @@ Ogre::Camera * mainCamera_; Sector * sector_; - SectorObject * target_; + SectorMeshObject * target_; Ogre::SceneNode * flightArrowNode_; + Ogre::SceneNode * targetArrowNode_; CEGUI::Window * targetCursor_; Ogre::Real targetCursorHalfWidth_; Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/Makefile.am 2009-01-25 14:46:55 UTC (rev 977) @@ -74,6 +74,8 @@ Planet.cpp \ Projectile.h \ Projectile.cpp \ + RadarObject.h \ + RadarObject.cpp \ ResourceManager.h \ ResourceManager.cpp \ Sector.h \ @@ -90,8 +92,12 @@ SectorChildObject.cpp \ SectorCollisionObject.h \ SectorCollisionObject.cpp \ + SectorExplosionObject.h \ + SectorExplosionObject.cpp \ SectorMeshObject.h \ SectorMeshObject.cpp \ + SectorMissileObject.h \ + SectorMissileObject.cpp \ SectorMovableObject.h \ SectorMovableObject.cpp \ SectorPadObject.h \ Modified: trunk/src/Missile.cpp =================================================================== --- trunk/src/Missile.cpp 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/Missile.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -35,7 +35,7 @@ readXMLNode< int >( hRoot, "damage", this, &OpenGate::Missile::setDamage, false ); readXMLNode< int >( hRoot, "thrust", this, &OpenGate::Missile::setThrust, false ); - readXMLNode< int >( hRoot, "lifetime", this, &OpenGate::Missile::setLifeTime, false ); + readXMLNode< int >( hRoot, "lifetime life_time", this, &OpenGate::Missile::setLifeTime, false ); } } //namespace OpenGate Modified: trunk/src/OpcodeWrapper.cpp =================================================================== --- trunk/src/OpcodeWrapper.cpp 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/OpcodeWrapper.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -107,13 +107,12 @@ if ( obj && active_ ){ OgreOpcode::CollisionObject * collObj = obj->collisionObject(); - if ( !collObj ){ + if ( !collObj && obj->entity() ){ OgreOpcode::EntityCollisionShape * collShape = collisionManager_->createEntityCollisionShape( obj->name() + "/CollShape" ); - if ( obj->entity() ){ - collShape->load( obj->entity() ); - } else { - std::cout << "OpcodeCollisionDetection::createObject( BaseObject * obj ), no entity defined for obj: " << obj->name(); - } + collShape->load( obj->entity() ); +// } else { +// std::cout << "OpcodeCollisionDetection::createObject( BaseObject * obj ), no entity defined for obj: " << obj->name(); +// } collObj = collideInSectorContext_->createObject( obj->name() + "/CollObj" ); collObj->setCollClass( collisionManager_->queryCollClass( obj->collisionClass() ) ); Modified: trunk/src/Opengate.h =================================================================== --- trunk/src/Opengate.h 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/Opengate.h 2009-01-25 14:46:55 UTC (rev 977) @@ -41,12 +41,14 @@ #define SECTOR_BEACON_PAD_OBJECT_RTTI 4 #define SECTOR_CHILD_OBJECT_RTTI 5 #define SECTOR_COLLISION_OBJECT_RTTI 6 -#define SECTOR_MESH_OBJECT_RTTI 7 -#define SECTOR_MOVABLE_OBJECT_RTTI 8 -#define SECTOR_PAD_OBJECT_RTTI 9 -#define SECTOR_STATION_OBJECT_RTTI 10 -#define SECTOR_STATION_PAD_OBJECT_RTTI 11 -#define SECTOR_VESSEL_OBJECT_RTTI 12 +#define SECTOR_EXPLOSION_OBJECT_RTTI 7 +#define SECTOR_MESH_OBJECT_RTTI 8 +#define SECTOR_MISSILE_OBJECT_RTTI 9 +#define SECTOR_MOVABLE_OBJECT_RTTI 10 +#define SECTOR_PAD_OBJECT_RTTI 11 +#define SECTOR_STATION_OBJECT_RTTI 12 +#define SECTOR_STATION_PAD_OBJECT_RTTI 13 +#define SECTOR_VESSEL_OBJECT_RTTI 14 #define SECTOROBJECTENVIRONMENT_RTTI 1000010 #define PROJECTILE_RTTI 100001 @@ -74,6 +76,8 @@ class OpcodeCollisionDetection; class Planet; class Projectile; +class RadarObject; +class GunObject; class ResourceManager; @@ -84,7 +88,9 @@ class SectorBeaconPadObject; class SectorChildObject; class SectorCollisionObject; +class SectorExplosionObject; class SectorMeshObject; +class SectorMissileObject; class SectorMovableObject; class SectorPadObject; class SectorStationObject; Added: trunk/src/RadarObject.cpp =================================================================== --- trunk/src/RadarObject.cpp (rev 0) +++ trunk/src/RadarObject.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -0,0 +1,106 @@ +/*************************************************************************** + * Copyright (C) 2006-2009 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "RadarObject.h" + +#include "Hud.h" +#include "Sector.h" +#include "SectorAvatarObject.h" +#include "SectorMeshObject.h" + +namespace OpenGate{ + +RadarObject::RadarObject( Sector * sector, Hud * hud ) + : sector_( sector ), hud_( hud ), avatar_( NULL ), target_( NULL ){ + + for ( std::set< SectorMeshObject * >::iterator it = sector->sectorMeshObjects().begin(), itmax = sector->sectorMeshObjects().end(); + it != itmax; it ++ ){ + addObject( *it ); + } + + avatar_ = sector_->avatarObject(); + +} + +RadarObject::~RadarObject( ){ + objects_.clear(); +} + +void RadarObject::update( const Ogre::Real elapsedTime ){ + +} + +void RadarObject::addObject( SectorMeshObject * obj ){ + std::cout << "RadarObject::addObject( "<< obj->name() << std::endl; + objects_.insert( obj ); +} + +void RadarObject::delObject( SectorMeshObject * obj ){ + objects_.erase( obj ); + if ( target_ == obj ) findNextTarget(); +} + +void RadarObject::findNextTarget(){ + target_ = findTarget_( false ); + if ( hud_ ) hud_->setTarget( target_ ); +} + +void RadarObject::findPrevTarget(){ + target_ = findTarget_( true ); + if ( hud_ ) hud_->setTarget( target_ ); +} + +SectorMeshObject * RadarObject::findTarget_( bool reverse, bool forbidAvatarSelection ){ + if ( objects_.size() == 1 ){ + return *objects_.begin(); + } + + if ( objects_.size() > 0 ){ + if ( !target_ ) { + return *objects_.begin(); + } else { + std::set< SectorMeshObject * >::iterator itTarget = objects_.find( target_ ); + + if ( itTarget == objects_.end() ) itTarget = objects_.begin(); + + for ( uint i = 0; i < objects_.size(); i ++ ){ + if ( reverse ){ + if ( itTarget == objects_.begin() ) itTarget = objects_.end(); + itTarget --; + } else { + itTarget ++; + if ( itTarget == objects_.end() ) itTarget = objects_.begin(); + } + +// if ( (*itTarget)->selectable() ) { + if ( forbidAvatarSelection ){ + if ( (*itTarget) != avatar_ ) return (*itTarget); + } else return (*itTarget); + } + } + } + return NULL; +} + + +} //namespace OpenGate + + + Added: trunk/src/RadarObject.h =================================================================== --- trunk/src/RadarObject.h (rev 0) +++ trunk/src/RadarObject.h 2009-01-25 14:46:55 UTC (rev 977) @@ -0,0 +1,67 @@ +/*************************************************************************** + * Copyright (C) 2006-2009 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _OPENGATE_RADAROBJECT__H +#define _OPENGATE_RADAROBJECT__H + +#include "Opengate.h" + +namespace OpenGate{ + +class RadarViewable{ +public: +protected: +}; + +class RadarObject{ +public: + RadarObject( Sector * sector, Hud * hud_ ); + + ~RadarObject( ); + + void update( const Ogre::Real elapsedTime ); + + void addObject( SectorMeshObject * obj ); + + void delObject( SectorMeshObject * obj ); + + void findNextTarget(); + + void findPrevTarget(); + + SectorMeshObject * target( ) { return target_; } + +protected: + SectorMeshObject * findTarget_( bool reverse = false, bool forbidAvatarSelection = true ); + + //Radar * radar_; + Sector * sector_; + Hud * hud_; + SectorAvatarObject * avatar_; + SectorMeshObject * target_; + + std::set < SectorMeshObject * > objects_; +}; + +} //namespace OpenGate + +#endif // _OPENGATE_RADAROBJECT__H + + Modified: trunk/src/Sector.cpp =================================================================== --- trunk/src/Sector.cpp 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/Sector.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -27,17 +27,22 @@ #include "Avatar.h" #include "EntityManager.h" #include "LogManager.h" +#include "Missile.h" #include "OpcodeWrapper.h" +#include "RadarObject.h" #include "ResourceManager.h" #include "SectorAvatarObject.h" #include "SectorBeaconObject.h" #include "SectorCollisionObject.h" +#include "SectorExplosionObject.h" #include "SectorMeshObject.h" +#include "SectorMissileObject.h" #include "SectorStationObject.h" #include "SectorStationPadObject.h" #include "UnDockedState.h" #include <OgreEntity.h> +#include <OgreManualObject.h> #include <OgreSceneManager.h> #include <OgreSubEntity.h> @@ -50,14 +55,26 @@ name_ = "unknown"; listener_ = NULL; avatar_ = NULL; + childIDCounter_ = 0; + + createKoordAxis( ); + } Sector::~Sector( ){ - for_each( sectorObjects_.begin(), sectorObjects_.end(), deletePtr() ); + for_each( sectorCollObjects_.begin(), sectorCollObjects_.end(), deletePtr() ); + for_each( sectorMeshObjects_.begin(), sectorMeshObjects_.end(), deletePtr() ); for ( std::map< std::string, std::deque< SectorCollisionObject * > >::iterator it = objectHeap_.begin(), itmax = objectHeap_.end(); it != itmax; it ++ ){ for_each( (*it).second.begin(), (*it).second.end(), deletePtr() ); } + + if ( koordAxisNode_ ) { + koordAxisNode_->detachObject( koordAxisMO_ ); + sceneMgr_->destroyManualObject( koordAxisMO_->getName() ); + sceneMgr_->getRootSceneNode()->removeAndDestroyChild( koordAxisNode_->getName() ); + koordAxisNode_ = NULL; + } } bool Sector::update( Ogre::Real elapsedTime ){ @@ -65,10 +82,182 @@ ResourceManager::getSingleton().collisionManager->update( elapsedTime ); } - if ( avatar_ ) avatar_->update( elapsedTime ); + for ( std::set< SectorCollisionObject * >::iterator it = sectorCollObjects_.begin(); it != sectorCollObjects_.end(); ){ + if ( !(*it)->update( elapsedTime ) ) { + destructCollObject_( (*it++) ); + } else ++it; + } + for ( std::set< SectorMeshObject * >::iterator it = sectorMeshObjects_.begin(); it != sectorMeshObjects_.end(); ){ + if ( !(*it)->update( elapsedTime ) ) { + destructMeshObject_( (*it++) ); + } else ++it; + } return true; } +void Sector::destructCollObject_( SectorCollisionObject * obj ){ + if ( obj ){ + removeCollObject_( obj ); + switch ( obj->rtti() ){ + case SECTOR_EXPLOSION_OBJECT_RTTI: + objectHeap_[ "Explosion" ].push_back( obj ); + break; + default: + delete( obj ); + obj = NULL; + } + } +} + +void Sector::destructMeshObject_( SectorMeshObject * obj ){ + if ( obj ){ + log_->debug( "Sector::destruct_ object: " + obj->name() + " " + toStr( obj->rtti() ) ); + removeMeshObject_( obj ); + switch ( obj->rtti() ){ + case SECTOR_STATION_OBJECT_RTTI: + //sectorStations_.erase( obj ) + delete( obj ); + obj = NULL; + break; + case SECTOR_MISSILE_OBJECT_RTTI: + objectHeap_[ dynamic_cast< SectorMissileObject * >( obj )->missile()->name() ].push_back( obj ); + break; + default: + delete( obj ); + obj = NULL; + } + } +} + +void Sector::insertCollObject_( SectorCollisionObject * obj ){ + sectorCollObjects_.insert( obj ); + obj->activate(); +} + +void Sector::removeCollObject_( SectorCollisionObject * obj ){ + obj->deactivate(); + sectorCollObjects_.erase( obj ); +} + +void Sector::insertMeshObject_( SectorMeshObject * obj ){ + std::cout << "Sector::insertMeshObject_( SectorMeshObject * obj )" << obj->name() << std::endl; + sectorMeshObjects_.insert( obj ); + obj->activate(); + if ( listener_ ) { + if ( listener_->radar() ){ + listener_->radar()->addObject( obj ); + } + } +} + +void Sector::removeMeshObject_( SectorMeshObject * obj ){ + if ( listener_ ) { + if ( listener_->radar() ){ + listener_->radar()->delObject( obj ); + } + } + obj->deactivate(); + sectorMeshObjects_.erase( obj ); +} + +SectorMeshObject * Sector::createMeshObject( const std::string & name, const std::string & meshname ){ + SectorMeshObject * obj = new SectorMeshObject( name, this ); + obj->setMesh( meshname ); + insertMeshObject_( obj ); + return obj; +} + +SectorBeaconObject * Sector::createBeaconObject( ){ + SectorBeaconObject * obj = new SectorBeaconObject( this->name() + "/Beacon", this ); + insertMeshObject_( obj ); + return obj; +} + +SectorStationObject * Sector::createStationObject( const Ogre::String & stationName ){ + Station * station = ResourceManager::getSingleton().entityManager->station( stationName ); + SectorStationObject * obj = NULL; + + if ( station ){ + obj = new SectorStationObject( station, this ); + insertMeshObject_( obj ); + sectorStations_.insert( dynamic_cast< SectorStationObject * >( obj ) ); + } + return obj; +} + +SectorAvatarObject * Sector::createAvatarObject( Avatar & avatar ){ + log_->info( std::string( "Sector::createAvatarObject: " ) + avatar.name() ); + avatar_ = new SectorAvatarObject( avatar.name(), this, avatar.vessel() ); + avatar_->reset(); + + bool hasStation = false; + if ( !sectorStations_.empty() ){ + SectorStationObject *station = dynamic_cast< SectorStationObject* >( *sectorStations_.begin() ); + log_->info( std::string( "launch avatar from station " ) ); + if ( station->launchPad() ){ + avatar_->mainNode()->setPosition( station->launchPad()->position( true ) + station->launchPad()->direction( true ) * 5.0); + avatar_->mainNode()->setDirection( station->launchPad()->direction( true ) ); + avatar_->setVelocity( station->launchPad()->direction( true ) * 20.0 ); + hasStation = true; + } else { + log_->warn( std::string( "Station " + station->name() + " has no launch pad" ) ); + } + } + if ( !hasStation ) { + log_->info( std::string( "launch avatar from free position " ) ); + avatar_->mainNode()->setPosition( 0.0, 0.0, 0.0 ); + avatar_->mainNode()->setDirection( Ogre::Vector3( 0.0, 0.0, -1.0 ) ); + avatar_->setVelocity( Ogre::Vector3( 0.0, 0.0, 0.0 ) ); + } + insertMeshObject_( avatar_ ); + return avatar_; +} + +SectorMissileObject * Sector::createMissileObject( Missile * missile ){ + SectorMissileObject * obj; + + if ( objectHeap_[ missile->name() ].empty() ){ + obj = new SectorMissileObject( missile->name() + "_" + toStr( childIDCounter_ ), this, missile ); + childIDCounter_++; + log_->debug( "Sector::createMissile new " + obj->name() ); + } else { + obj = dynamic_cast< SectorMissileObject * >( objectHeap_[ missile->name() ].front() ); + objectHeap_[ missile->name() ].pop_front(); + obj->reset(); + log_->debug( "Sector::createMissile reuse " + obj->name() ); + } + insertMeshObject_( obj ); + return obj; +} + +void Sector::createExplosion( SectorMeshObject * object ){ + std::cout << "Sector::createExplosion( const Ogre::Vector3 & pos )" << std::endl; + SectorExplosionObject * obj; + std::string heapName( "Explosion" ); + + if ( objectHeap_[ heapName ].empty() ){ + obj = new SectorExplosionObject( heapName + "_" + toStr( childIDCounter_ ), this ); + childIDCounter_++; + } else { + obj = dynamic_cast< SectorExplosionObject * >( objectHeap_[ heapName ].front() ); + objectHeap_[ heapName ].pop_front(); + obj->reset(); + } + obj->mainNode()->setPosition( object->mainNode()->getPosition() ); + insertCollObject_( obj ); +} + + +void Sector::objectDocked( SectorMovableObject * obj, SectorStationObject * station ){ + std::cout << obj->name() << " docked at " << station->name() << std::endl; + switch ( obj->rtti() ){ + case SECTOR_AVATAR_OBJECT_RTTI: + if ( listener_ ) listener_->changeToDockedState(); + break; + default: break; + } +} + void Sector::populate( const std::string & fileName ){ TiXmlDocument doc( ResourceManager::getSingleton().findFullFileName( fileName ) ); bool loadOkay = doc.LoadFile(); @@ -104,12 +293,12 @@ pElem = hRoot.ChildElement( "station", 0 ).Element(); if ( pElem ){ - std::string name; readXMLAttribute < std::string >( pElem, "name", name ); - Ogre::Vector3 pos( readXMLVec3Element( pElem, "position" ) ); - Ogre::Quaternion rot( readXMLQuatElement( pElem, "orientation" ) ); - SectorMeshObject *obj = createStation( name ); - if ( pos != Ogre::Vector3::ZERO ) obj->mainNode()->setPosition( pos ); - if ( rot != Ogre::Quaternion::ZERO ) obj->rotNode()->setOrientation( rot ); + std::string name; readXMLAttribute < std::string >( pElem, "name", name ); + Ogre::Vector3 pos( readXMLVec3Element( pElem, "position" ) ); + Ogre::Quaternion rot( readXMLQuatElement( pElem, "orientation" ) ); + SectorStationObject *obj = createStationObject( name ); + if ( pos != Ogre::Vector3::ZERO ) obj->mainNode()->setPosition( pos ); + if ( rot != Ogre::Quaternion::ZERO ) obj->rotNode()->setOrientation( rot ); } pElem = hRoot.ChildElement( "beacon", 0 ).Element(); @@ -117,7 +306,7 @@ Ogre::Vector3 pos( readXMLVec3Element( pElem, "position" ) ); Ogre::Vector3 dir( readXMLVec3Element( pElem, "direction" ) ); Ogre::Quaternion rot( readXMLQuatElement( pElem, "orientation" ) ); - SectorMeshObject * obj = createBeacon( ); + SectorBeaconObject * obj = createBeaconObject( ); if ( pos != Ogre::Vector3::ZERO ) obj->mainNode()->setPosition( pos ); if ( dir != Ogre::Vector3::ZERO ) obj->mainNode()->setDirection( dir ); if ( rot != Ogre::Quaternion::ZERO ) obj->rotNode()->setOrientation( rot ); @@ -156,69 +345,76 @@ sceneMgr_->setSkyBox( true, name, 10000 ); } -SectorMeshObject * Sector::createMeshObject( const std::string & name, const std::string & meshname ){ - SectorMeshObject * obj = new SectorMeshObject( name, this ); - obj->setMesh( meshname ); - sectorObjects_.insert( obj ); - return obj; +void Sector::createKoordAxis( ){ + koordAxisNode_ = sceneMgr_->getRootSceneNode()->createChildSceneNode( "axisnode" ); + koordAxisMO_ = sceneMgr_->createManualObject( koordAxisNode_->getName()+ "/manualObject" ); + Ogre::Real length = 20; + + koordAxisMO_->begin( "singleColor", Ogre::RenderOperation::OT_LINE_LIST); + koordAxisMO_->getSection( 0 )->setCustomParameter( 0, Ogre::Vector4( 1.0, 0.0, 0.0, 1.0 ) ); + koordAxisMO_->position( 0.0, 0.0, 0.0 ); + koordAxisMO_->position( 1.0, 0.0, 0.0 ); + koordAxisMO_->position( 0.0, 0.0, 0.0 ); + koordAxisMO_->end(); + + koordAxisMO_->begin( "singleColor", Ogre::RenderOperation::OT_LINE_LIST); + koordAxisMO_->getSection( 1 )->setCustomParameter( 0, Ogre::Vector4( 0.0, 1.0, 0.0, 1.0 ) ); + koordAxisMO_->position( 0.0, 1.0, 0.0 ); + koordAxisMO_->position( 0.0, 0.0, 0.0 ); + koordAxisMO_->end(); + + koordAxisMO_->begin( "singleColor", Ogre::RenderOperation::OT_LINE_LIST); + koordAxisMO_->getSection( 2 )->setCustomParameter( 0, Ogre::Vector4( 0.0, 0.0, 1.0, 1.0 ) ); + koordAxisMO_->position( 0.0, 0.0, 1.0 ); + koordAxisMO_->position( 0.0, 0.0, 0.0 ); + koordAxisMO_->end(); + + koordAxisMO_->begin( "BaseWhiteNoLighting", Ogre::RenderOperation::OT_LINE_LIST); + koordAxisMO_->position( -1.0, 0.0, 0.0 ); + koordAxisMO_->position( 0.0, 0.0, 0.0 ); + koordAxisMO_->position( 0.0, -1.0, 0.0 ); + koordAxisMO_->position( 0.0, 0.0, 0.0 ); + koordAxisMO_->position( 0.0, 0.0, -1.0 ); +// koordAxisMO_->line( 0, 1 ); +// koordAxisMO_->line( 0, 2 ); +// koordAxisMO_->line( 0, 3 ); + koordAxisMO_->end(); + koordAxisNode_->attachObject( koordAxisMO_ ); + koordAxisNode_->scale( length, length, length ); } -SectorMeshObject * Sector::createBeacon( ){ - SectorMeshObject * obj = new SectorBeaconObject( this->name() + "/Beacon", this ); - sectorObjects_.insert( obj ); - return obj; -} -SectorMeshObject * Sector::createStation( const Ogre::String & stationName ){ - Station * station = ResourceManager::getSingleton().entityManager->station( stationName ); - SectorMeshObject * obj = NULL; - if ( station ){ - obj = new SectorStationObject( station, this ); - sectorObjects_.insert( obj ); - sectorStations_.insert( dynamic_cast< SectorStationObject * >( obj ) ); - } - return obj; -} -void Sector::createAvatarObject( Avatar & avatar ){ - log_->info( std::string( "Sector::createAvatarObject: " ) + avatar.name() ); - avatar_ = new SectorAvatarObject( avatar.name(), this, avatar.vessel() ); - - sectorObjects_.insert( avatar_ ); - avatar_->reset(); - bool hasStation = false; - if ( !sectorStations_.empty() ){ - SectorStationObject *station = dynamic_cast< SectorStationObject* >( *sectorStations_.begin() ); - log_->info( std::string( "launch avatar from station " ) ); - if ( station->launchPad() ){ - avatar_->mainNode()->setPosition( station->launchPad()->position( true ) + station->launchPad()->direction( true ) * 5.0); - avatar_->mainNode()->setDirection( station->launchPad()->direction( true ) ); - avatar_->setVelocity( station->launchPad()->direction( true ) * 20.0 ); - hasStation = true; - } else { - log_->warn( std::string( "Station " + station->name() + " has no launch pad" ) ); - } - } - if ( !hasStation ) { - log_->info( std::string( "launch avatar from free position " ) ); - avatar_->mainNode()->setPosition( 0.0, 0.0, 0.0 ); - avatar_->mainNode()->setDirection( Ogre::Vector3( 0.0, 0.0, -1.0 ) ); - avatar_->setVelocity( Ogre::Vector3( 0.0, 0.0, 0.0 ) ); - } - avatar_->mainNode()->setVisible( false ); -} - -void Sector::objectDocked( SectorMovableObject * obj, SectorStationObject * station ){ - std::cout << obj->name() << " docked at " << station->name() << std::endl; - switch ( obj->rtti() ){ - case SECTOR_AVATAR_OBJECT_RTTI: - if ( listener_ ) listener_->changeToDockedState(); - break; - default: break; - } -} - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #else #include "Sector.h" Modified: trunk/src/Sector.h =================================================================== --- trunk/src/Sector.h 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/Sector.h 2009-01-25 14:46:55 UTC (rev 977) @@ -54,31 +54,55 @@ /*! Return the name of this sector. Set during population from xml-file */ inline const std::string & name() const { return name_; } - /*! Populate the sector with information from a xml-file, see data/misc/test.sector for an example */ - void populate( const std::string & fileName ); + const std::set< SectorMeshObject * > & sectorMeshObjects() const { return sectorMeshObjects_; } - /*! Define the skybox of the sector */ - void setSkyBox( const std::string & name ); + /*! Return handle to the avatarObject */ + inline SectorAvatarObject * avatarObject() { return avatar_; } - /*! Create a player related avatar */ - void createAvatarObject( Avatar & avatar ); - /*! Create a mesh within the sector, without any specialization */ SectorMeshObject * createMeshObject( const std::string & name, const std::string & meshname ); /*! Create a beacon within the sector */ - SectorMeshObject * createBeacon( ); + SectorBeaconObject * createBeaconObject( ); /*! Create a station within the sector */ - SectorMeshObject * createStation( const Ogre::String & stationName ); + SectorStationObject * createStationObject( const Ogre::String & stationName ); - /*! Return handle to the avatarObject */ - inline SectorAvatarObject * avatarObject() { return avatar_; } + /*! Create a player related avatar */ + SectorAvatarObject * createAvatarObject( Avatar & avatar ); + /*! Create a missle */ + SectorMissileObject * createMissileObject( Missile * misssile ); + + /*! Create an explosion related to a given SectorMeshObject */ + void createExplosion( SectorMeshObject * obj ); + /*! Someone has docked */ void objectDocked( SectorMovableObject * obj, SectorStationObject * station ); + + /*! Populate the sector with information from a xml-file, see data/misc/test.sector for an example */ + void populate( const std::string & fileName ); + + /*! Define the skybox of the sector */ + void setSkyBox( const std::string & name ); + + void createKoordAxis( ); protected: + /*! do not destruct objects manualy, let them send false during update loop */ + void destructCollObject_( SectorCollisionObject * obj ); + + void insertCollObject_( SectorCollisionObject * obj ); + + void removeCollObject_( SectorCollisionObject * obj ); + + void destructMeshObject_( SectorMeshObject * obj ); + + void insertMeshObject_( SectorMeshObject * obj ); + + void removeMeshObject_( SectorMeshObject * obj ); + + Ogre::SceneManager * sceneMgr_; NetworkClient * network_; LogManager * log_; @@ -89,8 +113,12 @@ SectorAvatarObject * avatar_; - /*! Hold all stuff you can collide with in sector */ - std::set< SectorCollisionObject * > sectorObjects_; + /*! Hold all stuff you can collide or can be seen on radar */ + std::set< SectorMeshObject * > sectorMeshObjects_; + + /*! Hold all temporary stuff like explosions or projectiles */ + std::set< SectorCollisionObject * > sectorCollObjects_; + /*! Hold all stuff that makes the sector looking nice */ //std::set< SectorEnvironmentObject * > sectorEnvironment_; @@ -98,6 +126,11 @@ std::set< SectorStationObject * > sectorStations_; std::map< std::string, std::deque< SectorCollisionObject * > > objectHeap_; + + uint childIDCounter_; + + Ogre::SceneNode * koordAxisNode_; + Ogre::ManualObject * koordAxisMO_; }; #else @@ -210,7 +243,7 @@ protected: /*! do not destruct objects manualy, let them send false during update loop */ - void destruct_( SectorObject * obj ); + void destructObject_( SectorObject * obj ); Ogre::SceneManager * sceneMgr_; NetworkClient * network_; Modified: trunk/src/SectorAvatarObject.cpp =================================================================== --- trunk/src/SectorAvatarObject.cpp 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/SectorAvatarObject.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -26,6 +26,8 @@ #include "Moveable.h" #include "OpcodeWrapper.h" #include "ResourceManager.h" +#include "Sector.h" +#include "SectorMissileObject.h" #include "Vessel.h" #include <OgreSceneNode.h> @@ -76,6 +78,18 @@ } } +void SectorAvatarObject::setFirePressed( bool pressed ){ +} + +void SectorAvatarObject::fireMissile( Missile * missile, SectorMeshObject * target ){ + + SectorMissileObject * obj = sector_->createMissileObject( missile ); + obj->setTarget( target ); + obj->mainNode()->setOrientation( mainNode_->getOrientation() ); + obj->mainNode()->setPosition( mainNode_->getPosition() - mainNode_->getOrientation().yAxis() * 3.0 ); + obj->launch(); +} + } //namespace OpenGate Modified: trunk/src/SectorAvatarObject.h =================================================================== --- trunk/src/SectorAvatarObject.h 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/SectorAvatarObject.h 2009-01-25 14:46:55 UTC (rev 977) @@ -59,7 +59,10 @@ // /*! Returns the relative shield. */ // inline Ogre::Real shieldRate() const { if ( maxShield() > 0 ) return (float)shield_ / maxShield(); else return 0.0; } + void setFirePressed( bool pressed ); + void fireMissile( Missile * missile, SectorMeshObject * target = NULL ); + protected: Ogre::Real thrustChange_; Modified: trunk/src/SectorCollisionObject.cpp =================================================================== --- trunk/src/SectorCollisionObject.cpp 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/SectorCollisionObject.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -31,11 +31,31 @@ namespace OpenGate{ SectorCollisionObject::SectorCollisionObject( const std::string & name, Sector * sector, Ogre::SceneNode * parentNode ) - : SectorBaseObject( name, sector, parentNode ), collObj_( NULL ), entity_( NULL ){ + : SectorBaseObject( name, sector, parentNode ), collObj_( NULL ), entity_( NULL ), active_( false ) { } SectorCollisionObject::~SectorCollisionObject( ){ } +void SectorCollisionObject::reset( ){ } + +void SectorCollisionObject::setActive( bool active ){ + active_ = active; + if ( active ){ + activate_(); + if ( ResourceManager::getSingleton().collisionManager ){ + ResourceManager::getSingleton().collisionManager->create( this ); + } + mainNode_->setVisible( true ); + } else { + deactivate_(); + if ( ResourceManager::getSingleton().collisionManager ){ + ResourceManager::getSingleton().collisionManager->destroy( this ); + } + mainNode_->setVisible( false ); + } +} + +} Modified: trunk/src/SectorCollisionObject.h =================================================================== --- trunk/src/SectorCollisionObject.h 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/SectorCollisionObject.h 2009-01-25 14:46:55 UTC (rev 977) @@ -58,9 +58,31 @@ virtual Ogre::Entity * entity(){ return entity_; } //** END GETer/SETer + /*! Reset all values for this object. */ + virtual void reset( ); + + /*! Change active status of this object */ + void setActive( bool active ); + + /*! Return active status of this object */ + inline bool active() const { return active_; } + + /*! Activate this object, make it visible and set collision*/ + inline void activate(){ setActive( true ); } + + /*! Deactivate this object, make it invisible and remove collision*/ + inline void deactivate(){ setActive( false ); } + protected: + + virtual void deactivate_(){} + + virtual void activate_(){} + OgreOpcode::CollisionObject * collObj_; Ogre::Entity * entity_; + + bool active_; }; } //namespace OpenGate Added: trunk/src/SectorExplosionObject.cpp =================================================================== --- trunk/src/SectorExplosionObject.cpp (rev 0) +++ trunk/src/SectorExplosionObject.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -0,0 +1,70 @@ +/*************************************************************************** + * Copyright (C) 2009 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "SectorExplosionObject.h" + +#include "Sector.h" + +#include <OgreParticleEmitter.h> +#include <OgreParticleSystem.h> +#include <OgreSceneManager.h> +#include <OgreSceneNode.h> + +namespace OpenGate{ + +SectorExplosionObject::SectorExplosionObject( const std::string & name, Sector * sector, Ogre::SceneNode * parentNode ) + : SectorCollisionObject( name, sector, parentNode ){ + + explosion_ = sector_->sceneManager()->createParticleSystem( name_ + "/ExplosionSystem", "OpenGate/Explosion" ); + //explosion_ = sceneMgr_->createParticleSystem( name_ + "/ExplosionSystem", "OpenGate/ExplosionStart" ); + mainNode_->attachObject( explosion_ ); +} + +SectorExplosionObject::~SectorExplosionObject( ){ + if ( explosion_ ){ + mainNode_->detachObject( explosion_ ); + sector_->sceneManager()->destroyParticleSystem( explosion_ ); + explosion_ = NULL; + } +} + +void SectorExplosionObject::reset(){ +} + +bool SectorExplosionObject::update( Ogre::Real elapsedTime ){ + explodeSequenceTime_ -= elapsedTime; + + if ( explodeSequenceTime_ < 0.0 ) return false; + return true; +} + +void SectorExplosionObject::activate_(){ + explosion_->getEmitter( 0 )->setEnabled( true ); + explodeSequenceTime_ = explosion_->getEmitter( 0 )->getDuration() + explosion_->getEmitter( 0 )->getMaxTimeToLive(); +} + +void SectorExplosionObject::deactivate_(){ + explosion_->getEmitter( 0 )->setEnabled( false ); +} + +} //namespace OpenGate + + + Added: trunk/src/SectorExplosionObject.h =================================================================== --- trunk/src/SectorExplosionObject.h (rev 0) +++ trunk/src/SectorExplosionObject.h 2009-01-25 14:46:55 UTC (rev 977) @@ -0,0 +1,61 @@ +/*************************************************************************** + * Copyright (C) 2009 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _OPENGATE_SECTOREXPLOSIONOBJECT__H +#define _OPENGATE_SECTOREXPLOSIONOBJECT__H + +#include "Opengate.h" +#include "SectorCollisionObject.h" + +namespace OpenGate{ + +//! An explosion with optional collision +class SectorExplosionObject : public SectorCollisionObject { +public: + /*! Construct SectorObjectBase, */ + SectorExplosionObject( const std::string & name, Sector * sector, Ogre::SceneNode * parentNode = NULL ); + + /*! Default destructor */ + virtual ~SectorExplosionObject( ); + + /*! Abstract method for runtime identification */ + virtual int rtti( ) const { return SECTOR_EXPLOSION_OBJECT_RTTI; } + + /*! Update function */ + virtual bool update( Ogre::Real elapsedTime ); + + /*! Method for collision handling, called during a collision by opcodewrapper */ + virtual void collide( SectorCollisionObject * object ){} + + virtual void reset(); + +protected: + virtual void activate_(); + virtual void deactivate_(); + + Ogre::ParticleSystem * explosion_; + Ogre::Real explodeSequenceTime_; +}; + +} //namespace OpenGate + +#endif //_OPENGATE_SECTOREXPLOSIONOBJECT__H + + Modified: trunk/src/SectorMeshObject.cpp =================================================================== --- trunk/src/SectorMeshObject.cpp 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/SectorMeshObject.cpp 2009-01-25 14:46:55 UTC (rev 977) @@ -32,17 +32,15 @@ namespace OpenGate{ SectorMeshObject::SectorMeshObject( const std::string & name, Sector * sector, Ogre::SceneNode * parentNode ) - : SectorCollisionObject( name, sector, parentNode ) { + : SectorCollisionObject( name, sector, parentNode ), target_( NULL ){ entityScaleNode_ = mainNode_->createChildSceneNode( mainNode_->getName() + "/scale" ); entityRotNode_ = entityScaleNode_->createChildSceneNode( entityScaleNode_->getName() + "/rot" ); } SectorMeshObject::~SectorMeshObject( ){ + this->deactivate(); - if ( ResourceManager::getSingleton().collisionManager ){ - ResourceManager::getSingleton().collisionManager->destroy( collObj_ ); - } if ( entity_ ) sector_->sceneManager()->destroyEntity( entity_ ); entityRotNode_->detachAllObjects(); entityScaleNode_->removeAndDestroyChild( entityRotNode_->getName() ); @@ -68,12 +66,14 @@ } entityRotNode_->attachObject( entity_ ); + this->activate(); + +} - if ( ResourceManager::getSingleton().collisionManager ){ - ResourceManager::getSingleton().collisionManager->create( this ); - } +void SectorMeshObject::setBaseScale( const Ogre::Real & scale ){ + if ( scale > 1e-4 ) entityScaleNode_->scale( Ogre::Vector3( scale, scale, scale) ); } - + void SectorMeshObject::setBaseRot( const Ogre::Real & yaw, const Ogre::Real & pitch, const Ogre::Real & roll ){ if ( fabs( yaw ) >1e-4 ||fabs( pitch ) >1e-4 || fabs( roll ) >1e-4 ){ std::cout << "SectorObject::setBaseRot " << name_ << yaw @@ -132,6 +132,36 @@ // baseSize_ = size; // baseScale_ = scale; } + +void SectorMeshObject::explode() { + sector_->createExplosion( this ); + this->setDestroyRequest(); +} + +void SectorMeshObject::setTarget( SectorMeshObject * target ){ + this->looseTarget( ); + + if ( target ){ + target_ = target; + target_->addObserver( this ); + } +} + +void SectorMeshObject::looseTarget( ){ + if ( target_ ){ + target_->delObserver( this ); + target_ = NULL; + } +} +void SectorMeshObject::unsubscribeToObservers(){ + std::for_each( observers_.begin(), observers_.end(), std::mem_fun( &SectorMeshObject::looseTarget ) ); + //std::cout << "SectorObject::unsubscribeToObservers(): " << name_ << " " << observers_.size() << std::endl; +// for ( std::set < SectorObject * >::iterator it = observers_.begin(); it != observers_.end();){ +// (*it++)->looseTarget( ); +// } + + //std::cout << "SectorObject::unsubscribeToObservers(): " << observers_.size() << std::endl; +} } Modified: trunk/src/SectorMeshObject.h =================================================================== --- trunk/src/SectorMeshObject.h 2009-01-25 14:37:53 UTC (rev 976) +++ trunk/src/SectorMeshObject.h 2009-01-25 14:46:55 UTC (rev 977) @@ -26,7 +26,7 @@ namespace OpenGate{ -/*! Baseclass for SectorObjects with Ogre::Meshs. */ +/*! Baseclass for SectorObjects with Ogre::Meshs. SectorMeshObject can by selected */ class SectorMeshObject : public SectorCollisionObject {... [truncated message content] |