Апдейт ближнего боя (#37)
* Dagger update * Light weapons * HandheldAxe update * Update handheldAxe.yml * +sickle +dart * two handed update * add Link LightHammer sprite * pipi * . Add Weapons prototypes * fixes
This commit is contained in:
@@ -114,11 +114,29 @@ public sealed partial class MeleeWeaponComponent : Component
|
||||
public bool SwingLeft;
|
||||
|
||||
/// <summary>
|
||||
/// CrystallPunk Melee improvment. Allows each attack to take turns being either left or right
|
||||
/// CrystallPunk Melee upgrade. Allows each attack to take turns being either left or right
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool CPSwingBeverage = true;
|
||||
|
||||
/// <summary>
|
||||
/// CrystallPunk Melee upgrade. Modifier of wide attack animation speed
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float CPAnimationLength = 0.5f;
|
||||
|
||||
/// <summary>
|
||||
/// CrystallPunk Melee upgrade. Scale arc (for small knife ex.)
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float CPAnimationScale = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// CrystallPunk Melee upgrade. how far away from the player the animation should be played.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float CPAnimationOffset = -1f;
|
||||
|
||||
// Sounds
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -385,6 +385,11 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
var ev = new AttemptMeleeEvent();
|
||||
RaiseLocalEvent(weaponUid, ref ev);
|
||||
|
||||
//CrystallPun melee improvment
|
||||
if (weapon.CPSwingBeverage)
|
||||
weapon.SwingLeft = !weapon.SwingLeft;
|
||||
//CrystallPun melee improvment end
|
||||
|
||||
if (ev.Cancelled)
|
||||
{
|
||||
if (ev.Message != null)
|
||||
@@ -428,11 +433,6 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
var attackEv = new MeleeAttackEvent(weaponUid);
|
||||
RaiseLocalEvent(user, ref attackEv);
|
||||
|
||||
//CrystallPun melee improvment
|
||||
if (weapon.CPSwingBeverage)
|
||||
weapon.SwingLeft = !weapon.SwingLeft;
|
||||
//CrystallPun melee improvment end
|
||||
|
||||
weapon.Attacking = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user