Raised This Month: $ Target: $400
 0% 

Linux func_rotating bug fixer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-25-2009 , 16:22   Re: Linux func_rotating bug fixer
Reply With Quote #1

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_FixAnglesiEnt )
{
    new 
Float:vecAngles[3], bSetiFloat:fAngle

    pev
(iEntpev_anglesvecAngles)
    
bSet false

    
for(i=0i<3i++)
    {
        
fAngle vecAngles[i]
        if( 
fAngle < -360.0 || fAngle 360.0 )
        {
            
vecAngles[i] -= floatround(fAngle) / 360 360
            bSet 
true
        
}
    }

    if( 
bSet )
    {
        
set_pev(iEntpev_anglesvecAngles)
    }

Attached Files
File Type: sma Get Plugin or Get Source (func_rotating_bugfix.sma - 825 views - 1.4 KB)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 09-20-2010 at 13:17.
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode