diff options
| author | Léo Lam <leo@leolam.fr> | 2021-12-15 11:21:13 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2021-12-15 11:21:56 +0100 |
| commit | fb8f0c636eeb77d407c32930b458f769e187d4b4 (patch) | |
| tree | fe3682e2c490ed0b630c7dfda9964c00cf792dda /src/KingSystem/Physics/System/physDefines.cpp | |
| parent | c0a24e1611cb0dea3a29b739cd3b05daf9125f0e (diff) | |
ksys: Change isSensorLayer to getContactLayerType
The == 0 and == 1 comparisons suggest that the function actually
returns a ContactLayerType rather than a boolean
Diffstat (limited to 'src/KingSystem/Physics/System/physDefines.cpp')
| -rw-r--r-- | src/KingSystem/Physics/System/physDefines.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/KingSystem/Physics/System/physDefines.cpp b/src/KingSystem/Physics/System/physDefines.cpp index d5f2d123..beebbc5b 100644 --- a/src/KingSystem/Physics/System/physDefines.cpp +++ b/src/KingSystem/Physics/System/physDefines.cpp @@ -2,8 +2,10 @@ namespace ksys::phys { -u32 isSensorLayer(ContactLayer layer) { - return layer > ContactLayer::EntityEnd; +ContactLayerType getContactLayerType(ContactLayer layer) { + if (layer > ContactLayer::EntityEnd) + return ContactLayerType::Sensor; + return ContactLayerType::Entity; } u32 makeContactLayerMask(ContactLayer layer) { |
