mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Added a helper function which can tell whether an event type can be inversed.
This commit is contained in:
parent
c7e776a1f7
commit
8e750efe85
@ -287,6 +287,30 @@ bool IsCustomEvent(SQInt32 type) noexcept
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CanBeInversed(SQInt32 type) noexcept
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case EVT_KEYBINDKEYPRESS:
|
||||
case EVT_KEYBINDKEYRELEASE:
|
||||
case EVT_VEHICLEEMBARKING:
|
||||
case EVT_VEHICLEEMBARKED:
|
||||
case EVT_VEHICLEDISEMBARK:
|
||||
case EVT_PICKUPCLAIMED:
|
||||
case EVT_PICKUPCOLLECTED:
|
||||
case EVT_OBJECTSHOT:
|
||||
case EVT_OBJECTBUMP:
|
||||
case EVT_CHECKPOINTENTERED:
|
||||
case EVT_CHECKPOINTEXITED:
|
||||
case EVT_SPHEREENTERED:
|
||||
case EVT_SPHEREEXITED:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
bool Register_Event(HSQUIRRELVM vm)
|
||||
{
|
||||
|
@ -32,6 +32,11 @@ bool IsDestroyEvent(SQInt32 type) noexcept;
|
||||
*/
|
||||
bool IsCustomEvent(SQInt32 type) noexcept;
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool CanBeInversed(SQInt32 type) noexcept;
|
||||
|
||||
} // Namespace:: SqMod
|
||||
|
||||
#endif // _SQMOD_EVENT_SHARED_HPP_
|
Loading…
Reference in New Issue
Block a user