unbindall
sit
(or similar?) command with an optional parameter 0 or 1, to allow using 0 or 1 for binds. If nothing is entered (as for the default bind), it would simply toggle, I think.MyOwnObject
Cl_ShowOthers
, its a NetMessageEx# Can't add any NetMessages here!
? Can you not add it below that comment?NetMessageEx
. That is only meant for the normal NetMessage
s, as they are limited. You can't have infinite of them. Thats why this extended system was heavily required and is the foundation of what we can do right now. (heinrich!! c:)CharacterFlags
, called IS_SITTING
or similarbool m_IsSitting;
into CCharacterCore
and then
if(m_Core.m_IsSitting)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_IS_SITTING;
in character.cpp?CCharacter
CCharacter::DDRaceInit()
void CCharacter::SnapCharacter(int SnappingClient, int ID)
if (m_Input.m_Direction != 0) m_IsSitting = false;
is_sitting
is either sent when afk or manually sittingif (m_IsSitting || m_pPlayer->m_Afk)
pDDNetCharacter->m_Flags | CHARACTERFLAG_IS_SITTING
(edited)m_HasTelegunLaser
Console()->Register("+sit", "", CFGFLAG_CLIENT, ConKeyInputSet, (void *)&s_Set, "Sit");
"kill"
"?i['0'|'1']"
c++
if (m_Snap.m_LocalClientID < 0)
return;
CNetMsg_Cl_Sit Msg;
Msg.m_Sit = !m_aClients[m_Snap.m_LocalClientID].m_IsSitting;
CMsgPacker Packer(Msg.MsgID(), false);
Msg.Pack(&Packer);
Client()->SendMsg(IClient::CONN_MAIN, &Packer, MSGFLAG_VITAL);
if (g_Config.m_ClDummyCopyMoves)
Client()->SendMsg(IClient::CONN_DUMMY, &Packer, MSGFLAG_VITAL);
c++
void CGameClient::ConSit(IConsole::IResult *pResult, void *pUserData)
{
CGameClient *pThis = (CGameClient *)pUserData;
if (pThis->m_Snap.m_LocalClientID < 0)
return;
CNetMsg_Cl_Sit Msg;
Msg.m_Sit = pResult->NumArguments() ? pResult->GetInteger(0) : !pThis->m_aClients[m_Snap.m_LocalClientID].m_IsSitting;
CMsgPacker Packer(Msg.MsgID(), false);
Msg.Pack(&Packer);
pThis->Client()->SendMsg(IClient::CONN_MAIN, &Packer, MSGFLAG_VITAL);
if (g_Config.m_ClDummyCopyMoves)
pThis->Client()->SendMsg(IClient::CONN_DUMMY, &Packer, MSGFLAG_VITAL);
}
git submodule update --init --recursive
sit 0
or sit 1
should also work?|| m_pPlayer->IsPaused()
to the condition on the server, when you send the CHARACTEFFLAG_IS_SITTING
m_IsSitting || m_pPlayer->m_Afk || m_pPlayer->IsPaused()
reload
button for editor images. Like how there is Replace
and Remove
, I want there to be a button that automatically updates the image when it changed, or the autpmapper changeda = b = c;
works in C (edited)~/.cargo/bin
being ahead of everything else in PATH should make sure only my user copy is being used but alas idkrustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/jupeyy/.rustup
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu
nightly-2020-03-04-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
installed targets for active toolchain
--------------------------------------
i686-unknown-linux-gnu
x86_64-unknown-linux-gnu
active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.64.0-nightly (06754d885 2022-07-08)
rustup default 1.62
, deleting the win64 build directory and compiling again. if you have a couple of minutesrustup default 1.62
should do that rustup toolchain install 1.62
$ ldd (rustup which rustc)
linux-vdso.so.1 => linux-vdso.so.1 (0x00007fff981b4000)
librustc_driver-3268cbc2eb745628.so => path/to/home/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-3268cbc2eb745628.so (0x00007f720da00000)
libstd-91db243dd05c003b.so => path/to/home/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/libstd-91db243dd05c003b.so (0x00007f720d600000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f7212119000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007f7212114000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f721210f000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f720d419000)
libLLVM-14-rust-1.64.0-nightly.so => path/to/home/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-14-rust-1.64.0-nightly.so (0x00007f7208217000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f72120ed000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f720812f000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f7212145000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f72120d3000)
std
StructOpt
trait and its custom derive.mingw-w64-gcc
, probably?fn parse_tuple<T: FromStr, const SEPARATOR: char>(
s: &str,
) -> Result<(T, T), Box<dyn Error + Send + Sync + 'static>>
where
T::Err: Error + Send + Sync + 'static,
{
if s.matches(SEPARATOR).count() != 1 {
return Err(format!("Expected 2 values separated by '{}'", SEPARATOR).into());
}
let mut values = s.split(SEPARATOR).map(|str| str.parse::<T>());
Ok((values.next().unwrap()?, values.next().unwrap()?))
}
#[clap(long, short = 'p', value_parser = parse_tuple::<f32, ','>)]
position: Vec<(f32, f32)>,
= note: expected trait `for<'r> <for<'r> fn(&'r str) -> Result<URI<'r>, URIError> {parse_url} as FnOnce<(&'r str,)>>`
found trait `for<'r> <for<'r> fn(&'r str) -> Result<URI<'r>, URIError> {parse_url} as FnOnce<(&'r str,)>>`
'r
s#[derive(Parser, Debug)]
note: `fn(&'static str) -> Result<URI<'static>, URIError> {parse_url}` must implement `FnOnce<(&'0 str,)>`, for any lifetime `'0`...
use clap::Parser;
#[derive(Parser, Debug)]
#[clap(
version = "0.0.1",
about = "Provides bans to a compatible teeworlds server or proxy instance"
)]
struct Args {
#[clap(short = 't', long)]
auth_token: String,
#[clap(short, long)]
bindaddrs: Vec<url::Url>,
}
fn main() {
let args = Args::parse();
dbg!(args);
}