Guild icon
Teeworlds
discord.gg/teeworlds / general
Teeworlds Discord Server.
Between 2020-09-13 00:00:00Z and 2020-09-14 00:00:00Z
Vepva joined the server. 2020-09-13 01:20:21Z
Avatar
well i've seen a couple people with problems on the steam version
03:59
i just tell them to switch to the teeworlds.com version
03:59
¯\_(ใƒ„)_/¯
teeeeeeee joined the server. 2020-09-13 08:15:49Z
Avatar
That's rarely the issue, given how they're pretty much the same
Avatar
NewGIF!
Avatar
Nice! good job ๐Ÿ˜ƒ
Avatar
having animated flags in vanilla would be great
Avatar
Hey, can you please make the scrollbar in the demo section less sensitive. I have auto record on, I have around 10 demos per day or more. I scroll once and it literally skips a month of demos. I even counted it and it skipped around 322 demos. and 10 * 30 = 300, so yea it skips a month.
13:46
I find it very annoying..
Avatar
@darkstar i feel like you can use arrow keys to skip 5s of demo
Avatar
Hey, can you please make the scrollbar in the demo section less sensitive. I have auto record on, I have around 10 demos per day or more. I scroll once and it literally skips a month of demos. I even counted it and it skipped around 322 demos. and 10 * 30 = 300, so yea it skips a month.
@darkstar if you mean the file browser, it is fixed in master branch already. so it will be less sensitive in the next version
Avatar
yes I mean the 'file browser', so it will be fixed in the next version ok thanks
Avatar
what is f in the client ?
18:54
// reset velocity so the client doesn't predict stuff m_Core.m_Vel = vec2(0.f, 0.f); (edited)
18:55
like this
18:55
for the ninja
18:55
is that the friction in air ?
18:55
help pls
Avatar
@Deleted User it's the same as 0.0 here
19:04
0.0 is of type double, 0.0f is of type float
Avatar
what is double ._.
Avatar
variable type
Avatar
double is an 8 byte float type, float is a 4 byte float type
19:09
like int is 4 bytes and short is 2 bytes
Avatar
ok
19:15
19:15
can someone say if the code is good and no erorr are in ?
19:16
please ?
Avatar
try to compile, if you would get errors - you will know it
Avatar
ok
19:22
it works, but i don't what i wanted to do
19:22
the programm doesn't create more than 3 bullets
19:22
and i requested to create 12 bullets
19:23
so what tha heckkk
19:29
can someone help me pls ;-;
19:30
idk how to fix it
Avatar
Any tips why this code even can segfault? CEntity *CGameWorld::FindFirst(int Type) { // i am checking that array exist, so it should be initialized or at least contain nullptr's if (!m_apFirstEntityTypes) return 0; // segfaults here, how this is possible? if (!m_apFirstEntityTypes[Type]) return 0; return Type < 0 || Type >= NUM_ENTTYPES ? 0 : m_apFirstEntityTypes[Type]; }cpp
20:10
I feel so noob.
20:11
I know there are linked lists and have more or less read the code already for removal, initialisation and destroy. But it seems that in worst case m_apFirstEntityTypes[Type] should always be accessible and contain nullptr or 0
Avatar
c++ CEntity *CGameWorld::FindFirst(int Type) { if(Type < 0 || Type >= NUM_ENTTYPES) return 0; return m_apFirstEntityTypes[Type]; } (edited)
20:13
if Type is < 0 or >= num, then you cant access the array
Avatar
Ok, nice point. But I have crashdump where Type is 5 which is a valid entity type in my mod (a custom entity). (edited)
20:14
NUM_ENTTYPES is 25 in my mod.
Avatar
dont do these weird extra checks
20:14
no need
20:14
it just is not what you want there
Avatar
Then it will just segfault on last line. I've added it for a debug
Avatar
Then the error is not here but somewhere where you use the entitiy returned from this function
Avatar
it cannot do m_apFirstEntityTypes[5] for some reason
Avatar
if the function returns 0 you cant just use the entity
Avatar
but it's the top of a stack on crashdump
Avatar
u need to check after the function is used
Avatar
Yeah, but stacktrace is not where I use returned value but where I am accessing it.
20:16
Can stacktrace in a crashdump be wrong and point to some earlier point?
Avatar
c++ CEntity *pEnt = GameWorld()->FindFirst(ENTTYPE_XY); if (pEnt) { // do something with it here in safety }
Avatar
But... why segfaults points to inside of FindFirst and not in the code in brackets then?
20:18
Is that possible?
20:18
Maybe this is how gdb works?
Avatar
You can have undefined behaviour
20:18
good night
Avatar
for (CEngineerWall* pWall = (CEngineerWall*)GameWorld()->FindFirst(CGameWorld::ENTTYPE_ENGINEER_WALL); pWall; pWall = (CEngineerWall*)pWall->TypeNext()) { if (pWall->m_Owner != m_pPlayer->GetCID()) continue; GameServer()->m_World.DestroyEntity(pWall); } this is the previous frame
20:18
gn, thanks
Avatar
thonk it is possible you have some sort of optimization enabled?
Avatar
I think it's possible, it's a release build with debug symbols
Avatar
that would make sense
20:19
optimized binary can jump all over the places
๐Ÿ™ 1
Avatar
It seems that you both helped me a lot.
20:20
I was just stuck with this, error seemed to be pointing to the wrong place.
20:20
Now I know that it is possible.
20:20
Thanks! (edited)
Avatar
When in doubt get a debug build
Avatar
can someone help me to create a programm that check the team we are and the other tees
21:49
idk how to start
21:50
(sry for bad english btw)
Avatar
I'd give you a hand but I don't seem to understand what you want to do
Avatar
I want to create a program that checks which team I'm on and checks the players if they are on the same team as me
21:52
same for enemmies
21:54
so ?
21:54
@Learath2 and i want to create it in .lua file
Avatar
Well there is no lua virtual machine inside teeworlds, so you can't code in lua
Avatar
but i create it for the client not for the server
21:56
i think its an another kind of code ?
Avatar
Both the server and the client are coded in C++
22:00
I think there is ATH that has lua scripting in it, but that's 0.6 only
Avatar
oh yes i want to code it for ath in O.6
22:03
so how to code it ?
22:06
@Learath2 sorry for mention but not answering :/
Avatar
Sorry, I'm not familiar with ATH's lua hooks
22:08
It's fine, you can always ping me when I'm being slow. Means I'm working on something else and if you don't ping you'll never get your answer ๐Ÿ˜„
Avatar
ah ...
22:09
ok thanks :D
22:09
but.... do you know someone who know how to code in ath lua script ?
22:10
@Learath2
OoGToO joined the server. 2020-09-13 22:22:09Z
Avatar
@Learath2 please answer i need you :/
Avatar
whyyyyy
Avatar
i think ath has it owns documentation, you can read it
Exported 102 message(s)