-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInvisibleWall.cpp
More file actions
57 lines (45 loc) · 1022 Bytes
/
InvisibleWall.cpp
File metadata and controls
57 lines (45 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include "InvisibleWall.h"
using InvisibleWallCLPS = StaticCLPS_Block<{ .tractionID = CLPS::TR_SLIP_NO_WALL_JUMP_ABOVE }>;
SharedFilePtr InvisibleWall::clsnFile;
SpawnInfo InvisibleWall::spawnData =
{
[] -> ActorBase* { return new InvisibleWall; },
0x0000,
0x0100,
0x00000003,
0x00064000_f,
0x000c8000_f,
0x01000000_f,
0x01000000_f
};
[[gnu::target("thumb")]]
void InvisibleWall::UpdateModelTransform()
{
model.mat4x3 = Matrix4x3::RotationY(ang.y);
model.mat4x3.c3 = pos >> 3;
}
[[gnu::target("thumb")]]
int InvisibleWall::InitResources()
{
UpdateModelTransform();
UpdateClsnPosAndRot();
KCL_File& clsnF = clsnFile.LoadKCL();
clsn.SetFile(&clsnF, clsnNextMat, 1._f, ang.y, InvisibleWallCLPS::instance<>);
clsn.beforeClsnCallback = &MeshColliderBase::UpdatePosWithTransform;
return 1;
}
int InvisibleWall::CleanupResources()
{
clsn.Disable();
clsnFile.Release();
return 1;
}
int InvisibleWall::Behavior()
{
IsClsnInRange(0_f, 0_f);
return 1;
}
int InvisibleWall::Render()
{
return 1;
}