You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(140) |
Feb
(98) |
Mar
(152) |
Apr
(104) |
May
(71) |
Jun
(94) |
Jul
(169) |
Aug
(83) |
Sep
(47) |
Oct
(134) |
Nov
(7) |
Dec
(20) |
2004 |
Jan
(41) |
Feb
(14) |
Mar
(42) |
Apr
(47) |
May
(68) |
Jun
(143) |
Jul
(65) |
Aug
(29) |
Sep
(40) |
Oct
(34) |
Nov
(33) |
Dec
(97) |
2005 |
Jan
(29) |
Feb
(30) |
Mar
(9) |
Apr
(37) |
May
(13) |
Jun
(31) |
Jul
(22) |
Aug
(23) |
Sep
|
Oct
(37) |
Nov
(34) |
Dec
(117) |
2006 |
Jan
(48) |
Feb
(6) |
Mar
(2) |
Apr
(71) |
May
(10) |
Jun
(16) |
Jul
(7) |
Aug
(1) |
Sep
(14) |
Oct
(17) |
Nov
(25) |
Dec
(26) |
2007 |
Jan
(8) |
Feb
(2) |
Mar
(7) |
Apr
(26) |
May
|
Jun
(12) |
Jul
(30) |
Aug
(14) |
Sep
(9) |
Oct
(4) |
Nov
(7) |
Dec
(6) |
2008 |
Jan
(10) |
Feb
(10) |
Mar
(6) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(18) |
Aug
(15) |
Sep
(16) |
Oct
(5) |
Nov
(3) |
Dec
(10) |
2009 |
Jan
(11) |
Feb
(2) |
Mar
|
Apr
(15) |
May
(31) |
Jun
(18) |
Jul
(11) |
Aug
(26) |
Sep
(52) |
Oct
(17) |
Nov
(4) |
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ww...> - 2004-12-31 23:53:47
|
Author: delta Date: 2004-12-31 15:53:37 -0800 (Fri, 31 Dec 2004) New Revision: 1428 Modified: trunk/CSP/CSPChunkLod/VisualStudio/VisualStudio.vcproj trunk/CSP/CSPChunkLod/include/osgChunkLod/ChunkLod trunk/CSP/CSPChunkLod/src/osgChunkLod/ChunkLod.cpp trunk/CSP/CSPChunkLod/src/osgChunkLod/RegisterCombinerDetails.cpp Log: * Sync with the new dev pack. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1428 Diff omitted (14283 bytes). |
From: <sv...@ww...> - 2004-12-31 23:52:29
|
Author: delta Date: 2004-12-31 15:52:19 -0800 (Fri, 31 Dec 2004) New Revision: 1427 Modified: trunk/CSP/Demeter/CHANGES.current trunk/CSP/Demeter/DemeterVisualC6.vcproj Log: Linked the debug build against OpenThreadsWin32d.lib. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1427 Modified: trunk/CSP/Demeter/CHANGES.current =================================================================== --- trunk/CSP/Demeter/CHANGES.current 2004-12-31 23:47:52 UTC (rev 1426) +++ trunk/CSP/Demeter/CHANGES.current 2004-12-31 23:52:19 UTC (rev 1427) @@ -1,6 +1,9 @@ Version 0.3.2 (in progress) =========================== +2005-01-01: delta + Linked the debug build against OpenThreadsWin32d.lib. + 2004-12-23: delta Demeter is linked against osg which, since 0.9.8 depends on OpenThreads. Modified: trunk/CSP/Demeter/DemeterVisualC6.vcproj =================================================================== --- trunk/CSP/Demeter/DemeterVisualC6.vcproj 2004-12-31 23:47:52 UTC (rev 1426) +++ trunk/CSP/Demeter/DemeterVisualC6.vcproj 2004-12-31 23:52:19 UTC (rev 1427) @@ -40,7 +40,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="SDL_image.lib SDL.lib osgd.lib opengl32.lib glu32.lib" + AdditionalDependencies="OpenThreadsWin32d.lib SDL_image.lib SDL.lib osgd.lib opengl32.lib glu32.lib" OutputFile="../CSPSim/Bin/DemeterVisualC6d.dll" LinkIncremental="2" SuppressStartupBanner="TRUE" |
From: <sv...@ww...> - 2004-12-31 23:48:02
|
Author: delta Date: 2004-12-31 15:47:52 -0800 (Fri, 31 Dec 2004) New Revision: 1426 Modified: trunk/CSP/IndexServer/VisualStudio2003/IndexServer.vcproj Log: * Updated vcproj in sync with the new dev-pack. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1426 Modified: trunk/CSP/IndexServer/VisualStudio2003/IndexServer.vcproj =================================================================== --- trunk/CSP/IndexServer/VisualStudio2003/IndexServer.vcproj 2004-12-31 22:57:07 UTC (rev 1425) +++ trunk/CSP/IndexServer/VisualStudio2003/IndexServer.vcproj 2004-12-31 23:47:52 UTC (rev 1426) @@ -19,6 +19,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../SimData/Include;../.." + PreprocessorDefinitions="PTHREADS_WIN" RuntimeLibrary="3" RuntimeTypeInfo="TRUE" ExpandAttributedSource="TRUE" @@ -75,6 +76,7 @@ OptimizeForProcessor="0" OptimizeForWindowsApplication="FALSE" AdditionalIncludeDirectories="../../SimData/Include;../.." + PreprocessorDefinitions="PTHREADS_WIN" RuntimeLibrary="2" EnableEnhancedInstructionSet="0" RuntimeTypeInfo="TRUE" @@ -84,7 +86,7 @@ Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" - AdditionalDependencies="ws2_32.lib pthreadVC.lib SpatialIndex.lib SimNet.lib _cSimData.lib ccgnu2.lib SimCore.lib" + AdditionalDependencies="ws2_32.lib pthreadVC1.lib SpatialIndex.lib SimNet.lib _cSimData.lib ccgnu2.lib SimCore.lib" OutputFile="../$(ProjectName).exe" LinkIncremental="0" AdditionalLibraryDirectories="../../SpatialIndex/.bin;../../SimNet/.bin;../../SimData/SimData;../../SimCore/.bin"/> |
From: <sv...@ww...> - 2004-12-31 22:57:18
|
Author: delta Date: 2004-12-31 14:57:07 -0800 (Fri, 31 Dec 2004) New Revision: 1425 Modified: trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj Log: * Updated SimNet.vcproj synced with the new dev-pack (containing osg0.9.8-2). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1425 Modified: trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj =================================================================== --- trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj 2004-12-31 22:31:06 UTC (rev 1424) +++ trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj 2004-12-31 22:57:07 UTC (rev 1425) @@ -20,7 +20,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../..;../../SimData/Include" - PreprocessorDefinitions="WIN32" + PreprocessorDefinitions="PTHREADS_WIN;WIN32" RuntimeLibrary="3" RuntimeTypeInfo="TRUE" WarningLevel="4" @@ -64,7 +64,7 @@ FavorSizeOrSpeed="1" OptimizeForWindowsApplication="TRUE" AdditionalIncludeDirectories="../..;../../SimData/Include" - PreprocessorDefinitions="WIN32" + PreprocessorDefinitions="PTHREADS_WIN;WIN32" RuntimeLibrary="2" RuntimeTypeInfo="TRUE" WarningLevel="3"/> |
From: <sv...@ww...> - 2004-12-31 22:31:16
|
Author: delta Date: 2004-12-31 14:31:06 -0800 (Fri, 31 Dec 2004) New Revision: 1424 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Thread.h Log: * Typo in Task:ThreadId::operator&&. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1424 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-12-31 21:37:13 UTC (rev 1423) +++ trunk/CSP/SimData/CHANGES.current 2004-12-31 22:31:06 UTC (rev 1424) @@ -6,7 +6,7 @@ A small wrapper for Task:ThreadId is provided to garanty compatibility with this new version. This change is enabled when defining PTHREADS_WIN which should leave safe the GNU/Linux version. Also, the pthreads binaries - have been renamed pthreadVC1.* + have been renamed pthreadVC1. 2004-12-12: delta * Fixed a few warnings in Random.h under msvc. Hopefully gcc Modified: trunk/CSP/SimData/Include/SimData/Thread.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Thread.h 2004-12-31 21:37:13 UTC (rev 1423) +++ trunk/CSP/SimData/Include/SimData/Thread.h 2004-12-31 22:31:06 UTC (rev 1424) @@ -159,7 +159,7 @@ return !(*this == i); } bool operator&&(bool other) const { - return (*this == 0) && other; + return (*this != 0) && other; } }; #endif |
From: <sv...@ww...> - 2004-12-31 21:37:25
|
Author: delta Date: 2004-12-31 13:37:13 -0800 (Fri, 31 Dec 2004) New Revision: 1423 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Thread.h trunk/CSP/SimData/VisualStudio2003/SimData.vcproj Log: * Latest version of pthreads for win changed the type of pthread_t. A small wrapper for Task:ThreadId is provided to garanty compatibility with this new version. This change is enabled when defining PTHREADS_WIN which should leave safe the GNU/Linux version. Also, the pthreads binaries have been renamed pthreadVC1. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1423 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-12-31 20:47:29 UTC (rev 1422) +++ trunk/CSP/SimData/CHANGES.current 2004-12-31 21:37:13 UTC (rev 1423) @@ -1,6 +1,13 @@ Version 0.4.0 (in progress) =========================== +2004-12-23: delta + * Latest version of pthreads for win changed the type of pthread_t. + A small wrapper for Task:ThreadId is provided to garanty compatibility + with this new version. This change is enabled when defining PTHREADS_WIN + which should leave safe the GNU/Linux version. Also, the pthreads binaries + have been renamed pthreadVC1.* + 2004-12-12: delta * Fixed a few warnings in Random.h under msvc. Hopefully gcc won't complain. Modified: trunk/CSP/SimData/Include/SimData/Thread.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Thread.h 2004-12-31 20:47:29 UTC (rev 1422) +++ trunk/CSP/SimData/Include/SimData/Thread.h 2004-12-31 21:37:13 UTC (rev 1423) @@ -139,7 +139,30 @@ friend class BaseThread; public: +#ifndef PTHREADS_WIN typedef pthread_t ThreadId; +#else + // small wrapper for pthreads win dated 11-22-2004 + struct ThreadId: public pthread_t { + ThreadId(unsigned int i) {x = i;} + ThreadId& operator=(const pthread_t& other) { + if (this != &other) { + x = other.x; + p = other.p; + } + return *this; + } + bool operator==(unsigned int i) const { + return x == i; + } + bool operator!=(unsigned int i) const { + return !(*this == i); + } + bool operator&&(bool other) const { + return (*this == 0) && other; + } + }; +#endif protected: /** Entry point for a new thread. @@ -256,6 +279,11 @@ ThreadCondition m_exit; }; +#ifdef PTHREADS_WIN +inline bool operator&&(bool lhs,const Task::ThreadId& rhs) { + return rhs.operator&&(lhs); +} +#endif /** Base class for wrapping a Posix thread. * Modified: trunk/CSP/SimData/VisualStudio2003/SimData.vcproj =================================================================== --- trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-12-31 20:47:29 UTC (rev 1422) +++ trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-12-31 21:37:13 UTC (rev 1423) @@ -30,7 +30,7 @@ OptimizeForProcessor="0" OptimizeForWindowsApplication="TRUE" AdditionalIncludeDirectories="../Include,$(PYTHON_PATH)/include" - PreprocessorDefinitions="NDEBUG;_USRDLL;SIMDATA_EXPORTS" + PreprocessorDefinitions="PTHREADS_WIN;NDEBUG;_USRDLL;SIMDATA_EXPORTS" StringPooling="TRUE" RuntimeLibrary="2" BufferSecurityCheck="FALSE" @@ -53,7 +53,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="pthreadVC.lib" + AdditionalDependencies="pthreadVC1.lib" OutputFile="../SimData/_cSimData.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" @@ -110,7 +110,7 @@ Optimization="0" EnableIntrinsicFunctions="TRUE" AdditionalIncludeDirectories="../Include,$(PYTHON_PATH)/include" - PreprocessorDefinitions="_DEBUG;_USRDLL;SIMDATA_EXPORTS" + PreprocessorDefinitions="PTHREADS_WIN;_DEBUG;_USRDLL;SIMDATA_EXPORTS" BasicRuntimeChecks="3" RuntimeLibrary="3" RuntimeTypeInfo="TRUE" @@ -129,7 +129,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="pthreadVC.lib" + AdditionalDependencies="pthreadVC1.lib" OutputFile="../SimData/_cSimDatad.dll" LinkIncremental="2" SuppressStartupBanner="TRUE" |
From: <sv...@ww...> - 2004-12-31 20:47:40
|
Author: mkrose Date: 2004-12-31 12:47:29 -0800 (Fri, 31 Dec 2004) New Revision: 1422 Modified: trunk/CSP/SimNet/NetworkInterface.cpp Log: Prevent a spurious assertion when clients disconnect from the server. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1422 Modified: trunk/CSP/SimNet/NetworkInterface.cpp =================================================================== --- trunk/CSP/SimNet/NetworkInterface.cpp 2004-12-30 11:22:13 UTC (rev 1421) +++ trunk/CSP/SimNet/NetworkInterface.cpp 2004-12-31 20:47:29 UTC (rev 1422) @@ -270,7 +270,10 @@ } void NetworkInterface::disconnectPeer(PeerId id) { - removePeer(id); + PeerInfo *peer = getPeer(id); + if (peer && peer->isActive()) { + removePeer(id); + } } void NetworkInterface::processOutgoing(double timeout) { |
From: <sv...@ww...> - 2004-12-30 11:22:24
|
Author: delta Date: 2004-12-30 03:22:13 -0800 (Thu, 30 Dec 2004) New Revision: 1421 Modified: trunk/CSP/DevPack/INSTALL trunk/CSP/DevPack/README Log: * Used version 1.1.9 of cc++ (the very last one (2.1.3) compiles fine but impacts widely on the fps, more or less by a factor 2 in network mode. Changes occur with 1.2.0 on windows. * Updated step 1 of the install process. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1421 Modified: trunk/CSP/DevPack/INSTALL =================================================================== --- trunk/CSP/DevPack/INSTALL 2004-12-29 03:51:29 UTC (rev 1420) +++ trunk/CSP/DevPack/INSTALL 2004-12-30 11:22:13 UTC (rev 1421) @@ -3,14 +3,15 @@ INSTALLATION: -1. Drop this package on your system (make sure the complete - path doesn't contain any spaces). Updates to the system +1. Unzip this package on your system (make sure the complete + path doesn't contain any spaces). This will create a usr + folder containing \include, \lib and \bin subdirectories. + +2. Add usr\bin to the system path. Updates to the system path will take effect after a reboot. -2. Add usr\bin to the system path - 3. Add usr\include and usr\lib to VC++ directories so that - the compiler will find the new headers and libraries. You + the compiler will find the new headers and libraries. You may need to exit and restart VC++ for these changes to take effect. Modified: trunk/CSP/DevPack/README =================================================================== --- trunk/CSP/DevPack/README 2004-12-29 03:51:29 UTC (rev 1420) +++ trunk/CSP/DevPack/README 2004-12-30 11:22:13 UTC (rev 1421) @@ -28,7 +28,7 @@ > sources.redhat.com/pthreads-win32 -The dev-pack is contains: +The dev-pack contains: 1. OSG_OT_OP-0.9.8-2: a. OpenThreads 1.0 @@ -55,7 +55,7 @@ 11. SDL1.2.8 & SDL_image1.2.4 -12. Common C++ 2.1.3 +12. Common C++ 1.1.9 13. pthreads-win32 (pthreadsVC dated 11-22-2004) |
From: <sv...@ww...> - 2004-12-29 03:51:38
|
Author: mkrose Date: 2004-12-28 19:51:29 -0800 (Tue, 28 Dec 2004) New Revision: 1420 Added: trunk/CSP/DevPack/ trunk/CSP/DevPack/INSTALL trunk/CSP/DevPack/README Log: Add initial drafts of windows devpack readme and install files. These still require some editing (particularly the install file). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1420 Added: trunk/CSP/DevPack/INSTALL =================================================================== --- trunk/CSP/DevPack/INSTALL 2004-12-23 15:14:14 UTC (rev 1419) +++ trunk/CSP/DevPack/INSTALL 2004-12-29 03:51:29 UTC (rev 1420) @@ -0,0 +1,33 @@ +Combat Simulator Project dev-pack 0.4 (December 2004) for use with +CSPSim 0.4 (in progress) + +INSTALLATION: + +1. Drop this package on your system (make sure the complete + path doesn't contain any spaces). Updates to the system + path will take effect after a reboot. + +2. Add usr\bin to the system path + +3. Add usr\include and usr\lib to VC++ directories so that + the compiler will find the new headers and libraries. You + may need to exit and restart VC++ for these changes to + take effect. + +Note: You may already have an older version of a dll provided +in this pack; if you get dynamic link errors (typically +"non-existent entry points"), try to copy the problematic dll +from \bin into APPLICATIONS\CSPSim\Bin to force the dev pack +version to be loaded first when running CSPSim. + +The most up-to-date instructions for building CSP can be found at + + http://csp.sourceforge.net/wiki/BuildingCSP + +Any questions, comments, or suggestions should be directed to the +forums at + + http://csp.sourceforge.net/forum + + +The CSP Team Added: trunk/CSP/DevPack/README =================================================================== --- trunk/CSP/DevPack/README 2004-12-23 15:14:14 UTC (rev 1419) +++ trunk/CSP/DevPack/README 2004-12-29 03:51:29 UTC (rev 1420) @@ -0,0 +1,75 @@ +Combat Simulator Project dev-pack 0.4 (December 2004) for use with +CSPSim 0.4 (in progress) + +CSP is hosted at http://csp.sourceforge.net +Development server is https://www.zerobar.net/csp + +This development package is a collection of precompiled libraries +and header files. Most of the libraries were compiled with Microsoft +VisualStudio professional .net 2003 (aka 7.1) on a MS Windows XP pro +system. The header files are located in \include, while the library +files (in general export libs but also some static ones) are in \lib +and dlls are in \bin. This pack is distributed in the hope that it +will be useful, but WITHOUT ANY WARRANTY. Source code for all +precompiled libraries is available from their respective hosting +sites, which are listed below. + +Internet packages source: + + > www.openscenegraph.org + > gnuwin32.sourceforge.net + > www.libsdl.org + > www.libsdl.org/projects/SDL_image + > libsigc.sourceforge.net + > www.gzip.org + > osgnv.sourceforge.net (distributes a modified nvparse lib) + > www.gdal.org + > cplusplus.sourceforge.net + > sources.redhat.com/pthreads-win32 + + +The dev-pack is contains: + +1. OSG_OT_OP-0.9.8-2: + a. OpenThreads 1.0 + b. OpenProducer 0.8.3 + c. OpenSceneGraph 0.9.8-2 + +2. jpeg-6b3 + +3. freetype-2.1.8 + +4. libungif-4.1.0b1 + +5. zlib-1.2.1 + +6. libpng-1.2.8 + +7. tiff-win-3.6.1-2 + +8. libsigc++-1.2.5 + +9. nvparse-5, osgNV-0.6.0, osgNVCg-0.6.0, osgNVParse-0.6.0 (post 0.6.0) + +10. gdal1.2.4 + +11. SDL1.2.8 & SDL_image1.2.4 + +12. Common C++ 2.1.3 + +13. pthreads-win32 (pthreadsVC dated 11-22-2004) + + +See INSTALL for installation details. + +The most up-to-date instructions for building CSP can be found at + + http://csp.sourceforge.net/wiki/BuildingCSP + +Any questions, comments, or suggestions should be directed to the +forums at + + http://csp.sourceforge.net/forum + + +The CSP Team |
From: <sv...@ww...> - 2004-12-23 15:14:21
|
Author: delta Date: 2004-12-23 07:14:14 -0800 (Thu, 23 Dec 2004) New Revision: 1419 Modified: trunk/CSP/Demeter/CHANGES.current trunk/CSP/Demeter/DemeterVisualC6.vcproj Log: Demeter is linked against osg which, since 0.9.8 depends on OpenThreads. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1419 Modified: trunk/CSP/Demeter/CHANGES.current =================================================================== --- trunk/CSP/Demeter/CHANGES.current 2004-12-22 05:36:31 UTC (rev 1418) +++ trunk/CSP/Demeter/CHANGES.current 2004-12-23 15:14:14 UTC (rev 1419) @@ -1,6 +1,10 @@ Version 0.3.2 (in progress) =========================== +2004-12-23: delta + Demeter is linked against osg which, since 0.9.8 depends on + OpenThreads. + 2004-11-14: onsight Save and restore gl state when rendering the terrain. Modified: trunk/CSP/Demeter/DemeterVisualC6.vcproj =================================================================== --- trunk/CSP/Demeter/DemeterVisualC6.vcproj 2004-12-22 05:36:31 UTC (rev 1418) +++ trunk/CSP/Demeter/DemeterVisualC6.vcproj 2004-12-23 15:14:14 UTC (rev 1419) @@ -106,7 +106,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="osg.lib opengl32.lib glu32.lib SDL.lib SDL_image.lib" + AdditionalDependencies="OpenThreadsWin32.lib osg.lib opengl32.lib glu32.lib SDL.lib SDL_image.lib" OutputFile="../CSPSim/Bin/DemeterVisualC6.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" |
Author: mkrose Date: 2004-12-21 21:36:31 -0800 (Tue, 21 Dec 2004) New Revision: 1418 Added: trunk/CSP/CSPSim/Data/Models/bureau01/bureau01.3ds trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson01.3ds trunk/CSP/CSPSim/Data/Models/caissons/caisson02/caisson02.3ds trunk/CSP/CSPSim/Data/Models/caissons/caisson03/caisson03.3ds trunk/CSP/CSPSim/Data/Models/caissons/caisson04/caisson04.3ds trunk/CSP/CSPSim/Data/Models/caissons/caisson05/caisson05.3ds Removed: trunk/CSP/CSPSim/Data/Models/bureau01/bureau01.3DS trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson01.3DS trunk/CSP/CSPSim/Data/Models/caissons/caisson02/caisson02.3DS trunk/CSP/CSPSim/Data/Models/caissons/caisson03/caisson03.3DS trunk/CSP/CSPSim/Data/Models/caissons/caisson04/caisson04.3DS trunk/CSP/CSPSim/Data/Models/caissons/caisson05/caisson05.3DS Modified: trunk/CSP/CSPSim/CHANGES.current Log: Rename new .3DS models to .3ds to match the XML path. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1418 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-22 01:35:14 UTC (rev 1417) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-22 05:36:31 UTC (rev 1418) @@ -1,10 +1,13 @@ Version 0.4.0 (in progress) =========================== +2004-12-22: onsight + * Rename new .3DS models to .3ds to match the XML path. + 2004-12-22: delta -* Minor change in ScreenInfo: MessageBox has been renamed MessageList. + * Minor change in ScreenInfo: MessageBox has been renamed MessageList. -* Small change in the implementation of ScreenInfo. + * Small change in the implementation of ScreenInfo. 2004-12-19: lologramme * Add offices and flag Deleted: trunk/CSP/CSPSim/Data/Models/bureau01/bureau01.3DS =================================================================== (Binary files differ) Copied: trunk/CSP/CSPSim/Data/Models/bureau01/bureau01.3ds (from rev 1415, trunk/CSP/CSPSim/Data/Models/bureau01/bureau01.3DS) Deleted: trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson01.3DS =================================================================== (Binary files differ) Copied: trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson01.3ds (from rev 1415, trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson01.3DS) Deleted: trunk/CSP/CSPSim/Data/Models/caissons/caisson02/caisson02.3DS =================================================================== (Binary files differ) Copied: trunk/CSP/CSPSim/Data/Models/caissons/caisson02/caisson02.3ds (from rev 1415, trunk/CSP/CSPSim/Data/Models/caissons/caisson02/caisson02.3DS) Deleted: trunk/CSP/CSPSim/Data/Models/caissons/caisson03/caisson03.3DS =================================================================== (Binary files differ) Copied: trunk/CSP/CSPSim/Data/Models/caissons/caisson03/caisson03.3ds (from rev 1415, trunk/CSP/CSPSim/Data/Models/caissons/caisson03/caisson03.3DS) Deleted: trunk/CSP/CSPSim/Data/Models/caissons/caisson04/caisson04.3DS =================================================================== (Binary files differ) Copied: trunk/CSP/CSPSim/Data/Models/caissons/caisson04/caisson04.3ds (from rev 1415, trunk/CSP/CSPSim/Data/Models/caissons/caisson04/caisson04.3DS) Deleted: trunk/CSP/CSPSim/Data/Models/caissons/caisson05/caisson05.3DS =================================================================== (Binary files differ) Copied: trunk/CSP/CSPSim/Data/Models/caissons/caisson05/caisson05.3ds (from rev 1415, trunk/CSP/CSPSim/Data/Models/caissons/caisson05/caisson05.3DS) |
From: <sv...@ww...> - 2004-12-22 01:35:21
|
Author: delta Date: 2004-12-21 17:35:14 -0800 (Tue, 21 Dec 2004) New Revision: 1417 Modified: trunk/CSP/CSPSim/CHANGES.current Log: Forgotten. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1417 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-22 01:34:20 UTC (rev 1416) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-22 01:35:14 UTC (rev 1417) @@ -1,5 +1,11 @@ Version 0.4.0 (in progress) =========================== + +2004-12-22: delta +* Minor change in ScreenInfo: MessageBox has been renamed MessageList. + +* Small change in the implementation of ScreenInfo. + 2004-12-19: lologramme * Add offices and flag * Add Taxi signalisation @@ -7,7 +13,7 @@ 2004-12-18: onsight * Minor patches to make CSPSim work with OSG 0.9.8. This changes are not backwards compatible with OSG 0.9.6. To continue using the older - version, modify the build file to define OSG_096 (e.g. /DOSG_096 with + version, modify the build file to define OSG096 (e.g. /DOSG_096 with MSVC on the command line, or -DOSG_096 for gcc). If you upgrade to OSG 098, be sure to eliminate all traces of the older version. Also for SCons builds, run 'scons -c all; scons config' before rebuilding. |
From: <sv...@ww...> - 2004-12-22 01:34:27
|
Author: delta Date: 2004-12-21 17:34:20 -0800 (Tue, 21 Dec 2004) New Revision: 1416 Modified: trunk/CSP/CSPSim/Include/ScreenInfo.h trunk/CSP/CSPSim/Source/ScreenInfo.cpp trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp Log: * Minor change in ScreenInfo: MessageBox has been renamed MessageList. * Small change in the implementation of ScreenInfo. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1416 Modified: trunk/CSP/CSPSim/Include/ScreenInfo.h =================================================================== --- trunk/CSP/CSPSim/Include/ScreenInfo.h 2004-12-19 15:00:01 UTC (rev 1415) +++ trunk/CSP/CSPSim/Include/ScreenInfo.h 2004-12-22 01:34:20 UTC (rev 1416) @@ -26,30 +26,33 @@ #ifndef __SCREENINFO_H__ #define __SCREENINFO_H__ -#include <osg/Geode> - namespace osgText { class Text; } +#include <osg/Geode> +#include <osg/Switch> + #include <SimData/Ref.h> class DynamicObject; - -class ScreenInfo: public osg::Geode + +class ScreenInfo: public osg::Switch +//class ScreenInfo: public osg::Geode { protected: std::string m_TTFPath; int m_FontSize; float m_CharacterSize; - osgText::Text *m_Text; + osg::ref_ptr<osg::Geode> m_InfoGeode; + osg::ref_ptr<osgText::Text> m_Text; osgText::Text *makeText(float pos_x, float pos_y,std::string const &string_text = ""); virtual ~ScreenInfo() {} public: ScreenInfo(float pos_x, float pos_y, std::string const &name, std::string const &text = ""); virtual void update(){} - void setStatus(bool const visible) {if (visible) setNodeMask(0x1); else setNodeMask(0x0);} - bool getStatus() const {return getNodeMask() != 0x0;} + void setStatus(bool const visible) {if (visible) setAllChildrenOn(); else setAllChildrenOff();} + bool getStatus() const {return getValue(0);} }; @@ -93,7 +96,7 @@ }; -class MessageBox: public ScreenInfo +class MessageList: public ScreenInfo { std::vector<osg::ref_ptr<osgText::Text> > m_Messages; int m_Lines; @@ -101,9 +104,9 @@ float m_Alpha; double m_LastUpdate; protected: - ~MessageBox(){} + ~MessageList(){} public: - MessageBox(int posx, int posy, int lines, float delay); + MessageList(int posx, int posy, int lines, float delay); void addLine(std::string const &line); virtual void update(); }; Modified: trunk/CSP/CSPSim/Source/ScreenInfo.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ScreenInfo.cpp 2004-12-19 15:00:01 UTC (rev 1415) +++ trunk/CSP/CSPSim/Source/ScreenInfo.cpp 2004-12-22 01:34:20 UTC (rev 1416) @@ -32,8 +32,8 @@ #include <iomanip> #include <sstream> -#include <osg/Texture2D> -#include <osg/StateSet> +#include <osg/Texture2D> +#include <osg/StateSet> #include <osgText/Text> #include <SimData/Timing.h> @@ -79,8 +79,9 @@ m_FontSize(20), //m_CharacterSize(14), m_CharacterSize(11), - m_Text(makeText(pos_x,pos_y - m_CharacterSize, text)) { - addDrawable(m_Text); + m_Text(makeText(pos_x,pos_y - m_CharacterSize, text)), + m_InfoGeode(new osg::Geode) { + m_InfoGeode->addDrawable(m_Text.get()); setName(name); // HACK to prevent text from disappearing when chunklod multitexture details // are turned on: @@ -88,6 +89,7 @@ ss->setTextureMode(1,GL_TEXTURE_2D,osg::StateAttribute::OFF); //ss->setTextureMode(2,GL_TEXTURE_2D,osg::StateAttribute::OFF); //ss->setTextureMode(3,GL_TEXTURE_2D,osg::StateAttribute::OFF); + addChild(m_InfoGeode.get()); } osgText::Text *ScreenInfo::makeText(float pos_x, float pos_y, std::string const &string_text) { @@ -114,7 +116,7 @@ m_Date(makeText(pos_x, pos_y - 2*m_CharacterSize)) { m_Text->setUseDisplayList(false); m_Date->setUseDisplayList(false); - addDrawable(m_Date); + m_InfoGeode->addDrawable(m_Date); setUpdateCallback(new UpdateCallback); } @@ -156,11 +158,11 @@ m_Text->setUseDisplayList(false); m_Altitude->setUseDisplayList(false); - addDrawable(m_Altitude); + m_InfoGeode->addDrawable(m_Altitude); m_GlobalPosition->setUseDisplayList(false); - addDrawable(m_GlobalPosition); + m_InfoGeode->addDrawable(m_GlobalPosition); m_Velocity->setUseDisplayList(false); - addDrawable(m_Velocity); + m_InfoGeode->addDrawable(m_Velocity); setUpdateCallback(new UpdateCallback); } @@ -199,8 +201,8 @@ : ScreenInfo(posx,posy,"OBJECT STATS"), m_PosX(posx), m_PosY(posy) { m_Skip = static_cast<int>(m_CharacterSize); - if (m_Text) { - removeDrawable(m_Text); + if (m_Text.valid()) { + m_InfoGeode->removeDrawable(m_Text.get()); } if (!getUpdateCallback()) { setUpdateCallback(new UpdateCallback); @@ -216,7 +218,7 @@ short m = stringStats.size(); if (m < n) { for (int i = m; i < n; ++i) { - removeDrawable(m_ObjectStats[i].get()); + m_InfoGeode->removeDrawable(m_ObjectStats[i].get()); } m_ObjectStats.resize(m); } else @@ -224,7 +226,7 @@ m_ObjectStats.resize(m); for (int i = n; i < m; ++i) { m_ObjectStats[i] = makeText(m_PosX, m_PosY+i*m_Skip); - addDrawable(m_ObjectStats[i].get()); + m_InfoGeode->addDrawable(m_ObjectStats[i].get()); } } while (--m >= 0) { @@ -233,24 +235,24 @@ } } -MessageBox::MessageBox(int posx, int posy, int lines, float delay) +MessageList::MessageList(int posx, int posy, int lines, float delay) : ScreenInfo(posx, posy, "MESSAGE BOX"), m_Lines(lines), m_Delay(delay), m_Alpha(1.0), m_LastUpdate(0) { - if (m_Text) { - removeDrawable(m_Text); + if (m_Text.valid()) { + m_InfoGeode->removeDrawable(m_Text.get()); } int stepy = static_cast<int>(m_CharacterSize); for (int i = 0; i < lines; ++i) { osg::ref_ptr<osgText::Text> line = makeText(posx, posy - i * stepy); m_Messages.push_back(line); - addDrawable(line.get()); + m_InfoGeode->addDrawable(line.get()); } if (!getUpdateCallback()) { setUpdateCallback(new UpdateCallback); } } -void MessageBox::addLine(std::string const &line) { +void MessageList::addLine(std::string const &line) { m_LastUpdate = simdata::get_realtime(); for (int i = m_Lines-1; i > 0; --i) { m_Messages[i]->setText(m_Messages[i-1]->getText()); @@ -260,7 +262,7 @@ } } -void MessageBox::update() { +void MessageList::update() { double now = simdata::get_realtime(); float dt = static_cast<float>(now - m_LastUpdate); float old_alpha = m_Alpha; Modified: trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp 2004-12-19 15:00:01 UTC (rev 1415) +++ trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp 2004-12-22 01:34:20 UTC (rev 1416) @@ -36,7 +36,7 @@ osg::ref_ptr<ScreenInfo> pause = new ScreenInfo(ScreenWidth-5*offsetpos,ScreenHeight-offsetpos,"PAUSE", "PAUSE"); osg::ref_ptr<ScreenInfo> record = new ScreenInfo(ScreenWidth-15*offsetpos,ScreenHeight-offsetpos,"RECORD", "RECORD"); osg::ref_ptr<GeneralStats> generalStats = new GeneralStats(offsetpos, ScreenHeight / 5); - osg::ref_ptr<MessageBox> messageBox = new MessageBox(offsetpos, ScreenHeight / 2, 4, 4.0); + osg::ref_ptr<MessageList> messageBox = new MessageList(offsetpos, ScreenHeight / 2, 4, 4.0); rootNode->addChild(framerate.get()); rootNode->addChild(pause.get()); @@ -137,7 +137,7 @@ void ScreenInfoManager::addMessage(std::string const &line) { - MessageBox *mbox = dynamic_cast<MessageBox*>(getScreenInfo("MESSAGE BOX")); + MessageList *mbox = dynamic_cast<MessageList*>(getScreenInfo("MESSAGE BOX")); if (mbox) { mbox->addLine(line); } |
From: <sv...@ww...> - 2004-12-19 15:00:07
|
Author: lologramme Date: 2004-12-19 07:00:01 -0800 (Sun, 19 Dec 2004) New Revision: 1415 Added: trunk/CSP/CSPSim/Data/Models/caissons/caisson02/ trunk/CSP/CSPSim/Data/Models/caissons/caisson02/G-F1.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson02/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson02/caisson02.3DS trunk/CSP/CSPSim/Data/Models/caissons/caisson03/ trunk/CSP/CSPSim/Data/Models/caissons/caisson03/F-18.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson03/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson03/caisson03.3DS trunk/CSP/CSPSim/Data/Models/caissons/caisson04/ trunk/CSP/CSPSim/Data/Models/caissons/caisson04/bande-F.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson04/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson04/caisson04.3DS trunk/CSP/CSPSim/Data/Models/caissons/caisson05/ trunk/CSP/CSPSim/Data/Models/caissons/caisson05/F.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson05/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson05/caisson05.3DS trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson02.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson03.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson04.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson05.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson02/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson02/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson03/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson03/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson04/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson04/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson05/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson05/model.xml Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml Log: Add taxi signalisation Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1415 Diff omitted (11654 bytes). |
Author: lologramme Date: 2004-12-19 06:26:37 -0800 (Sun, 19 Dec 2004) New Revision: 1414 Added: trunk/CSP/CSPSim/Data/Models/caissons/ trunk/CSP/CSPSim/Data/Models/caissons/caisson01/ trunk/CSP/CSPSim/Data/Models/caissons/caisson01/F-G1.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson01.3DS trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson01.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson01/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson01/model.xml Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml Log: Add taxi signalisation Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1414 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-19 08:38:24 UTC (rev 1413) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-19 14:26:37 UTC (rev 1414) @@ -2,7 +2,8 @@ =========================== 2004-12-19: lologramme * Add offices and flag - + * Add Taxi signalisation + 2004-12-18: onsight * Minor patches to make CSPSim work with OSG 0.9.8. This changes are not backwards compatible with OSG 0.9.6. To continue using the older Added: trunk/CSP/CSPSim/Data/Models/caissons/caisson01/F-G1.jpg =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Data/Models/caissons/caisson01/F-G1.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson.jpg =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson01.3DS =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Data/Models/caissons/caisson01/caisson01.3DS ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml 2004-12-19 08:38:24 UTC (rev 1413) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml 2004-12-19 14:26:37 UTC (rev 1414) @@ -38,5 +38,12 @@ <Float name="y">1380</Float> <Float name="orientation">1.57</Float> </Object> + <!-- F-G Taxi signalisation --> + <Object class="FeatureLayout"> + <Path name="model">caisson01</Path> + <Float name="x">365</Float> + <Float name="y">1218</Float> + <Float name="orientation">3.64</Float> + </Object> </List> </Object> Added: trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson01.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson01.xml 2004-12-19 08:38:24 UTC (rev 1413) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson01.xml 2004-12-19 14:26:37 UTC (rev 1414) @@ -0,0 +1,6 @@ +<?xml version="1.0" standalone="no"?> + +<Object class="FeatureObjectModel"> + <Path name="model">caissons.caisson01.model</Path> + <Int name="hit_points">30</Int> +</Object> Added: trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson01/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson01/model.xml 2004-12-19 08:38:24 UTC (rev 1413) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson01/model.xml 2004-12-19 14:26:37 UTC (rev 1414) @@ -0,0 +1,16 @@ +<?xml version="1.0" standalone="no"?> + +<Object class="ObjectModel"> + <External name="model_path">caissons/caisson01/caisson01.3ds</External> + <Vector name="axis_0">1 0 0</Vector> + <Vector name="axis_1">0 1.0 0.0</Vector> + <Vector name="offset">0 0 0</Vector> + <Float name="polygon_offset">-1</Float> + <!--Bool name="lighting">false</Bool--> + <Float name="scale">1.0</Float> + <!--List name="contacts"> + <Vector>0.0 0.0 0.0</Vector> + </List--> + <Bool name="smooth">true</Bool> + <Bool name="filter">true</Bool> +</Object> |
Author: lologramme Date: 2004-12-19 00:38:24 -0800 (Sun, 19 Dec 2004) New Revision: 1413 Added: trunk/CSP/CSPSim/Data/Models/bureau01/ trunk/CSP/CSPSim/Data/Models/bureau01/bureau01.3DS trunk/CSP/CSPSim/Data/Models/bureau01/bureau01.jpg trunk/CSP/CSPSim/Data/Models/flag01/ trunk/CSP/CSPSim/Data/Models/flag01/flag01.osg trunk/CSP/CSPSim/Data/Models/flag01/images/ trunk/CSP/CSPSim/Data/Models/flag01/images/flag01.tga trunk/CSP/CSPSim/Data/XML/theater/balkan/bureau01.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/bureau01/ trunk/CSP/CSPSim/Data/XML/theater/balkan/bureau01/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/flag01.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/flag01/ trunk/CSP/CSPSim/Data/XML/theater/balkan/flag01/model.xml Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml Log: Add office and flag Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1413 Diff omitted (20184 bytes). |
From: <sv...@ww...> - 2004-12-19 06:54:38
|
Author: mkrose Date: 2004-12-18 22:54:29 -0800 (Sat, 18 Dec 2004) New Revision: 1412 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Console.cpp trunk/CSP/CSPSim/Source/ConsoleCommands.cpp trunk/CSP/CSPSim/Source/ObjectModel.cpp trunk/CSP/CSPSim/Source/ScreenInfo.cpp trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp trunk/CSP/CSPSim/Source/SmokeEffects.cpp trunk/CSP/CSPSim/Source/VirtualScene.cpp Log: Minor patches to make CSPSim work with OSG 0.9.8. This changes are not backwards compatible with OSG 0.9.6. To continue using the older version, modify the build file to define OSG_096 (e.g. /DOSG_096 with MSVC on the command line, or -DOSG_096 for gcc). If you upgrade to OSG 098, be sure to eliminate all traces of the older version. Also for SCons builds, run 'scons -c all; scons config' before rebuilding. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1412 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:48:11 UTC (rev 1411) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-19 06:54:29 UTC (rev 1412) @@ -2,6 +2,14 @@ =========================== 2004-12-18: onsight + * Minor patches to make CSPSim work with OSG 0.9.8. This changes are + not backwards compatible with OSG 0.9.6. To continue using the older + version, modify the build file to define OSG_096 (e.g. /DOSG_096 with + MSVC on the command line, or -DOSG_096 for gcc). If you upgrade to + OSG 098, be sure to eliminate all traces of the older version. Also + for SCons builds, run 'scons -c all; scons config' before rebuilding. + +2004-12-18: onsight * Add hooks in GameScreen to catch player join/quit events and display a message on the screen. Modified: trunk/CSP/CSPSim/Source/Console.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Console.cpp 2004-12-18 11:48:11 UTC (rev 1411) +++ trunk/CSP/CSPSim/Source/Console.cpp 2004-12-19 06:54:29 UTC (rev 1412) @@ -71,6 +71,7 @@ Console::Console(const Console ©, const osg::CopyOp ©op) : osg::Geode(copy, copyop), + std::basic_streambuf<char>(), _text(static_cast<osgText::Text *>(copyop(copy._text.get()))), _cursor(static_cast<osgText::Text *>(copyop(copy._cursor.get()))), _token(static_cast<osgText::Text *>(copyop(copy._token.get()))), @@ -108,7 +109,11 @@ void Console::_setFont(osg::ref_ptr<osgText::Text> &text, std::string const &font, int size) { text->setFont(font); +#ifdef OSG096 text->setFontSize(size, size); +#else + text->setFontResolution(size, size); +#endif // OSG096 text->setCharacterSize(size, 1.0); text->setColor(osg::Vec4(1, 1, 1, 1)); text->setAlignment(osgText::Text::LEFT_TOP); Modified: trunk/CSP/CSPSim/Source/ConsoleCommands.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ConsoleCommands.cpp 2004-12-18 11:48:11 UTC (rev 1411) +++ trunk/CSP/CSPSim/Source/ConsoleCommands.cpp 2004-12-19 06:54:29 UTC (rev 1412) @@ -56,7 +56,11 @@ setMatrix(osg::Matrix::ortho2D(0, ScreenWidth, 0, ScreenHeight)); m_ModelViewAbs = new osg::MatrixTransform; +#ifdef OSG096 m_ModelViewAbs->setReferenceFrame(osg::Transform::RELATIVE_TO_ABSOLUTE); +#else + m_ModelViewAbs->setReferenceFrame(osg::Transform::ABSOLUTE_RF); +#endif // OSG096 m_ModelViewAbs->setMatrix(osg::Matrix::identity()); addChild(m_ModelViewAbs.get()); @@ -175,13 +179,11 @@ if (result.size() > 0) { result = result + "\n"; } - std::cout << "print\n"; m_Console->print(result); } m_Command = ""; update(); setCursor(0); - std::cout << "done\n"; return true; } return false; Modified: trunk/CSP/CSPSim/Source/ObjectModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ObjectModel.cpp 2004-12-18 11:48:11 UTC (rev 1411) +++ trunk/CSP/CSPSim/Source/ObjectModel.cpp 2004-12-19 06:54:29 UTC (rev 1412) @@ -35,7 +35,11 @@ #include <osgDB/ReadFile> #include <osgFX/SpecularHighlights> #include <osgUtil/SmoothingVisitor> +#ifdef OSG096 #include <osgUtil/DisplayListVisitor> +#else +#include <osgUtil/GLObjectsVisitor> +#endif #include <osgUtil/Optimizer> #include <osg/CullFace> #include <osg/NodeVisitor> @@ -193,7 +197,12 @@ osg::StateSet::TextureAttributeList& attr = set->getTextureAttributeList(); osg::StateSet::TextureAttributeList::iterator i; for (i = attr.begin(); i != attr.end(); i++) { +#ifdef OSG096 osg::StateSet::AttributeList::iterator tex = i->find(osg::StateAttribute::TEXTURE); +#else + // TODO don't we need to consider other members within the TEXTURE group? + osg::StateSet::AttributeList::iterator tex = i->find(osg::StateAttribute::TypeMemberPair(osg::StateAttribute::TEXTURE, 0)); +#endif // OSG096 if (tex != i->end()) { osg::Texture* texture = dynamic_cast<osg::Texture*>(tex->second.first.get()); if (texture) { @@ -414,11 +423,20 @@ addContactMarkers(); osg::ref_ptr<osg::State> state = new osg::State; + +#ifdef OSG096 osgUtil::DisplayListVisitor dlv(osgUtil::DisplayListVisitor::COMPILE_DISPLAY_LISTS); dlv.setState(state.get()); dlv.setNodeMaskOverride(0xffffffff); m_Model->accept(dlv); m_DebugMarkers->accept(dlv); +#else + osgUtil::GLObjectsVisitor ov; + ov.setState(state.get()); + ov.setNodeMaskOverride(0xffffffff); + m_Model->accept(ov); + m_DebugMarkers->accept(ov); +#endif // OSG096 // XXX: there is a really weird bug on vs with the optimizer: // 1) it rarely appears in the release built (never when called from this exact line) @@ -541,7 +559,11 @@ m_Label = new osgText::Text(); m_Label->setFont("screeninfo.ttf"); +#ifdef OSG096 m_Label->setFontSize(16, 16); +#else + m_Label->setFontResolution(16, 16); +#endif // OSG096 m_Label->setColor(osg::Vec4(0.3f, 0.4f, 1.0f, 1.0f)); m_Label->setCharacterSize(100.0, 1.0); m_Label->setPosition(osg::Vec3(6, 0, 0)); @@ -554,7 +576,11 @@ label->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); //setMatrix(osg::Matrix::ortho2D(0,ScreenWidth,0,ScreenHeight)); osg::MatrixTransform *m_modelview_abs = new osg::MatrixTransform; +#ifdef OSG096 m_modelview_abs->setReferenceFrame(osg::Transform::RELATIVE_TO_ABSOLUTE); +#else + m_modelview_abs->setReferenceFrame(osg::Transform::ABSOLUTE_RF); +#endif // OSG096 m_modelview_abs->setMatrix(osg::Matrix::identity()); m_modelview_abs->addChild(label); @@ -566,6 +592,7 @@ } SceneModel::~SceneModel() { + // FIXME shouldn't we be removing the copy? osg::Node *model_node = m_Model->getModel().get(); assert(model_node); m_Transform->removeChild(model_node); Modified: trunk/CSP/CSPSim/Source/ScreenInfo.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ScreenInfo.cpp 2004-12-18 11:48:11 UTC (rev 1411) +++ trunk/CSP/CSPSim/Source/ScreenInfo.cpp 2004-12-19 06:54:29 UTC (rev 1412) @@ -93,7 +93,11 @@ osgText::Text *ScreenInfo::makeText(float pos_x, float pos_y, std::string const &string_text) { osgText::Text *text = new osgText::Text; text->setFont(m_TTFPath); +#ifdef OSG096 text->setFontSize(m_FontSize, m_FontSize); +#else + text->setFontResolution(m_FontSize, m_FontSize); +#endif // OSG096 text->setColor(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f)); text->setCharacterSize(m_CharacterSize, 1.0); text->setPosition(osg::Vec3(pos_x, pos_y, 0)); Modified: trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp 2004-12-18 11:48:11 UTC (rev 1411) +++ trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp 2004-12-19 06:54:29 UTC (rev 1412) @@ -54,7 +54,11 @@ setMatrix(osg::Matrix::ortho2D(0,ScreenWidth,0,ScreenHeight)); m_modelview_abs = new osg::MatrixTransform; +#ifdef OSG096 m_modelview_abs->setReferenceFrame(osg::Transform::RELATIVE_TO_ABSOLUTE); +#else + m_modelview_abs->setReferenceFrame(osg::Transform::ABSOLUTE_RF); +#endif // OSG096 m_modelview_abs->setMatrix(osg::Matrix::identity()); set2dScene(m_modelview_abs,ScreenWidth,ScreenHeight); Modified: trunk/CSP/CSPSim/Source/SmokeEffects.cpp =================================================================== --- trunk/CSP/CSPSim/Source/SmokeEffects.cpp 2004-12-18 11:48:11 UTC (rev 1411) +++ trunk/CSP/CSPSim/Source/SmokeEffects.cpp 2004-12-19 06:54:29 UTC (rev 1412) @@ -140,7 +140,11 @@ P->setVelocity(simdata::toOSG(wind) + push.get_random()); place += d_place; wind += d_wind; +#ifdef OSG096 if (getReferenceFrame() == RELATIVE_TO_PARENTS) { +#else + if (getReferenceFrame() == RELATIVE_RF) { +#endif // OSG096 P->transformPositionVelocity(getLocalToWorldMatrix()); //P->transformPositionVelocity(getWorldToLocalMatrix()); } Modified: trunk/CSP/CSPSim/Source/VirtualScene.cpp =================================================================== --- trunk/CSP/CSPSim/Source/VirtualScene.cpp 2004-12-18 11:48:11 UTC (rev 1411) +++ trunk/CSP/CSPSim/Source/VirtualScene.cpp 2004-12-19 06:54:29 UTC (rev 1412) @@ -50,7 +50,6 @@ #include <osgUtil/SceneView> #include <osgUtil/Optimizer> #include <osgUtil/CullVisitor> -#include <osgUtil/DisplayListVisitor> #include <osg/Material> #include <osg/BlendFunc> |
From: <sv...@ww...> - 2004-12-18 11:48:20
|
Author: mkrose Date: 2004-12-18 03:48:11 -0800 (Sat, 18 Dec 2004) New Revision: 1411 Removed: trunk/CSP/CSPSim/Include/Message.h trunk/CSP/CSPSim/Source/Message.cpp Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/SConscript trunk/CSP/CSPSim/Source/Makefile.in trunk/CSP/CSPSim/Source/SConscript trunk/CSP/CSPSim/VisualStudio/CSPSimAppli/CSPSimAppli.vcproj trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: Cleanup old Message files. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1411 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:39:57 UTC (rev 1410) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:48:11 UTC (rev 1411) @@ -14,6 +14,8 @@ * Hack upon hack to prevent engine cutoff when stationary in a light tailwind (AOA near 180 deg). + * Cleanup old Message files. + 2004-12-18: delta * Until we make a more accurate FCS, we'll use the animation binding to provide a better visual approximation of the animations of the "ailerons" Deleted: trunk/CSP/CSPSim/Include/Message.h =================================================================== --- trunk/CSP/CSPSim/Include/Message.h 2004-12-18 11:39:57 UTC (rev 1410) +++ trunk/CSP/CSPSim/Include/Message.h 2004-12-18 11:48:11 UTC (rev 1411) @@ -1,80 +0,0 @@ -// Combat Simulator Project - FlightSim Demo -// 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. - - -/** - * @file Message.h - * - **/ - -#ifndef __MESSAGE_H__ -#define __MESSAGE_H__ - - -#define COLLISION_MESSAGE 1 -#define SET_ALTITUDE_MESSAGE 2 -#define LOOK_FOR_ENEMIES_MESSAGE 10 -#define WEAPON_READY_MESSAGE 11 - -#define CHECK_GAME_STATUS_MESSAGE 100 -#define GENERATE_NEW_ENEMY_PLANES_MESSAGE 101 - - - -/** - * class Message - * - * @author unknown - */ -class Message -{ - - public: - - Message(); - virtual ~Message(); - Message(const Message &); - Message & operator=(const Message &); - - bool operator<(const Message & rhs) const; - bool operator>(const Message & rhs) const; - bool operator==(const Message &rhs) const; - - void dump(); - - unsigned int type; - unsigned int senderID; - unsigned int receiverID; - float sentTime; - float receiveTime; - int data; -}; - - -/** - * class messageComparison - * - * @author unknown - */ -struct messageComparison { - bool operator () (Message * left, Message * right) const - { return left->receiveTime > right->receiveTime; } -}; - -#endif // __MESSAGE_H__ - Modified: trunk/CSP/CSPSim/SConscript =================================================================== --- trunk/CSP/CSPSim/SConscript 2004-12-18 11:39:57 UTC (rev 1410) +++ trunk/CSP/CSPSim/SConscript 2004-12-18 11:48:11 UTC (rev 1411) @@ -69,4 +69,3 @@ build.BuildModules(env, MODULES) - Modified: trunk/CSP/CSPSim/Source/Makefile.in =================================================================== --- trunk/CSP/CSPSim/Source/Makefile.in 2004-12-18 11:39:57 UTC (rev 1410) +++ trunk/CSP/CSPSim/Source/Makefile.in 2004-12-18 11:48:11 UTC (rev 1411) @@ -55,7 +55,6 @@ BaseDynamics.cpp \ BaseScreen.cpp \ ChunkLodTerrain.cpp \ - ClientNode.cpp \ Collision.cpp \ Colorspace.cpp \ Config.cpp \ @@ -63,10 +62,8 @@ ConsoleCommands.cpp \ CSPSim.cpp \ DemeterTerrain.cpp \ - DispatchCenter.cpp \ DynamicObject.cpp \ DynamicalSystem.cpp \ - EchoServerNode.cpp \ Engine.cpp \ EventMapIndex.cpp \ EventMapping.cpp \ @@ -81,19 +78,9 @@ LandingGear.cpp \ LogoScreen.cpp \ MenuScreen.cpp \ - Message.cpp \ - SimNet/NetworkNode.cpp \ - SimNet/NetworkMessage.cpp \ - SimNet/ObjectUpdateMessage.cpp \ - SimNet/NetworkMessenger.cpp \ - SimNet/PrintMessageHandler.cpp \ - SimNet/RedirectMessageHandler.cpp \ - SimNet/EchoMessageHandler.cpp \ - SimNet/DispatchMessageHandler.cpp \ NumericalMethod.cpp \ ObjectModel.cpp \ PhysicsModel.cpp \ - RedirectServerNode.cpp \ ScreenInfo.cpp \ ScreenInfoManager.cpp \ SimpleSceneManager.cpp \ Deleted: trunk/CSP/CSPSim/Source/Message.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Message.cpp 2004-12-18 11:39:57 UTC (rev 1410) +++ trunk/CSP/CSPSim/Source/Message.cpp 2004-12-18 11:48:11 UTC (rev 1411) @@ -1,90 +0,0 @@ -// Combat Simulator Project - FlightSim Demo -// 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. - - -/** - * @file Message.cpp - * - **/ - - -#include "Message.h" -#include <SimCore/Util/Log.h> - - -Message::Message() -{ - -} - -Message::~Message() -{ - -} - -Message::Message(const Message & message) -{ - type = message.type; - senderID = message.senderID; - receiverID = message.receiverID; - sentTime = message.sentTime; - receiveTime = message.receiveTime; - data = message.data; -} - -Message & Message::operator=(const Message & message) -{ - type = message.type; - senderID = message.senderID; - receiverID = message.receiverID; - sentTime = message.sentTime; - receiveTime = message.receiveTime; - data = message.data; - return *this; -} - -void Message::dump() -{ - CSP_LOG(APP, INFO, "Message) Type: " << type - << ", SenderID: " << senderID - << ", receiverID: " << receiverID - << ", sentTime: " << sentTime - << ", receiveTime: " << receiveTime );; - -} - -bool Message::operator<(const Message & rhs) const -{ - if ( receiveTime < rhs.receiveTime) - return true; - return false; - -} - -bool Message::operator>(const Message &rhs) const -{ - if (receiveTime > rhs.receiveTime) - return true; - return false; -} - -bool Message::operator==(const Message &rhs) const -{ - return (receiveTime == rhs.receiveTime); -} - Modified: trunk/CSP/CSPSim/Source/SConscript =================================================================== --- trunk/CSP/CSPSim/Source/SConscript 2004-12-18 11:39:57 UTC (rev 1410) +++ trunk/CSP/CSPSim/Source/SConscript 2004-12-18 11:48:11 UTC (rev 1411) @@ -54,7 +54,6 @@ 'LandingGear.cpp', 'LogoScreen.cpp', 'MenuScreen.cpp', - 'Message.cpp', 'NumericalMethod.cpp', 'ObjectModel.cpp', 'PhysicsModel.cpp', Modified: trunk/CSP/CSPSim/VisualStudio/CSPSimAppli/CSPSimAppli.vcproj =================================================================== --- trunk/CSP/CSPSim/VisualStudio/CSPSimAppli/CSPSimAppli.vcproj 2004-12-18 11:39:57 UTC (rev 1410) +++ trunk/CSP/CSPSim/VisualStudio/CSPSimAppli/CSPSimAppli.vcproj 2004-12-18 11:48:11 UTC (rev 1411) @@ -261,9 +261,6 @@ RelativePath="..\..\Source\MenuScreen.cpp"> </File> <File - RelativePath="..\..\Source\Message.cpp"> - </File> - <File RelativePath="..\..\Source\NumericalMethod.cpp"> </File> <File @@ -458,9 +455,6 @@ RelativePath="..\..\Include\MenuScreen.h"> </File> <File - RelativePath="..\..\Include\Message.h"> - </File> - <File RelativePath="..\..\Include\NumericalMethod.h"> </File> <File Modified: trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj =================================================================== --- trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2004-12-18 11:39:57 UTC (rev 1410) +++ trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2004-12-18 11:48:11 UTC (rev 1411) @@ -285,9 +285,6 @@ RelativePath="..\..\Source\MenuScreen.cpp"> </File> <File - RelativePath="..\..\Source\Message.cpp"> - </File> - <File RelativePath="..\..\Source\NumericalMethod.cpp"> </File> <File @@ -524,9 +521,6 @@ RelativePath="..\..\Include\MenuScreen.h"> </File> <File - RelativePath="..\..\Include\Message.h"> - </File> - <File RelativePath="..\..\Include\NumericalMethod.h"> </File> <File |
From: <sv...@ww...> - 2004-12-18 11:40:03
|
Author: mkrose Date: 2004-12-18 03:39:57 -0800 (Sat, 18 Dec 2004) New Revision: 1410 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Engine.cpp Log: Hack upon hack to prevent engine cutoff when stationary in a light tailwind (AOA near 180 deg). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1410 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:38:01 UTC (rev 1409) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:39:57 UTC (rev 1410) @@ -11,6 +11,9 @@ 3160. You still need to specify ServerIp to connect to remote index servers. + * Hack upon hack to prevent engine cutoff when stationary in a light + tailwind (AOA near 180 deg). + 2004-12-18: delta * Until we make a more accurate FCS, we'll use the animation binding to provide a better visual approximation of the animations of the "ailerons" Modified: trunk/CSP/CSPSim/Source/Engine.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Engine.cpp 2004-12-18 11:38:01 UTC (rev 1409) +++ trunk/CSP/CSPSim/Source/Engine.cpp 2004-12-18 11:39:57 UTC (rev 1410) @@ -169,17 +169,20 @@ void EngineDynamics::cut() { double alpha = b_Alpha->value(); + // f is a totally ad-hoc means of preventing a slight tailwind from killing + // the engine when we aren't moving. + double f = simdata::clampTo(4.0 * (b_Mach->value() - 0.25), 0.0, 1.0); if ((std::abs(alpha) > simdata::PI_2) || (alpha < -m_A)) { - m_Force = simdata::Vector3::ZERO; + m_Force *= (1.0 - f); } else if (alpha < m_B) { - m_Force *= cos( flatten(alpha)); + m_Force *= (1.0 - f) + f * cos(flatten(alpha)); } else if (alpha < m_C) { - m_Force *= cos(m_B + (simdata::PI_2 - m_B)*(alpha - m_B)/(m_C-m_B)); + m_Force *= (1.0 - f) + f * cos(m_B + (simdata::PI_2 - m_B)*(alpha - m_B)/(m_C-m_B)); } else { - m_Force = simdata::Vector3::ZERO; + m_Force *= (1.0 - f); } } |
From: <sv...@ww...> - 2004-12-18 11:38:07
|
Author: mkrose Date: 2004-12-18 03:38:01 -0800 (Sat, 18 Dec 2004) New Revision: 1409 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/CSPSim.cpp Log: Simplify the network parameters in the ini file. If unset, LocalIp should default to the correct value. ExternalIp is no longer needed or used. LocalPort now defaults to 3161, and ServerPort defaults to 3160. You still need to specify ServerIp to connect to remote index servers. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1409 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:32:30 UTC (rev 1408) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:38:01 UTC (rev 1409) @@ -5,6 +5,12 @@ * Add hooks in GameScreen to catch player join/quit events and display a message on the screen. + * Simplify the network parameters in the ini file. If unset, LocalIp + should default to the correct value. ExternalIp is no longer needed + or used. LocalPort now defaults to 3161, and ServerPort defaults to + 3160. You still need to specify ServerIp to connect to remote index + servers. + 2004-12-18: delta * Until we make a more accurate FCS, we'll use the animation binding to provide a better visual approximation of the animations of the "ailerons" Modified: trunk/CSP/CSPSim/Source/CSPSim.cpp =================================================================== --- trunk/CSP/CSPSim/Source/CSPSim.cpp 2004-12-18 11:32:30 UTC (rev 1408) +++ trunk/CSP/CSPSim/Source/CSPSim.cpp 2004-12-18 11:38:01 UTC (rev 1409) @@ -367,24 +367,18 @@ // create the networking layer if (g_Config.getBool("Networking", "UseNetworking", false, true)) { simnet::netlog().setLogPriority(simdata::LOG_INFO); - std::string local_address = g_Config.getString("Networking", "LocalIp", "127.0.0.1", true); - int local_port = g_Config.getInt("Networking", "LocalPort", 14111, true); - + std::string default_ip = simnet::NetworkNode().getIpString(); + std::string local_address = g_Config.getString("Networking", "LocalIp", default_ip, true); + int local_port = g_Config.getInt("Networking", "LocalPort", 3161, true); + simnet::NetworkNode local_node(local_address, local_port); CSP_LOG(NETWORK, INFO, "Initializing network interface " << local_address << ":" << local_port); + int incoming_bw = g_Config.getInt("Networking", "IncomingBandwidth", 36000, true); int outgoing_bw = g_Config.getInt("Networking", "OutgoingBandwidth", 36000, true); - simnet::NetworkNode local_node(local_address, local_port); m_NetworkClient = new simnet::Client(local_node, incoming_bw, outgoing_bw); - if (g_Config.hasKey("Networking", "ExternalIp")) { - std::string external_address = g_Config.getString("Networking", "ExternalIp"); - simnet::NetworkNode external_node(external_address, local_port); - CSP_LOG(NETWORK, INFO, "External interface is " << external_address << ":" << local_port); - m_NetworkClient->setExternalNode(external_node); - } - - std::string server_address = g_Config.getString("Networking", "ServerIp", "127.0.0.1", true); - int server_port = g_Config.getInt("Networking", "ServerPort", 14110, true); + std::string server_address = g_Config.getString("Networking", "ServerIp", default_ip, true); + int server_port = g_Config.getInt("Networking", "ServerPort", 3160, true); CSP_LOG(NETWORK, INFO, "Connecting to server: " << server_address << ":" << server_port); simnet::NetworkNode server_node(server_address, server_port); if (!m_NetworkClient->connectToServer(server_node, 5.0 /*seconds*/)) { |
From: <sv...@ww...> - 2004-12-18 11:32:36
|
Author: mkrose Date: 2004-12-18 03:32:30 -0800 (Sat, 18 Dec 2004) New Revision: 1408 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/GameScreen.h trunk/CSP/CSPSim/Source/GameScreen.cpp Log: Add hooks in GameScreen to catch player join/quit events and display a message on the screen. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1408 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:28:17 UTC (rev 1407) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:32:30 UTC (rev 1408) @@ -1,15 +1,19 @@ Version 0.4.0 (in progress) -=========================== - -2004-12-18: delta -* Until we make a more accurate FCS, we'll use the animation binding to - provide a better visual approximation of the animations of the "ailerons" - and "elevators". - -* Deflection limits are set to -16 deg and +25 deg. - -==> ALL USERS: run RebuildData.py. - +=========================== + +2004-12-18: onsight + * Add hooks in GameScreen to catch player join/quit events and display + a message on the screen. + +2004-12-18: delta + * Until we make a more accurate FCS, we'll use the animation binding to + provide a better visual approximation of the animations of the "ailerons" + and "elevators". + + * Deflection limits are set to -16 deg and +25 deg. + +==> ALL USERS: run RebuildData.py. + 2004-12-17: onsight * Add a message box to the onscreen display that displays/scrolls several lines of text, and fades out when unchanged for several seconds. @@ -30,10 +34,10 @@ * Updated FlightModel and m2k xml related files. ==> ALL USERS: run RebuildData.py. - + 2004-12-17: Lologramme * Add hangar - + 2004-12-16: Lologramme * add control tower @@ -62,17 +66,17 @@ 2004-12-15: delta * Moved the aircraft at start up to be at the bottom of the runway. - + 2004-12-14: onsight * Minor fix for the engine cutoff function under linux. 2004-12-13: Lologramme * Replace Runway by New runway with taxi and roads - + 2004-12-14: delta * Minor anti-warnings changes in SimCore/Battlefield/LocalBattlefield.cpp. - * Slighty flatten the joystick inputs. + * Slighty flatten the joystick inputs. * Other minor changes. Modified: trunk/CSP/CSPSim/Include/GameScreen.h =================================================================== --- trunk/CSP/CSPSim/Include/GameScreen.h 2004-12-18 11:28:17 UTC (rev 1407) +++ trunk/CSP/CSPSim/Include/GameScreen.h 2004-12-18 11:32:30 UTC (rev 1408) @@ -28,6 +28,7 @@ #include <osg/ref_ptr> #include <SimData/Ref.h> #include <SimData/ScopedPointer.h> +#include <SimCore/Util/CallbackDecl.h> #include "BaseScreen.h" class PyConsole; @@ -149,7 +150,7 @@ virtual void initInterface(); -protected: +private: size_t m_ViewMode; void setCamera(double dt); @@ -170,15 +171,11 @@ simdata::ScopedPointer<CameraAgent> m_CameraAgent; simdata::ScopedPointer<CameraCommands> m_CameraCommands; CameraCommand* m_CurrentCameraCommand; - /* - CameraCommand *m_PanLeft,*m_PanRight,*m_PanLeftRightStop; - CameraCommand *m_PanUp,*m_PanDown,*m_PanUpDownStop; - CameraCommand *m_ZoomIn,*m_ZoomOut,*m_ZoomStop,*m_ZoomStepIn,*m_ZoomStepOut; - MouseCommand* m_Mouse; - CameraCommand* m_CurrentCameraCommand; - void createCameraCommand(); - void deleteCameraCommands(); - */ + + void onPlayerJoin(int, const std::string&); + void onPlayerQuit(int, const std::string&); + simcore::ScopedCallback2<int, const std::string&> m_OnPlayerJoin; + simcore::ScopedCallback2<int, const std::string&> m_OnPlayerQuit; }; #endif // __GAMESCREEN_H__ Modified: trunk/CSP/CSPSim/Source/GameScreen.cpp =================================================================== --- trunk/CSP/CSPSim/Source/GameScreen.cpp 2004-12-18 11:28:17 UTC (rev 1407) +++ trunk/CSP/CSPSim/Source/GameScreen.cpp 2004-12-18 11:32:30 UTC (rev 1408) @@ -48,6 +48,7 @@ #include "VirtualScene.h" #include <SimCore/Battlefield/LocalBattlefield.h> +#include <SimCore/Util/Callback.h> #include <SimCore/Util/Log.h> /* @@ -182,13 +183,14 @@ m_ActiveObject(0), m_CameraAgent(new CameraAgent(ViewFactory())), m_CameraCommands(new CameraCommands), - m_CurrentCameraCommand(0) { + m_CurrentCameraCommand(0), + m_OnPlayerJoin(this, &GameScreen::onPlayerJoin), + m_OnPlayerQuit(this, &GameScreen::onPlayerQuit) +{ initInterface(); - //createCameraCommand(); } GameScreen::~GameScreen() { - //deleteCameraCommands(); m_CurrentCameraCommand = 0; } @@ -219,10 +221,26 @@ m_InfoView->setSceneData(m_InfoGroup.get()); simdata::Ref<DynamicObject> ao = CSPSim::theSim->getActiveObject(); - if (ao.valid()) + if (ao.valid()) { setActiveObject(ao); + } + + LocalBattlefield *bf = CSPSim::theSim->getBattlefield(); + if (bf) { + bf->registerPlayerJoinCallback(*m_OnPlayerJoin); + bf->registerPlayerQuitCallback(*m_OnPlayerQuit); + } } +void GameScreen::onPlayerJoin(int, const std::string& name) { + m_ScreenInfoManager->addMessage(name + " has joined the game"); +} + +void GameScreen::onPlayerQuit(int, const std::string& name) { + m_ScreenInfoManager->addMessage(name + " has left the game"); +} + + void GameScreen::onExit() { } |
From: <sv...@ww...> - 2004-12-18 11:28:23
|
Author: mkrose Date: 2004-12-18 03:28:17 -0800 (Sat, 18 Dec 2004) New Revision: 1407 Modified: trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp trunk/CSP/SimCore/Battlefield/LocalBattlefield.h trunk/CSP/SimCore/SConscript Log: Add player join and quit signals to allow the main sim to trigger actions on these events. This change makes SimCore depend on libsigc++-1.2. ==>WINDOWS users: add libsigc++-1.2 to the SimCore build. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1407 Modified: trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp =================================================================== --- trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp 2004-12-18 11:05:26 UTC (rev 1406) +++ trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp 2004-12-18 11:28:17 UTC (rev 1407) @@ -26,6 +26,7 @@ #include <SimCore/Battlefield/Battlefield.h> #include <SimCore/Battlefield/SceneManager.h> #include <SimCore/Util/SynchronousUpdate.h> +#include <SimCore/Util/Callback.h> #include <SimNet/ClientServer.h> #include <SimNet/DispatchHandler.h> @@ -195,7 +196,9 @@ m_ServerTimeOffset(0), m_ScanElapsedTime(0), m_ScanRate(0), - m_ScanIndex(0) + m_ScanIndex(0), + m_PlayerJoinSignal(new simcore::Signal2<int, const std::string&>()), + m_PlayerQuitSignal(new simcore::Signal2<int, const std::string&>()) { // if no network connection, ids will be assigned sequentially // starting at 1024. otherwise, the id pool is initialized when @@ -369,28 +372,42 @@ void LocalBattlefield::onPlayerQuit(simdata::Ref<PlayerQuit> const &msg, simdata::Ref<simnet::MessageQueue> const &) { SIMNET_LOG(MESSAGE, INFO, *msg); const PeerId id = msg->peer_id(); + PlayerInfoMap::iterator iter = m_PlayerInfoMap.find(id); + if (iter != m_PlayerInfoMap.end()) { + CSP_LOG(BATTLEFIELD, INFO, iter->second->GetName() << " just quit the game! (id " << id << ")"); + m_PlayerQuitSignal->emit(id, iter->second->GetName()); + m_PlayerInfoMap.erase(iter); + } else { + CSP_LOG(BATTLEFIELD, WARNING, "received quit message for unmapped peer " << id); + } if (m_NetworkClient->getPeer(id)) { - PlayerInfoMap::iterator iter = m_PlayerInfoMap.find(id); - if (iter != m_PlayerInfoMap.end()) { - CSP_LOG(BATTLEFIELD, INFO, iter->second->GetName() << " just quit the game!"); - m_PlayerInfoMap.erase(iter); - } m_NetworkClient->disconnectPeer(id); // the global battlefield should send separate messages to remove // all objects owned by this peer + } else { + CSP_LOG(BATTLEFIELD, WARNING, "received quit message for unknown peer " << id); } } +void LocalBattlefield::registerPlayerJoinCallback(simcore::Callback2<int, const std::string&> &callback) { + m_PlayerJoinSignal->connect(callback); +} + +void LocalBattlefield::registerPlayerQuitCallback(simcore::Callback2<int, const std::string&> &callback) { + m_PlayerQuitSignal->connect(callback); +} + void LocalBattlefield::onPlayerJoin(simdata::Ref<PlayerJoin> const &msg, simdata::Ref<simnet::MessageQueue> const &) { SIMNET_LOG(MESSAGE, INFO, *msg); const PeerId id = msg->peer_id(); if (!m_NetworkClient->getPeer(id)) { - CSP_LOG(BATTLEFIELD, INFO, msg->user_name() << " just joined the game!"); const simnet::NetworkNode remote_node(msg->ip_addr(), msg->port()); + CSP_LOG(BATTLEFIELD, INFO, msg->user_name() << " just joined the game! (id " << id << ", ip " << remote_node << ")"); const int incoming_bw = msg->incoming_bw(); const int outgoing_bw = msg->outgoing_bw(); m_PlayerInfoMap[id] = new PlayerInfo(id, msg->user_name()); m_NetworkClient->addPeer(id, remote_node, incoming_bw, outgoing_bw); + m_PlayerJoinSignal->emit(id, msg->user_name()); } } @@ -731,21 +748,31 @@ const int detail = m_PeerUpdates[n_updates - 1].detail; assert(detail >=0 && detail < DETAIL_LEVELS); + // the object may choose to skip an update due to low estimated error + bool skipped = false; + // ok to use slightly stale messages. note that if we refresh the cache for any // peer, all other peers at that detail level will get the new message. if (m_UpdateTime - m_DetailCache[detail].last_refresh > interval / 10) { // FIXME the state message will be used for multiple peers that are updated at different // intervals, so the content should not depend on interval. simnet::NetworkMessage::Ref msg = m_Wrapper->unit()->getState(timestamp, 0 /*interval*/, detail); - msg->setRoutingType(ROUTE_UNIT_UPDATE); - msg->setRoutingData(m_Wrapper->id()); - msg->setPriority(2); // XXX msg/detail dependent? - m_DetailCache[detail].msg = msg; - m_DetailCache[detail].last_refresh = m_UpdateTime; + if (msg.valid()) { + msg->setRoutingType(ROUTE_UNIT_UPDATE); + msg->setRoutingData(m_Wrapper->id()); + msg->setPriority(2); // XXX msg/detail dependent? + m_DetailCache[detail].msg = msg; + m_DetailCache[detail].last_refresh = m_UpdateTime; + } else { + skipped = true; + } } - // hack for sorting by detail level, see below - targets[target_count++] = (detail << 24) | m_PeerUpdates[n_updates - 1].id; + if (!skipped) { + // hack for sorting by detail level, see below + targets[target_count++] = (detail << 24) | m_PeerUpdates[n_updates - 1].id; + } + std::push_heap(m_PeerUpdates.begin(), m_PeerUpdates.end()); } @@ -769,7 +796,7 @@ } void LocalBattlefield::UnitUpdateProxy::setUpdateParameters(PeerId id, double interval, simdata::uint16 detail) { - assert(detail >= 0 && detail < DETAIL_LEVELS); + assert(detail < DETAIL_LEVELS); simdata::uint16 interval_ms = static_cast<simdata::uint16>(interval * 1000.0); const unsigned n = m_PeerUpdates.size(); for (unsigned i = 0; i < n; ++i) { Modified: trunk/CSP/SimCore/Battlefield/LocalBattlefield.h =================================================================== --- trunk/CSP/SimCore/Battlefield/LocalBattlefield.h 2004-12-18 11:05:26 UTC (rev 1406) +++ trunk/CSP/SimCore/Battlefield/LocalBattlefield.h 2004-12-18 11:28:17 UTC (rev 1407) @@ -30,9 +30,8 @@ #include <SimCore/Battlefield/Battlefield.h> #include <SimCore/Battlefield/BattlefieldMessages.h> +#include <SimCore/Util/CallbackDecl.h> -#include <SimNet/NetworkNode.h> // XXX forward declare InetHostAddress - class SceneManager; class UpdateMaster; @@ -87,6 +86,9 @@ return m_ConnectionState == CONNECTION_ACTIVE; } + void registerPlayerJoinCallback(simcore::Callback2<int, const std::string&> &callback); + void registerPlayerQuitCallback(simcore::Callback2<int, const std::string&> &callback); + private: struct ObjectIdPool; @@ -185,6 +187,9 @@ void scanUnit(LocalUnitWrapper *wrapper); void continueUnitScan(double dt); + + simdata::ScopedPointer<simcore::Signal2<int, const std::string&> > m_PlayerJoinSignal; + simdata::ScopedPointer<simcore::Signal2<int, const std::string&> > m_PlayerQuitSignal; }; Modified: trunk/CSP/SimCore/SConscript =================================================================== --- trunk/CSP/SimCore/SConscript 2004-12-18 11:05:26 UTC (rev 1406) +++ trunk/CSP/SimCore/SConscript 2004-12-18 11:28:17 UTC (rev 1407) @@ -23,8 +23,18 @@ 'Util', ] +def PackageConfig(env): + print '<< SimCore Config >>' + conf = build.CustomConfigure(env) + conf.CheckPkgConfig('sigc++-1.2', version='1.2.5', lib_name='sigc') + env = conf.Finish() + env.ParseConfig('pkg-config --cflags --libs sigc++-1.2') + env = env.Copy() +env.SetConfig(PackageConfig) + OBJECTS = build.BuildModules(env, MODULES) libsimcore = env.StaticLibrary('simcore', OBJECTS) Alias(['all', 'simcore'], [libsimcore]) + |
From: <sv...@ww...> - 2004-12-18 11:05:38
|
Author: mkrose Date: 2004-12-18 03:05:26 -0800 (Sat, 18 Dec 2004) New Revision: 1406 Modified: trunk/CSP/IndexServer/IndexServer.cpp trunk/CSP/SimCore/Battlefield/GlobalBattlefield.h Log: Part of a significant simplification of ip address specifications for the index server and clients. The global battlefield and IS now use the inbound ip address to infer the remote external ip rather than forcing the client to specify it explicitly. Improve the error checking and correctly handle peer-peer introductions for both local and remote peers. NOTE: in IndexServer.ini, you must specify ExternalIp=x.x.x.x to receive connections from external clients (assuming you are running on a LAN behind a NAT router). If unspecified, the Bind parameter will now default to the primary ethernet interface, port 3160. If in doubt, just delete the entire [Network] section, rerun IS to regenerate the default fields, and add ExternalIp = {your external ip}. If you have a dynamic ip assignment, the latter must be updated whenever your ip changes. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1406 Modified: trunk/CSP/IndexServer/IndexServer.cpp =================================================================== --- trunk/CSP/IndexServer/IndexServer.cpp 2004-12-18 11:00:39 UTC (rev 1405) +++ trunk/CSP/IndexServer/IndexServer.cpp 2004-12-18 11:05:26 UTC (rev 1406) @@ -42,7 +42,9 @@ void IndexServer::initPrimaryInterface() { assert(m_NetworkServer.isNull()); - const std::string server_interface = g_Config.getString("Network", "Bind", "127.0.0.1:4999", true); + simnet::NetworkNode default_node; + const std::string server_interface = g_Config.getString("Network", "Bind", default_node.getIpString() + ":3160", true); + const std::string external_ip = g_Config.getString("Network", "ExternalIp", "", false); const std::string::size_type colon = server_interface.find(':'); std::string address; simnet::Port port = 0; @@ -55,11 +57,32 @@ std::cerr << "Should be of the form www.xxx.yyy.zzz:port\n"; ::exit(1); } - CSP_LOG(APP, INFO, "binding to interface " << address << ":" << port); - simnet::NetworkNode local(address, port); + simnet::NetworkNode local_node(address, port); + CSP_LOG(APP, INFO, "binding to interface " << local_node); + const int incoming_bw = g_Config.getInt("Network", "IncomingBandwidth", 12000, true); const int outgoing_bw = g_Config.getInt("Network", "OutgoingBandwidth", 12000, true); - m_NetworkServer = new simnet::Server(local, incoming_bw, outgoing_bw); + m_NetworkServer = new simnet::Server(local_node, incoming_bw, outgoing_bw); + + if (external_ip.empty()) { + if (!local_node.isRoutable()) { + CSP_LOG(APP, WARNING, "no external ip address specified; accepting only local (LAN) connections"); + } + } else { + if (!local_node.isRoutable()) { + simnet::NetworkNode external_node(external_ip, port); + CSP_LOG(APP, INFO, "external interface is " << external_node); + if (external_node.isRoutable()) { + m_NetworkServer->setExternalNode(external_node); + } else { + CSP_LOG(APP, ERROR, "external interface is not routable; ignoring ExternalIp and accepting only local (LAN) connections"); + } + } else { + if (external_ip != address) { + CSP_LOG(APP, ERROR, "binding to a routable interface that does not match the specified external ip (" << external_ip << "); ignoring ExternalIp"); + } + } + } } void IndexServer::initialize() { Modified: trunk/CSP/SimCore/Battlefield/GlobalBattlefield.h =================================================================== --- trunk/CSP/SimCore/Battlefield/GlobalBattlefield.h 2004-12-18 11:00:39 UTC (rev 1405) +++ trunk/CSP/SimCore/Battlefield/GlobalBattlefield.h 2004-12-18 11:05:26 UTC (rev 1406) @@ -186,7 +186,7 @@ dispatch->registerHandler(this, &GlobalBattlefield::onRegisterUnit); } - PlayerJoin::Ref makeJoin(const PeerId id) { + PlayerJoin::Ref makeJoin(const PeerId id, bool local) { PlayerJoin::Ref join = new PlayerJoin(); join->setRoutingType(ROUTE_COMMAND); join->setReliable(); @@ -197,29 +197,23 @@ join->set_outgoing_bw(static_cast<int>(peer_info->outgoingBandwidth())); join->set_incoming_bw(static_cast<int>(peer_info->incomingBandwidth())); join->set_port(peer_info->getNode().getPort()); - // default to the external ip (overridden in announceJoin) - join->set_ip_addr(data.external_ip_addr); + join->set_ip_addr(local ? data.internal_ip_addr : data.external_ip_addr); return join; } void announceJoin(const PeerId id) { - //ClientData &new_client_data = m_ClientData[id]; - PlayerJoin::Ref join = makeJoin(id); + ClientData &new_client_data = m_ClientData[id]; + PlayerJoin::Ref local_join = makeJoin(id, true); + PlayerJoin::Ref remote_join = makeJoin(id, false); for (ClientDataMap::const_iterator iter = m_ClientData.begin(); iter != m_ClientData.end(); ++iter) { // don't announce to ourself if (iter->first == id) continue; // if the external ips match, these hosts are probably on a LAN and should communicate via their // internal interfaces; otherwise use the external ip. - /* XXX broken since join is shared for all outbound messages - if (iter->second.external_ip_addr == new_client_data.external_ip_addr) { - join->set_ip_addr(new_client_data.internal_ip_addr); - } else { - join->set_ip_addr(new_client_data.external_ip_addr); - } - */ - - m_NetworkServer->queue()->queueMessage(join, iter->first); + PlayerJoin::Ref join; + bool local = (iter->second.external_ip_addr == new_client_data.external_ip_addr); + m_NetworkServer->queue()->queueMessage(local ? local_join : remote_join, iter->first); } } @@ -234,12 +228,14 @@ } - // FIXME sends one message for each existing player. + // FIXME sends one message for each existing player (should be batched into one, or a few, messages). void announceExistingPlayers(const PeerId new_id) { + ClientData &new_client_data = m_ClientData[new_id]; for (ClientDataMap::const_iterator iter = m_ClientData.begin(); iter != m_ClientData.end(); ++iter) { const PeerId id = iter->first; if (id == new_id) continue; - PlayerJoin::Ref join = makeJoin(id); + bool local = (iter->second.external_ip_addr == new_client_data.external_ip_addr); + PlayerJoin::Ref join = makeJoin(id, local); m_NetworkServer->queue()->queueMessage(join, new_id); } } @@ -258,35 +254,39 @@ PeerId id = msg->getSource(); simnet::PeerInfo const *peer_info = m_NetworkServer->getPeer(id); + uint32 inbound_ip_addr = peer_info->getNode().getIp(); uint32 internal_ip_addr = msg->has_internal_ip_addr() ? msg->internal_ip_addr() : inbound_ip_addr; - uint32 external_ip_addr = msg->has_external_ip_addr() ? msg->external_ip_addr() : inbound_ip_addr; - ost::InetAddress decode_addr; - CSP_LOG(BATTLEFIELD, INFO, "join request from " << (decode_addr = inbound_ip_addr).getHostname()); - CSP_LOG(BATTLEFIELD, INFO, " internal ip " << (decode_addr = internal_ip_addr).getHostname()); - CSP_LOG(BATTLEFIELD, INFO, " external ip " << (decode_addr = external_ip_addr).getHostname()); + CSP_LOG(BATTLEFIELD, INFO, "join request from " << peer_info->getNode()); + CSP_LOG(BATTLEFIELD, INFO, " internal ip " << simnet::NetworkNode::ipToString(internal_ip_addr)); // basic sanity checking on ip addresses - if (simnet::NetworkNode::isRoutable(internal_ip_addr) && (internal_ip_addr != external_ip_addr)) { + if (simnet::NetworkNode::isRoutable(internal_ip_addr) && (internal_ip_addr != inbound_ip_addr)) { CSP_LOG(BATTLEFIELD, ERROR, "join rejected: internal ip routable, but does not match external ip"); response->set_details("internal ip routable, but does not match external ip"); response.send(queue); return; } - if (simnet::NetworkNode::isRoutable(inbound_ip_addr) && (external_ip_addr != inbound_ip_addr)) { - CSP_LOG(BATTLEFIELD, ERROR, "join rejected: inbound ip routable, but does not match external ip"); - response->set_details("inbound ip is routable, but does not match external ip"); - response.send(queue); - return; - } if (!simnet::NetworkNode::isRoutable(inbound_ip_addr) && (internal_ip_addr != inbound_ip_addr)) { CSP_LOG(BATTLEFIELD, ERROR, "join rejected: inbound ip unroutable, but does not match internal ip"); response->set_details("inbound ip is unroutable, but does not match internal ip"); response.send(queue); return; } + if (simnet::NetworkNode::isRoutable(inbound_ip_addr) && (!m_NetworkServer->getExternalNode().isRoutable())) { + CSP_LOG(BATTLEFIELD, ERROR, "join rejected: inbound ip routable, but server is not configured to accept remote connections (no external ip set)."); + response->set_details("server not configured to accept remote connections"); + response.send(queue); + return; + } + // the correct "external" ip for remote clients is the ip the packets come from. for clients + // on the same lan, use the server's "external" ip address. this simplifies the configuration, + // since only the server needs to specify an external ip address; the clients can just bind to + // their local interfaces and the server will decide which ip to use when introducing two peers. + uint32 external_ip_addr = simnet::NetworkNode::isRoutable(inbound_ip_addr) ? inbound_ip_addr : m_NetworkServer->getExternalNode().getIp(); + ClientData &data = m_ClientData[id]; response->set_success(true); response->set_details("welcome " + msg->user_name()); |
From: <sv...@ww...> - 2004-12-18 11:00:49
|
Author: delta Date: 2004-12-18 03:00:39 -0800 (Sat, 18 Dec 2004) New Revision: 1405 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/systems.xml Log: * Until we make a more accurate FCS, we'll use the animation binding to provide a better visual approximation of the animations of the "ailerons" and "elevators". * Deflection limits are set to -16 deg and +25 deg. ==> ALL USERS: run RebuildData.py. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1405 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-18 10:54:46 UTC (rev 1404) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-18 11:00:39 UTC (rev 1405) @@ -1,5 +1,15 @@ Version 0.4.0 (in progress) -=========================== +=========================== + +2004-12-18: delta +* Until we make a more accurate FCS, we'll use the animation binding to + provide a better visual approximation of the animations of the "ailerons" + and "elevators". + +* Deflection limits are set to -16 deg and +25 deg. + +==> ALL USERS: run RebuildData.py. + 2004-12-17: onsight * Add a message box to the onscreen display that displays/scrolls several lines of text, and fades out when unchanged for several seconds. @@ -20,10 +30,10 @@ * Updated FlightModel and m2k xml related files. ==> ALL USERS: run RebuildData.py. - + 2004-12-17: Lologramme * Add hangar - + 2004-12-16: Lologramme * add control tower @@ -50,16 +60,19 @@ ==> Run ComplileData.py after updating to pick up the changes. +2004-12-15: delta + * Moved the aircraft at start up to be at the bottom of the runway. + 2004-12-14: onsight * Minor fix for the engine cutoff function under linux. 2004-12-13: Lologramme * Replace Runway by New runway with taxi and roads - + 2004-12-14: delta * Minor anti-warnings changes in SimCore/Battlefield/LocalBattlefield.cpp. - * Slighty flatten the joystick inputs. + * Slighty flatten the joystick inputs. * Other minor changes. Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml 2004-12-18 10:54:46 UTC (rev 1404) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml 2004-12-18 11:00:39 UTC (rev 1405) @@ -29,27 +29,51 @@ <Vector name="axis">0 -0.34 0.94</Vector> </Object> + <Object class="DrivenRotation"> + <String name="channel_name">ControlSurfaces.ElevatorDeflection</String> + <Key name="model_id">Aircraft.LeftOuterAileron</Key> + <Int name="lod_limit">1</Int> + <Vector name="axis">-1 0 0</Vector> + </Object> <Object class="DrivenRotation"> <String name="channel_name">ControlSurfaces.ElevatorDeflection</String> <Key name="model_id">Aircraft.LeftAileron</Key> <Int name="lod_limit">1</Int> <Vector name="axis">-1 0 0</Vector> </Object> + <Object class="DrivenRotation"> + <String name="channel_name">ControlSurfaces.ElevatorDeflection</String> + <Key name="model_id">Aircraft.RightOuterAileron</Key> + <Int name="lod_limit">1</Int> + <Vector name="axis">-1 0 0</Vector> + </Object> <Object class="DrivenRotation"> <String name="channel_name">ControlSurfaces.ElevatorDeflection</String> <Key name="model_id">Aircraft.RightAileron</Key> <Int name="lod_limit">1</Int> <Vector name="axis">-1 0 0</Vector> </Object> - + <Object class="DrivenRotation"> <String name="channel_name">ControlSurfaces.AileronDeflection</String> <Key name="model_id">Aircraft.LeftOuterAileron</Key> <Int name="lod_limit">1</Int> <Vector name="axis">1 0 0</Vector> </Object> + <Object class="DrivenRotation"> + <String name="channel_name">ControlSurfaces.AileronDeflection</String> + <Key name="model_id">Aircraft.LeftAileron</Key> + <Int name="lod_limit">1</Int> + <Vector name="axis">1 0 0</Vector> + </Object> <Object class="DrivenRotation"> <String name="channel_name">ControlSurfaces.AileronDeflection</String> + <Key name="model_id">Aircraft.RightAileron</Key> + <Int name="lod_limit">1</Int> + <Vector name="axis">-1 0 0</Vector> + </Object> + <Object class="DrivenRotation"> + <String name="channel_name">ControlSurfaces.AileronDeflection</String> <Key name="model_id">Aircraft.RightOuterAileron</Key> <Int name="lod_limit">1</Int> <Vector name="axis">-1 0 0</Vector> Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/systems.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/systems.xml 2004-12-18 10:54:46 UTC (rev 1404) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/systems.xml 2004-12-18 11:00:39 UTC (rev 1405) @@ -4,10 +4,10 @@ <List name="subsystems"> <Object class="AircraftInputSystem" /> <Object class="AircraftSimpleFCS"> - <Float name="elevator_limit0">-25.0</Float> + <Float name="elevator_limit0">-16.0</Float> <Float name="elevator_limit1">25.0</Float> <Float name="aileron_limit0">-16</Float> - <Float name="aileron_limit1">16</Float> + <Float name="aileron_limit1">25</Float> <Float name="rudder_limit">30.0</Float> <Float name="airbrake_limit">60.0</Float> <Float name="elevator_rate">60.0</Float> |
From: <sv...@ww...> - 2004-12-18 10:54:57
|
Author: mkrose Date: 2004-12-18 02:54:46 -0800 (Sat, 18 Dec 2004) New Revision: 1404 Modified: trunk/CSP/SimNet/ClientServer.cpp trunk/CSP/SimNet/ClientServer.h Log: Small improvements to error handling and reporting of client-server connections. Also expose ExternalIp for Servers and deprecate it for Clients. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1404 Modified: trunk/CSP/SimNet/ClientServer.cpp =================================================================== --- trunk/CSP/SimNet/ClientServer.cpp 2004-12-18 10:50:33 UTC (rev 1403) +++ trunk/CSP/SimNet/ClientServer.cpp 2004-12-18 10:54:46 UTC (rev 1404) @@ -114,8 +114,8 @@ } void Server::onConnectionRequest(simdata::Ref<ConnectionRequest> const &msg, simdata::Ref<MessageQueue> const &queue) { - SIMNET_LOG(HANDSHAKE, DEBUG, "connection request " << *msg); - PeerId client_id = msg->getSource(); + SIMNET_LOG(HANDSHAKE, INFO, "connection request " << *msg); + const PeerId client_id = msg->getSource(); ConnectionData &connection_data = m_PendingConnections[client_id]; if (msg->incoming_bw() < 1000 || msg->outgoing_bw() < 1000) { SIMNET_LOG(HANDSHAKE, ERROR, "client reports very low bandwidth " << *msg); @@ -149,6 +149,10 @@ m_NetworkInterface->disconnectPeer(msg->getSource()); } +void Server::setExternalNode(NetworkNode const &external_node) { + m_NetworkInterface->setExternalNode(external_node); +} + Client::Client(NetworkNode const &bind, int inbound_bw, int outbound_bw): ClientServerBase(bind, false /*isServer*/, inbound_bw, outbound_bw), m_Connected(false) @@ -156,6 +160,7 @@ } Client::~Client() { + disconnectFromServer(true); } bool Client::connectToServer(NetworkNode const &server, double timeout) { @@ -189,9 +194,17 @@ if (!msg->has_success() || !msg->success() || !msg->has_client_id()) { if (msg->has_response()) { SIMNET_LOG(HANDSHAKE, ERROR, "connection failed: " << msg->response()); + } else { + SIMNET_LOG(HANDSHAKE, ERROR, "connection failed: " << *msg); } // TODO set m_Connected to indicate failure + return; } + if (msg->client_id() < 2) { + SIMNET_LOG(HANDSHAKE, ERROR, "connection failed: bad id assignment from server"); + // TODO set m_Connected to indicate failure + return; + } m_NetworkInterface->setClientId(msg->client_id()); Acknowledge::Ref ack = new Acknowledge(); ack->setReliable(); Modified: trunk/CSP/SimNet/ClientServer.h =================================================================== --- trunk/CSP/SimNet/ClientServer.h 2004-12-18 10:50:33 UTC (rev 1403) +++ trunk/CSP/SimNet/ClientServer.h 2004-12-18 10:54:46 UTC (rev 1404) @@ -216,6 +216,10 @@ * @param outbound_bw The maximum outbound bandwidth for this server (bytes/sec). */ Server(NetworkNode const &bind, int inbound_bw, int outbound_bw); + + /** See NetworkInterface::setExternalNode(). + */ + void setExternalNode(NetworkNode const &external_node); }; @@ -237,9 +241,12 @@ Client(NetworkNode const &bind, int inbound_bw, int outbound_bw); /** See NetworkInterface::setExternalNode(). + * @deprecated External node is now only used by Server. */ void setExternalNode(NetworkNode const &external_node); + /** Destroy the client. If connected to a server, queue disconnect messages. + */ virtual ~Client(); /** Connect to a server. @@ -255,7 +262,7 @@ /** Send a disconnect message to the server, and set the client state to disconnected. * - * @param immediate If fales, the disconnect message is queued as a reliable + * @param immediate If false, the disconnect message is queued as a reliable * packet. If true, two disconnect message are sent immediately via using * normal (unreliable) transport. The latter should only be used if it is * truly necessary to shut down the connection in a hurry, as there is no |