Skip to content

Commit

Permalink
UPBGE: Fix controller activation.
Browse files Browse the repository at this point in the history
  • Loading branch information
panzergame committed Oct 20, 2017
1 parent 1998e6f commit 904ca9b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/gameengine/GameLogic/SCA_IController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void SCA_IController::Activate(SG_DList& head)
head.AddFront(&list);
}
else {
SG_QList& list = m_gameobj->GetActiveActuators();
SG_QList& list = m_gameobj->GetActiveControllers();
InsertActiveQList(list);
head.AddBack(&list);
}
Expand Down
9 changes: 7 additions & 2 deletions source/gameengine/GameLogic/SCA_IObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
SG_QList SCA_IObject::m_activeBookmarkedControllers;

SCA_IObject::SCA_IObject()
:m_initState(0),
:m_suspended(false),
m_initState(0),
m_state(0),
m_firstState(nullptr)
{
m_suspended = false;
}

SCA_IObject::~SCA_IObject()
Expand Down Expand Up @@ -88,6 +88,11 @@ SG_QList& SCA_IObject::GetActiveActuators()
return m_activeActuators;
}

SG_QList& SCA_IObject::GetActiveControllers()
{
return m_activeControllers;
}

SG_QList& SCA_IObject::GetActiveBookmarkedControllers()
{
return m_activeBookmarkedControllers;
Expand Down
1 change: 1 addition & 0 deletions source/gameengine/GameLogic/SCA_IObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class SCA_IObject : public EXP_Value
SCA_SensorList& GetSensors();
SCA_ActuatorList& GetActuators();
SG_QList& GetActiveActuators();
SG_QList& GetActiveControllers();
static SG_QList& GetActiveBookmarkedControllers();

void AddSensor(SCA_ISensor *act);
Expand Down

0 comments on commit 904ca9b

Please sign in to comment.