Code:
public force_spin()
{
log_amx("Start")
if(get_pcvar_num(toggle_pcvar))
{
static classname[16], Float:angles[3]
new ent = engfunc(EngFunc_FindEntityInSphere,maxplayers,Float:{0.0,0.0,0.0},4800.0)
while(ent)
{
log_amx("%d",ent)
if(pev_valid(ent))
{
pev(ent,pev_classname,classname,15)
if(containi(classname,"armoury")!=-1 || containi(classname,"weaponbox")!=-1)
{
pev(ent,pev_angles,angles)
angles[1] += get_pcvar_float(speed_pcvar) / 10.0
if(angles[1]>=180.0)
{
angles[1] -= 360.0
}
set_pev(ent,pev_angles,angles)
}
}
ent = engfunc(EngFunc_FindEntityInSphere,ent,Float:{0.0,0.0,0.0},4800.0)
}
}
log_amx("End")
}
This function is from my UT style weapon floating plugin. It works fine on every map I have except airstip. I have it set to execute the above statement ONCE from plugin_init in a test plugin. that's all that happens. It executes once and no other 3rd party plugin is running. Here is the log i get out:
Code:
L 10/09/2007 - 13:18:06: [GHW_Floating_Weapons.amxx] Start
L 10/09/2007 - 13:18:06: [GHW_Floating_Weapons.amxx] 34
L 10/09/2007 - 13:18:06: [GHW_Floating_Weapons.amxx] (Lots of ent numbers)
L 10/09/2007 - 13:18:06: [GHW_Floating_Weapons.amxx] 407
L 10/09/2007 - 13:18:06: [GHW_Floating_Weapons.amxx] 34
L 10/09/2007 - 13:18:06: [GHW_Floating_Weapons.amxx] (Lots of ent numbers)
L 10/09/2007 - 13:18:06: [GHW_Floating_Weapons.amxx] 407
The end is never printed into the log file. It appears that this:
Code:
engfunc(EngFunc_FindEntityInSphere,407,Float:{0.0,0.0,0.0},4800.0)
is returning 34... I had like 2 hours of sleep a couple days ago so I think it could be a typo of some sort but I really don't know... and I don't know why it only happens on airstrip...