fixed some warnings - fix potential crash in particle server

* fixed a couple unused variable warnings
* fixed several more serious "< of unsigned value always returns false" warnings, that prevented the corrupt particle packet guard code from properly working