Open FloooD opened 13 years ago
meh, k I guess
hm would needa rename some stuff in cross_layer
btw it's mostly to move lines from main to onsecond and onframe
k done
btw on many maps, when i try to join
* glibc detected * ./custom_cs2dsrv: free(): invalid pointer: 0x0805f406 *** fuuuuuuuuuuu
which maps? Gonna squeeze a debug session in before midterm time rolls around again
basically anything that is not de_cs2d has a pretty high chance of crashing it
aim_fr33kz is one of them...
o_O can you send me aim_fr33kz? Just delete all of the free() calls in map.c
o_O I can't replicate the segfault, are you using make or make --no-shared?
Whoa, this new issues system is pretty
oh nvm, when you join
Sighz, I hate malloc so much
The problem comes from packet.c:line 1024 if (!i) return (byte*)"";
Where "" is a const char* allocated OFF of the heap. So calling free off of the heap segfaults <_<. It'll be patched in a jiffy
nvm, a second segfault occurs with aim_fr33kz on lua_hooks, not the case with de_cs2d though o_O
lol this looks like the pull request thing now :P
ya sometimes it segfaults at startup sometimes when u try to join
int check_sendqueue(void){ // returns the number of elements sent
int threshold = 0x30, i = 0, cur = mtime(); // 48 sends per iteration
why 48?
just a random number. I figured that it had to be greater than 32, but not too great so that it retains a maximum processing time per iteration (to prevent the server from getting flooded during one iteration)
worst case scenario: 32 players in server all moving
server receives 32 packets every 20 ms for every packet received, ~32 are sent out... so around 1000 packets every 20 ms... 100 packets every 2 ms i.e. 1 frame at 500fps
well i guess it doesn't really matter for now ;p
would there be anything wrong in making the sock in main.c an extern?
since for quite a few functions the first argument is ALWAYS sock... so might as well just take out that argument :P