aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/actors/actor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pink/objects/actors/actor.cpp')
-rw-r--r--engines/pink/objects/actors/actor.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/pink/objects/actors/actor.cpp b/engines/pink/objects/actors/actor.cpp
index e6545f3a1f..abcb66502e 100644
--- a/engines/pink/objects/actors/actor.cpp
+++ b/engines/pink/objects/actors/actor.cpp
@@ -48,9 +48,8 @@ Sequencer *Actor::getSequencer() const {
Action *Actor::findAction(const Common::String &name) {
for (uint i = 0; i < _actions.size(); ++i) {
- if (_actions[i]->getName() == name) {
+ if (_actions[i]->getName() == name)
return _actions[i];
- }
}
return nullptr;
}
@@ -60,14 +59,12 @@ GamePage *Actor::getPage() const {
}
void Actor::init(bool unk) {
- if (!_action) {
+ if (!_action)
_action = findAction(kIdleAction);
- }
if (!_action) {
_isActionEnded = 1;
- }
- else {
+ } else {
_isActionEnded = 0;
_action->start(unk);
}
@@ -103,8 +100,7 @@ void Actor::setAction(Action *newAction, bool unk) {
assert(0); // want to see this
_isActionEnded = 1;
_action = newAction;
- }
- else {
+ } else {
setAction(newAction);
}
}