AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [solved] copying func_rotating... (https://forums.alliedmods.net/showthread.php?t=45269)

Ramono 09-27-2006 13:09

[solved] copying func_rotating...
 
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 :)

Greenberet 09-27-2006 13:19

Re: copying func_rotating...
 
i think you have to copy the keyvalues

Ramono 09-29-2006 01:44

Re: [solved] copying func_rotating...
 
I just found out that copying the func_rotating doesnt fix the bug...

p3tsin 09-29-2006 03:50

Re: [solved] copying func_rotating...
 
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 :?)

Ramono 09-29-2006 06:30

Re: [solved] copying func_rotating...
 
cant,
the bug stops sending rotate information to the client, so this would not help either ( i think )

p3tsin 09-29-2006 14:03

Re: [solved] copying func_rotating...
 
ehm? well it works for me, ive been using for 4 months w/o any problems :wink:


All times are GMT -4. The time now is 04:45.

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