mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added a tweak to update unarmed attacks after leveling up
Changed the artifact package name.
This commit is contained in:
@@ -36,16 +36,16 @@ jobs:
|
||||
- name: Prepare artifact
|
||||
run: |
|
||||
:
|
||||
mkdir -p ddraw
|
||||
mkdir -p sfall-build
|
||||
|
||||
cp artifacts/ddraw.ini ddraw
|
||||
cp artifacts/sfall.dat ddraw
|
||||
cp "${{ steps.build.outputs.release-xp }}" ddraw
|
||||
cp artifacts/ddraw.ini sfall-build
|
||||
cp artifacts/sfall.dat sfall-build
|
||||
cp "${{ steps.build.outputs.release-xp }}" sfall-build
|
||||
shell: bash
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ddraw
|
||||
path: ddraw
|
||||
name: sfall-build
|
||||
path: sfall-build
|
||||
retention-days: 14
|
||||
|
||||
@@ -343,7 +343,26 @@ long Unarmed::GetHitAPCost(fo::AttackType hit) {
|
||||
return unarmed.Hit(hit).apCost;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static void __declspec(naked) statPCAddExperienceCheckPMs_hook() {
|
||||
__asm {
|
||||
call fo::funcoffs::intface_update_hit_points_;
|
||||
sub esp, 8;
|
||||
lea edx, [esp + 4]; // modeR
|
||||
mov eax, esp; // modeL
|
||||
call fo::funcoffs::intface_get_item_states_;
|
||||
pop edx;
|
||||
pop ebx;
|
||||
xor eax, eax;
|
||||
jmp fo::funcoffs::intface_update_items_;
|
||||
}
|
||||
}
|
||||
|
||||
void Unarmed::init() {
|
||||
// Update unarmed attack after leveling up
|
||||
HookCall(0x4AFC15, statPCAddExperienceCheckPMs_hook);
|
||||
|
||||
unarmed = Hits();
|
||||
|
||||
auto unarmedFile = IniReader::GetConfigString("Misc", "UnarmedFile", "", MAX_PATH);
|
||||
@@ -381,7 +400,7 @@ void Unarmed::init() {
|
||||
val = IniReader::GetInt(sHit, "Penetrate", -1, file);
|
||||
if (val >= 0) hit.isPenetrate = (val != 0);
|
||||
|
||||
val = IniReader::GetInt(sHit, "Second", -1, file);
|
||||
val = IniReader::GetInt(sHit, "Secondary", -1, file);
|
||||
if (val >= 0) hit.isSecondary = (val != 0);
|
||||
|
||||
for (size_t s = 0; s < fo::Stat::STAT_base_count; _itoa(++s, &stat[4], 10)) {
|
||||
|
||||
Reference in New Issue
Block a user