diff --git a/CHANGELOG.md b/CHANGELOG.md index 5822b64..a107516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ * Moved IsFacing function from barney.cpp to h_ai.cpp to help prevent linker errors when copy pasting source file * When using `impulse 107` to get the name of a texture the texture type (as used in `materials.txt`) will also be printed * Made `PM_FindTextureType` const correct +* Added `WRITE_FLOAT` function corresponding to the client's `READ_FLOAT` function ## Changes in V1.0.0 Beta 013 diff --git a/dlls/enginecallback.h b/dlls/enginecallback.h index 452e896..52becf1 100644 --- a/dlls/enginecallback.h +++ b/dlls/enginecallback.h @@ -82,6 +82,12 @@ inline void MESSAGE_BEGIN(int msg_dest, int msg_type, const float* pOrigin = NUL #define WRITE_COORD (*g_engfuncs.pfnWriteCoord) #define WRITE_STRING (*g_engfuncs.pfnWriteString) #define WRITE_ENTITY (*g_engfuncs.pfnWriteEntity) + +inline void WRITE_FLOAT(float value) +{ + WRITE_LONG(*reinterpret_cast(&value)); +} + #define CVAR_REGISTER (*g_engfuncs.pfnCVarRegister) #define CVAR_GET_FLOAT (*g_engfuncs.pfnCVarGetFloat) #define CVAR_GET_STRING (*g_engfuncs.pfnCVarGetString)