Added sv_eye_emote_change_delay default to 1 to Close #94.

This commit is contained in:
GreYFoX 2011-12-27 12:19:02 +02:00
parent 539b686f85
commit 66c321c547
3 changed files with 6 additions and 0 deletions

View file

@ -125,6 +125,7 @@ MACRO_CONFIG_INT(SvPauseFrequency, sv_pause_frequency, 5, 0, 9999, CFGFLAG_SERVE
MACRO_CONFIG_INT(SvEmotionalTees, sv_emotional_tees, 1, -1, 1, CFGFLAG_SERVER, "Whether eye change of tees is enabled with emoticons = 1, not = 0, -1 not at all")
MACRO_CONFIG_INT(SvEmoticonDelay, sv_emoticon_delay, 3, 0, 9999, CFGFLAG_SERVER, "The time in seconds between over-head emoticons")
MACRO_CONFIG_INT(SvEyeEmoteChangeDelay, sv_eye_emote_change_delay, 1, 0, 9999, CFGFLAG_SERVER, "The time in seconds between eye emoticons change")
MACRO_CONFIG_INT(SvChatDelay, sv_chat_delay, 1, 0, 9999, CFGFLAG_SERVER, "The time in seconds between chat messages")

View file

@ -665,6 +665,9 @@ void CGameContext::ConEyeEmote(IConsole::IResult *pResult, void *pUserData)
{
if (pChr)
{
if(pPlayer->m_LastEyeEmote + g_Config.m_SvEyeEmoteChangeDelay * pSelf->Server()->TickSpeed() >= pSelf->Server()->Tick())
return;
if (!str_comp(pResult->GetString(0), "angry"))
pChr->m_DefEmote = EMOTE_ANGRY;
else if (!str_comp(pResult->GetString(0), "blink"))
@ -689,6 +692,7 @@ void CGameContext::ConEyeEmote(IConsole::IResult *pResult, void *pUserData)
pChr->m_DefEmoteReset = pSelf->Server()->Tick()
+ Duration * pSelf->Server()->TickSpeed();
pPlayer->m_LastEyeEmote = pSelf->Server()->Tick();
}
}
}

View file

@ -152,6 +152,7 @@ public:
bool AfkTimer(int new_target_x, int new_target_y); //returns true if kicked
int64 m_LastPlaytime;
int64 m_LastEyeEmote;
int m_LastTarget_x;
int m_LastTarget_y;
int m_Sent1stAfkWarning; // afk timer's 1st warning after 50% of sv_max_afk_time