Replace remaining occurances of CVar_GetVar with CVar_Get
This commit is contained in:
parent
bf2825e9a5
commit
c7e552fc5f
|
@ -43,7 +43,6 @@ void CVar_RegisterString(const char* name, const char* defaultValue);
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
extern std::map<std::string, std::unique_ptr<CVar>, std::less<>> cvars;
|
extern std::map<std::string, std::unique_ptr<CVar>, std::less<>> cvars;
|
||||||
CVar* CVar_GetVar(const char* name);
|
|
||||||
void CVar_SetFloat(const char* name, float value);
|
void CVar_SetFloat(const char* name, float value);
|
||||||
void CVar_SetString(const char* name, const char* value);
|
void CVar_SetString(const char* name, const char* value);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -128,7 +128,7 @@ void Ship::GameOverlay::Draw() {
|
||||||
|
|
||||||
if (overlay.type == OverlayType::TEXT) {
|
if (overlay.type == OverlayType::TEXT) {
|
||||||
const char* text = ImStrdup(key.c_str());
|
const char* text = ImStrdup(key.c_str());
|
||||||
const CVar* var = CVar_GetVar(text);
|
const CVar* var = CVar_Get(text);
|
||||||
|
|
||||||
switch (var->type) {
|
switch (var->type) {
|
||||||
case CVAR_TYPE_FLOAT:
|
case CVAR_TYPE_FLOAT:
|
||||||
|
@ -156,7 +156,7 @@ bool Ship::OverlayCommand(const std::vector<std::string>& args) {
|
||||||
return CMD_FAILED;
|
return CMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CVar_GetVar(args[2].c_str()) != nullptr) {
|
if (CVar_Get(args[2].c_str()) != nullptr) {
|
||||||
const char* key = args[2].c_str();
|
const char* key = args[2].c_str();
|
||||||
GameOverlay* overlay = SohImGui::overlay;
|
GameOverlay* overlay = SohImGui::overlay;
|
||||||
if (args[1] == "add") {
|
if (args[1] == "add") {
|
||||||
|
|
Loading…
Reference in New Issue