diff --git a/d3xp/gamesys/Event.cpp b/d3xp/gamesys/Event.cpp index 8b5c6f5..83c5e6e 100644 --- a/d3xp/gamesys/Event.cpp +++ b/d3xp/gamesys/Event.cpp @@ -772,17 +772,17 @@ void idEvent::Save( idSaveGame *savefile ) { switch( format[ i ] ) { case D_EVENT_FLOAT : savefile->WriteFloat( *reinterpret_cast( dataPtr ) ); - size += sizeof( float ); + size += sizeof( intptr_t ); break; case D_EVENT_INTEGER : case D_EVENT_ENTITY : case D_EVENT_ENTITY_NULL : savefile->WriteInt( *reinterpret_cast( dataPtr ) ); - size += sizeof( int ); + size += sizeof( intptr_t ); break; case D_EVENT_VECTOR : savefile->WriteVec3( *reinterpret_cast( dataPtr ) ); - size += sizeof( idVec3 ); + size += sizeof( E_EVENT_SIZEOF_VEC ); break; case D_EVENT_STRING : s.Clear(); @@ -888,17 +888,17 @@ void idEvent::Restore( idRestoreGame *savefile ) { switch( format[ j ] ) { case D_EVENT_FLOAT : savefile->ReadFloat( *reinterpret_cast( dataPtr ) ); - size += sizeof( float ); + size += sizeof( intptr_t ); break; case D_EVENT_INTEGER : case D_EVENT_ENTITY : case D_EVENT_ENTITY_NULL : savefile->ReadInt( *reinterpret_cast( dataPtr ) ); - size += sizeof( int ); + size += sizeof( intptr_t ); break; case D_EVENT_VECTOR : savefile->ReadVec3( *reinterpret_cast( dataPtr ) ); - size += sizeof( idVec3 ); + size += sizeof( E_EVENT_SIZEOF_VEC ); break; case D_EVENT_STRING : savefile->ReadString(s); diff --git a/game/gamesys/Event.cpp b/game/gamesys/Event.cpp index 3c44039..3d38978 100644 --- a/game/gamesys/Event.cpp +++ b/game/gamesys/Event.cpp @@ -638,17 +638,17 @@ void idEvent::Save( idSaveGame *savefile ) { switch( format[ i ] ) { case D_EVENT_FLOAT : savefile->WriteFloat( *reinterpret_cast( dataPtr ) ); - size += sizeof( float ); + size += sizeof( intptr_t ); break; case D_EVENT_INTEGER : case D_EVENT_ENTITY : case D_EVENT_ENTITY_NULL : savefile->WriteInt( *reinterpret_cast( dataPtr ) ); - size += sizeof( int ); + size += sizeof( intptr_t ); break; case D_EVENT_VECTOR : savefile->WriteVec3( *reinterpret_cast( dataPtr ) ); - size += sizeof( idVec3 ); + size += sizeof( E_EVENT_SIZEOF_VEC ); break; case D_EVENT_STRING : s.Clear(); @@ -737,17 +737,17 @@ void idEvent::Restore( idRestoreGame *savefile ) { switch( format[ j ] ) { case D_EVENT_FLOAT : savefile->ReadFloat( *reinterpret_cast( dataPtr ) ); - size += sizeof( float ); + size += sizeof( intptr_t ); break; case D_EVENT_INTEGER : case D_EVENT_ENTITY : case D_EVENT_ENTITY_NULL : savefile->ReadInt( *reinterpret_cast( dataPtr ) ); - size += sizeof( int ); + size += sizeof( intptr_t ); break; case D_EVENT_VECTOR : savefile->ReadVec3( *reinterpret_cast( dataPtr ) ); - size += sizeof( idVec3 ); + size += sizeof( E_EVENT_SIZEOF_VEC ); break; case D_EVENT_STRING : savefile->ReadString(s);