Revision: 4854
          http://cel.svn.sourceforge.net/cel/?rev=4854&view=rev
Author:   kickvb
Date:     2012-05-04 17:08:46 +0000 (Fri, 04 May 2012)
Log Message:
-----------
Merged revisions 4853 via svnmerge from 
https://cel.svn.sourceforge.net/svnroot/cel/cel/trunk

........
  r4853 | kickvb | 2012-05-04 19:03:10 +0200 (Fri, 04 May 2012) | 2 lines
  
  Fix for the application being launched in server only mode. There is still a 
problem with true NPC actors that are no more updated in this case. Thanks to 
Vincent for pointing this.
........

Revision Links:
--------------
    http://cel.svn.sourceforge.net/cel/?rev=4853&view=rev

Modified Paths:
--------------
    cel/branches/release/V2.0/apps/nettest/nettest.cpp
    cel/branches/release/V2.0/apps/nettest/nettest.h

Property Changed:
----------------
    cel/branches/release/V2.0/
    cel/branches/release/V2.0/scripts/0install/celstart-launcher-1.9.xml
    cel/branches/release/V2.0/scripts/0install/celstart-runtime-1.9.xml


Property changes on: cel/branches/release/V2.0
___________________________________________________________________
Modified: svnmerge-integrated
   - 
/cel/trunk:1-4188,4191-4263,4265,4268-4273,4277-4311,4314,4316,4319,4326,4345-4346,4360,4379,4419,4609,4621,4718,4720,4723,4731,4747,4801,4803-4804,4806-4810,4812-4813,4815-4817,4821,4824,4846
 /cel/branches/release/V1.4:1-3452,3796,3939
   + 
/cel/trunk:1-4188,4191-4263,4265,4268-4273,4277-4311,4314,4316,4319,4326,4345-4346,4360,4379,4419,4609,4621,4718,4720,4723,4731,4747,4801,4803-4804,4806-4810,4812-4813,4815-4817,4821,4824,4846,4853
 /cel/branches/release/V1.4:1-3452,3796,3939
Modified: svn:mergeinfo
   - /cel/branches/release/V1.4:3796,3939
/cel/branches/soc2009/quests:3863-3864,3875-3885,3887-3897,3906-3930,3938-3942,3945,3950-3951,3953-3954,4109-4111
/cel/branches/soc2010/navmesh:4054-4116
/cel/trunk:4191-4263,4265,4268-4273,4277-4311,4314,4316,4319,4326,4345-4346,4360,4379,4419,4609,4621,4718,4720,4731,4747,4803-4804,4806-4810,4812-4813,4815-4817,4821,4824,4846
   + /cel/branches/release/V1.4:3796,3939
/cel/branches/soc2009/quests:3863-3864,3875-3885,3887-3897,3906-3930,3938-3942,3945,3950-3951,3953-3954,4109-4111
/cel/branches/soc2010/navmesh:4054-4116
/cel/trunk:4191-4263,4265,4268-4273,4277-4311,4314,4316,4319,4326,4345-4346,4360,4379,4419,4609,4621,4718,4720,4731,4747,4803-4804,4806-4810,4812-4813,4815-4817,4821,4824,4846,4853

Modified: cel/branches/release/V2.0/apps/nettest/nettest.cpp
===================================================================
--- cel/branches/release/V2.0/apps/nettest/nettest.cpp  2012-05-04 17:03:10 UTC 
(rev 4853)
+++ cel/branches/release/V2.0/apps/nettest/nettest.cpp  2012-05-04 17:08:46 UTC 
(rev 4854)
@@ -87,6 +87,11 @@
 #include "propclass/trigger.h"
 #include "propclass/zone.h"
 
+#define APP_SINGLEPLAYER 0
+#define APP_SERVER 1
+#define APP_CLIENT 2
+#define APP_CLIENTSERVER 3
+
 NetTest::NetTest ()
 {
   SetApplicationName ("Network test");
@@ -442,8 +447,9 @@
   scfString regionname, startname;
   pczonemgr->GetLastStartLocation (&regionname, &startname);
 
-  if (pczonemgr->PointMesh (name, regionname, startname)
-       != CEL_ZONEERROR_OK)
+  if (applicationType != APP_SERVER
+      && pczonemgr->PointMesh (name, regionname, startname)
+      != CEL_ZONEERROR_OK)
   {
     ReportError ("Error finding npc start position!");
     return 0;
@@ -704,26 +710,20 @@
     //level_file = "basic_level.xml";
   }
 
-  // read client-server type of this application
-  // 0 means singleplayer, 1 means server, 2 means client, 3 means client + 
server + open to other players
-# define APP_SINGLEPLAYER 0
-# define APP_SERVER 1
-# define APP_CLIENT 2
-# define APP_CLIENTSERVER 3
-  //int app_type = APP_CLIENT;
-  int app_type = APP_CLIENTSERVER;
+  // read the client-server type of this application
+  applicationType = APP_CLIENTSERVER;
 
   if (cmdline->GetOption ("server") != 0)
   {
     if (cmdline->GetOption ("client") != 0)
-      app_type = APP_CLIENTSERVER;
+      applicationType = APP_CLIENTSERVER;
     else
-      app_type = APP_SERVER;
+      applicationType = APP_SERVER;
   }
   else if (cmdline->GetOption ("client") != 0)
-    app_type = APP_CLIENT;
+    applicationType = APP_CLIENT;
   else if (cmdline->GetOption ("singleplayer") != 0)
-    app_type = APP_SINGLEPLAYER;
+    applicationType = APP_SINGLEPLAYER;
 
   // read player name
   csString player_name = cmdline->GetOption ("player");
@@ -739,8 +739,7 @@
   celGameInfo game_info;
   game_info.game_name = "Test game";
   game_info.hostname = "127.0.0.1";
-  //game_info.port_nb = 25000;
-  game_info.port_nb = 25001;
+  game_info.port_nb = 25000;
   game_info.password = "nice password";
   game_info.max_players = 3;
   game_info.custom_data = pl->CreateDataBuffer (0);
@@ -753,7 +752,7 @@
   else player.player_name = "Test player";
 
   // launch networked game
-  switch (app_type)
+  switch (applicationType)
   {
     case APP_SINGLEPLAYER:
       csPrintf ("Creating singleplayer game with player %s\n",
@@ -782,6 +781,7 @@
         return false;
       break;
   }
+
   // This calls the default runloop. This will basically just keep
   // broadcasting process events to keep the game going.
   Run ();

Modified: cel/branches/release/V2.0/apps/nettest/nettest.h
===================================================================
--- cel/branches/release/V2.0/apps/nettest/nettest.h    2012-05-04 17:03:10 UTC 
(rev 4853)
+++ cel/branches/release/V2.0/apps/nettest/nettest.h    2012-05-04 17:08:46 UTC 
(rev 4854)
@@ -74,6 +74,8 @@
   GameFactoryManager* gfm;
   celNetworkServerStats stats;
 
+  int applicationType;
+
   void WriteShadow (int align,int x,int y,int fg,const char *str,...);
   void Write(int align,int x,int y,int fg,int bg,const char *str,...);
 


Property changes on: 
cel/branches/release/V2.0/scripts/0install/celstart-launcher-1.9.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - /cel/branches/release/V1.4/scripts/0install/celstart-launcher-1.9.xml:3796
/cel/branches/soc2009/quests/scripts/0install/celstart-launcher-1.9.xml:3863-3864,3875-3885,3887-3897,3906-3930,3938-3942,3945,3950-3951,3953-3954,4109-4111
/cel/branches/soc2010/navmesh/scripts/0install/celstart-launcher-1.9.xml:4054-4116
/cel/trunk/scripts/0install/celstart-launcher-1.9.xml:4191-4263,4265,4268-4273,4277-4311,4419,4609,4621,4720,4731,4747,4803-4804,4806-4810,4812-4813,4815-4817,4821,4824,4846
   + /cel/branches/release/V1.4/scripts/0install/celstart-launcher-1.9.xml:3796
/cel/branches/soc2009/quests/scripts/0install/celstart-launcher-1.9.xml:3863-3864,3875-3885,3887-3897,3906-3930,3938-3942,3945,3950-3951,3953-3954,4109-4111
/cel/branches/soc2010/navmesh/scripts/0install/celstart-launcher-1.9.xml:4054-4116
/cel/trunk/scripts/0install/celstart-launcher-1.9.xml:4191-4263,4265,4268-4273,4277-4311,4419,4609,4621,4720,4731,4747,4803-4804,4806-4810,4812-4813,4815-4817,4821,4824,4846,4853


Property changes on: 
cel/branches/release/V2.0/scripts/0install/celstart-runtime-1.9.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - /cel/branches/release/V1.4/scripts/0install/celstart-runtime-1.9.xml:3796
/cel/branches/soc2009/quests/scripts/0install/celstart-runtime-1.9.xml:3863-3864,3875-3885,3887-3897,3906-3930,3938-3942,3945,3950-3951,3953-3954,4109-4111
/cel/branches/soc2010/navmesh/scripts/0install/celstart-runtime-1.9.xml:4054-4116
/cel/trunk/scripts/0install/celstart-runtime-1.9.xml:4191-4263,4265,4268-4273,4277-4311,4419,4609,4621,4720,4731,4747,4803-4804,4806-4810,4812-4813,4815-4817,4821,4824,4846
   + /cel/branches/release/V1.4/scripts/0install/celstart-runtime-1.9.xml:3796
/cel/branches/soc2009/quests/scripts/0install/celstart-runtime-1.9.xml:3863-3864,3875-3885,3887-3897,3906-3930,3938-3942,3945,3950-3951,3953-3954,4109-4111
/cel/branches/soc2010/navmesh/scripts/0install/celstart-runtime-1.9.xml:4054-4116
/cel/trunk/scripts/0install/celstart-runtime-1.9.xml:4191-4263,4265,4268-4273,4277-4311,4419,4609,4621,4720,4731,4747,4803-4804,4806-4810,4812-4813,4815-4817,4821,4824,4846,4853

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Cel-cvs-update mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cel-cvs-update

Reply via email to