LeviLamina
Loading...
Searching...
No Matches
ActorHistory.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/ecs/gamerefs_entity/EntityContext.h"
7#include "mc/deps/game_refs/OwnerPtr.h"
8
9// auto generated forward declare list
10// clang-format off
11class EntityRegistry;
14// clang-format on
15
16class ActorHistory {
17public:
18 // ActorHistory inner types declare
19 // clang-format off
20 struct Snapshot;
21 // clang-format on
22
23 // ActorHistory inner types define
24 struct Snapshot {
25 public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 32, ::OwnerPtr<::EntityContext>> mSnapshotState;
29 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::IMovementCorrection>>> mCorrections;
30 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IReplayableActorInput>> mCapturedInput;
31 ::ll::TypedStorage<1, 1, bool> mIsCorrection;
32 // NOLINTEND
33 };
34
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 8, uint64 const> mHistoryWindow;
39 ::ll::TypedStorage<8, 40, ::std::deque<::ActorHistory::Snapshot>> mSnapshots;
40 ::ll::TypedStorage<8, 8, uint64> mOldestFrame;
41 ::ll::TypedStorage<4, 4, ::std::bitset<2>> mPendingCorrections;
42 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::IMovementCorrection>>> mQueuedCorrection;
43 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IReplayableActorInput>> mNextInput;
44 // NOLINTEND
45
46#ifdef LL_PLAT_S
47#else // LL_PLAT_C
48public:
49 // prevent constructor by default
50 ActorHistory();
51
52#endif
53public:
54 // member functions
55 // NOLINTBEGIN
56#ifdef LL_PLAT_C
57 MCAPI explicit ActorHistory(uint64 historyWindow);
58#endif
59
60 MCAPI void addCorrectionToFrame(::std::shared_ptr<::IMovementCorrection> correction, uint64 frame);
61
62#ifdef LL_PLAT_C
63 MCAPI void addFrame(::EntityContext& entity, uint64 frame, ::EntityRegistry& registry);
64#endif
65
66 MCAPI ~ActorHistory();
67 // NOLINTEND
68
69public:
70 // static functions
71 // NOLINTBEGIN
72#ifdef LL_PLAT_C
73 MCAPI static void prepareEntityForRewindFromCapture(
74 ::EntityContext const& fromCapture,
75 ::EntityContext const& fromLive,
76 ::EntityContext& toRewind
77 );
78#endif
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
84#ifdef LL_PLAT_C
85 MCAPI void* $ctor(uint64 historyWindow);
86#endif
87 // NOLINTEND
88
89public:
90 // destructor thunk
91 // NOLINTBEGIN
92 MCAPI void $dtor();
93 // NOLINTEND
94};
Definition EntityContext.h:15
Definition EntityRegistry.h:10
Definition ActorHistory.h:24
Definition IMovementCorrection.h:15
Definition IReplayableActorInput.h:29