Don't intercept/redistribute llDamage sent from vehicle to one of its sitters (Combat2 2024-04-11.8639309472)
complete
Thunder Rahja
Under current behavior, all damage sent to an agent sitting on an object is redirected to the object sat on and then redistributed to all sitters. This includes
llDamage
called from a vehicle targeting one of its sitters. Please allow llDamage
called from an object/vehicle to be sent directly to its sitters.Demonstration: Create two or more prims and link them together, create the following script in the root link, and then sit on and click the object:
default
{
state_entry()
{
llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [PRIM_SIT_TARGET, 1, <0.5,0,0.5>, ZERO_ROTATION]);
}
touch_start()
{
key root = llList2Key(llGetObjectDetails(llDetectedKey(0), [OBJECT_ROOT]), 0);
if (root = llGetKey()) // avatar is sitting on me
{
llDamage(llDetectedKey(0), 20, 4);
llSay(0, "Sent 20 damage to " + llKey2Name(llDetectedKey(0)));
}
}
on_damage(integer num_detected)
{
llSay(0, "I took damage");
}
}
Log In
This post was marked as
complete
SL Feedback
Merged in a post from Thunder Rahja:
Title: Damage passthrough and damage to sitter flags for llSetLinkSitFlags (Combat2 2024-04-11.8639309472)
Details: "SIT_FLAG_NO_DAMAGE" was suggested to stop passing damage from vehicle to the avatar seated on the specified link.
To complement the above, I propose additional flags to further modify damage distribution from object to sitters:
- "SIT_FLAG_DAMAGE_PASSTHROUGH": Allow llDamageto hit a sitter without intercepting/redistributing the incoming damage. This should also allow objects (with a damage property, e.g.llSetDamage) to damage the sitting avatar that they directly collide with (unlessSIT_FLAG_NO_COLLIDEis also enabled).
- "SIT_FLAG_DAMAGE_TO_SITTER": Damage from llDamageor collision with an object (with a damage property) to this specific link should be redirected to the avatar sitting on this link.
These two new flags should also stop
on_damage
and final_damage
from firing in the vehicle's root link for relevant damage, and not produce a CombatLog message for the object/vehicle since it would no longer be processed by the object.Rider Linden
in progress
Thunder Rahja
In Combat2 2024-05-02.8929584012, an object that I owned and sat on did not fire its own
on_damage
when it called llDamage
on me. This issue appears to be resolved.Wulfie Reanimator
The current behavior also prevents "custom" damage behavior, for example if a vehicle wants to block all incoming damage and then individually assign damage to specific sitters. (Imagine a tank with an exposed gunner at the top. The driver should be safe while the gunner receives damage.) The vehicle would block its own damage in this case, which is no fun.