From: Andrew C. <ac...@us...> - 2005-03-17 23:07:15
|
Update of /cvsroot/planeshift/planeshift/src/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3787/src/client Modified Files: actionhandler.cpp Log Message: Various csString fixes Index: actionhandler.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/actionhandler.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** actionhandler.cpp 1 Feb 2005 21:31:37 -0000 1.4 --- actionhandler.cpp 17 Mar 2005 23:06:35 -0000 1.5 *************** *** 105,122 **** // <position><x/><y/><z/></position> // <location> csString xml; xml.Append( "<location>" ); xml.Append( "<sector>" ); xml.Append( sector ); xml.Append( "</sector>" ); xml.Append( "<mesh>" ); xml.Append( mesh ); xml.Append( "</mesh>" ); ! xml.Append( "<polygon>" ); xml.Append( (float)poly ); xml.Append( "</polygon>" ); xml.Append( "<position>" ); ! xml.Append( "<x>" ); xml.Append( pos.x ); xml.Append( "</x>" ); ! xml.Append( "<y>" ); xml.Append( pos.y ); xml.Append( "</y>" ); ! xml.Append( "<z>" ); xml.Append( pos.z ); xml.Append( "</z>" ); xml.Append( "</position>" ); xml.Append( "</location>" ); // Create Message ! psMapActionMessage queryMsg( 0, psMapActionMessage::QUERY, xml ); // Send Message --- 105,123 ---- // <position><x/><y/><z/></position> // <location> + csString polyStr; polyStr.Format( "%d", poly ); + csString posStr; posStr.Format( "<x>%f</x><y>%f</y><z>%f</z>", pos.x, pos.y, pos.z ); + csString xml; xml.Append( "<location>" ); xml.Append( "<sector>" ); xml.Append( sector ); xml.Append( "</sector>" ); xml.Append( "<mesh>" ); xml.Append( mesh ); xml.Append( "</mesh>" ); ! xml.Append( "<polygon>" ); xml.Append( polyStr ); xml.Append( "</polygon>" ); xml.Append( "<position>" ); ! xml.Append( posStr ); xml.Append( "</position>" ); xml.Append( "</location>" ); // Create Message ! psMapActionMessage queryMsg( 0, psMapActionMessage::QUERY, xml ); // Send Message |