Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-04-08 15:36:22 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-04-08 15:36:22 +0400
commit80485c2926a518b5de9db3d737abd4afb80be5a7 (patch)
tree2053f46ed955323a8dfcbdb9d99f4c46b759ad30 /source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
parent5398f1ba77d25ff27a4e8275a1453e7ddb2f2f0d (diff)
In NaN times I suggested a python function to get the subject of a
Message using a python function of the MessageSensor. Thats a nice thing if you want complex message handling in one python script. Just get all messages, check the subject and do what you want. In the current situation you end up with several MessageSensors connected to the python script, instead of one Sensor and a smart script. Some developer (cant remember who) did implement that function, but however not the way I wanted (maybe I was not clear enough) ;-) So the getSubject() function will return whats entered in the "Subject:" filter field of the MessageSensor. Quite useless IMHO. So I added a new function getSubjects() which is similar to getBodies(), in fact I stole the code from there ;-) I left the getSubject() alone, because of backward compatibility (never saw someone using that function, but...) The future: In conjunction with a wildcard subject: filter field the getSubjects() function will be even more usefull. i.e. Player* will filter for PlayerScore, PlayerKill etc. -- Carsten Wartmann
Diffstat (limited to 'source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h')
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
index 8335a8ba7a4..f2b8b306d9d 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
@@ -54,6 +54,7 @@ class KX_NetworkMessageSensor : public SCA_ISensor
bool m_IsUp;
class CListValue* m_BodyList;
+ class CListValue* m_SubjectList;
public:
KX_NetworkMessageSensor(
KX_NetworkEventManager* eventmgr, // our eventmanager
@@ -79,6 +80,7 @@ public:
KX_PYMETHOD_DOC(KX_NetworkMessageSensor, GetFrameMessageCount);
KX_PYMETHOD_DOC(KX_NetworkMessageSensor, GetBodies);
KX_PYMETHOD_DOC(KX_NetworkMessageSensor, GetSubject);
+ KX_PYMETHOD_DOC(KX_NetworkMessageSensor, GetSubjects);
};