Opened 7 years ago
Closed 7 years ago
#966 closed enhancement (cantfix)
ProjectileDestroyed widget side callin
Reported by: | beherith | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | BAR Beta release |
Component: | BAR | Version: | |
Keywords: | Cc: |
Description
ProjectileDestroyed is only called in gadgets, but I would like to add a small deferred light flash to it. If its not too much trouble, can the projectiledestroyed callin be somehow passed over to the widget? Im aware that it needs Script.SetWatchWeapon activated, and I can handle that part, along with all visibility and LOS checks needed to avoid leaking synced info to unsynced side.
Attachments (2)
Change History (9)
by , 7 years ago
Attachment: | api_projectile_destroyed.lua added |
---|
comment:1 by , 7 years ago
Here are the bare bones of what's needed, with no LOS masks or anything.
I'm quite cagey about doing this. I think there could be a significant performance cost - the 'callin' has to be passed from gadget synced -> gadget unsynced -> widget, and will be called very many times. There might also be a performance cost attached, inside the engine, to just watching all weapons.
comment:2 by , 7 years ago
Yeah, i totally understand your reservations on this, ill try to limit it to only the very very largest projectiles, namely t2 plasma cannons, and vlaunch missiles, and rockets.
Also, I will attempt to filter the stuff to only projectiles that are destroyed while in LOS and in view.
Thanks a ton, ill integrate it :D
comment:3 by , 7 years ago
Is Spring.isSphereInView even callable from synced? Well ill have to try :D
comment:4 by , 7 years ago
It should be callable from unsynced gadget but not synced gadget! LOS masking has to be done in unsynced gadget afaics.
One other thing - iirc Script.LuaUI calls can only have one widgetHandler:RegisterGlobal set as its reciever. So if you're going to put the reciever into a widget you'll need to remove the example widget.
comment:5 by , 7 years ago
Ok, I gave it a test, and unfortunately, it neither looks good enough, and doesnt perform well enough to give nice projectile flashes :(
comment:6 by , 7 years ago
I think the only way to do this would be to add LuaUI version of Projectile* callins with appropriate los masking in the engine. I'm not sure why it wan't done already...
comment:7 by , 7 years ago
Resolution: | → cantfix |
---|---|
Status: | new → closed |
gadget part