mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
add AddOpenSimExtraFeature to simulator features, so it is done under proper locking. Fix gridservice extra features merge (they override older). This does need a future cleanup
This commit is contained in:
@@ -40,6 +40,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
{
|
||||
event SimulatorFeaturesRequestDelegate OnSimulatorFeaturesRequest;
|
||||
void AddFeature(string name, OSD value);
|
||||
void AddOpenSimExtraFeature(string name, OSD value);
|
||||
bool RemoveFeature(string name);
|
||||
bool TryGetFeature(string name, out OSD value);
|
||||
OSDMap GetFeatures();
|
||||
|
||||
@@ -1255,23 +1255,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
ISimulatorFeaturesModule fm = RequestModuleInterface<ISimulatorFeaturesModule>();
|
||||
if (fm != null)
|
||||
{
|
||||
OSD openSimExtras;
|
||||
OSDMap openSimExtrasMap;
|
||||
|
||||
if (!fm.TryGetFeature("OpenSimExtras", out openSimExtras))
|
||||
openSimExtras = new OSDMap();
|
||||
|
||||
float statisticsFPSfactor = 1.0f;
|
||||
if(Normalized55FPS)
|
||||
statisticsFPSfactor = 55.0f * FrameTime;
|
||||
|
||||
openSimExtrasMap = (OSDMap)openSimExtras;
|
||||
openSimExtrasMap["SimulatorFPS"] = OSD.FromReal(1.0f / FrameTime);
|
||||
openSimExtrasMap["SimulatorFPSFactor"] = OSD.FromReal(statisticsFPSfactor);
|
||||
openSimExtrasMap["SimulatorFPSWarnPercent"] = OSD.FromInteger(FrameTimeWarnPercent);
|
||||
openSimExtrasMap["SimulatorFPSCritPercent"] = OSD.FromInteger(FrameTimeCritPercent);
|
||||
|
||||
fm.AddFeature("OpenSimExtras", openSimExtrasMap);
|
||||
fm.AddOpenSimExtraFeature("SimulatorFPS", OSD.FromReal(1.0f / FrameTime));
|
||||
fm.AddOpenSimExtraFeature("SimulatorFPSFactor", OSD.FromReal(statisticsFPSfactor));
|
||||
fm.AddOpenSimExtraFeature("SimulatorFPSWarnPercent", OSD.FromInteger(FrameTimeWarnPercent));
|
||||
fm.AddOpenSimExtraFeature("SimulatorFPSCritPercent", OSD.FromInteger(FrameTimeCritPercent));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user