diff options
Diffstat (limited to 'src/systems/playing.cpp')
-rw-r--r-- | src/systems/playing.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/systems/playing.cpp b/src/systems/playing.cpp index acec4e7..dabc9a5 100644 --- a/src/systems/playing.cpp +++ b/src/systems/playing.cpp | |||
@@ -42,10 +42,9 @@ void PlayingSystem::initPlayer() | |||
42 | auto& transformable = game_.getEntityManager(). | 42 | auto& transformable = game_.getEntityManager(). |
43 | emplaceComponent<TransformableComponent>(player); | 43 | emplaceComponent<TransformableComponent>(player); |
44 | 44 | ||
45 | transformable.x = realizable.startingX; | 45 | transformable.pos = realizable.startingPos; |
46 | transformable.y = realizable.startingY; | 46 | transformable.size.w() = 10; |
47 | transformable.w = 10; | 47 | transformable.size.h() = 12; |
48 | transformable.h = 12; | ||
49 | 48 | ||
50 | game_.getSystemManager().getSystem<PonderingSystem>().initializeBody( | 49 | game_.getSystemManager().getSystem<PonderingSystem>().initializeBody( |
51 | player, | 50 | player, |
@@ -59,8 +58,7 @@ void PlayingSystem::initPlayer() | |||
59 | 58 | ||
60 | playable.mapId = realizable.activeMap; | 59 | playable.mapId = realizable.activeMap; |
61 | playable.checkpointMapId = realizable.startingMapId; | 60 | playable.checkpointMapId = realizable.startingMapId; |
62 | playable.checkpointX = realizable.startingX; | 61 | playable.checkpointPos = realizable.startingPos; |
63 | playable.checkpointY = realizable.startingY; | ||
64 | 62 | ||
65 | realizing.enterActiveMap(player); | 63 | realizing.enterActiveMap(player); |
66 | 64 | ||
@@ -70,8 +68,7 @@ void PlayingSystem::initPlayer() | |||
70 | void PlayingSystem::changeMap( | 68 | void PlayingSystem::changeMap( |
71 | id_type player, | 69 | id_type player, |
72 | size_t mapId, | 70 | size_t mapId, |
73 | double x, | 71 | vec2d warpPos) |
74 | double y) | ||
75 | { | 72 | { |
76 | auto& playable = game_.getEntityManager(). | 73 | auto& playable = game_.getEntityManager(). |
77 | getComponent<PlayableComponent>(player); | 74 | getComponent<PlayableComponent>(player); |
@@ -103,8 +100,7 @@ void PlayingSystem::changeMap( | |||
103 | 100 | ||
104 | pondering.unferry(player); | 101 | pondering.unferry(player); |
105 | 102 | ||
106 | transformable.x = x; | 103 | transformable.pos = warpPos; |
107 | transformable.y = y; | ||
108 | 104 | ||
109 | if (realizable.activePlayer == player) | 105 | if (realizable.activePlayer == player) |
110 | { | 106 | { |
@@ -139,8 +135,7 @@ void PlayingSystem::die(id_type player) | |||
139 | changeMap( | 135 | changeMap( |
140 | player, | 136 | player, |
141 | playable.checkpointMapId, | 137 | playable.checkpointMapId, |
142 | playable.checkpointX, | 138 | playable.checkpointPos); |
143 | playable.checkpointY); | ||
144 | 139 | ||
145 | animatable.frozen = false; | 140 | animatable.frozen = false; |
146 | animatable.flickering = false; | 141 | animatable.flickering = false; |