Topic: [Help] Throughhookable tiles and Prediction
Hello. I've got 2 questions about modding of the teeworlds source (vanilla).
First of all, I tried to implement tiles you can stand on but hook through.
For this purpose, I added a new Tile to mapitems.h, right underneath TILE_DEATH.
The tile has been added to the map, and I am a 100% certain that it worked.
So, in collision.cpp, I added a new "case TILE_THROUGHHOOK:", which sets the tile index for this tile to COLFLAG_SOLID|COLFLAG_THROUGHHOOK
Alright. COLFLAG_THROUGHHOOK is set to 128 by default in collision.hpp.
After compiling (Which worked, too) I simply fall through this tile. If I set the collisionflag to COLFLAG_SOLID only, I stay on the tile, but it LOOKS like I fall through, until I move left or right and the coordinate is updated.
So, first question: Why do I fall through a tile with colflag 1000001 but not through one with 1?
Second question: What can I do against the prediction errors? I know I can compile a matching Client, but where do I change how the prediction works?
Thanks for your time,
Ikaron