1
0
Fork 0

Merge branch 'master' of gitorious.org:fg/fgdata

This commit is contained in:
Erik Hofman 2012-01-05 11:06:54 +01:00
commit 36efe1c8ec
6 changed files with 61 additions and 4802 deletions

View file

@ -24,6 +24,8 @@
<target-framerate type="double" userarchive="y">25.0</target-framerate>
<large-scale-persistence type="double" userarchive="y">1.0</large-scale-persistence>
<small-scale-persistence type="double" userarchive="y">0.0</small-scale-persistence>
<ground-haze-factor type="double" userarchive="y">1.0</ground-haze-factor>
<max-vis-range-m type="double" userarchive="y">120000.0</max-vis-range-m>
</config>
<tmp>
<tile-management type="string" userarchive="y">realistic weather</tile-management>

View file

@ -134,7 +134,6 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
return 1;
}
menuEnable("autopilot", isAutopilotMenuEnabled() );
menuEnable("multiplayer", multiplayer.is_active());
menuEnable("joystick-info", size(props.globals.getNode("/input/joysticks").getChildren("js")));
# frame-per-second display

File diff suppressed because it is too large Load diff

View file

@ -4754,7 +4754,7 @@ setprop(lw~"effect-volumes/number-active-turb",0);
setprop(lw~"effect-volumes/number-active-lift",0);
setprop(lw~"effect-volumes/number-active-sat",0);
setprop(lw~"config/max-vis-range-m", 120000.0);
# setprop(lw~"config/max-vis-range-m", 120000.0);
setprop(lw~"config/temperature-offset-degc", 0.0);
# create properties for tile management

View file

@ -8,14 +8,11 @@
#
# 3) Allow chat messages to be written by the user.
var is_active = func getprop("/sim/multiplay/txport") or getprop("/sim/multiplay/rxport");
var lastmsg = {};
var ignore = {};
var msg_loop_id = 0;
var msg_timeout = 0;
var log_file = nil;
var check_messages = func(loop_id) {
if (loop_id != msg_loop_id) return;
@ -73,35 +70,6 @@ var chat_listener = func(n)
}
}
settimer(func {
if (is_active()) {
if (getprop("/sim/multiplay/write-message-log")) {
var ac = getprop("/sim/aircraft");
var cs = getprop("/sim/multiplay/callsign");
var apt = airportinfo().id;
var t = props.globals.getNode("/sim/time/real").getValues();
var file = string.normpath(getprop("/sim/fg-home") ~ "/mp-message.log");
var f = io.open(file, "a");
io.write(f, sprintf("\n===== %s %04d/%02d/%02d\t%s\t%s\t%s\n",
["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][t.weekday],
t.year, t.month, t.day, apt, ac, cs));
setlistener("/sim/signals/exit", func io.write(f, "=====\n") and io.close(f));
setlistener("/sim/messages/mp-plane", func(n) {
io.write(f, sprintf("%02d:%02d %s\n",
getprop("/sim/time/real/hour"),
getprop("/sim/time/real/minute"),
n.getValue()));
io.flush(f);
});
}
check_messages(msg_loop_id += 1);
}
# Call-back to ensure we see our own messages.
setlistener("/sim/multiplay/chat", chat_listener);
}, 1);
# Message composition function, activated using the - key.
@ -469,7 +437,40 @@ var model = {
},
};
_setlistener("/sim/signals/nasal-dir-initialized", func {
_setlistener("sim/signals/nasal-dir-initialized", func model.init());
model.init();
setlistener("/sim/multiplay/online", func(n) {
if (n.getBoolValue()) {
if (getprop("/sim/multiplay/write-message-log")) {
var ac = getprop("/sim/aircraft");
var cs = getprop("/sim/multiplay/callsign");
var apt = airportinfo().id;
var t = props.globals.getNode("/sim/time/real").getValues();
if (log_file == nil) {
var file = string.normpath(getprop("/sim/fg-home") ~ "/mp-message.log");
log_file = io.open(file, "a");
io.write(log_file, sprintf("\n===== %s %04d/%02d/%02d\t%s\t%s\t%s\n",
["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][t.weekday],
t.year, t.month, t.day, apt, ac, cs));
setlistener("/sim/signals/exit", func io.write(log_file, "=====\n") and io.close(log_file));
setlistener("/sim/messages/mp-plane", func(n) {
io.write(log_file, sprintf("%02d:%02d %s\n",
getprop("/sim/time/real/hour"),
getprop("/sim/time/real/minute"),
n.getValue()));
io.flush(log_file);
});
}
}
check_messages(msg_loop_id += 1);
}
}, 1, 0);
# Call-back to ensure we see our own messages.
setlistener("/sim/multiplay/chat", chat_listener);
});

View file

@ -42,10 +42,8 @@
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<default>1</default>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
@ -66,6 +64,11 @@
<halign>left</halign>
<property>/sim/multiplay/callsign</property>
</input>
<text>
<row>0</row><col>2</col>
<halign>left</halign>
<label>(requires reconnect)</label>
</text>
<text>
<row>1</row><col>0</col>
<halign>right</halign>
@ -74,6 +77,7 @@
<combo>
<name>host</name>
<row>1</row><col>1</col>
<colspan>2</colspan>
<pref-width>350</pref-width>
<property>/sim/multiplay/selected-server</property>
<editable>false</editable>
@ -90,7 +94,6 @@
<value>mpserver12.flightgear.org (Amsterdam, Netherlands)</value>
<value>mpserver13.flightgear.org (Grenoble, France)</value>
</combo>
<!-- status area -->
<text>
<visible>
@ -124,6 +127,7 @@
<button>
<legend>Connect</legend>
<equal>true</equal>
<enable>
<not>
<property>/sim/multiplay/online</property>
@ -140,6 +144,10 @@
# the hostname and the comment.
server = split(" ", server)[0];
setprop("/sim/multiplay/txhost", server);
# Standard port is 5000
setprop("/sim/multiplay/txport", 5000);
setprop("/sim/multiplay/rxport", 5000);
</script>
</binding>
<binding>
@ -149,6 +157,7 @@
</button>
<button>
<legend>Disconnect</legend>
<equal>true</equal>
<enable>
<property>/sim/multiplay/online</property>
</enable>
@ -158,7 +167,7 @@
<binding>
<command>nasal</command>
<script>
setprop("/sim/multiplay/txhost", "0.0.0.0");
setprop("/sim/multiplay/txhost", "");
</script>
</binding>
<binding>
@ -166,8 +175,17 @@
<subsystem>mp</subsystem>
</binding>
</button>
<button>
<row>1</row><col>2</col>
<legend>Server Status</legend>
<binding>
<command>open-browser</command>
<path>http://mpmap01.flightgear.org/mpstatus/</path>
</binding>
</button>
<button>
<legend>Close</legend>
<default>true</default>
<equal>true</equal>
<binding>
<command>dialog-close</command>