Found that thos entities stop rotation (only visual) when some angle value is above 32768 or below -32768 on linux, and -16777216/16777216 (=32768*512) on windows, at least on my computer and on my dediacted server.
Here a better coded (i hope) plugin.
PHP Code:
/* Formatright © 2009, ConnorMcLeod
func_rotating bugfix is free software;
you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with func_rotating bugfix; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define VERSION "0.0.2"
public plugin_init()
{
register_plugin("func_rotating bugfix", VERSION, "ConnorMcLeod")
RegisterHam(Ham_Think, "func_rotating", "Think_FixAngles", 1)
RegisterHam(Ham_Think, "func_train", "Think_FixAngles", 1)
}
public Think_FixAngles( iEnt )
{
new Float:vecAngles[3], bSet, i, Float:fAngle
pev(iEnt, pev_angles, vecAngles)
bSet = false
for(i=0; i<3; i++)
{
fAngle = vecAngles[i]
if( fAngle < -360.0 || fAngle > 360.0 )
{
vecAngles[i] -= floatround(fAngle) / 360 * 360
bSet = true
}
}
if( bSet )
{
set_pev(iEnt, pev_angles, vecAngles)
}
}