mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Added sv_eye_emote_change_delay default to 1 to Close #94.
This commit is contained in:
parent
539b686f85
commit
66c321c547
|
@ -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")
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue