alliedmodders / hl2sdk

Half-Life 2 SDK Mirrors
https://github.com/valvesoftware
341 stars 158 forks source link

Update `INVALID_EHANDLE_INDEX` to be `0xFFFFFFFFFFFFFFFF` #197

Closed drunderscore closed 4 months ago

drunderscore commented 5 months ago

CBaseHandle::m_Index is an unsigned long, which is now 8 bytes long under 64-bit -- and Valve didn't downgrade this to unsigned int to keep it 4 bytes.

This is especially important for CBaseHandle::IsValid to properly function.

Kenzzer commented 4 months ago

Didn't realise this was here. But please take a look to PR #198 which should supersede this PR. Valve didn't forget to downgrade the variable, it has been downgraded (they've stripped most instances of long across the sdk) it's just our hl2sdk mirror doesn't reflect that yet. Once the other PR is merged, no changes to INVALID_EHANDLE_INDEX value will be necessary.

drunderscore commented 4 months ago

That's fine -- it was either one or the other and I assume my investigation was faulty... probably because I've been speeding through trying to unbreak the many broken things 🙃