Add WRITE_FLOAT function corresponding to the client's READ_FLOAT function

This commit is contained in:
Sam V 2023-02-04 13:29:14 +01:00
parent d9f8ec47c6
commit 0da76d96ab
2 changed files with 7 additions and 0 deletions

View file

@ -26,6 +26,7 @@
* Moved IsFacing function from barney.cpp to h_ai.cpp to help prevent linker errors when copy pasting source file * 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 * 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 * Made `PM_FindTextureType` const correct
* Added `WRITE_FLOAT` function corresponding to the client's `READ_FLOAT` function
## Changes in V1.0.0 Beta 013 ## Changes in V1.0.0 Beta 013

View file

@ -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_COORD (*g_engfuncs.pfnWriteCoord)
#define WRITE_STRING (*g_engfuncs.pfnWriteString) #define WRITE_STRING (*g_engfuncs.pfnWriteString)
#define WRITE_ENTITY (*g_engfuncs.pfnWriteEntity) #define WRITE_ENTITY (*g_engfuncs.pfnWriteEntity)
inline void WRITE_FLOAT(float value)
{
WRITE_LONG(*reinterpret_cast<int*>(&value));
}
#define CVAR_REGISTER (*g_engfuncs.pfnCVarRegister) #define CVAR_REGISTER (*g_engfuncs.pfnCVarRegister)
#define CVAR_GET_FLOAT (*g_engfuncs.pfnCVarGetFloat) #define CVAR_GET_FLOAT (*g_engfuncs.pfnCVarGetFloat)
#define CVAR_GET_STRING (*g_engfuncs.pfnCVarGetString) #define CVAR_GET_STRING (*g_engfuncs.pfnCVarGetString)