Merge pull request #186 from diamante0018/fix-cbuf
Fix cbuf not being terminated
This commit is contained in:
commit
2f7af0b3dc
@ -1172,8 +1172,7 @@ namespace Components
|
||||
}
|
||||
else
|
||||
{
|
||||
Game::Cbuf_AddText(gamePadIndex, keyBinding);
|
||||
Game::Cbuf_AddText(gamePadIndex, "\n");
|
||||
Game::Cbuf_InsertText(gamePadIndex, keyBinding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace Components
|
||||
Game::Dvar_SetStringByName("ui_startupMessage", message.data());
|
||||
Game::Dvar_SetStringByName("ui_startupMessageTitle", Utils::String::VA("Messages (%d/%d)", StartupMessages::TotalMessages - StartupMessages::MessageList.size(), StartupMessages::TotalMessages));
|
||||
Game::Dvar_SetStringByName("ui_startupNextButtonText", StartupMessages::MessageList.size() ? "Next" : "Close");
|
||||
Game::Cbuf_AddText(0, "openmenu startup_messages");
|
||||
Game::Cbuf_AddText(0, "openmenu startup_messages\n");
|
||||
|
||||
StartupMessages::MessageList.pop_front();
|
||||
});
|
||||
|
@ -34,6 +34,7 @@ namespace Game
|
||||
|
||||
Cbuf_AddServerText_t Cbuf_AddServerText = Cbuf_AddServerText_t(0x4BB9B0);
|
||||
Cbuf_AddText_t Cbuf_AddText = Cbuf_AddText_t(0x404B20);
|
||||
Cbuf_InsertText_t Cbuf_InsertText = Cbuf_InsertText_t(0x4940B0);
|
||||
|
||||
CG_NextWeapon_f_t CG_NextWeapon_f = CG_NextWeapon_f_t(0x449DE0);
|
||||
CG_GetClientNum_t CG_GetClientNum = CG_GetClientNum_t(0x433700);
|
||||
@ -657,7 +658,7 @@ namespace Game
|
||||
{
|
||||
Dvar_SetStringByName("com_errorMessage", message.data());
|
||||
Dvar_SetStringByName("com_errorTitle", title.data());
|
||||
Cbuf_AddText(0, "openmenu error_popmenu_lobby");
|
||||
Cbuf_AddText(0, "openmenu error_popmenu_lobby\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,9 +46,12 @@ namespace Game
|
||||
typedef void(__cdecl * Cbuf_AddServerText_t)();
|
||||
extern Cbuf_AddServerText_t Cbuf_AddServerText;
|
||||
|
||||
typedef void(__cdecl * Cbuf_AddText_t)(int localClientNum, const char *text);
|
||||
typedef void(__cdecl * Cbuf_AddText_t)(int localClientNum, const char* text);
|
||||
extern Cbuf_AddText_t Cbuf_AddText;
|
||||
|
||||
typedef void(__cdecl * Cbuf_InsertText_t)(int localClientNum, const char* text);
|
||||
extern Cbuf_InsertText_t Cbuf_InsertText;
|
||||
|
||||
typedef int(__cdecl * CG_GetClientNum_t)();
|
||||
extern CG_GetClientNum_t CG_GetClientNum;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user