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:
jeefo 2016-09-14 11:51:58 +03:00
commit 18a80dd563
7 changed files with 95 additions and 48 deletions

View file

@ -152,7 +152,8 @@ enum ClientFlags
{
CF_USED = (1 << 0),
CF_ALIVE = (1 << 1),
CF_ADMIN = (1 << 2)
CF_ADMIN = (1 << 2),
CF_ICON = (1 << 3)
};
// bot create status
@ -608,7 +609,8 @@ struct BotName
struct ChatterItem
{
String name;
float repeatTime;
float repeat;
float duration;
};
struct WeaponSelect
@ -642,7 +644,7 @@ struct Client
MenuId menu; // id to opened bot menu
edict_t *ent; // pointer to actual edict
Vector origin; // position in the world
Vector soundPosition; // position sound was played
Vector soundPos; // position sound was played
int team; // bot team
int team2; // real bot team in free for all mode (csdm)
@ -651,6 +653,9 @@ struct Client
float hearingDistance; // distance this sound is heared
float timeSoundLasting; // time sound is played/heared
int iconFlags[MAX_ENGINE_PLAYERS]; // flag holding chatter icons
float iconTimestamp[MAX_ENGINE_PLAYERS]; // timers for chatter icons
Client (void) : menu (BOT_MENU_IVALID) { }
};