Skip to content

Commit

Permalink
feat(skymp5-client): update playerCombatSystem.ts (#1719)
Browse files Browse the repository at this point in the history
  • Loading branch information
SupAidmi authored Nov 5, 2023
1 parent 9844c2b commit ecd3a33
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions skymp5-client/src/sweetpie/playerCombatSystem.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import * as sp from "skyrimPlatform";

const weaponTimings = new Map<sp.WeaponType, [number, number]>([
[sp.WeaponType.Fist, [200, 0]],
[sp.WeaponType.Sword, [256, 41]],
[sp.WeaponType.Dagger, [218, 35]],
[sp.WeaponType.WarAxe, [288, 46]],
[sp.WeaponType.Mace, [320, 51]],
[sp.WeaponType.Greatsword, [368, 59]],
[sp.WeaponType.Fist, [0, 30]],
[sp.WeaponType.Sword, [0, 30]],
[sp.WeaponType.Dagger, [0, 60]],
[sp.WeaponType.WarAxe, [0, 60]],
[sp.WeaponType.Mace, [0, 65]],
[sp.WeaponType.Greatsword, [0, 65]],
// NOTE: both of the next two weapon types correspond to id=6.
// TODO(#xyz): do something about it. Maybe we can distinguish them somehow...
[sp.WeaponType.Battleaxe, [416, 66]],
[sp.WeaponType.Warhammer, [416, 66]],
[sp.WeaponType.Bow, [0, 218]],
[sp.WeaponType.Staff, [320, 51]],
[sp.WeaponType.Crossbow, [0, 320]],
[sp.WeaponType.Battleaxe, [0, 70]],
[sp.WeaponType.Warhammer, [0, 70]],
[sp.WeaponType.Bow, [0, 70]],
[sp.WeaponType.Staff, [0, 70]],
[sp.WeaponType.Crossbow, [0, 70]],
]);

let blockPlayerControlTimeStamp: number = 0;
Expand All @@ -24,7 +24,7 @@ export const start = (): void => {
sp.once("update", () => setAttackStaminaRestriction());

// Sup asked for this (Temporary disabled)
//sp.once('update', registerHandlersIfNeeded);
sp.once('update', registerHandlersIfNeeded);
};

const hasSweetPie = (): boolean => {
Expand Down

0 comments on commit ecd3a33

Please sign in to comment.