mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
commit
38be4b5745
|
@ -1638,11 +1638,11 @@ void CGameContext::ConTeleXY(IConsole::IResult *pResult, void *pUserData)
|
|||
// Relative?
|
||||
const char *pStrDelta = str_startswith(pInString, "~");
|
||||
|
||||
if(!str_isallnum(pStrDelta ? pStrDelta : pInString))
|
||||
float d;
|
||||
if(!str_tofloat(pStrDelta ? pStrDelta : pInString, &d))
|
||||
return false;
|
||||
|
||||
// Is the number valid?
|
||||
float d = str_tofloat(pStrDelta ? pStrDelta : pInString);
|
||||
if(std::isnan(d) || std::isinf(d))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -3647,7 +3647,7 @@ void CGameContext::RegisterChatCommands()
|
|||
Console()->Register("rescue", "", CFGFLAG_CHAT | CFGFLAG_SERVER, ConRescue, this, "Teleport yourself out of freeze (use sv_rescue 1 to enable this feature)");
|
||||
Console()->Register("tp", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, 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, 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", "i[x] i[y]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeleXY, this, "Teleport yourself to the specified coordinates");
|
||||
Console()->Register("tpxy", "f[x] f[y]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeleXY, this, "Teleport yourself to the specified coordinates");
|
||||
Console()->Register("lasttp", "", CFGFLAG_CHAT | CFGFLAG_SERVER, ConLastTele, this, "Teleport yourself to the last location you teleported to");
|
||||
Console()->Register("tc", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, 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, ConTeleCursor, this, "Teleport yourself to player or to where you are spectating/or looking if no player name is given");
|
||||
|
|
Loading…
Reference in a new issue