Small fix

This commit is contained in:
Federico Cecchetto 2021-08-31 02:14:46 +02:00
parent eea3b08dd2
commit e419e7bb11
2 changed files with 7 additions and 6 deletions

View File

@ -65,6 +65,11 @@ namespace fps
void draw_speed()
{
if (!game::CL_IsCgameInitialized() || !game::g_entities[0].client)
{
return;
}
const auto speed = sqrt(pow(game::g_entities[0].client->velocity[0], 2) +
pow(game::g_entities[0].client->velocity[1], 2) +
pow(game::g_entities[0].client->velocity[2], 2));

View File

@ -717,7 +717,7 @@ namespace scripting
{"nullsub_367", 0x8079},
{"nullsub_533", 0x807A},
{"sub_503ad0", 0x807B},
{"sub_503af0", 0x807C},
{"playloopsound", 0x807C},
{"sub_503c10", 0x807D},
{"sub_503c90", 0x807E},
{"sub_503d20", 0x807F},
@ -1772,13 +1772,9 @@ namespace scripting
std::unordered_map<std::string, unsigned> token_map =
{
{"init", 521},
{"main", 616},
{"player", 794},
{"default_start", 10126},
};
std::unordered_map<unsigned, std::string> file_list =
{
};
}