-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
5,222 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Metamod Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- src/aslp/* | ||
- '.github/workflows/metamod-build.yaml' | ||
|
||
jobs: | ||
win32: | ||
name: Win32 | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: lukka/get-cmake@latest | ||
|
||
- name: Download dependencies | ||
run: | | ||
git clone --depth 1 https://github.com/hzqst/metamod-fallguys.git dependencies | ||
cp -r dependencies/metamod src/metamod | ||
cp -r dependencies/asext src/asext | ||
cp -r dependencies/hlsdk src/hlsdk | ||
- name: Create build directory | ||
run: cmake -E make_directory build | ||
|
||
- name: Generate build files | ||
run: cmake -S src/aslp -B build | ||
|
||
- name: Build project | ||
run: cmake --build build --config Release | ||
|
||
- name: Create Release | ||
uses: xresloader/upload-to-github-release@v1.5.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
with: | ||
file: "build/Release/aslp.dll" | ||
default_release_body_path: CHANGELOG.md | ||
overwrite: true | ||
tags: true | ||
draft: false | ||
prerelease: false | ||
tag_name: metamod | ||
branches: main | ||
default_release_name: metamod | ||
token: ${{ secrets.TOKEN }} | ||
target_owner: Mikk155 | ||
target_repo: Sven-Co-op |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
cmake_minimum_required( VERSION 3.10 ) | ||
|
||
project( aslp ) | ||
|
||
set( CMAKE_CXX_STANDARD 11 ) | ||
set( CMAKE_CXX_STANDARD_REQUIRED True ) | ||
|
||
set( SOURCES | ||
angelscript/vftable.cpp | ||
|
||
aslp.cpp | ||
dllapi.cpp | ||
dllmain.cpp | ||
engine_api.cpp | ||
engine_hook.cpp | ||
|
||
entities/CApache.cpp | ||
entities/CBloater.cpp | ||
entities/COsprey.cpp | ||
entities/CPlayer.cpp | ||
entities/CSentry.cpp | ||
entities/CTurret.cpp | ||
|
||
entities/base/hook_items.cpp | ||
|
||
entities/register.cpp | ||
|
||
h_export.cpp | ||
meta_api.cpp | ||
server_hook.cpp | ||
) | ||
|
||
set( HEADERS | ||
angelscript/angelscript.h | ||
angelscript/angelscriptlib.h | ||
angelscript/dlldef.h | ||
angelscript/signatures.h | ||
angelscript/vftable.h | ||
|
||
aslp.h | ||
enginedef.h | ||
|
||
entities/register.h | ||
|
||
entities/base/hook_items.h | ||
|
||
serverdef.h | ||
signatures.h | ||
utility.h | ||
) | ||
|
||
add_library( ${PROJECT_NAME} SHARED ${SOURCES} ${HEADERS} ) | ||
|
||
target_include_directories( ${PROJECT_NAME} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
../hlsdk/common | ||
../hlsdk/dlls | ||
../hlsdk/pm_shared | ||
../hlsdk/engine | ||
../metamod | ||
../asext/include | ||
angelscript | ||
entities/base | ||
entities | ||
) | ||
|
||
set_target_properties( ${PROJECT_NAME} PROPERTIES OUTPUT_NAME "aslp" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#pragma once | ||
|
||
#include "vftable.h" | ||
#include "dlldef.h" | ||
#include "utility.h" | ||
|
||
typedef struct traceinfo_s | ||
{ | ||
void* pVictim; | ||
void* pInflictor; | ||
float flDamage; | ||
vec3_t vecDir; | ||
TraceResult ptr; | ||
int bitsDamageType; | ||
}traceinfo_t; | ||
|
||
typedef struct damageinfo_s | ||
{ | ||
void* pVictim; | ||
void* pInflictor; | ||
void* pAttacker; | ||
float flDamage; | ||
int bitsDamageType; | ||
}damageinfo_t; | ||
|
||
typedef struct healthinfo_s | ||
{ | ||
void* pEntity; | ||
float flHealth; | ||
int bitsDamageType; | ||
int health_cap; | ||
}healthinfo_t; | ||
|
||
typedef struct angelhook_s | ||
{ | ||
/*Function Table*/ | ||
void* pThink = nullptr; | ||
void* pTouch = nullptr; | ||
void* pBlocked = nullptr; | ||
void* pKeyValue = nullptr; | ||
void* pClientCommand = nullptr; | ||
void* pPM_Move = nullptr; | ||
void* pAddToFullPack = nullptr; | ||
|
||
/*Function Table Post*/ | ||
void* pThink_Post = nullptr; | ||
void* pAddToFullPack_Post = nullptr; | ||
|
||
/*New DLL Function Table*/ | ||
void* pShouldCollide = nullptr; | ||
|
||
/*Player*/ | ||
void* pPlayerPreTakeHealth = nullptr; | ||
void* pPlayerPostTakeHealth = nullptr; | ||
void* pPlayerPreTakeArmor = nullptr; | ||
void* pPlayerPostTakeArmor = nullptr; | ||
void* pPlayerPreRevive = nullptr; | ||
void* pPlayerPostRevive = nullptr; | ||
void* pPlayerPreDropWeapon = nullptr; | ||
void* pPlayerPostDropWeapon = nullptr; | ||
void* pPlayerGetItemInfo = nullptr; | ||
|
||
/*Monsters*/ | ||
void* pMonsterPreTakeDamage = nullptr; | ||
void* pMonsterPostTakeDamage = nullptr; | ||
void* pMonsterPreTraceAttack = nullptr; | ||
void* pMonsterPostTraceAttack = nullptr; | ||
void* pMonsterPreKilled = nullptr; | ||
void* pMonsterPostKilled = nullptr; | ||
void* pMonsterPreUse = nullptr; | ||
void* pMonsterPostUse = nullptr; | ||
void* pMonsterPreRevive = nullptr; | ||
void* pMonsterPostRevive = nullptr; | ||
void* pMonsterPrePlaySentence = nullptr; | ||
void* pMonsterPostPlaySentence = nullptr; | ||
void* pMonsterPreCheckEnemy = nullptr; | ||
void* pMonsterPostCheckEnemy = nullptr; | ||
|
||
}angelhook_t; | ||
|
||
extern angelhook_t g_AngelHook; |
Oops, something went wrong.