Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2019-10-06 00:00:00Z and 2019-10-07 00:00:00Z
Avatar
@heinrich5991 Why dont you pass the MapIndex also from gamecore?
Avatar
@fokkonaut because afaict the position of the tee is used in all other places
12:13
you can see that it depends on the tee's position m_Pos
12:13
the MapIndex overriding only happens because at that call site, it didn't depend on the tee's position, but some arbitrary other map position
Avatar
yes, but just to have it completed? Maybe someone bases on DDNet, and changes something in the core and uses m_Pos there
12:14
Or someone uses m_Core.m_Pos from the character class
Avatar
then everything breaks anyway(?) – it's not only the center position that's used in GetMoveRestrictions
12:15
GetMoveRestrictions checks the current tile and tiles in all four directions. only that center tile is being overridden at the changed call site
Avatar
Why does it get overriden?
Avatar
i.e. it checks the specified "center" that is given, and the four directions depending on where the tee is, not the specified center
12:16
because it got overridden before, I tried to not change the behavior
Avatar
But it works without it
Avatar
from the commit description:
Fix unintentional behavior change with blockers Could be seen on "Insane 3", on teleporter 37. Thanks to Zwelf for reporting.
(edited)
12:18
rip IRC
12:19
So, I dont need to pass the Extra stuff from my mod from the core?
12:19
for the room thing
Avatar
depends
12:19
you could just not include this behavior, because it's braindead
Avatar
why the fuck does the stopping of the stopper tiles not depend on the actual position of the tee? ^^
12:20
but only for the center check
12:20
sounds like a bug to me
12:21
Well, I'd like to keep it as ddnet
12:21
But still, do you remember the room, where I pass the Extra stuff to check whether the tee can enter or not?
Avatar
yes
Avatar
Do I also need to pass it from the core?
Avatar
m_Extra or the new parameter?
Avatar
Mine, not yours
12:22
currently i do, and it works
Avatar
then continue to do it I guess
Avatar
I am unsure if it is not useless
12:23
Because your new parameter is also not passed from the core, and obviously works
Avatar
argh
12:23
it's just an override for the center position
12:24
usually, the the tee's pos is used and some positions in all four directions
12:24
should I draw a picture?
Avatar
xd maybe
12:28
in gamecore.cpp, where the character is not passed, the code checks the five marked positions for stoppers
12:29
if you pass the parameter, like character.cpp does, the center is no longer checked, but another random tile somewhere else on the map is. the tee's surrounding is still checked though
12:29
@fokkonaut is that clearer?
12:29
I don't get how you go from that to not passing extra in gamecore
Avatar
ah lol
12:30
xd
12:30
sorry for my dumbness at this point
pepeH 1
Avatar
@heinrich5991 what kinda behaviour is that??
18:15
Which center did the stoppers use before your fix?
Avatar
it iterates over every tile which it passed, and uses that as a center
Avatar
Weird, I dont even remember reading anything like that
Avatar
yea, it's nicely obfuscated
Avatar
@heinrich5991 wait how is GetPureMapIndex different then the index HandleTiles gets?
Avatar
HandleTiles gets an array of tiles that were encountered during the tick
Avatar
void CCharacter::HandleTiles(int Index) am I missing sth here?
20:15
It looks more like HandleTiles is called for each tile
Avatar
yes, sorry
20:16
that
Avatar
@heinrich5991 I looked at it for a while, but I didn't quite get it, what was the old behaviour that you replicated
Avatar
I basically just looked at the old code ^^
20:40
it has TileIndex as a parameter and uses that as the center tile for the stopper calculation, but gets the directional tiles from the tee's position
20:41
for the stopper calculation
Avatar
HandleTiles is still called for each and every tile passed through
20:43
Oooh, your new stopper code only checked the actual position
20:43
but in the past it was handled with the map index passed to handletiles?
Avatar
yes
20:46
sorry, I seem to be unable to explain it ^^
Avatar
when talking about physics code and CCharacter::HandleTiles what about removing these lines and the corresponding checks below: https://github.com/ddnet/ddnet/blob/112d0432e2c47526bf6324a608f808f3cd002871/src/game/server/entities/character.cpp#L1369-L1380 they increase the radius for end and begin tiles... but only when HandleTiles is actually called, so only when you already touch some ddnet tile this is inconsistent and just bloats the code
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/ddnet
Exported 71 message(s)