-
Notifications
You must be signed in to change notification settings - Fork 149
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
XEH - Add missing event handlers with SPE 1.0 #1587
Conversation
addons/xeh/CfgVehicles.hpp
Outdated
class Tank; | ||
class SPE_Armored_Target_Dummy: Tank { | ||
class EventHandlers { | ||
// This class has an empty CBA_Extended_EventHandlers, repopulate with actual event handlers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, what? Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, this is the SPE class structure
class SPE_Armored_Target_Dummy: Tank
{
class Eventhandlers
{
class CBA_Extended_EventHandlers{};
};
};
Since the XEH_ENABLED
macro adds the EventHandlers
classes with inheritance from the CBA_Extended_EventHandlers_base
class it causes a load order issue and UBC problem. This structure with macros usage avoids both problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL. To fix, should put
class SPE_Armored_Target_Dummy: Tank {
class Eventhandlers {
delete CBA_Extended_EventHandlers;
};
};
here, and then
class Tank;
class SPE_Armored_Target_Dummy: Tank {
XEH_ENABLED;
};
into ee component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would need a separate (sub)config with cfgPatches requiredAddons[] = { "Some_SPE_Addon" };
and either the new skipWhenMissingDependencies
with 2.14 patch or #if __has_include("some_spe_path")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? delete
complains now if no class is there? Maybe add it in patch 1, then remove it in patch 2, then XEH_enabled in patch 3. XEH already has a ton of (now sub-) module duplicates for legacy reasons. If you need to change the requiredAddons for it, go ahead.
Your current solution is whack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
SPE is optional CDLC so not always loaded, when I tried locally CBA always got loaded before SPE so we need to ensure the load order unless we use the suggested solution in the PR
If you need to change the requiredAddons for it, go ahead.
Any preference on new skipWhenMissingDependencies
which won't be usable until upcoming patch 2.14 and would block PR / release until then or using #if __has_include("some_spe_path")
which doesn't work properly with some tools like HEMTT and binarization enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think #1589 should help with this problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class SPE_Armored_Target_Dummy: Tank
{
scope=1;
class Eventhandlers
{
class CBA_Extended_EventHandlers
{
};
};
it's scope=1 and nothing inherits from this
I'm guessing this is for something scripted,
they explicitly disabled eh and xeh on it
I think we might just want to trust them and not touch it
class EventHandlers { | ||
// This class has an empty CBA_Extended_EventHandlers, repopulate with actual event handlers | ||
class CBA_Extended_EventHandlers { | ||
EXTENDED_EVENTHANDLERS | ||
}; | ||
}; | ||
SLX_XEH_DISABLED = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class EventHandlers { | |
// This class has an empty CBA_Extended_EventHandlers, repopulate with actual event handlers | |
class CBA_Extended_EventHandlers { | |
EXTENDED_EVENTHANDLERS | |
}; | |
}; | |
SLX_XEH_DISABLED = 0; | |
SLX_XEH_DISABLED = 1; |
This is likely to fixed in a future SPE update, should we skip this? |
If it will be fixed, then yes. Can always merge after SPE updates if it ends up not being fixed. |
Has this been fixed in SPE 1.02 released on September 21st? |
Latest patch fixed some but these are still broken,
Config tree might be different than when this patch was maybe, it needs some love |
I fixed the minefields eventhandler inheritance on SPE side, should be fixed next time an update comes out |
If those minefields were the last, I think we can close this @Drofseh ? |
XEH issues fixed with SPE 1.1 patches |
When merged this pull request will: