From: <sv...@ww...> - 2007-06-14 05:09:25
|
Author: stormbringer Date: 2006-10-13 11:36:26 -0700 (Fri, 13 Oct 2006) New Revision: 2000 Modified: trunk/csp/bin/test_objects Log: Correct initial position of F16 to avoid budding out of the ground. Thanks Henrik! Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2000 Modified: trunk/csp/bin/test_objects =================================================================== --- trunk/csp/bin/test_objects 2006-10-04 03:58:40 UTC (rev 1999) +++ trunk/csp/bin/test_objects 2006-10-13 18:36:26 UTC (rev 2000) @@ -1,55 +1,55 @@ -# -*- python -*- - -# Combat Simulator Project -# Copyright (C) 2002 The Combat Simulator Project -# http://csp.sourceforge.net -# -# 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. - - -# Create some test vehicles and other objects. The first vehicle created -# will be the initial active object. This is a temporary hack until the -# theater code is developed to the point that objects are generated -# automatically via a campaign engine. - -# shorthand - -vec = csp.csplib.Vector3 -vehicle = sim.createVehicle - -m2k = "sim:vehicles.aircraft.m2k" -f16dj = "sim:vehicles.aircraft.f16dj" - - -def createBalkan(): - vehicle(f16dj, vec(-29495, -10530, 87.8), vec(0, 0, 0), vec(0.0, 0.0, 180.0)) - vehicle(f16dj, vec(-29510, -10530, 87.8), vec(0, 0, 0), vec(0.0, 0.0, 180.0)) - -def createNCA(): - vehicle(m2k, vec(0, 0, 1200.0), vec(0, 100.0, 0), vec(5.0, 0.0, 0.0)) - vehicle(f16dj, vec(10, 10, 1000.2), vec(0, 100.0, 0), vec(2.0, 2.0, 140.0)) - -def unknown(): - print "Unrecognized terrain name: %s" % sim.getTerrainName() - - -dispatch = { - "Balkan Terrain": createBalkan, - "NCA Terrain": createNCA, -} - -create = dispatch.get(sim.getTerrainName(), unknown) -create() - +# -*- python -*- + +# Combat Simulator Project +# Copyright (C) 2002 The Combat Simulator Project +# http://csp.sourceforge.net +# +# 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. + + +# Create some test vehicles and other objects. The first vehicle created +# will be the initial active object. This is a temporary hack until the +# theater code is developed to the point that objects are generated +# automatically via a campaign engine. + +# shorthand + +vec = csp.csplib.Vector3 +vehicle = sim.createVehicle + +m2k = "sim:vehicles.aircraft.m2k" +f16dj = "sim:vehicles.aircraft.f16dj" + + +def createBalkan(): + vehicle(f16dj, vec(-29495, -10530, 91.1), vec(0, 0, 0), vec(0.0, 0.0, 180.0)) + vehicle(f16dj, vec(-29510, -10530, 91.1), vec(0, 0, 0), vec(0.0, 0.0, 180.0)) + +def createNCA(): + vehicle(m2k, vec(0, 0, 1200.0), vec(0, 100.0, 0), vec(5.0, 0.0, 0.0)) + vehicle(f16dj, vec(10, 10, 1000.2), vec(0, 100.0, 0), vec(2.0, 2.0, 140.0)) + +def unknown(): + print "Unrecognized terrain name: %s" % sim.getTerrainName() + + +dispatch = { + "Balkan Terrain": createBalkan, + "NCA Terrain": createNCA, +} + +create = dispatch.get(sim.getTerrainName(), unknown) +create() + |