TheZoc / sourceforts-bug-tracker

Bug Tracker for the classic SourceForts HL2 Mod
10 stars 0 forks source link

Server's Console writing "m_iHealth" while shooting at multiple blocks #81

Closed ghost closed 5 years ago

ghost commented 5 years ago

Happening once you hit 2 blocks at same time The more blocks you hit, the more line you get into the console.

exemple: You shoot at blocks and hit 2 blocks: Entity 211 (class 'prop_physics') reported ENTITY_CHANGE_NONE but 'm_iHealth' changed. Entity 212 (class 'prop_physics') reported ENTITY_CHANGE_NONE but 'm_iHealth' changed. are now visible in the server's console

TheZoc commented 5 years ago

Weirdly enough, this only happens with frozen blocks, right?

TheZoc commented 5 years ago

Okay, so here's everything I found out while trying to solve this issue:

This are of the code is inaccessible. Apparently, it's a warning about changing a member variable and not reporting that it changed.

I managed to find this file: https://github.com/VSES/SourceEngine2007/blob/43a5c90a5ada1e69ca044595383be67f40b33c61/se2007/engine/sv_packedentities.cpp#L206

Apparently that wasn't supposed to be publicly available on the web, but it helped me to fix this spam.

What I did is: Whenever the block takes damage, we send the full entity data over the network, instead of just the delta. It's ugly, but seems to be working. If there's no issues with data flooding on a bigger game, I'll keep it this way.