mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-19 01:02:20 +00:00
Compare commits
25 commits
7a4a2c51cd
...
c93cb1ba15
Author | SHA1 | Date | |
---|---|---|---|
Chiller Dragon | c93cb1ba15 | ||
11fd82077a | |||
3d30ce4bf2 | |||
9e0ba8a91f | |||
c89509bc4b | |||
306d3c7b58 | |||
9832288983 | |||
fc058fa432 | |||
3b22a3e02f | |||
ed1ef4e694 | |||
9103332e36 | |||
0948a53648 | |||
bbd34c9452 | |||
e4282f100a | |||
eb9e73f68b | |||
e0a95d14a6 | |||
fa28ed77a6 | |||
5335813629 | |||
796fa4275f | |||
5b0163d069 | |||
c9e7e0f01b | |||
cf107a81a1 | |||
4e2d7e2104 | |||
ChillerDragon | 74bb327799 | ||
22d699fbc0 |
|
@ -1,15 +1,40 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:installLocation="auto">
|
||||||
|
|
||||||
<!-- Vulkan 1.1.0 is used if supported -->
|
<!-- Vulkan 1.1.0 is used if supported -->
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.vulkan.version"
|
android:name="android.hardware.vulkan.version"
|
||||||
android:required="false"
|
android:required="false"
|
||||||
android:version="0x00401000" />
|
android:version="0x00401000" />
|
||||||
<!-- android:glEsVersion is not specified as OpenGL ES 1.0 is supported as fallback -->
|
<!-- android:glEsVersion is not specified as OpenGL ES 1.0 is supported as fallback -->
|
||||||
|
|
||||||
|
<!-- Only playable in landscape mode -->
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.screen.landscape"
|
android:name="android.hardware.screen.landscape"
|
||||||
android:required="true" />
|
android:required="true" />
|
||||||
|
|
||||||
|
<!-- Touchscreen support -->
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.touchscreen"
|
||||||
|
android:required="false" />
|
||||||
|
|
||||||
|
<!-- Game controller support -->
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.bluetooth"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.gamepad"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.usb.host"
|
||||||
|
android:required="false" />
|
||||||
|
|
||||||
|
<!-- External mouse input events -->
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.type.pc"
|
||||||
|
android:required="false" />
|
||||||
|
|
||||||
<!-- Teeworlds does broadcasts over local networks -->
|
<!-- Teeworlds does broadcasts over local networks -->
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
|
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
|
||||||
|
@ -25,17 +50,24 @@
|
||||||
android:isGame="true"
|
android:isGame="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
|
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||||
|
android:hardwareAccelerated="true">
|
||||||
<activity
|
<activity
|
||||||
android:name="org.ddnet.client.NativeMain"
|
android:name="org.ddnet.client.NativeMain"
|
||||||
|
android:alwaysRetainTaskState="true"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
|
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||||
|
android:preferMinimalPostProcessing="true"
|
||||||
android:screenOrientation="landscape"
|
android:screenOrientation="landscape"
|
||||||
android:launchMode="singleInstance">
|
android:launchMode="singleInstance">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<!-- Let Android know that we can handle some USB devices and should receive this event -->
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
||||||
|
</intent-filter>
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.app.lib_name"
|
android:name="android.app.lib_name"
|
||||||
android:value="DDNet" />
|
android:value="DDNet" />
|
||||||
|
|
|
@ -668,10 +668,7 @@ void CClient::DisconnectWithReason(const char *pReason)
|
||||||
m_CurrentServerCurrentPingTime = -1;
|
m_CurrentServerCurrentPingTime = -1;
|
||||||
m_CurrentServerNextPingTime = -1;
|
m_CurrentServerNextPingTime = -1;
|
||||||
|
|
||||||
ResetMapDownload();
|
ResetMapDownload(true);
|
||||||
m_aMapdownloadFilename[0] = '\0';
|
|
||||||
m_aMapdownloadFilenameTemp[0] = '\0';
|
|
||||||
m_aMapdownloadName[0] = '\0';
|
|
||||||
|
|
||||||
// clear the current server info
|
// clear the current server info
|
||||||
mem_zero(&m_CurrentServerInfo, sizeof(m_CurrentServerInfo));
|
mem_zero(&m_CurrentServerInfo, sizeof(m_CurrentServerInfo));
|
||||||
|
@ -1528,7 +1525,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
|
||||||
DummyDisconnect(0);
|
DummyDisconnect(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetMapDownload();
|
ResetMapDownload(true);
|
||||||
|
|
||||||
SHA256_DIGEST *pMapSha256 = nullptr;
|
SHA256_DIGEST *pMapSha256 = nullptr;
|
||||||
const char *pMapUrl = nullptr;
|
const char *pMapUrl = nullptr;
|
||||||
|
@ -2196,7 +2193,7 @@ int CClient::UnpackAndValidateSnapshot(CSnapshot *pFrom, CSnapshot *pTo)
|
||||||
return Builder.Finish(pTo);
|
return Builder.Finish(pTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CClient::ResetMapDownload()
|
void CClient::ResetMapDownload(bool ResetActive)
|
||||||
{
|
{
|
||||||
if(m_pMapdownloadTask)
|
if(m_pMapdownloadTask)
|
||||||
{
|
{
|
||||||
|
@ -2215,19 +2212,24 @@ void CClient::ResetMapDownload()
|
||||||
Storage()->RemoveFile(m_aMapdownloadFilenameTemp, IStorage::TYPE_SAVE);
|
Storage()->RemoveFile(m_aMapdownloadFilenameTemp, IStorage::TYPE_SAVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_MapdownloadChunk = 0;
|
if(ResetActive)
|
||||||
m_MapdownloadSha256Present = false;
|
{
|
||||||
m_MapdownloadSha256 = SHA256_ZEROED;
|
m_MapdownloadChunk = 0;
|
||||||
m_MapdownloadCrc = 0;
|
m_MapdownloadSha256Present = false;
|
||||||
m_MapdownloadTotalsize = -1;
|
m_MapdownloadSha256 = SHA256_ZEROED;
|
||||||
m_MapdownloadAmount = 0;
|
m_MapdownloadCrc = 0;
|
||||||
|
m_MapdownloadTotalsize = -1;
|
||||||
|
m_MapdownloadAmount = 0;
|
||||||
|
m_aMapdownloadFilename[0] = '\0';
|
||||||
|
m_aMapdownloadFilenameTemp[0] = '\0';
|
||||||
|
m_aMapdownloadName[0] = '\0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CClient::FinishMapDownload()
|
void CClient::FinishMapDownload()
|
||||||
{
|
{
|
||||||
m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client/network", "download complete, loading map");
|
m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client/network", "download complete, loading map");
|
||||||
|
|
||||||
const int PrevMapdownloadTotalsize = m_MapdownloadTotalsize;
|
|
||||||
SHA256_DIGEST *pSha256 = m_MapdownloadSha256Present ? &m_MapdownloadSha256 : nullptr;
|
SHA256_DIGEST *pSha256 = m_MapdownloadSha256Present ? &m_MapdownloadSha256 : nullptr;
|
||||||
|
|
||||||
bool FileSuccess = true;
|
bool FileSuccess = true;
|
||||||
|
@ -2236,7 +2238,6 @@ void CClient::FinishMapDownload()
|
||||||
FileSuccess &= Storage()->RenameFile(m_aMapdownloadFilenameTemp, m_aMapdownloadFilename, IStorage::TYPE_SAVE);
|
FileSuccess &= Storage()->RenameFile(m_aMapdownloadFilenameTemp, m_aMapdownloadFilename, IStorage::TYPE_SAVE);
|
||||||
if(!FileSuccess)
|
if(!FileSuccess)
|
||||||
{
|
{
|
||||||
ResetMapDownload();
|
|
||||||
char aError[128 + IO_MAX_PATH_LENGTH];
|
char aError[128 + IO_MAX_PATH_LENGTH];
|
||||||
str_format(aError, sizeof(aError), Localize("Could not save downloaded map. Try manually deleting this file: %s"), m_aMapdownloadFilename);
|
str_format(aError, sizeof(aError), Localize("Could not save downloaded map. Try manually deleting this file: %s"), m_aMapdownloadFilename);
|
||||||
DisconnectWithReason(aError);
|
DisconnectWithReason(aError);
|
||||||
|
@ -2246,19 +2247,17 @@ void CClient::FinishMapDownload()
|
||||||
const char *pError = LoadMap(m_aMapdownloadName, m_aMapdownloadFilename, pSha256, m_MapdownloadCrc);
|
const char *pError = LoadMap(m_aMapdownloadName, m_aMapdownloadFilename, pSha256, m_MapdownloadCrc);
|
||||||
if(!pError)
|
if(!pError)
|
||||||
{
|
{
|
||||||
ResetMapDownload();
|
ResetMapDownload(true);
|
||||||
m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client/network", "loading done");
|
m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client/network", "loading done");
|
||||||
SendReady(CONN_MAIN);
|
SendReady(CONN_MAIN);
|
||||||
}
|
}
|
||||||
else if(m_pMapdownloadTask) // fallback
|
else if(m_pMapdownloadTask) // fallback
|
||||||
{
|
{
|
||||||
ResetMapDownload();
|
ResetMapDownload(false);
|
||||||
m_MapdownloadTotalsize = PrevMapdownloadTotalsize;
|
|
||||||
SendMapRequest();
|
SendMapRequest();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ResetMapDownload();
|
|
||||||
DisconnectWithReason(pError);
|
DisconnectWithReason(pError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2784,7 +2783,7 @@ void CClient::Update()
|
||||||
else if(m_pMapdownloadTask->State() == EHttpState::ERROR || m_pMapdownloadTask->State() == EHttpState::ABORTED)
|
else if(m_pMapdownloadTask->State() == EHttpState::ERROR || m_pMapdownloadTask->State() == EHttpState::ABORTED)
|
||||||
{
|
{
|
||||||
dbg_msg("webdl", "http failed, falling back to gameserver");
|
dbg_msg("webdl", "http failed, falling back to gameserver");
|
||||||
ResetMapDownload();
|
ResetMapDownload(false);
|
||||||
SendMapRequest();
|
SendMapRequest();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,7 +360,7 @@ public:
|
||||||
|
|
||||||
int UnpackAndValidateSnapshot(CSnapshot *pFrom, CSnapshot *pTo);
|
int UnpackAndValidateSnapshot(CSnapshot *pFrom, CSnapshot *pTo);
|
||||||
|
|
||||||
void ResetMapDownload();
|
void ResetMapDownload(bool ResetActive);
|
||||||
void FinishMapDownload();
|
void FinishMapDownload();
|
||||||
|
|
||||||
void RequestDDNetInfo() override;
|
void RequestDDNetInfo() override;
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
#include <engine/http.h>
|
#include <engine/http.h>
|
||||||
#include <engine/storage.h>
|
#include <engine/storage.h>
|
||||||
|
|
||||||
static constexpr const char *COMMUNITY_COUNTRY_NONE = "none";
|
|
||||||
static constexpr const char *COMMUNITY_TYPE_NONE = "None";
|
|
||||||
|
|
||||||
class CSortWrap
|
class CSortWrap
|
||||||
{
|
{
|
||||||
typedef bool (CServerBrowser::*SortFunc)(int, int) const;
|
typedef bool (CServerBrowser::*SortFunc)(int, int) const;
|
||||||
|
|
|
@ -283,6 +283,7 @@ void CVideo::Pause(bool Pause)
|
||||||
void CVideo::Stop()
|
void CVideo::Stop()
|
||||||
{
|
{
|
||||||
dbg_assert(!m_Stopped, "Already stopped");
|
dbg_assert(!m_Stopped, "Already stopped");
|
||||||
|
m_Stopped = true;
|
||||||
|
|
||||||
m_pGraphics->WaitForIdle();
|
m_pGraphics->WaitForIdle();
|
||||||
|
|
||||||
|
@ -341,8 +342,6 @@ void CVideo::Stop()
|
||||||
pSound->PauseAudioDevice();
|
pSound->PauseAudioDevice();
|
||||||
delete ms_pCurrentVideo;
|
delete ms_pCurrentVideo;
|
||||||
pSound->UnpauseAudioDevice();
|
pSound->UnpauseAudioDevice();
|
||||||
|
|
||||||
m_Stopped = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVideo::NextVideoFrameThread()
|
void CVideo::NextVideoFrameThread()
|
||||||
|
|
|
@ -309,6 +309,9 @@ public:
|
||||||
|
|
||||||
static constexpr const char *COMMUNITY_DDNET = "ddnet";
|
static constexpr const char *COMMUNITY_DDNET = "ddnet";
|
||||||
static constexpr const char *COMMUNITY_NONE = "none";
|
static constexpr const char *COMMUNITY_NONE = "none";
|
||||||
|
|
||||||
|
static constexpr const char *COMMUNITY_COUNTRY_NONE = "none";
|
||||||
|
static constexpr const char *COMMUNITY_TYPE_NONE = "None";
|
||||||
/**
|
/**
|
||||||
* Special community value for country/type filters that
|
* Special community value for country/type filters that
|
||||||
* affect all communities.
|
* affect all communities.
|
||||||
|
|
|
@ -105,6 +105,7 @@ MACRO_CONFIG_INT(EdZoomTarget, ed_zoom_target, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG
|
||||||
MACRO_CONFIG_INT(EdShowkeys, ed_showkeys, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show pressed keys")
|
MACRO_CONFIG_INT(EdShowkeys, ed_showkeys, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show pressed keys")
|
||||||
MACRO_CONFIG_INT(EdAlignQuads, ed_align_quads, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Enable/disable quad alignment. When enabled, red lines appear to show how quad/points are aligned and snapped to other quads/points when moving them")
|
MACRO_CONFIG_INT(EdAlignQuads, ed_align_quads, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Enable/disable quad alignment. When enabled, red lines appear to show how quad/points are aligned and snapped to other quads/points when moving them")
|
||||||
MACRO_CONFIG_INT(EdShowQuadsRect, ed_show_quads_rect, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show the bounds of the selected quad. In case of multiple quads, it shows the bounds of the englobing rect. Can be helpful when aligning a group of quads")
|
MACRO_CONFIG_INT(EdShowQuadsRect, ed_show_quads_rect, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show the bounds of the selected quad. In case of multiple quads, it shows the bounds of the englobing rect. Can be helpful when aligning a group of quads")
|
||||||
|
MACRO_CONFIG_INT(EdAutoMapReload, ed_auto_map_reload, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Run 'hot_reload' on the local server while rcon authed on map save")
|
||||||
|
|
||||||
MACRO_CONFIG_INT(ClShowWelcome, cl_show_welcome, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show welcome message indicating the first launch of the client")
|
MACRO_CONFIG_INT(ClShowWelcome, cl_show_welcome, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show welcome message indicating the first launch of the client")
|
||||||
MACRO_CONFIG_INT(ClMotdTime, cl_motd_time, 10, 0, 100, CFGFLAG_CLIENT | CFGFLAG_SAVE, "How long to show the server message of the day")
|
MACRO_CONFIG_INT(ClMotdTime, cl_motd_time, 10, 0, 100, CFGFLAG_CLIENT | CFGFLAG_SAVE, "How long to show the server message of the day")
|
||||||
|
|
|
@ -136,7 +136,7 @@ int CConsole::ParseStart(CResult *pResult, const char *pString, int Length)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CConsole::ParseArgs(CResult *pResult, const char *pFormat, FCommandCallback pfnCallback)
|
int CConsole::ParseArgs(CResult *pResult, const char *pFormat, bool IsColor)
|
||||||
{
|
{
|
||||||
char Command = *pFormat;
|
char Command = *pFormat;
|
||||||
char *pStr;
|
char *pStr;
|
||||||
|
@ -235,7 +235,7 @@ int CConsole::ParseArgs(CResult *pResult, const char *pFormat, FCommandCallback
|
||||||
if(Command == 'i')
|
if(Command == 'i')
|
||||||
{
|
{
|
||||||
// don't validate colors here
|
// don't validate colors here
|
||||||
if(pfnCallback != &SColorConfigVariable::CommandCallback)
|
if(!IsColor)
|
||||||
{
|
{
|
||||||
int Value;
|
int Value;
|
||||||
if(!str_toint(pResult->GetString(pResult->NumArguments() - 1), &Value) ||
|
if(!str_toint(pResult->GetString(pResult->NumArguments() - 1), &Value) ||
|
||||||
|
@ -514,7 +514,7 @@ void CConsole::ExecuteLineStroked(int Stroke, const char *pStr, int ClientId, bo
|
||||||
|
|
||||||
if(Stroke || IsStrokeCommand)
|
if(Stroke || IsStrokeCommand)
|
||||||
{
|
{
|
||||||
if(int Error = ParseArgs(&Result, pCommand->m_pParams, pCommand->m_pfnCallback))
|
if(int Error = ParseArgs(&Result, pCommand->m_pParams, pCommand->m_pfnCallback == &SColorConfigVariable::CommandCallback))
|
||||||
{
|
{
|
||||||
char aBuf[CMDLINE_LENGTH + 64];
|
char aBuf[CMDLINE_LENGTH + 64];
|
||||||
if(Error == PARSEARGS_INVALID_INTEGER)
|
if(Error == PARSEARGS_INVALID_INTEGER)
|
||||||
|
|
|
@ -153,7 +153,7 @@ class CConsole : public IConsole
|
||||||
PARSEARGS_INVALID_FLOAT,
|
PARSEARGS_INVALID_FLOAT,
|
||||||
};
|
};
|
||||||
|
|
||||||
int ParseArgs(CResult *pResult, const char *pFormat, FCommandCallback pfnCallback = 0);
|
int ParseArgs(CResult *pResult, const char *pFormat, bool IsColor = false);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
this function will set pFormat to the next parameter (i,s,r,v,?) it contains and
|
this function will set pFormat to the next parameter (i,s,r,v,?) it contains and
|
||||||
|
|
|
@ -93,6 +93,7 @@ MAYBE_UNUSED static const char *FONT_ICON_EARTH_AMERICAS = "\xEF\x95\xBD";
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_NETWORK_WIRED = "\xEF\x9B\xBF";
|
MAYBE_UNUSED static const char *FONT_ICON_NETWORK_WIRED = "\xEF\x9B\xBF";
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_LIST_UL = "\xEF\x83\x8A";
|
MAYBE_UNUSED static const char *FONT_ICON_LIST_UL = "\xEF\x83\x8A";
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_INFO = "\xEF\x84\xA9";
|
MAYBE_UNUSED static const char *FONT_ICON_INFO = "\xEF\x84\xA9";
|
||||||
|
MAYBE_UNUSED static const char *FONT_ICON_TERMINAL = "\xEF\x84\xA0";
|
||||||
|
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_SLASH = "\xEF\x9C\x95";
|
MAYBE_UNUSED static const char *FONT_ICON_SLASH = "\xEF\x9C\x95";
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_PLAY = "\xEF\x81\x8B";
|
MAYBE_UNUSED static const char *FONT_ICON_PLAY = "\xEF\x81\x8B";
|
||||||
|
|
|
@ -160,8 +160,6 @@ class CGameConsole : public CComponent
|
||||||
static const ColorRGBA ms_SearchHighlightColor;
|
static const ColorRGBA ms_SearchHighlightColor;
|
||||||
static const ColorRGBA ms_SearchSelectedColor;
|
static const ColorRGBA ms_SearchSelectedColor;
|
||||||
|
|
||||||
void Toggle(int Type);
|
|
||||||
|
|
||||||
static void PossibleCommandsRenderCallback(int Index, const char *pStr, void *pUser);
|
static void PossibleCommandsRenderCallback(int Index, const char *pStr, void *pUser);
|
||||||
static void ConToggleLocalConsole(IConsole::IResult *pResult, void *pUserData);
|
static void ConToggleLocalConsole(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConToggleRemoteConsole(IConsole::IResult *pResult, void *pUserData);
|
static void ConToggleRemoteConsole(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
@ -196,6 +194,7 @@ public:
|
||||||
virtual bool OnInput(const IInput::CEvent &Event) override;
|
virtual bool OnInput(const IInput::CEvent &Event) override;
|
||||||
void Prompt(char (&aPrompt)[32]);
|
void Prompt(char (&aPrompt)[32]);
|
||||||
|
|
||||||
|
void Toggle(int Type);
|
||||||
bool IsClosed() { return m_ConsoleState == CONSOLE_CLOSED; }
|
bool IsClosed() { return m_ConsoleState == CONSOLE_CLOSED; }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -869,11 +869,14 @@ void CMenus::RenderServerbrowserDDNetFilter(CUIRect View,
|
||||||
{
|
{
|
||||||
if(Click == 1)
|
if(Click == 1)
|
||||||
{
|
{
|
||||||
// Left click: when all are active, only activate one
|
// Left click: when all are active, only activate one and none
|
||||||
for(int j = 0; j < MaxItems; ++j)
|
for(int j = 0; j < MaxItems; ++j)
|
||||||
{
|
{
|
||||||
if(j != ItemIndex)
|
if(const char *pItemName = GetItemName(j);
|
||||||
Filter.Add(GetItemName(j));
|
j != ItemIndex &&
|
||||||
|
!((&Filter == &ServerBrowser()->CountriesFilter() && str_comp(pItemName, IServerBrowser::COMMUNITY_COUNTRY_NONE) == 0) ||
|
||||||
|
(&Filter == &ServerBrowser()->TypesFilter() && str_comp(pItemName, IServerBrowser::COMMUNITY_TYPE_NONE) == 0)))
|
||||||
|
Filter.Add(pItemName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(Click == 2)
|
else if(Click == 2)
|
||||||
|
@ -890,7 +893,10 @@ void CMenus::RenderServerbrowserDDNetFilter(CUIRect View,
|
||||||
bool AllFilteredExceptUs = true;
|
bool AllFilteredExceptUs = true;
|
||||||
for(int j = 0; j < MaxItems; ++j)
|
for(int j = 0; j < MaxItems; ++j)
|
||||||
{
|
{
|
||||||
if(j != ItemIndex && !Filter.Filtered(GetItemName(j)))
|
if(const char *pItemName = GetItemName(j);
|
||||||
|
j != ItemIndex && !Filter.Filtered(pItemName) &&
|
||||||
|
!((&Filter == &ServerBrowser()->CountriesFilter() && str_comp(pItemName, IServerBrowser::COMMUNITY_COUNTRY_NONE) == 0) ||
|
||||||
|
(&Filter == &ServerBrowser()->TypesFilter() && str_comp(pItemName, IServerBrowser::COMMUNITY_TYPE_NONE) == 0)))
|
||||||
{
|
{
|
||||||
AllFilteredExceptUs = false;
|
AllFilteredExceptUs = false;
|
||||||
break;
|
break;
|
||||||
|
@ -898,7 +904,7 @@ void CMenus::RenderServerbrowserDDNetFilter(CUIRect View,
|
||||||
}
|
}
|
||||||
// When last one is removed, re-enable all currently selectable items.
|
// When last one is removed, re-enable all currently selectable items.
|
||||||
// Don't use Clear, to avoid enabling also currently unselectable items.
|
// Don't use Clear, to avoid enabling also currently unselectable items.
|
||||||
if(AllFilteredExceptUs)
|
if(AllFilteredExceptUs && Active)
|
||||||
{
|
{
|
||||||
for(int j = 0; j < MaxItems; ++j)
|
for(int j = 0; j < MaxItems; ++j)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#include "menus.h"
|
#include "menus.h"
|
||||||
|
|
||||||
|
using namespace FontIcons;
|
||||||
|
|
||||||
void CMenus::RenderStartMenu(CUIRect MainView)
|
void CMenus::RenderStartMenu(CUIRect MainView)
|
||||||
{
|
{
|
||||||
GameClient()->m_MenuBackground.ChangePosition(CMenuBackground::POS_START);
|
GameClient()->m_MenuBackground.ChangePosition(CMenuBackground::POS_START);
|
||||||
|
@ -186,13 +188,27 @@ void CMenus::RenderStartMenu(CUIRect MainView)
|
||||||
}
|
}
|
||||||
|
|
||||||
// render version
|
// render version
|
||||||
CUIRect VersionUpdate, CurVersion;
|
CUIRect CurVersion, ConsoleButton;
|
||||||
MainView.HSplitBottom(20.0f, nullptr, &VersionUpdate);
|
MainView.HSplitBottom(45.0f, nullptr, &CurVersion);
|
||||||
VersionUpdate.VSplitRight(50.0f, &CurVersion, nullptr);
|
CurVersion.VSplitRight(40.0f, &CurVersion, nullptr);
|
||||||
VersionUpdate.VMargin(VMargin, &VersionUpdate);
|
CurVersion.HSplitTop(20.0f, &ConsoleButton, &CurVersion);
|
||||||
|
CurVersion.HSplitTop(5.0f, nullptr, &CurVersion);
|
||||||
|
ConsoleButton.VSplitRight(40.0f, nullptr, &ConsoleButton);
|
||||||
Ui()->DoLabel(&CurVersion, GAME_RELEASE_VERSION, 14.0f, TEXTALIGN_MR);
|
Ui()->DoLabel(&CurVersion, GAME_RELEASE_VERSION, 14.0f, TEXTALIGN_MR);
|
||||||
|
|
||||||
|
static CButtonContainer s_ConsoleButton;
|
||||||
|
TextRender()->SetFontPreset(EFontPreset::ICON_FONT);
|
||||||
|
TextRender()->SetRenderFlags(ETextRenderFlags::TEXT_RENDER_FLAG_ONLY_ADVANCE_WIDTH | ETextRenderFlags::TEXT_RENDER_FLAG_NO_X_BEARING | ETextRenderFlags::TEXT_RENDER_FLAG_NO_Y_BEARING | ETextRenderFlags::TEXT_RENDER_FLAG_NO_PIXEL_ALIGMENT | ETextRenderFlags::TEXT_RENDER_FLAG_NO_OVERSIZE);
|
||||||
|
if(DoButton_Menu(&s_ConsoleButton, FONT_ICON_TERMINAL, 0, &ConsoleButton, nullptr, IGraphics::CORNER_ALL, 5.0f, 0.0f, ColorRGBA(0.0f, 0.0f, 0.0f, 0.1f)))
|
||||||
|
{
|
||||||
|
GameClient()->m_GameConsole.Toggle(CGameConsole::CONSOLETYPE_LOCAL);
|
||||||
|
}
|
||||||
|
TextRender()->SetRenderFlags(0);
|
||||||
|
TextRender()->SetFontPreset(EFontPreset::DEFAULT_FONT);
|
||||||
|
|
||||||
|
CUIRect VersionUpdate;
|
||||||
|
MainView.HSplitBottom(20.0f, nullptr, &VersionUpdate);
|
||||||
|
VersionUpdate.VMargin(VMargin, &VersionUpdate);
|
||||||
#if defined(CONF_AUTOUPDATE)
|
#if defined(CONF_AUTOUPDATE)
|
||||||
CUIRect UpdateButton;
|
CUIRect UpdateButton;
|
||||||
VersionUpdate.VSplitRight(100.0f, &VersionUpdate, &UpdateButton);
|
VersionUpdate.VSplitRight(100.0f, &VersionUpdate, &UpdateButton);
|
||||||
|
|
|
@ -797,15 +797,16 @@ bool CScoreboard::Active() const
|
||||||
if(m_Active)
|
if(m_Active)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
const CNetObj_GameInfo *pGameInfoObj = GameClient()->m_Snap.m_pGameInfoObj;
|
||||||
if(GameClient()->m_Snap.m_pLocalInfo && !GameClient()->m_Snap.m_SpecInfo.m_Active)
|
if(GameClient()->m_Snap.m_pLocalInfo && !GameClient()->m_Snap.m_SpecInfo.m_Active)
|
||||||
{
|
{
|
||||||
// we are not a spectator, check if we are dead
|
// we are not a spectator, check if we are dead and the game isn't paused
|
||||||
if(!GameClient()->m_Snap.m_pLocalCharacter && g_Config.m_ClScoreboardOnDeath)
|
if(!GameClient()->m_Snap.m_pLocalCharacter && g_Config.m_ClScoreboardOnDeath &&
|
||||||
|
!(pGameInfoObj && pGameInfoObj->m_GameStateFlags & GAMESTATEFLAG_PAUSED))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the game is over
|
// if the game is over
|
||||||
const CNetObj_GameInfo *pGameInfoObj = GameClient()->m_Snap.m_pGameInfoObj;
|
|
||||||
if(pGameInfoObj && pGameInfoObj->m_GameStateFlags & GAMESTATEFLAG_GAMEOVER)
|
if(pGameInfoObj && pGameInfoObj->m_GameStateFlags & GAMESTATEFLAG_GAMEOVER)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -2500,7 +2500,7 @@ void CGameClient::SendSwitchTeam(int Team)
|
||||||
void CGameClient::SendStartInfo7(bool Dummy) const
|
void CGameClient::SendStartInfo7(bool Dummy) const
|
||||||
{
|
{
|
||||||
protocol7::CNetMsg_Cl_StartInfo Msg;
|
protocol7::CNetMsg_Cl_StartInfo Msg;
|
||||||
Msg.m_pName = Dummy ? Client()->DummyName() : Config()->m_PlayerName;
|
Msg.m_pName = Dummy ? Client()->DummyName() : Client()->PlayerName();
|
||||||
Msg.m_pClan = Dummy ? Config()->m_ClDummyClan : Config()->m_PlayerClan;
|
Msg.m_pClan = Dummy ? Config()->m_ClDummyClan : Config()->m_PlayerClan;
|
||||||
Msg.m_Country = Dummy ? Config()->m_ClDummyCountry : Config()->m_PlayerCountry;
|
Msg.m_Country = Dummy ? Config()->m_ClDummyCountry : Config()->m_PlayerCountry;
|
||||||
for(int p = 0; p < protocol7::NUM_SKINPARTS; p++)
|
for(int p = 0; p < protocol7::NUM_SKINPARTS; p++)
|
||||||
|
|
|
@ -7691,7 +7691,7 @@ void CEditor::RenderMenubar(CUIRect MenuBar)
|
||||||
if(DoButton_Ex(&s_SettingsButton, "Settings", 0, &SettingsButton, 0, nullptr, IGraphics::CORNER_T, EditorFontSizes::MENU, TEXTALIGN_ML))
|
if(DoButton_Ex(&s_SettingsButton, "Settings", 0, &SettingsButton, 0, nullptr, IGraphics::CORNER_T, EditorFontSizes::MENU, TEXTALIGN_ML))
|
||||||
{
|
{
|
||||||
static SPopupMenuId s_PopupMenuEntitiesId;
|
static SPopupMenuId s_PopupMenuEntitiesId;
|
||||||
Ui()->DoPopupMenu(&s_PopupMenuEntitiesId, SettingsButton.x, SettingsButton.y + SettingsButton.h - 1.0f, 200.0f, 92.0f, this, PopupMenuSettings, PopupProperties);
|
Ui()->DoPopupMenu(&s_PopupMenuEntitiesId, SettingsButton.x, SettingsButton.y + SettingsButton.h - 1.0f, 200.0f, 106.0f, this, PopupMenuSettings, PopupProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
CUIRect ChangedIndicator, Info, Help, Close;
|
CUIRect ChangedIndicator, Info, Help, Close;
|
||||||
|
@ -8592,7 +8592,7 @@ void CEditor::HandleWriterFinishJobs()
|
||||||
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "editor/save", aBuf);
|
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "editor/save", aBuf);
|
||||||
|
|
||||||
// send rcon.. if we can
|
// send rcon.. if we can
|
||||||
if(Client()->RconAuthed())
|
if(Client()->RconAuthed() && g_Config.m_EdAutoMapReload)
|
||||||
{
|
{
|
||||||
CServerInfo CurrentServerInfo;
|
CServerInfo CurrentServerInfo;
|
||||||
Client()->GetServerInfo(&CurrentServerInfo);
|
Client()->GetServerInfo(&CurrentServerInfo);
|
||||||
|
|
|
@ -371,6 +371,30 @@ CUi::EPopupMenuFunctionResult CEditor::PopupMenuSettings(void *pContext, CUIRect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
View.HSplitTop(2.0f, nullptr, &View);
|
||||||
|
View.HSplitTop(12.0f, &Slot, &View);
|
||||||
|
{
|
||||||
|
Slot.VMargin(5.0f, &Slot);
|
||||||
|
|
||||||
|
CUIRect Label, Selector;
|
||||||
|
Slot.VSplitMid(&Label, &Selector);
|
||||||
|
CUIRect No, Yes;
|
||||||
|
Selector.VSplitMid(&No, &Yes);
|
||||||
|
|
||||||
|
pEditor->Ui()->DoLabel(&Label, "Auto map reload", 10.0f, TEXTALIGN_ML);
|
||||||
|
|
||||||
|
static int s_ButtonNo = 0;
|
||||||
|
static int s_ButtonYes = 0;
|
||||||
|
if(pEditor->DoButton_Ex(&s_ButtonNo, "No", !g_Config.m_EdAutoMapReload, &No, 0, "Do not run 'hot_reload' on the local server while rcon authed on map save", IGraphics::CORNER_L))
|
||||||
|
{
|
||||||
|
g_Config.m_EdAutoMapReload = false;
|
||||||
|
}
|
||||||
|
if(pEditor->DoButton_Ex(&s_ButtonYes, "Yes", g_Config.m_EdAutoMapReload, &Yes, 0, "Run 'hot_reload' on the local server while rcon authed on map save", IGraphics::CORNER_R))
|
||||||
|
{
|
||||||
|
g_Config.m_EdAutoMapReload = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return CUi::POPUP_KEEP_OPEN;
|
return CUi::POPUP_KEEP_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,13 @@ bool CCharacter::Spawn(CPlayer *pPlayer, vec2 Pos)
|
||||||
delete GameServer()->m_apSavedTees[m_pPlayer->GetCid()];
|
delete GameServer()->m_apSavedTees[m_pPlayer->GetCid()];
|
||||||
GameServer()->m_apSavedTees[m_pPlayer->GetCid()] = nullptr;
|
GameServer()->m_apSavedTees[m_pPlayer->GetCid()] = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(GameServer()->m_apSavedTeleTees[m_pPlayer->GetCid()])
|
||||||
|
{
|
||||||
|
m_pPlayer->m_LastTeleTee = *GameServer()->m_apSavedTeleTees[m_pPlayer->GetCid()];
|
||||||
|
delete GameServer()->m_apSavedTeleTees[m_pPlayer->GetCid()];
|
||||||
|
GameServer()->m_apSavedTeleTees[m_pPlayer->GetCid()] = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -108,6 +108,9 @@ void CGameContext::Construct(int Resetting)
|
||||||
for(auto &pSavedTee : m_apSavedTees)
|
for(auto &pSavedTee : m_apSavedTees)
|
||||||
pSavedTee = nullptr;
|
pSavedTee = nullptr;
|
||||||
|
|
||||||
|
for(auto &pSavedTeleTee : m_apSavedTeleTees)
|
||||||
|
pSavedTeleTee = nullptr;
|
||||||
|
|
||||||
for(auto &pSavedTeam : m_apSavedTeams)
|
for(auto &pSavedTeam : m_apSavedTeams)
|
||||||
pSavedTeam = nullptr;
|
pSavedTeam = nullptr;
|
||||||
|
|
||||||
|
@ -131,6 +134,9 @@ void CGameContext::Destruct(int Resetting)
|
||||||
for(auto &pSavedTee : m_apSavedTees)
|
for(auto &pSavedTee : m_apSavedTees)
|
||||||
delete pSavedTee;
|
delete pSavedTee;
|
||||||
|
|
||||||
|
for(auto &pSavedTeleTee : m_apSavedTeleTees)
|
||||||
|
delete pSavedTeleTee;
|
||||||
|
|
||||||
for(auto &pSavedTeam : m_apSavedTeams)
|
for(auto &pSavedTeam : m_apSavedTeams)
|
||||||
delete pSavedTeam;
|
delete pSavedTeam;
|
||||||
|
|
||||||
|
@ -773,7 +779,6 @@ void CGameContext::StartVote(const char *pDesc, const char *pCommand, const char
|
||||||
{
|
{
|
||||||
// reset votes
|
// reset votes
|
||||||
m_VoteEnforce = VOTE_ENFORCE_UNKNOWN;
|
m_VoteEnforce = VOTE_ENFORCE_UNKNOWN;
|
||||||
m_VoteEnforcer = -1;
|
|
||||||
for(auto &pPlayer : m_apPlayers)
|
for(auto &pPlayer : m_apPlayers)
|
||||||
{
|
{
|
||||||
if(pPlayer)
|
if(pPlayer)
|
||||||
|
@ -1204,7 +1209,7 @@ void CGameContext::OnTick()
|
||||||
}
|
}
|
||||||
else if(m_VoteEnforce == VOTE_ENFORCE_YES_ADMIN)
|
else if(m_VoteEnforce == VOTE_ENFORCE_YES_ADMIN)
|
||||||
{
|
{
|
||||||
Console()->ExecuteLine(m_aVoteCommand, m_VoteEnforcer);
|
Console()->ExecuteLine(m_aVoteCommand, m_VoteCreator);
|
||||||
SendChat(-1, TEAM_ALL, "Vote passed enforced by authorized player", -1, FLAG_SIX);
|
SendChat(-1, TEAM_ALL, "Vote passed enforced by authorized player", -1, FLAG_SIX);
|
||||||
EndVote();
|
EndVote();
|
||||||
}
|
}
|
||||||
|
@ -1712,6 +1717,9 @@ void CGameContext::OnClientDrop(int ClientId, const char *pReason)
|
||||||
delete m_apSavedTees[ClientId];
|
delete m_apSavedTees[ClientId];
|
||||||
m_apSavedTees[ClientId] = nullptr;
|
m_apSavedTees[ClientId] = nullptr;
|
||||||
|
|
||||||
|
delete m_apSavedTeleTees[ClientId];
|
||||||
|
m_apSavedTeleTees[ClientId] = nullptr;
|
||||||
|
|
||||||
m_aTeamMapping[ClientId] = -1;
|
m_aTeamMapping[ClientId] = -1;
|
||||||
|
|
||||||
m_VoteUpdate = true;
|
m_VoteUpdate = true;
|
||||||
|
@ -3208,12 +3216,19 @@ void CGameContext::ConHotReload(IConsole::IResult *pResult, void *pUserData)
|
||||||
if(!pSelf->GetPlayerChar(i))
|
if(!pSelf->GetPlayerChar(i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
CCharacter *pChar = pSelf->GetPlayerChar(i);
|
||||||
|
|
||||||
// Save the tee individually
|
// Save the tee individually
|
||||||
pSelf->m_apSavedTees[i] = new CSaveTee();
|
pSelf->m_apSavedTees[i] = new CSaveTee();
|
||||||
pSelf->m_apSavedTees[i]->Save(pSelf->GetPlayerChar(i), false);
|
pSelf->m_apSavedTees[i]->Save(pChar, false);
|
||||||
|
|
||||||
|
if(pSelf->m_apPlayers[i])
|
||||||
|
pSelf->m_apSavedTeleTees[i] = new CSaveTee(pSelf->m_apPlayers[i]->m_LastTeleTee);
|
||||||
|
|
||||||
// Save the team state
|
// Save the team state
|
||||||
pSelf->m_aTeamMapping[i] = pSelf->GetDDRaceTeam(i);
|
pSelf->m_aTeamMapping[i] = pSelf->GetDDRaceTeam(i);
|
||||||
|
if(pSelf->m_aTeamMapping[i] == TEAM_SUPER)
|
||||||
|
pSelf->m_aTeamMapping[i] = pChar->m_TeamBeforeSuper;
|
||||||
|
|
||||||
if(pSelf->m_apSavedTeams[pSelf->m_aTeamMapping[i]])
|
if(pSelf->m_apSavedTeams[pSelf->m_aTeamMapping[i]])
|
||||||
continue;
|
continue;
|
||||||
|
@ -3778,7 +3793,7 @@ void CGameContext::RegisterChatCommands()
|
||||||
Console()->Register("rescuemode", "?r['auto'|'manual']", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConRescueMode, this, "Sets one of the two rescue modes (auto or manual). Prints current mode if no arguments provided");
|
Console()->Register("rescuemode", "?r['auto'|'manual']", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConRescueMode, this, "Sets one of the two rescue modes (auto or manual). Prints current mode if no arguments provided");
|
||||||
Console()->Register("tp", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleTo, this, "Depending on the number of supplied arguments, teleport yourself to; (0.) where you are spectating or aiming; (1.) the specified player name");
|
Console()->Register("tp", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleTo, this, "Depending on the number of supplied arguments, teleport yourself to; (0.) where you are spectating or aiming; (1.) the specified player name");
|
||||||
Console()->Register("teleport", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleTo, this, "Depending on the number of supplied arguments, teleport yourself to; (0.) where you are spectating or aiming; (1.) the specified player name");
|
Console()->Register("teleport", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleTo, this, "Depending on the number of supplied arguments, teleport yourself to; (0.) where you are spectating or aiming; (1.) the specified player name");
|
||||||
Console()->Register("tpxy", "f[x] f[y]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleXY, this, "Teleport yourself to the specified coordinates. A tilde (~) can be used to denote your current position, e.g. '/tpxy ~1 ~' to teleport one tile to the right");
|
Console()->Register("tpxy", "s[x] s[y]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleXY, this, "Teleport yourself to the specified coordinates. A tilde (~) can be used to denote your current position, e.g. '/tpxy ~1 ~' to teleport one tile to the right");
|
||||||
Console()->Register("lasttp", "", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConLastTele, this, "Teleport yourself to the last location you teleported to");
|
Console()->Register("lasttp", "", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConLastTele, this, "Teleport yourself to the last location you teleported to");
|
||||||
Console()->Register("tc", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleCursor, this, "Teleport yourself to player or to where you are spectating/or looking if no player name is given");
|
Console()->Register("tc", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleCursor, this, "Teleport yourself to player or to where you are spectating/or looking if no player name is given");
|
||||||
Console()->Register("telecursor", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleCursor, this, "Teleport yourself to player or to where you are spectating/or looking if no player name is given");
|
Console()->Register("telecursor", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER | CMDFLAG_PRACTICE, ConTeleCursor, this, "Teleport yourself to player or to where you are spectating/or looking if no player name is given");
|
||||||
|
@ -4820,7 +4835,6 @@ void CGameContext::ForceVote(int EnforcerId, bool Success)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_VoteEnforce = Success ? CGameContext::VOTE_ENFORCE_YES_ADMIN : CGameContext::VOTE_ENFORCE_NO_ADMIN;
|
m_VoteEnforce = Success ? CGameContext::VOTE_ENFORCE_YES_ADMIN : CGameContext::VOTE_ENFORCE_NO_ADMIN;
|
||||||
m_VoteEnforcer = EnforcerId;
|
|
||||||
|
|
||||||
char aBuf[256];
|
char aBuf[256];
|
||||||
const char *pOption = Success ? "yes" : "no";
|
const char *pOption = Success ? "yes" : "no";
|
||||||
|
|
|
@ -185,6 +185,7 @@ public:
|
||||||
bool m_aPlayerHasInput[MAX_CLIENTS];
|
bool m_aPlayerHasInput[MAX_CLIENTS];
|
||||||
CSaveTeam *m_apSavedTeams[MAX_CLIENTS];
|
CSaveTeam *m_apSavedTeams[MAX_CLIENTS];
|
||||||
CSaveTee *m_apSavedTees[MAX_CLIENTS];
|
CSaveTee *m_apSavedTees[MAX_CLIENTS];
|
||||||
|
CSaveTee *m_apSavedTeleTees[MAX_CLIENTS];
|
||||||
int m_aTeamMapping[MAX_CLIENTS];
|
int m_aTeamMapping[MAX_CLIENTS];
|
||||||
|
|
||||||
// returns last input if available otherwise nulled PlayerInput object
|
// returns last input if available otherwise nulled PlayerInput object
|
||||||
|
@ -577,7 +578,6 @@ public:
|
||||||
VOTE_TYPE_SPECTATE,
|
VOTE_TYPE_SPECTATE,
|
||||||
};
|
};
|
||||||
int m_VoteVictim;
|
int m_VoteVictim;
|
||||||
int m_VoteEnforcer;
|
|
||||||
|
|
||||||
inline bool IsOptionVote() const { return m_VoteType == VOTE_TYPE_OPTION; }
|
inline bool IsOptionVote() const { return m_VoteType == VOTE_TYPE_OPTION; }
|
||||||
inline bool IsKickVote() const { return m_VoteType == VOTE_TYPE_KICK; }
|
inline bool IsKickVote() const { return m_VoteType == VOTE_TYPE_KICK; }
|
||||||
|
|
Loading…
Reference in a new issue