[Bf-committers] BGE patch for 2.47

Diego Hernan Borghetti bdiego at gmail.com
Sun Jul 13 04:15:46 CEST 2008


On Sat, 12 Jul 2008, Benoit Bolsee wrote:

Hi Benoit:

Really thanks, queue for my next commit :)

> Hi,
>
> One of my recent update contained two bug fix that are good for 2.47 but
> couldn't easily be separated from the trunk update. I put them here to
> allow inclusion in 2.47:
> Commit Log: "Truncated loop n Ipo Actuator when start frame is not 1.
> Parent Actuator did not check if activation was due to positive or
> negative event"
>
>
> Index: source/gameengine/Ketsji/KX_IpoActuator.cpp
> ===================================================================
> --- source/gameengine/Ketsji/KX_IpoActuator.cpp	(r,vision 15425)
> +++ source/gameengine/Ketsji/KX_IpoActuator.cpp	(copie de travail)
> @@ -352,7 +303,10 @@
> 				if (!m_bNegativeEvent){
> 					/* Perform wraparound */
> 					SetLocalTime(curtime);
> -					m_localtime = m_startframe +
> fmod(m_localtime, m_startframe - m_endframe);
> +					if (start_smaller_then_end >
> 0.f)
> +						m_localtime =
> m_startframe + fmod(m_localtime - m_startframe, m_endframe -
> m_startframe);
> +					else
> +						m_localtime =
> m_startframe - fmod(m_startframe - m_localtime, m_startframe -
> m_endframe);
> 					SetStartTime(curtime);
> 				}
> 				else
> Index: source/gameengine/Ketsji/KX_ParentActuator.cpp
> ===================================================================
> --- source/gameengine/Ketsji/KX_ParentActuator.cpp	(r,vision 15425)
> +++ source/gameengine/Ketsji/KX_ParentActuator.cpp	(copie de
> travail)
> @@ -77,6 +77,12 @@
>
> bool KX_ParentActuator::Update()
> {
> +	bool bNegativeEvent = IsNegativeEvent();
> +	RemoveAllEvents();
> +
> +	if (bNegativeEvent)
> +		return false; // do nothing on negative events
> +
> 	KX_GameObject *obj = (KX_GameObject*) GetParent();
> 	KX_Scene *scene = PHY_GetActiveScene();
> 	switch (m_mode) {
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>

-- 
 			Diego


More information about the Bf-committers mailing list