diff options
| author | oy <Tom_Adams@web.de> | 2011-04-02 11:55:37 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-02 11:55:37 +0200 |
| commit | 04a3b7be0042b48d1b6963801420ac4cb480bf4d (patch) | |
| tree | fb3e5210d8cc33c4253b82ca26f0d217662f7277 /src/engine/shared | |
| parent | 81453bd09ca9a495ebccbc6ca526299ef5d63dab (diff) | |
| download | zcatch-04a3b7be0042b48d1b6963801420ac4cb480bf4d.tar.gz zcatch-04a3b7be0042b48d1b6963801420ac4cb480bf4d.zip | |
fixed problem with recorded demo files. Closes #570
Diffstat (limited to 'src/engine/shared')
| -rw-r--r-- | src/engine/shared/demo.cpp | 8 | ||||
| -rw-r--r-- | src/engine/shared/demo.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/engine/shared/demo.cpp b/src/engine/shared/demo.cpp index 1eb33696..ac78f22f 100644 --- a/src/engine/shared/demo.cpp +++ b/src/engine/shared/demo.cpp @@ -22,7 +22,7 @@ CDemoRecorder::CDemoRecorder(class CSnapshotDelta *pSnapshotDelta) } // Record -int CDemoRecorder::Start(class IStorage *pStorage, class IConsole *pConsole, const char *pFilename, const char *pNetVersion, const char *pMap, int Crc, const char *pType) +int CDemoRecorder::Start(class IStorage *pStorage, class IConsole *pConsole, const char *pFilename, const char *pNetVersion, const char *pMap, unsigned Crc, const char *pType) { CDemoHeader Header; if(m_File) @@ -74,7 +74,7 @@ int CDemoRecorder::Start(class IStorage *pStorage, class IConsole *pConsole, con Header.m_Version = gs_ActVersion; str_copy(Header.m_aNetversion, pNetVersion, sizeof(Header.m_aNetversion)); str_copy(Header.m_aMapName, pMap, sizeof(Header.m_aMapName)); - int MapSize = io_length(MapFile); + unsigned MapSize = io_length(MapFile); Header.m_aMapSize[0] = (MapSize>>24)&0xff; Header.m_aMapSize[1] = (MapSize>>16)&0xff; Header.m_aMapSize[2] = (MapSize>>8)&0xff; @@ -590,11 +590,11 @@ int CDemoPlayer::Load(class IStorage *pStorage, class IConsole *pConsole, const m_DemoType = DEMOTYPE_INVALID; // read map - int MapSize = (m_Info.m_Header.m_aMapSize[0]<<24) | (m_Info.m_Header.m_aMapSize[1]<<16) | (m_Info.m_Header.m_aMapSize[2]<<8) | (m_Info.m_Header.m_aMapSize[3]); + unsigned MapSize = (m_Info.m_Header.m_aMapSize[0]<<24) | (m_Info.m_Header.m_aMapSize[1]<<16) | (m_Info.m_Header.m_aMapSize[2]<<8) | (m_Info.m_Header.m_aMapSize[3]); // check if we already have the map // TODO: improve map checking (maps folder, check crc) - int Crc = (m_Info.m_Header.m_aMapCrc[0]<<24) | (m_Info.m_Header.m_aMapCrc[1]<<16) | (m_Info.m_Header.m_aMapCrc[2]<<8) | (m_Info.m_Header.m_aMapCrc[3]); + unsigned Crc = (m_Info.m_Header.m_aMapCrc[0]<<24) | (m_Info.m_Header.m_aMapCrc[1]<<16) | (m_Info.m_Header.m_aMapCrc[2]<<8) | (m_Info.m_Header.m_aMapCrc[3]); char aMapFilename[128]; str_format(aMapFilename, sizeof(aMapFilename), "downloadedmaps/%s_%08x.map", m_Info.m_Header.m_aMapName, Crc); IOHANDLE MapFile = pStorage->OpenFile(aMapFilename, IOFLAG_READ, IStorage::TYPE_ALL); diff --git a/src/engine/shared/demo.h b/src/engine/shared/demo.h index ad8e82b5..c877536d 100644 --- a/src/engine/shared/demo.h +++ b/src/engine/shared/demo.h @@ -23,7 +23,7 @@ class CDemoRecorder : public IDemoRecorder public: CDemoRecorder(class CSnapshotDelta *pSnapshotDelta); - int Start(class IStorage *pStorage, class IConsole *pConsole, const char *pFilename, const char *pNetversion, const char *pMap, int MapCrc, const char *pType); + int Start(class IStorage *pStorage, class IConsole *pConsole, const char *pFilename, const char *pNetversion, const char *pMap, unsigned MapCrc, const char *pType); int Stop(); void RecordSnapshot(int Tick, const void *pData, int Size); |