Revision Difference
Structures/Bullet#547522
<cat>struct</cat>
<structure>
<realm>Shared</realm>
<description>Tables used for bullets see <page>Entity:FireBullets</page> and <page>GM:EntityFireBullets</page>.</description>
<fields>
<item name="Attacker" type="Entity" default="self">The entity that should be reported as attacker eg. a player
By default this would be set to the entity <page>Entity:FireBullets</page> is called on.</item>
<item name="Callback" type="function" default="nil">Function to be called **after** the bullet was fired but **before** the damage is applied (the callback is called even if no damage is applied). The arguments are:
* <page>Entity</page> attacker
* <page>table</page> tr - See <page>Structures/TraceResult</page>
* <page>CTakeDamageInfo</page> dmgInfo</item>
<item name="Damage" type="number" default="1">The damage dealt by the bullet. If set to `0`, it means the damage should be calulcated from the ammo type's <page>ConVar</page>s. See <page>Structures/AmmoData</page>.</item>⤶
<item name="Damage" type="number" default="1">The damage dealt by the bullet.⤶
⤶
If set to `0`, it means the damage should be calculated from the ammo type's <page>ConVar</page>s if the ammo type has `AMMO_INTERPRET_PLRDAMAGE_AS_DAMAGE_TO_PLAYER` flag set. ⤶
See <page>Structures/AmmoData</page>.⤶
</item>⤶
<item name="Force" type="number" default="1">The force of the bullets</item>
<item name="Distance" type="number" default="56756">Maximum distance the bullet can travel</item>
<item name="HullSize" type="number" default="0">The hull size of the bullet</item>
<item name="Num" type="number" default="1">The amount of bullets to fire</item>
<item name="Tracer" type="number" default="1">Show tracer for every x bullets</item>
<item name="AmmoType" type="string" default="<empty string>">The ammunition name</item>
<item name="TracerName" type="string" default="nil">The tracer name. You can find a list of default effects <page text="here">Effects</page>.</item>
<item name="Dir" type="Vector" default="Vector( 0, 0, 0 )">The fire direction</item>
<item name="Spread" type="Vector" default="Vector( 0, 0, 0 )">The spread, only x and y are needed</item>
<item name="Src" type="Vector" default="Vector( 0, 0, 0 )">The position to fire the bullets from</item>
<item name="IgnoreEntity" type="Entity" default="NULL">The entity that the bullet will ignore when it will be shot.</item>
</fields>
</structure>