Black Mesa support#78
Open
MyGamepedia wants to merge 10 commits into
Open
Conversation
AMBuildScript: - now compiles black mesa. configure.py - should work now AMBuilder: - split bms and tf2 things, tf2 gameruls and tf2 nav/area to tf2, bms nav/area to bms cbasenpc_internal.cpp: - tf2 gamerules stuff is now under macro extension.cpp: - tf2 stuff under tf2 macro - proper unload so if it doesn't load it doesn't crash the game helpers.cpp: - iirc the changes for 1.12 compile natives.cpp: - removed double basecombatcharacter::setup natives\bms: - black mesa has custom classes for CNavMesh/CNavArea with CBlackMesa prefix. entityfactory.cpp, behavior.cpp: - changed context->GetContext() to context so it can compile nav.cpp: - split bms and tf2 nav.cpp version via macro takedamageinfo.cpp: - throw error for black mesa if used GettDamageForForceCalc/SetDamageForForceCalc serialrefresher.cpp: - used different algorithm to get framesnapshotmanager in bms baseanimating.cpp, baseanimating.h: - bms wil use offset for CBaseAnimating::mSequenceDuration - used different algorithm to get GetAnimationEvent in bms baseentity.cpp, baseentity.h: - new code to get CBaseEntity::PhysicsMarkEntitiesAsTouching and g_TouchTrace. - black mesa will use trigger_auto_crouch for BEGIN_VAR instead of trigger_stun. - added CBaseEntity::SDK_OnUnload() for proper unload. bms_nav_area.h: - CBlackMesaNavArea class. nav_mesh.cpp: - will give more info when unloaded for CNavMesh::Load reasons. takedamageinfo.cpp: - m_flDamageForForce moved as tf2 only. toolsnav_mesh.h: - added "vstdlib/random.h" to compile. cbasenpc.txt: - new data + fixes to prev commit PackageScript: - bms folder included bms\nav.inc: - methodmap for CBlackMesaNavArea
black mesa doesn't always use lowercase only classnames, so newlights and gonarch doesn't appear, newlight_point will appear but newLight_Point won't (the second case used by maps). this fixes the issue.
nav area map crash fix, fixed offsets for UpdateLastKnownArea and OnNavAreaChanged, nextbot spawn crashes
- fixed "Host_Error: DLL_SetView: not a client" error, the reason is silly... the sign was for OnRestore and not for LookupPoseParameter, i wasted my entire day on this... - cbasenpc_example.sp now will compile. - added bmsnavtest.sp for black mesa nav mesh/area test goals.
- Now the compiler will split Black Mesa and TF2 features, this is taked from SourceCoop. By default, TF2 version compiled. Currently this affect activity.inc file include and damage crit type natives. - Moved TF2 activity.inc version to tf subfolder. - moved bmsnavtest.sp. - added cbasenpc_bmsnavtest.sp to AMBuilder from scripting folder.
Collaborator
Even if it's half broken/no linux support, PR like these are always a welcomed addition. I'm quite busy currently, so I'm going to review the PR over several days. Still thanks for your work! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Full Black Mesa support, a couple of bug fixes, added Black Mesa nav mesh/area features. Compiles under SourceMod 1.12.
Everything was tested on Windows build, the Linux build needs some tests (cuz i was unable):
It's also better to check if TF2 build is working without errors.
Includes cbasenpc_bmsnavtest, so you can test bms nav features pretty quickly.
I expect this needs a review, I'm not too familiar with how extensions are coded, so I guess some things could be done better, but at very least, the Windows build is working pretty well. Didn't test absolutely everything, but overall I'm happy with how it works. Here is demo I used for the extension abilities showcase in Crowbar/HECU Collective discord servers: https://youtu.be/zxkjcR4G7MQ
Full changes log:
cbasenpc.txt:
AMBuildScript:
configure.py:
AMBuilder:
cbasenpc_internal.cpp:
extension.cpp:
helpers.cpp:
natives.cpp:
natives\bms:
entityfactory.cpp, behavior.cpp:
nav.cpp:
takedamageinfo.cpp:
serialrefresher.cpp:
baseanimating.cpp, baseanimating.h:
baseentity.cpp, baseentity.h:
bms_nav_area.h:
nav_mesh.cpp:
takedamageinfo.cpp:
toolsnav_mesh.h:
cbasenpc.txt:
PackageScript:
bms\nav.inc:
pluginentityfactory.h:
NextBotEventResponderInterface.h:
nav_area.h:
NextBotGroundLocomotion.h:
bms/activity.inc:
cbasenpc.inc:
baseanimating.inc:
takedamageinfo.inc:
cbasenpc_bmsnavtest.sp: