phases are floats now

This commit is contained in:
Joe Shochet 2002-07-29 17:37:18 +00:00
parent b380b3b799
commit 82158d1b8b
3 changed files with 8 additions and 8 deletions

View File

@ -63,7 +63,7 @@ get_server_multifile_name(int index) const {
// Access: Public // Access: Public
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE Version DownloadDb:: INLINE Phase DownloadDb::
get_client_multifile_phase(string mfname) const { get_client_multifile_phase(string mfname) const {
return (_client_db.get_multifile_record_named(mfname))->_phase; return (_client_db.get_multifile_record_named(mfname))->_phase;
} }
@ -73,7 +73,7 @@ get_client_multifile_phase(string mfname) const {
// Access: Public // Access: Public
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE Version DownloadDb:: INLINE Phase DownloadDb::
get_server_multifile_phase(string mfname) const { get_server_multifile_phase(string mfname) const {
return (_server_db.get_multifile_record_named(mfname))->_phase; return (_server_db.get_multifile_record_named(mfname))->_phase;
} }

View File

@ -698,7 +698,7 @@ parse_mfr(uchar *start, int size) {
DatagramIterator di(_datagram); DatagramIterator di(_datagram);
PN_int32 mfr_name_length = di.get_int32(); PN_int32 mfr_name_length = di.get_int32();
mfr->_name = di.extract_bytes(mfr_name_length); mfr->_name = di.extract_bytes(mfr_name_length);
mfr->_phase = di.get_int32(); mfr->_phase = di.get_float64();
mfr->_size = di.get_int32(); mfr->_size = di.get_int32();
mfr->_status = di.get_int32(); mfr->_status = di.get_int32();
mfr->_num_files = di.get_int32(); mfr->_num_files = di.get_int32();
@ -854,7 +854,7 @@ bool DownloadDb::Db::
write(ofstream &write_stream, bool want_server_info) { write(ofstream &write_stream, bool want_server_info) {
// Declare these outside the loop so we do not keep creating // Declare these outside the loop so we do not keep creating
// and deleting them // and deleting them
PN_int32 phase; PN_float64 phase;
PN_int32 size; PN_int32 size;
PN_int32 status; PN_int32 status;
PN_int32 num_files; PN_int32 num_files;
@ -892,7 +892,7 @@ write(ofstream &write_stream, bool want_server_info) {
_datagram.append_data((*i)->_name.c_str(), (*i)->_name.length()); _datagram.append_data((*i)->_name.c_str(), (*i)->_name.length());
// Add all the properties // Add all the properties
_datagram.add_int32(phase); _datagram.add_float64(phase);
_datagram.add_int32(size); _datagram.add_int32(size);
_datagram.add_int32(status); _datagram.add_int32(status);
_datagram.add_int32(num_files); _datagram.add_int32(num_files);

View File

@ -55,7 +55,7 @@ MultifileRecord is a Vector<FileRecord>
*/ */
typedef int Version; typedef int Version;
typedef int Phase; typedef float Phase;
class EXPCL_PANDAEXPRESS DownloadDb { class EXPCL_PANDAEXPRESS DownloadDb {
PUBLISHED: PUBLISHED:
@ -93,8 +93,8 @@ PUBLISHED:
INLINE int get_server_multifile_size(string mfname) const; INLINE int get_server_multifile_size(string mfname) const;
INLINE void set_server_multifile_size(string mfname, int size); INLINE void set_server_multifile_size(string mfname, int size);
INLINE int get_client_multifile_phase(string mfname) const; INLINE Phase get_client_multifile_phase(string mfname) const;
INLINE int get_server_multifile_phase(string mfname) const; INLINE Phase get_server_multifile_phase(string mfname) const;
INLINE void set_client_multifile_incomplete(string mfname); INLINE void set_client_multifile_incomplete(string mfname);
INLINE void set_client_multifile_complete(string mfname); INLINE void set_client_multifile_complete(string mfname);