added support for BotVoice message under cs16client & xash.
BotVoice message now showup with correct show time based on duration of voice message. fixed colored menus under legacy game versions
This commit is contained in:
parent
bcf11cf6ff
commit
18a80dd563
7 changed files with 95 additions and 48 deletions
|
|
@ -207,7 +207,7 @@ float Engine::GetWaveLength (const char *fileName)
|
|||
return 0.0f;
|
||||
|
||||
// check if we have engine function for this
|
||||
if (g_engfuncs.pfnGetApproxWavePlayLen != nullptr)
|
||||
if (!(g_gameFlags & GAME_XASH_ENGINE) && g_engfuncs.pfnGetApproxWavePlayLen != nullptr)
|
||||
{
|
||||
fp.Close ();
|
||||
return g_engfuncs.pfnGetApproxWavePlayLen (filePath) / 1000.0f;
|
||||
|
|
@ -545,7 +545,7 @@ char *Engine::TraslateMessage (const char *input)
|
|||
if (IsDedicatedServer ())
|
||||
return const_cast <char *> (&input[0]);
|
||||
|
||||
static char string[MAX_PRINT_BUFFER];
|
||||
static char string[MAX_PRINT_BUFFER] = { 0, };
|
||||
const char *ptr = input + strlen (input) - 1;
|
||||
|
||||
while (ptr > input && *ptr == '\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue