diff options
-rwxr-xr-x | include/game.h | 16 | ||||
-rw-r--r-- | include/statelib.h | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/include/game.h b/include/game.h index e5a4813..0fa72c9 100755 --- a/include/game.h +++ b/include/game.h @@ -1095,11 +1095,11 @@ class dActorMultiState_c; template <class TOwner>
class dStateWrapperBase_c {
public:
- dStateWrapperBase_c() :
- manager(&pointless, &executor, &dStateBase_c::mNoState) { }
+ dStateWrapperBase_c(TOwner *pOwner) :
+ manager(&pointless, &executor, &dStateBase_c::mNoState), executor(pOwner) { }
- dStateWrapperBase_c(dState_c<TOwner> *pInitState) :
- manager(&pointless, &executor, pInitState) { }
+ dStateWrapperBase_c(TOwner *pOwner, dState_c<TOwner> *pInitState) :
+ manager(&pointless, &executor, pInitState), executor(pOwner) { }
virtual ~dStateWrapperBase_c() { }
@@ -1123,11 +1123,11 @@ public: template <class TOwner>
class dStateWrapper_c : public dStateWrapperBase_c<TOwner> {
public:
- dStateWrapper_c() :
- dStateWrapperBase_c() { }
+ dStateWrapper_c(TOwner *pOwner) :
+ dStateWrapperBase_c(pOwner) { }
- dStateWrapper_c(dState_c<TOwner> *pInitState) :
- dStateWrapperBase_c(pInitState) { }
+ dStateWrapper_c(TOwner *pOwner, dState_c<TOwner> *pInitState) :
+ dStateWrapperBase_c(pOwner, pInitState) { }
~dStateWrapper_c() { }
};
diff --git a/include/statelib.h b/include/statelib.h index 092ef6a..e65f33a 100644 --- a/include/statelib.h +++ b/include/statelib.h @@ -120,6 +120,7 @@ class dStateExecutorBase_c { template <class TOwner> class dStateMethodExecutor_c : public dStateMethodExecutorBase_c { public: + dStateMethodExecutor_c(TOwner *pOwner) : mOwningObject(pOwner) { } ~dStateMethodExecutor_c() { } void callBegin(); @@ -133,6 +134,7 @@ class dStateMethodExecutor_c : public dStateMethodExecutorBase_c { template <class TOwner> class dStateExecutor_c : public dStateExecutorBase_c { public: + dStateExecutor_c(TOwner *pOwner) : mStockExecutor(pOwner) { } ~dStateExecutor_c() { } dStateMethodExecutorBase_c *getMethodExecutorForState(dStateBase_c *state); |