[Feat] Система лежания и снаряды теперь проходят через лежащих людей, если не целиться в них (#195)
* add: система лежания и вставания * add: теперь по-умолчанию по лежачим не попадают снаряды * add: только гуманоиды могут ложиться
This commit is contained in:
@@ -26,6 +26,12 @@ public sealed partial class ProjectileComponent : Component
|
||||
[DataField, AutoNetworkedField]
|
||||
public EntityUid? Weapon;
|
||||
|
||||
/// <summary>
|
||||
/// Entity being targeted by crosshair.
|
||||
/// </summary>
|
||||
[AutoNetworkedField]
|
||||
public EntityUid? Target;
|
||||
|
||||
/// <summary>
|
||||
/// The projectile spawns inside the shooter most of the time, this prevents entities from shooting themselves.
|
||||
/// </summary>
|
||||
|
||||
@@ -334,6 +334,12 @@ public sealed class ImpactEffectEvent : EntityEventArgs
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised when an entity is just about to be hit with a projectile
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public record struct ProjectileCollideAttemptEvent(EntityUid ProjUid, ProjectileComponent Component, bool Cancelled);
|
||||
|
||||
/// <summary>
|
||||
/// Raised when an entity is just about to be hit with a projectile but can reflect it
|
||||
/// </summary>
|
||||
@@ -350,4 +356,4 @@ public record struct ProjectileHitEvent(DamageSpecifier Damage, EntityUid Target
|
||||
/// Raised after a projectile has dealt it's damage.
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture Fixture);
|
||||
public record struct AfterProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, Fixture Fixture);
|
||||
Reference in New Issue
Block a user