-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我想实现chand功能 #529
Comments
You don't even get your code formatted into |
现在可以了 |
我真的很需要这个,我认为这个类似gmod的功能成功可以帮大家为模型工作更轻松,特别是搬运那些骨骼手臂一样的模型时,但是我对编码能力不足,我打算不同的人物模型可以设置不同的手臂,有谁愿意一起做这个吗 |
Stop posting AI generated randomshit. 不要往这里粘贴AI拉的屎。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#include <meta_hooksv.h>
#include
#include
#include
#include
#include
// 配置和缓存存储
std::map<std::string, std::string> g_ArmsConfig;
std::map<std::string, model_t*> g_CachedArmsModels;
// 辅助函数:清理模型路径并转为小写
std::string GetCleanModelName(const char* path)
{
std::string modelName = path;
}
// 加载INI配置
void LoadArmsConfiguration()
{
const char* iniPath = "addons/metahook/arms_config.ini";
std::ifstream file(iniPath);
}
// 获取缓存模型
model_t* GetCachedModel(const std::string& modelPath)
{
auto it = g_CachedArmsModels.find(modelPath);
if (it != g_CachedArmsModels.end())
return it->second;
}
// 骨骼查找函数
int FindBoneIndex(studiohdr_t* pstudiohdr, const char* boneName)
{
if (!pstudiohdr)
return -1;
}
// 绑定手臂模型
static void AttachHandToWeapon(cl_entity_t* weapon, cl_entity_t* hand, model_t* armsModel)
{
if (!weapon || !hand || !armsModel)
return;
}
// Hooked StudioSetupModel
static void My_StudioSetupModel(int bodypart, void** ppbodypart, void** ppsubmodel)
{
cl_entity_t* entity = IEngineStudio.GetCurrentEntity();
}
// 重新加载配置
void ReloadArmsConfig()
{
gEngfuncs.Con_Printf("[ArmsConfig] 重新加载配置...\n");
g_ArmsConfig.clear();
g_CachedArmsModels.clear();
LoadArmsConfiguration();
}
// 控制台命令
void Cmd_ReloadArmsConfig()
{
ReloadArmsConfig();
}
// Metahook初始化
void MetaHook_Init()
{
// 加载配置
LoadArmsConfiguration();
}
The text was updated successfully, but these errors were encountered: