mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-18 06:13:55 -07:00
Create a Damage system component from the Damage helper object and parts of the Attack component. This fixes the issue by making ranged damage independent of the attacking entity. While there fix the issue of damaging all nearby entities in case the actual target was not hit, instead of only a single one. This was SVN commit r18625.
7 lines
329 B
JavaScript
7 lines
329 B
JavaScript
Engine.RegisterInterface("Attack");
|
|
|
|
/**
|
|
* Message of the form { "attacker": number, "target": number, "type": string, "damage": number, "attackerOwner": number }
|
|
* sent from Attack component and by Damage component to the target entity, each time the target is attacked or damaged.
|
|
*/
|
|
Engine.RegisterMessageType("Attacked");
|