forked from mirrors/0ad
2f12bae102
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.
8 lines
329 B
JavaScript
8 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");
|