diff options
author | BlueWall | 2012-01-21 23:26:27 -0500 |
---|---|---|
committer | BlueWall | 2012-01-21 23:26:27 -0500 |
commit | 32d58d6e3e9a0ea1bfa808567d0f64c0652f8a85 (patch) | |
tree | 8c19dbfa8975080d7bbbeaa1e2de4072520c899f /OpenSim/Framework/EstateSettings.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-32d58d6e3e9a0ea1bfa808567d0f64c0652f8a85.zip opensim-SC-32d58d6e3e9a0ea1bfa808567d0f64c0652f8a85.tar.gz opensim-SC-32d58d6e3e9a0ea1bfa808567d0f64c0652f8a85.tar.bz2 opensim-SC-32d58d6e3e9a0ea1bfa808567d0f64c0652f8a85.tar.xz |
Telehub Support:
Telehub settings now persist to the database and are saved across sim restarts. So-far this only works on MySQL. this is a work in progress, teleport routing is not yet implemented.
Diffstat (limited to 'OpenSim/Framework/EstateSettings.cs')
-rw-r--r-- | OpenSim/Framework/EstateSettings.cs | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index 2a495b0..9bdeab8 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -373,5 +373,155 @@ namespace OpenSim.Framework | |||
373 | 373 | ||
374 | return l_EstateAccess.Contains(user); | 374 | return l_EstateAccess.Contains(user); |
375 | } | 375 | } |
376 | |||
377 | // Telehub support | ||
378 | private bool m_TelehubEnabled = false; | ||
379 | public bool HasTelehub | ||
380 | { | ||
381 | get { return m_TelehubEnabled; } | ||
382 | set { m_TelehubEnabled = value; } | ||
383 | } | ||
384 | |||
385 | // Connected Telehub object | ||
386 | private UUID m_TelehubObject; | ||
387 | public UUID TelehubObject | ||
388 | { | ||
389 | get | ||
390 | { | ||
391 | if (HasTelehub) | ||
392 | { | ||
393 | return m_TelehubObject; | ||
394 | } | ||
395 | else | ||
396 | { | ||
397 | return UUID.Zero; | ||
398 | } | ||
399 | } | ||
400 | set | ||
401 | { | ||
402 | m_TelehubObject = value; | ||
403 | } | ||
404 | } | ||
405 | |||
406 | // Connected Telehub name | ||
407 | private string m_TelehubName; | ||
408 | public string TelehubName | ||
409 | { | ||
410 | get | ||
411 | { | ||
412 | if (HasTelehub) | ||
413 | { | ||
414 | return m_TelehubName; | ||
415 | } | ||
416 | else | ||
417 | { | ||
418 | return String.Empty; | ||
419 | } | ||
420 | } | ||
421 | set | ||
422 | { | ||
423 | m_TelehubName = value; | ||
424 | } | ||
425 | } | ||
426 | |||
427 | // Connected Telehub position | ||
428 | private float m_TelehubPosX; | ||
429 | private float m_TelehubPosY; | ||
430 | private float m_TelehubPosZ; | ||
431 | public Vector3 TelehubPos | ||
432 | { | ||
433 | get | ||
434 | { | ||
435 | if (HasTelehub) | ||
436 | { | ||
437 | Vector3 Pos = new Vector3(m_TelehubPosX, m_TelehubPosY, m_TelehubPosZ); | ||
438 | return Pos; | ||
439 | } | ||
440 | else | ||
441 | { | ||
442 | return Vector3.Zero; | ||
443 | } | ||
444 | } | ||
445 | set | ||
446 | { | ||
447 | |||
448 | m_TelehubPosX = value.X; | ||
449 | m_TelehubPosY = value.Y; | ||
450 | m_TelehubPosZ = value.Z; | ||
451 | } | ||
452 | } | ||
453 | |||
454 | // Connected Telehub rotation | ||
455 | private float m_TelehubRotX; | ||
456 | private float m_TelehubRotY; | ||
457 | private float m_TelehubRotZ; | ||
458 | private float m_TelehubRotW; | ||
459 | public Quaternion TelehubRot | ||
460 | { | ||
461 | get | ||
462 | { | ||
463 | if (HasTelehub) | ||
464 | { | ||
465 | Quaternion quat = new Quaternion(); | ||
466 | |||
467 | quat.X = m_TelehubRotX; | ||
468 | quat.Y = m_TelehubRotY; | ||
469 | quat.Z = m_TelehubRotZ; | ||
470 | quat.W = m_TelehubRotW; | ||
471 | |||
472 | return quat; | ||
473 | } | ||
474 | else | ||
475 | { | ||
476 | // What else to do?? | ||
477 | Quaternion quat = new Quaternion(); | ||
478 | |||
479 | quat.X = m_TelehubRotX; | ||
480 | quat.X = m_TelehubRotY; | ||
481 | quat.X = m_TelehubRotZ; | ||
482 | quat.X = m_TelehubRotW; | ||
483 | |||
484 | return quat; | ||
485 | } | ||
486 | } | ||
487 | set | ||
488 | { | ||
489 | m_TelehubRotX = value.X; | ||
490 | m_TelehubRotY = value.Y; | ||
491 | m_TelehubRotZ = value.Z; | ||
492 | m_TelehubRotW = value.W; | ||
493 | } | ||
494 | } | ||
495 | |||
496 | // Our Connected Telehub's SpawnPoints | ||
497 | public List<Vector3> l_SpawnPoints = new List<Vector3>(); | ||
498 | |||
499 | // Add a SpawnPoint | ||
500 | // ** These are not region coordinates ** | ||
501 | // They are relative to the Telehub coordinates | ||
502 | // | ||
503 | public void AddSpawnPoint(Vector3 point) | ||
504 | { | ||
505 | l_SpawnPoints.Add(point); | ||
506 | } | ||
507 | |||
508 | // Remove a SpawnPoint | ||
509 | public void RemoveSpawnPoint(int point_index) | ||
510 | { | ||
511 | l_SpawnPoints.RemoveAt(point_index); | ||
512 | } | ||
513 | |||
514 | // Return the List of SpawnPoints | ||
515 | public List<Vector3> SpawnPoints() | ||
516 | { | ||
517 | return l_SpawnPoints; | ||
518 | |||
519 | } | ||
520 | |||
521 | // Clear the SpawnPoints List of all entries | ||
522 | public void ClearSpawnPoints() | ||
523 | { | ||
524 | l_SpawnPoints.Clear(); | ||
525 | } | ||
376 | } | 526 | } |
377 | } | 527 | } |