mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Force 'Cbuf_GetCurrentPlayer()' inline
FORCEINLINE will compile this down to an immediate.
This commit is contained in:
parent
21f64bc572
commit
af81954b7f
@ -3,16 +3,6 @@
|
|||||||
#include "tier1/cvar.h"
|
#include "tier1/cvar.h"
|
||||||
#include "engine/cmd.h"
|
#include "engine/cmd.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// Purpose: Returns current player calling this function
|
|
||||||
// Output : ECommandTarget_t -
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
ECommandTarget_t Cbuf_GetCurrentPlayer(void)
|
|
||||||
{
|
|
||||||
// Always returns 'CBUF_FIRST_PLAYER' in Respawn's code.
|
|
||||||
return ECommandTarget_t::CBUF_FIRST_PLAYER;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: Sends the entire command line over to the server
|
// Purpose: Sends the entire command line over to the server
|
||||||
// Input : *args -
|
// Input : *args -
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
#ifndef CMD_H
|
#ifndef CMD_H
|
||||||
#define CMD_H
|
#define CMD_H
|
||||||
|
|
||||||
ECommandTarget_t Cbuf_GetCurrentPlayer(void);
|
//-----------------------------------------------------------------------------
|
||||||
|
// Purpose: Returns current player calling this function
|
||||||
|
// Output : ECommandTarget_t -
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
FORCEINLINE ECommandTarget_t Cbuf_GetCurrentPlayer(void)
|
||||||
|
{
|
||||||
|
// Always returns 'CBUF_FIRST_PLAYER' in Respawn's code.
|
||||||
|
return ECommandTarget_t::CBUF_FIRST_PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
/* ==== COMMAND_BUFFER ================================================================================================================================================== */
|
/* ==== COMMAND_BUFFER ================================================================================================================================================== */
|
||||||
inline CMemory p_Cbuf_AddText;
|
inline CMemory p_Cbuf_AddText;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user