diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 96 |
1 files changed, 94 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 80df86e..242bd27 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -425,13 +425,105 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
425 | 425 | ||
426 | public void llSetStatus(int status, int value) | 426 | public void llSetStatus(int status, int value) |
427 | { | 427 | { |
428 | NotImplemented("llSetStatus"); | 428 | if ((status & LSL_BaseClass.STATUS_PHYSICS) == LSL_BaseClass.STATUS_PHYSICS) |
429 | { | ||
430 | m_host.AddFlag(LLObject.ObjectFlags.Physics); | ||
431 | } | ||
432 | if ((status & LSL_BaseClass.STATUS_PHANTOM) == LSL_BaseClass.STATUS_PHANTOM) | ||
433 | { | ||
434 | m_host.AddFlag(LLObject.ObjectFlags.Phantom); | ||
435 | } | ||
436 | if ((status & LSL_BaseClass.STATUS_CAST_SHADOWS) == LSL_BaseClass.STATUS_CAST_SHADOWS) | ||
437 | { | ||
438 | m_host.AddFlag(LLObject.ObjectFlags.CastShadows); | ||
439 | } | ||
440 | if ((status & LSL_BaseClass.STATUS_ROTATE_X) == LSL_BaseClass.STATUS_ROTATE_X) | ||
441 | { | ||
442 | NotImplemented("llSetStatus - STATUS_ROTATE_X"); | ||
443 | } | ||
444 | if ((status & LSL_BaseClass.STATUS_ROTATE_Y) == LSL_BaseClass.STATUS_ROTATE_Y) | ||
445 | { | ||
446 | NotImplemented("llSetStatus - STATUS_ROTATE_Y"); | ||
447 | } | ||
448 | if ((status & LSL_BaseClass.STATUS_ROTATE_Z) == LSL_BaseClass.STATUS_ROTATE_Z) | ||
449 | { | ||
450 | NotImplemented("llSetStatus - STATUS_ROTATE_Z"); | ||
451 | } | ||
452 | if ((status & LSL_BaseClass.STATUS_BLOCK_GRAB) == LSL_BaseClass.STATUS_BLOCK_GRAB) | ||
453 | { | ||
454 | NotImplemented("llSetStatus - STATUS_BLOCK_GRAB"); | ||
455 | } | ||
456 | if ((status & LSL_BaseClass.STATUS_DIE_AT_EDGE) == LSL_BaseClass.STATUS_DIE_AT_EDGE) | ||
457 | { | ||
458 | NotImplemented("llSetStatus - STATUS_DIE_AT_EDGE"); | ||
459 | } | ||
460 | if ((status & LSL_BaseClass.STATUS_RETURN_AT_EDGE) == LSL_BaseClass.STATUS_RETURN_AT_EDGE) | ||
461 | { | ||
462 | NotImplemented("llSetStatus - STATUS_RETURN_AT_EDGE"); | ||
463 | } | ||
464 | if ((status & LSL_BaseClass.STATUS_SANDBOX) == LSL_BaseClass.STATUS_SANDBOX) | ||
465 | { | ||
466 | NotImplemented("llSetStatus - STATUS_SANDBOX"); | ||
467 | } | ||
429 | return; | 468 | return; |
430 | } | 469 | } |
431 | 470 | ||
432 | public int llGetStatus(int status) | 471 | public int llGetStatus(int status) |
433 | { | 472 | { |
434 | NotImplemented("llGetStatus"); | 473 | Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.ObjectFlags.ToString()); |
474 | switch (status) | ||
475 | { | ||
476 | case LSL_BaseClass.STATUS_PHYSICS: | ||
477 | if ((m_host.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == (uint)LLObject.ObjectFlags.Physics) | ||
478 | { | ||
479 | return 1; | ||
480 | } | ||
481 | return 0; | ||
482 | break; | ||
483 | case LSL_BaseClass.STATUS_PHANTOM: | ||
484 | if ((m_host.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == (uint)LLObject.ObjectFlags.Phantom) | ||
485 | { | ||
486 | return 1; | ||
487 | } | ||
488 | return 0; | ||
489 | break; | ||
490 | case LSL_BaseClass.STATUS_CAST_SHADOWS: | ||
491 | if ((m_host.ObjectFlags & (uint)LLObject.ObjectFlags.CastShadows) == (uint)LLObject.ObjectFlags.CastShadows) | ||
492 | { | ||
493 | return 1; | ||
494 | } | ||
495 | return 0; | ||
496 | break; | ||
497 | case LSL_BaseClass.STATUS_BLOCK_GRAB: | ||
498 | NotImplemented("llGetStatus - STATUS_BLOCK_GRAB"); | ||
499 | return 0; | ||
500 | break; | ||
501 | case LSL_BaseClass.STATUS_DIE_AT_EDGE: | ||
502 | NotImplemented("llGetStatus - STATUS_DIE_AT_EDGE"); | ||
503 | return 0; | ||
504 | break; | ||
505 | case LSL_BaseClass.STATUS_RETURN_AT_EDGE: | ||
506 | NotImplemented("llGetStatus - STATUS_RETURN_AT_EDGE"); | ||
507 | return 0; | ||
508 | break; | ||
509 | case LSL_BaseClass.STATUS_ROTATE_X: | ||
510 | NotImplemented("llGetStatus - STATUS_ROTATE_X"); | ||
511 | return 0; | ||
512 | break; | ||
513 | case LSL_BaseClass.STATUS_ROTATE_Y: | ||
514 | NotImplemented("llGetStatus - STATUS_ROTATE_Y"); | ||
515 | return 0; | ||
516 | break; | ||
517 | case LSL_BaseClass.STATUS_ROTATE_Z: | ||
518 | NotImplemented("llGetStatus - STATUS_ROTATE_Z"); | ||
519 | return 0; | ||
520 | break; | ||
521 | case LSL_BaseClass.STATUS_SANDBOX: | ||
522 | NotImplemented("llGetStatus - STATUS_SANDBOX"); | ||
523 | return 0; | ||
524 | break; | ||
525 | } | ||
526 | NotImplemented("llGetStatus - Unknown Status parameter"); | ||
435 | return 0; | 527 | return 0; |
436 | } | 528 | } |
437 | 529 | ||