From c77af311665d230ed933138cd20962d021ad5c2b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 25 Feb 2009 06:43:03 +0000 Subject: Minor speedups for the BGE * Where possible use vec.setValue(x,y,z) to assign values to a vector instead of vec= MT_Vector3(x,y,z), for MT_Point and MT_Matrix types too. * Comparing TexVerts was creating 10 MT_Vector types - instead compare as floats. * Added SG_Spatial::SetWorldFromLocalTransform() since the local transform is use for world transform in some cases. * removed some unneeded vars from UpdateChildCoordinates functions * Py API - Mouse, Ray, Radar sensors - use PyObjectFrom(vec) rather then filling the lists in each function. Use METH_NOARGS for get*() functions. --- source/gameengine/Ketsji/KX_TrackToActuator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/gameengine/Ketsji/KX_TrackToActuator.cpp') diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index 89dfc8e57ad..9d4fa14ad8e 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -258,18 +258,18 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) { case 0: { - up = MT_Vector3(1.0,0,0); + up.setValue(1.0,0,0); break; } case 1: { - up = MT_Vector3(0,1.0,0); + up.setValue(0,1.0,0); break; } case 2: default: { - up = MT_Vector3(0,0,1.0); + up.setValue(0,0,1.0); } } #endif -- cgit v1.2.3