blob: 8191cec58b4756a6629ee054f594c9ac18853a8e (
plain)
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
58
59
|
#include "StarToolUserItem.hpp"
namespace Star {
ToolUserItem::ToolUserItem() : m_owner(nullptr) {}
void ToolUserItem::init(ToolUserEntity* owner, ToolHand hand) {
m_owner = owner;
m_hand = hand;
}
void ToolUserItem::uninit() {
m_owner = nullptr;
m_hand = {};
}
void ToolUserItem::update(float, FireMode, bool, HashSet<MoveControlType> const&) {}
bool ToolUserItem::initialized() const {
return (bool)m_owner;
}
ToolUserEntity* ToolUserItem::owner() const {
if (!m_owner)
throw ToolUserItemException("Not initialized in ToolUserItem::owner");
return m_owner;
}
EntityMode ToolUserItem::entityMode() const {
if (!m_owner)
throw ToolUserItemException("Not initialized in ToolUserItem::entityMode");
return *m_owner->entityMode();
}
ToolHand ToolUserItem::hand() const {
if (!m_owner)
throw ToolUserItemException("Not initialized in ToolUserItem::hand");
return *m_hand;
}
World* ToolUserItem::world() const {
if (!m_owner)
throw ToolUserItemException("Not initialized in ToolUserItem::world");
return m_owner->world();
}
List<DamageSource> ToolUserItem::damageSources() const {
return {};
}
List<PolyF> ToolUserItem::shieldPolys() const {
return {};
}
List<PhysicsForceRegion> ToolUserItem::forceRegions() const {
return {};
}
}
|