Merge branch 'master' of gitorious.org:fg/fgdata
BIN
Aircraft/Generic/Effects/CubeCrosses/carribean.png
Normal file
After Width: | Height: | Size: 268 KiB |
BIN
Aircraft/Generic/Effects/CubeCrosses/real_fairsky.png
Normal file
After Width: | Height: | Size: 672 KiB |
BIN
Aircraft/Generic/Effects/CubeCrosses/sunrise.png
Normal file
After Width: | Height: | Size: 260 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/carribean/1.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/carribean/2.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/carribean/3.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/carribean/4.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/carribean/5.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/carribean/6.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/fgfs-sky/1.png
Normal file
After Width: | Height: | Size: 746 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/fgfs-sky/2.png
Normal file
After Width: | Height: | Size: 492 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/fgfs-sky/3.png
Normal file
After Width: | Height: | Size: 701 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/fgfs-sky/4.png
Normal file
After Width: | Height: | Size: 840 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/fgfs-sky/5.png
Normal file
After Width: | Height: | Size: 743 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/fgfs-sky/6.png
Normal file
After Width: | Height: | Size: 178 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/gimp-sky/1.png
Normal file
After Width: | Height: | Size: 170 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/gimp-sky/2.png
Normal file
After Width: | Height: | Size: 167 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/gimp-sky/3.png
Normal file
After Width: | Height: | Size: 194 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/gimp-sky/4.png
Normal file
After Width: | Height: | Size: 193 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/gimp-sky/5.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/gimp-sky/6.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_nx.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_ny.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_nz.png
Normal file
After Width: | Height: | Size: 127 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_px.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_py.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_pz.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_nx.png
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_ny.png
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_nz.png
Normal file
After Width: | Height: | Size: 129 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_px.png
Normal file
After Width: | Height: | Size: 110 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_py.png
Normal file
After Width: | Height: | Size: 110 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_pz.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/sunrise/1.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/sunrise/2.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/sunrise/3.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/sunrise/4.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/sunrise/5.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
Aircraft/Generic/Effects/CubeMaps/sunrise/6.png
Normal file
After Width: | Height: | Size: 19 KiB |
|
@ -1,15 +1,15 @@
|
|||
###############################################################################
|
||||
## $Id$
|
||||
##
|
||||
## A message based information broadcast for the multiplayer network.
|
||||
##
|
||||
## Copyright (C) 2008 - 2009 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
## Copyright (C) 2008 - 2010 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
## This file is licensed under the GPL license version 2 or later.
|
||||
##
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Broadcast primitive using a MP enabled string property.
|
||||
# Broadcasts from users in multiplayer.ignore are ignored.
|
||||
#
|
||||
# BroadcastChannel.new(mpp_path, process)
|
||||
# Create a new broadcast primitive. Any MP user with the same
|
||||
|
@ -101,7 +101,9 @@ BroadcastChannel.update = func {
|
|||
props.globals.getNode("/ai/models").getChildren("multiplayer");
|
||||
foreach (var pilot; mpplayers) {
|
||||
if ((pilot.getChild("valid") != nil) and
|
||||
pilot.getChild("valid").getValue()) {
|
||||
pilot.getChild("valid").getValue() and
|
||||
!contains(multiplayer.ignore,
|
||||
pilot.getChild("callsign").getValue())) {
|
||||
if ((me.peers[pilot.getIndex()] == nil) and
|
||||
me.accept_predicate(pilot)) {
|
||||
me.peers[pilot.getIndex()] =
|
||||
|
@ -110,8 +112,10 @@ BroadcastChannel.update = func {
|
|||
MessageChannel.new_message_handler(process_msg, pilot));
|
||||
}
|
||||
} else {
|
||||
delete(me.peers, pilot.getIndex());
|
||||
me.on_disconnect(pilot);
|
||||
if (contains(me.peers, pilot.getIndex())) {
|
||||
delete(me.peers, pilot.getIndex());
|
||||
me.on_disconnect(pilot);
|
||||
}
|
||||
}
|
||||
}
|
||||
me.last_time = t;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
###############################################################################
|
||||
## $Id$
|
||||
##
|
||||
## A cellular automaton forest fire model with the ability to
|
||||
## spread over the multiplayer network.
|
||||
##
|
||||
## Copyright (C) 2007 - 2009 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
## Copyright (C) 2007 - 2010 Anders Gidenstam (anders(at)gidenstam.org)
|
||||
## This file is licensed under the GPL license version 2 or later.
|
||||
##
|
||||
###############################################################################
|
||||
|
@ -21,6 +20,9 @@ var trace = func {}
|
|||
# Where to save fire event logs.
|
||||
var SAVEDIR = getprop("/sim/fg-home") ~ "/Wildfire/";
|
||||
|
||||
# Maximum number of ignite events a single user can send per second.
|
||||
var MAX_IGNITE_RATE = 0.25;
|
||||
|
||||
###############################################################################
|
||||
## External API
|
||||
|
||||
|
@ -132,6 +134,7 @@ var fire_LOD_pp = "environment/wildfire/models/fire-lod";
|
|||
var smoke_LOD_pp = "environment/wildfire/models/smoke-lod";
|
||||
var LOD_High = 20;
|
||||
var LOD_Low = 80;
|
||||
var mp_last_limited_event = {}; # source : time
|
||||
|
||||
var score = { extinguished : 0, protected : 0, waste : 0 };
|
||||
var old_score = { extinguished : 0, protected : 0, waste : 0 };
|
||||
|
@ -189,10 +192,19 @@ var foam_drop_msg = func (pos, radius, volume) {
|
|||
|
||||
var parse_msg = func (source, msg) {
|
||||
if (!getprop(MP_share_pp)) return;
|
||||
var cur_time = systime();
|
||||
var type = Binary.decodeByte(substr(msg, 5));
|
||||
if (type == 1) {
|
||||
var pos = Binary.decodeCoord(substr(msg, 6));
|
||||
ignite(pos, 0);
|
||||
var i = source.getIndex();
|
||||
if (!contains(mp_last_limited_event, i) or
|
||||
(cur_time - mp_last_limited_event[i]) > 1/MAX_IGNITE_RATE) {
|
||||
var pos = Binary.decodeCoord(substr(msg, 6));
|
||||
ignite(pos, 0);
|
||||
} else {
|
||||
printlog("warn", "wildfire.nas: Ignored ignite event from " ~
|
||||
source.getNode("callsign").getValue());
|
||||
}
|
||||
mp_last_limited_event[i] = cur_time;
|
||||
}
|
||||
if (type == 2) {
|
||||
var pos = Binary.decodeCoord(substr(msg, 6));
|
||||
|
|
|
@ -1,92 +1,92 @@
|
|||
<?xml version="1.0"?>
|
||||
<PropertyList>
|
||||
|
||||
<name>pushback</name>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<nasal>
|
||||
<open>
|
||||
var pushback_position = aircraft.door.new("sim/model/pushback", 10.0);
|
||||
pushback_position.setpos(pushback_position.getpos());
|
||||
props.globals.getNode("/sim/model/pushback/enabled", 1 ).setBoolValue(1);
|
||||
props.globals.initNode("/sim/model/pushback/target-speed-fps", 0.0 );
|
||||
</open>
|
||||
<close>
|
||||
pushback_position.setpos(0);
|
||||
setprop("/sim/model/pushback/enabled", 0 );
|
||||
setprop("/sim/model/pushback/target-speed-fps", 0 );
|
||||
</close>
|
||||
</nasal>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<text>
|
||||
<label>Pushback</label>
|
||||
</text>
|
||||
|
||||
<empty>
|
||||
<stretch>true</stretch>
|
||||
</empty>
|
||||
|
||||
<button>
|
||||
<legend/>
|
||||
<key>Esc</key>
|
||||
<pref-width>16</pref-width>
|
||||
<pref-height>16</pref-height>
|
||||
<border>2</border>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<stretch>true</stretch>
|
||||
<layout>vbox</layout>
|
||||
<halign>center</halign>
|
||||
<valign>top</valign>
|
||||
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label>(Dis)Connect pushback</label>
|
||||
<property>/sim/model/pushback/position-norm</property>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>pushback_position.toggle();</script>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<text>
|
||||
<label>Speed:</label>
|
||||
</text>
|
||||
|
||||
<slider>
|
||||
<row>0</row>
|
||||
<col>2</col>
|
||||
<min>-25</min> <!-- +/- 15kts -->
|
||||
<max>25</max>
|
||||
<property>/sim/model/pushback/target-speed-fps</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</slider>
|
||||
|
||||
<text>
|
||||
<pref-width>16</pref-width>
|
||||
<property>/sim/model/pushback/target-speed-fps</property>
|
||||
<format>%2.0f</format>
|
||||
<live>true</live>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<label>fps</label>
|
||||
</text>
|
||||
|
||||
</group>
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<PropertyList>
|
||||
|
||||
<name>pushback</name>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<nasal>
|
||||
<open>
|
||||
var pushback_position = aircraft.door.new("sim/model/pushback", 10.0);
|
||||
pushback_position.setpos(pushback_position.getpos());
|
||||
props.globals.getNode("/sim/model/pushback/enabled", 1 ).setBoolValue(1);
|
||||
props.globals.initNode("/sim/model/pushback/target-speed-fps", 0.0 );
|
||||
</open>
|
||||
<close>
|
||||
pushback_position.setpos(0);
|
||||
setprop("/sim/model/pushback/enabled", 0 );
|
||||
setprop("/sim/model/pushback/target-speed-fps", 0 );
|
||||
</close>
|
||||
</nasal>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<text>
|
||||
<label>Pushback</label>
|
||||
</text>
|
||||
|
||||
<empty>
|
||||
<stretch>true</stretch>
|
||||
</empty>
|
||||
|
||||
<button>
|
||||
<legend/>
|
||||
<key>Esc</key>
|
||||
<pref-width>16</pref-width>
|
||||
<pref-height>16</pref-height>
|
||||
<border>2</border>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<stretch>true</stretch>
|
||||
<layout>vbox</layout>
|
||||
<halign>center</halign>
|
||||
<valign>top</valign>
|
||||
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label>(Dis)Connect pushback</label>
|
||||
<property>/sim/model/pushback/position-norm</property>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>pushback_position.toggle();</script>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<text>
|
||||
<label>Speed:</label>
|
||||
</text>
|
||||
|
||||
<slider>
|
||||
<row>0</row>
|
||||
<col>2</col>
|
||||
<min>-25</min> <!-- +/- 15kts -->
|
||||
<max>25</max>
|
||||
<property>/sim/model/pushback/target-speed-fps</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</slider>
|
||||
|
||||
<text>
|
||||
<pref-width>16</pref-width>
|
||||
<property>/sim/model/pushback/target-speed-fps</property>
|
||||
<format>%2.0f</format>
|
||||
<live>true</live>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<label>fps</label>
|
||||
</text>
|
||||
|
||||
</group>
|
||||
|
||||
</group> </PropertyList>
|