Thank you kindly, Idb for a patch that solves:

llWind always returns a zero vector. In the attached 
patch the WindModule has been changed slightly to 
make wind data available for llWind
This commit is contained in:
Charles Krinke
2008-10-19 21:11:13 +00:00
parent 923f9fb749
commit a5d945e199
3 changed files with 63 additions and 2 deletions

View File

@@ -953,7 +953,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Vector llWind(LSL_Vector offset)
{
m_host.AddScriptLPS(1);
return new LSL_Vector();
LSL_Vector wind = new LSL_Vector(0, 0, 0);
IWindModule module = World.RequestModuleInterface<IWindModule>();
if (module != null && module.WindSpeeds != null)
{
Vector3 pos = m_host.GetWorldPosition();
int x = (int)((pos.X + offset.x)/ 16);
int y = (int)((pos.Y + offset.y)/ 16);
if (x < 0) x = 0;
if (x > 15) x = 15;
if (y < 0) y = 0;
if (y > 15) y = 15;
wind.x = module.WindSpeeds[y * 16 + x].X;
wind.y = module.WindSpeeds[y * 16 + x].Y;
}
return wind;
}
public void llSetStatus(int status, int value)