[Condition Zero] Career Tasks Fix
2 Attachment(s)
Background & Mechanism
Recently, I noticed that Condition Zero has a special game mode in which you need to achieve certain tasks, decide who your teammates are... Quite fascinating. However, after I looking into the mission pack system, I noticed that there're some task codes that just won't work. Since all of these tasks are used to create a T mission pack, whereas the built-in mission pack is a CT pack, I wonder whether that is the reason why nobody has notice and Valve doesn't even care to have it fixed. These three unusable vanilla tasks are: Code:
killdefuser - Kill a CT when he is defusing. This is the call chain I built by refering to ReGameDLL-CS: Code:
CBasePlayer::Killed() In CCareerTaskManager::HandleEvent() we have: Code:
for (auto task : m_tasks) Code:
void CCareerTask::OnEvent(GameEventType event, CBasePlayer *pVictim, CBasePlayer *pAttacker) The result is: Code:
CBasePlayer::Killed() So the simplest fix I can purpose is to flip the param of HandleEnemyKill() via Orpheu module. But after this patch, one task remains unfixed, which is "Kill a CT whom hostages are following." Then I go straight into CCareerTask::OnEvent() and as excepted, this code is used to determine whether a player is followed by hostages. Code:
if (pHostage->m_target == pAttacker) While making a hook in function HostageFollowState::OnUpdate(), I noticed a fatal bug in Orpheu module. It interpreted CHostageImprov as an alias of CBaseEntity by a superfluous configuration file. It is wrong and can cause a serious of CTD. By hooking HostageFollowState::OnUpdate(), CHostage::m_target can now nicely syncing with HostageFollowState::m_leader and CCareerTask::OnEvent() can now properly handle everything rest. At last, it is all fixed. Requirement - Orpheu - AMX Mod X start from 1.8.1Tested & Works on Counter-Strike: Condition Zero EXCLUSIVELYInstallation After regular Orpheu installation steps, you have to deleteReference Book ReGameDLL-CSCredits Arkshine's plugin Infinite Round. From which I learned how to modify a member of a non-CBaseEntity class. |
Re: [Condition Zero] Career Tasks Fix
:)233333这又是什么模式插件?
|
Re: [Condition Zero] Career Tasks Fix
You should either add all your custom includes inside the archive(offset.inc) or link to a thread from this forum where people can download them(for orpheu includes for example).
Usually I would have checked to confirm your findings, but I quickly read your analysis and it looks reasonable. Also remove the commented code, your source files shouldn't contain any commented/dead code. If someone can confirm this works, I'll approve. |
Re: [Condition Zero] Career Tasks Fix
Quote:
|
Re: [Condition Zero] Career Tasks Fix
All I can confirm is a double-standard. Why not put this on Github and have Valve fix it?
|
Re: [Condition Zero] Career Tasks Fix
Luna, I went ahead and approved your plugin. If someone finds any problems, please let me know.
Edit: I changed modification from ALL to CZ. |
Re: [Condition Zero] Career Tasks Fix
Quote:
|
Re: [Condition Zero] Career Tasks Fix
Quote:
Back to the plugin itself here specifically. I've had CZERO since the beginning. Does anybody know when these 'Career Tasks' were made into 'working left-ins'? |
Re: [Condition Zero] Career Tasks Fix
|
Re: [Condition Zero] Career Tasks Fix
The German Shepherd Malamute mix, also known as the Alaskan Shepherd is a very good-looking and loyal dog that has been sought after malamute german shepherd mix
|
All times are GMT -4. The time now is 12:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.