Fix cg_gamemessage
This commit is contained in:
parent
c505c29bea
commit
4a3d8c3252
@ -248,7 +248,7 @@ namespace command
|
|||||||
game::CG_GameMessage(0, utils::string::va("godmode %s",
|
game::CG_GameMessage(0, utils::string::va("godmode %s",
|
||||||
game::g_entities[0].flags & game::FL_GODMODE
|
game::g_entities[0].flags & game::FL_GODMODE
|
||||||
? "^2on"
|
? "^2on"
|
||||||
: "^1off"));
|
: "^1off"), 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
add("demigod", []()
|
add("demigod", []()
|
||||||
@ -262,7 +262,7 @@ namespace command
|
|||||||
game::CG_GameMessage(0, utils::string::va("demigod mode %s",
|
game::CG_GameMessage(0, utils::string::va("demigod mode %s",
|
||||||
game::g_entities[0].flags & game::FL_DEMI_GODMODE
|
game::g_entities[0].flags & game::FL_DEMI_GODMODE
|
||||||
? "^2on"
|
? "^2on"
|
||||||
: "^1off"));
|
: "^1off"), 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
add("notarget", []()
|
add("notarget", []()
|
||||||
@ -276,7 +276,7 @@ namespace command
|
|||||||
game::CG_GameMessage(0, utils::string::va("notarget %s",
|
game::CG_GameMessage(0, utils::string::va("notarget %s",
|
||||||
game::g_entities[0].flags & game::FL_NOTARGET
|
game::g_entities[0].flags & game::FL_NOTARGET
|
||||||
? "^2on"
|
? "^2on"
|
||||||
: "^1off"));
|
: "^1off"), 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
add("noclip", []()
|
add("noclip", []()
|
||||||
@ -290,7 +290,7 @@ namespace command
|
|||||||
game::CG_GameMessage(0, utils::string::va("noclip %s",
|
game::CG_GameMessage(0, utils::string::va("noclip %s",
|
||||||
game::g_entities[0].client->flags & 1
|
game::g_entities[0].client->flags & 1
|
||||||
? "^2on"
|
? "^2on"
|
||||||
: "^1off"));
|
: "^1off"), 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
add("ufo", []()
|
add("ufo", []()
|
||||||
@ -302,7 +302,7 @@ namespace command
|
|||||||
|
|
||||||
game::g_entities[0].client->flags ^= 2;
|
game::g_entities[0].client->flags ^= 2;
|
||||||
game::CG_GameMessage(
|
game::CG_GameMessage(
|
||||||
0, utils::string::va("ufo %s", game::g_entities[0].client->flags & 2 ? "^2on" : "^1off"));
|
0, utils::string::va("ufo %s", game::g_entities[0].client->flags & 2 ? "^2on" : "^1off"), 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
add("give", [](const params& params)
|
add("give", [](const params& params)
|
||||||
@ -314,7 +314,7 @@ namespace command
|
|||||||
|
|
||||||
if (params.size() < 2)
|
if (params.size() < 2)
|
||||||
{
|
{
|
||||||
game::CG_GameMessage(0, "You did not specify a weapon name");
|
game::CG_GameMessage(0, "You did not specify a weapon name", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ namespace command
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
game::CG_GameMessage(0, "Weapon does not exist");
|
game::CG_GameMessage(0, "Weapon does not exist", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -419,7 +419,7 @@ namespace command
|
|||||||
|
|
||||||
if (params.size() < 2)
|
if (params.size() < 2)
|
||||||
{
|
{
|
||||||
game::CG_GameMessage(0, "You did not specify a weapon name");
|
game::CG_GameMessage(0, "You did not specify a weapon name", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ namespace mods
|
|||||||
if (!game::Com_InFrontend())
|
if (!game::Com_InFrontend())
|
||||||
{
|
{
|
||||||
console::error("Cannot load mod while in-game!\n");
|
console::error("Cannot load mod while in-game!\n");
|
||||||
game::CG_GameMessage(0, "^1Cannot unload mod while in-game!");
|
game::CG_GameMessage(0, "^1Cannot unload mod while in-game!", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ namespace mods
|
|||||||
if (!game::Com_InFrontend())
|
if (!game::Com_InFrontend())
|
||||||
{
|
{
|
||||||
console::error("Cannot unload mod while in-game!\n");
|
console::error("Cannot unload mod while in-game!\n");
|
||||||
game::CG_GameMessage(0, "^1Cannot unload mod while in-game!");
|
game::CG_GameMessage(0, "^1Cannot unload mod while in-game!", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ namespace game
|
|||||||
|
|
||||||
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{0x14059A050};
|
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{0x14059A050};
|
||||||
|
|
||||||
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessage{0x14037F450};
|
WEAK symbol<void(int localClientNum, const char* message, int style)> CG_GameMessage{0x14037F450};
|
||||||
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessageBold{0x14037F1B0};
|
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessageBold{0x14037F1B0};
|
||||||
WEAK symbol<char*(const unsigned int weapon,
|
WEAK symbol<char*(const unsigned int weapon,
|
||||||
bool isAlternate, char* outputBuffer, int bufferLen)> CG_GetWeaponDisplayName{0x1403B9210};
|
bool isAlternate, char* outputBuffer, int bufferLen)> CG_GetWeaponDisplayName{0x1403B9210};
|
||||||
@ -48,6 +48,7 @@ namespace game
|
|||||||
WEAK symbol<size_t(XAssetType type)> DB_GetXAssetTypeSize{0x1403E40D0};
|
WEAK symbol<size_t(XAssetType type)> DB_GetXAssetTypeSize{0x1403E40D0};
|
||||||
WEAK symbol<void(void* levelLoad, const char* name,
|
WEAK symbol<void(void* levelLoad, const char* name,
|
||||||
const unsigned int allocFlags, const unsigned __int64 sizeEst)> DB_LevelLoadAddZone{0x1404145D0};
|
const unsigned int allocFlags, const unsigned __int64 sizeEst)> DB_LevelLoadAddZone{0x1404145D0};
|
||||||
|
WEAK symbol<int(game::XAssetType type, const char* name)> DB_IsXAssetDefault{0x1404143C0};
|
||||||
|
|
||||||
WEAK symbol<dvar_t*(const char* name)> Dvar_FindVar{0x140618F90};
|
WEAK symbol<dvar_t*(const char* name)> Dvar_FindVar{0x140618F90};
|
||||||
WEAK symbol<dvar_t*(int hash)> Dvar_FindMalleableVar{0x140618F00};
|
WEAK symbol<dvar_t*(int hash)> Dvar_FindMalleableVar{0x140618F00};
|
||||||
|
Loading…
Reference in New Issue
Block a user