Raised This Month: $ Target: $400
 0% 

[solved] copying func_rotating...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 09-27-2006 , 13:09   [solved] copying func_rotating...
Reply With Quote #1

I'm trying to copy a func_rotating to fix the linux bug in HL ( please don't steal my idea )
but when i copy a func_rotating, it works for a few seconds and after that it just stops, and this is not the linux bug, because you can stand on it.

i'm copying it with this code:
Code:
    new stringa[64], Float:veca[3]     new newent = create_entity("func_rotating")         new i     for (i=0;i<=EV_SZ_weaponmodel;i++){         entity_get_string(ent,i,stringa,63)         entity_set_string(newent,i,stringa)     }         for (i=0;i<=EV_VEC_vuser4;i++){         entity_get_vector(ent,i,veca)         entity_set_vector(newent,i,veca)     }         for (i=0;i<=EV_INT_deadflag;i++){         entity_set_int(newent,i,entity_get_int(ent,i))     }         for (i=0;i<=EV_FL_fuser4;i++){         entity_set_float(newent,i,entity_get_float(ent,i))     }         for (i=0;i<=EV_ENT_euser4;i++){         entity_set_edict(newent,i,entity_get_edict(ent,i))     }         for (i=0;i<EV_BYTE_blending2;i++){         entity_set_byte(newent,i,entity_get_byte(ent,i))     }
Note: ent = the entity being copyed

Edit, i need dispatchspawn at the end. solved it.
plugin should come soon after
__________________
Um, hi.

Last edited by Ramono; 09-27-2006 at 13:55.
Ramono is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 09-27-2006 , 13:19   Re: copying func_rotating...
Reply With Quote #2

i think you have to copy the keyvalues
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 09-29-2006 , 01:44   Re: [solved] copying func_rotating...
Reply With Quote #3

I just found out that copying the func_rotating doesnt fix the bug...
__________________
Um, hi.
Ramono is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 09-29-2006 , 03:50   Re: [solved] copying func_rotating...
Reply With Quote #4

if u mean by "linux bug" the bug where func_rotatings would stop rotating after a while,
why not just reset their pev_angles like every minute or so

this way you dont have to reset them to {0.0, 0.0, 0.0} every time:
Code:
pev(ent,pev_angles, angles) //for example: 1053.33 -= 2 * 360 = 333.33 angles[0] -= floatround(angles[0] / 360.0,floatround_floor) * 360.0 angles[1] -= floatround(angles[1] / 360.0,floatround_floor) * 360.0 angles[2] -= floatround(angles[2] / 360.0,floatround_floor) * 360.0 set_pev(ent,pev_angles, angles)
(i dont like the way the calculations are done, but at least it works )
__________________
plop
p3tsin is offline
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 09-29-2006 , 06:30   Re: [solved] copying func_rotating...
Reply With Quote #5

cant,
the bug stops sending rotate information to the client, so this would not help either ( i think )
__________________
Um, hi.

Last edited by Ramono; 09-30-2006 at 05:46.
Ramono is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 09-29-2006 , 14:03   Re: [solved] copying func_rotating...
Reply With Quote #6

ehm? well it works for me, ive been using for 4 months w/o any problems
__________________
plop
p3tsin is offline
Old 09-30-2006, 05:08
Ramono
This message has been deleted by Ramono.
Reply


Thread Tools
Display Modes

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 04:45.


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