qoala / InvisibleInc-CommunityBugFixes

1 stars 0 forks source link

Dragging an enemy body through an allied lethal laser grid triggers the laser on the body #35

Closed qoala closed 3 years ago

qoala commented 3 years ago

Vanilla Example (confirmed):

Modded Example (unconfirmed):


Both the laser's autodisable and its effect on a unit (lethal damage for K&O lasers) are applied during TRG_UNIT_WARP when that unit enters the beam path. When dragging another unit, the dragged unit is warped first. (Notably, this allows an agent to drag a guard through a corp-controlled laser with no ill effects)

Could disabling the laser be moved to a different trigger, such that both the dragging and dragged unit are checked for autodisable before either are hit? TRG_UNIT_WARP_PRE is sent for both units before either sends TRG_UNIT_WARP, however, the move can still be cancelled during the "pre" signal.

qoala commented 3 years ago

Revised note:
laser_emitter:canControl considers a dragging unit to also have the privileges of the dragged unit. This is also part of allowing an agent to drag a guard through a corp-controlled laser. Changing canControl to apply this symmetrically (so the dragged unit also has the priviliges of its carrier) may be the easiest change.