Skip to content

Commit

Permalink
windows(amd64): fix EHANDLE size( fixes saverestore )
Browse files Browse the repository at this point in the history
  • Loading branch information
nillerusr committed Dec 17, 2022
1 parent ff2211f commit bc909e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions public/basehandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ friend class CBaseEntityList;

CBaseHandle();
CBaseHandle( const CBaseHandle &other );
CBaseHandle( unsigned long value );
CBaseHandle( uintp value );
CBaseHandle( int iEntry, int iSerialNumber );

void Init( int iEntry, int iSerialNumber );
Expand Down Expand Up @@ -63,7 +63,7 @@ friend class CBaseEntityList;
protected:
// The low NUM_SERIAL_BITS hold the index. If this value is less than MAX_EDICTS, then the entity is networkable.
// The high NUM_SERIAL_NUM_BITS bits are the serial number.
unsigned long m_Index;
uintp m_Index;
};


Expand All @@ -80,7 +80,7 @@ inline CBaseHandle::CBaseHandle( const CBaseHandle &other )
m_Index = other.m_Index;
}

inline CBaseHandle::CBaseHandle( unsigned long value )
inline CBaseHandle::CBaseHandle( uintp value )
{
m_Index = value;
}
Expand Down Expand Up @@ -150,7 +150,7 @@ inline bool CBaseHandle::operator <( const CBaseHandle &other ) const

inline bool CBaseHandle::operator <( const IHandleEntity *pEntity ) const
{
unsigned long otherIndex = (pEntity) ? pEntity->GetRefEHandle().m_Index : INVALID_EHANDLE_INDEX;
uintp otherIndex = (pEntity) ? pEntity->GetRefEHandle().m_Index : INVALID_EHANDLE_INDEX;
return m_Index < otherIndex;
}

Expand Down
2 changes: 1 addition & 1 deletion public/saverestoretypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct levellist_t

struct EHandlePlaceholder_t // Engine does some of the game writing (alas, probably shouldn't), but can't see ehandle.h
{
unsigned long i;
uintp i;
};

//-------------------------------------
Expand Down

0 comments on commit bc909e9

Please sign in to comment.