Talk:IsElementWithinAColShape: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Y U NO USE builtin functions?)
 
No edit summary
 
Line 4: Line 4:


Also, why not [[IsElementWithinColShape]]? --[[User:Wielebny|Wielebny]] 18:44, 24 June 2013 (UTC)
Also, why not [[IsElementWithinColShape]]? --[[User:Wielebny|Wielebny]] 18:44, 24 June 2013 (UTC)
You are right, the result would never be freed if an element is destroyed inside the colshape, and I'm working on the restart-proof code.
By the way, The only reason why I didn't overwrite the function [[isElementWithinColShape]] is because that function check if the element is in a specific colshape, where as this function checks whether the element is in '''A''' colshape.

Latest revision as of 09:40, 12 July 2013

I don't consider this example very well written. In case that player element enters the colshape, and then disconnects, the inColShape[player_element] will never be freed, resulting in memory leak.

Besides, this code isn't restart-proof and can't handle more than one colshape.

Also, why not IsElementWithinColShape? --Wielebny 18:44, 24 June 2013 (UTC)

You are right, the result would never be freed if an element is destroyed inside the colshape, and I'm working on the restart-proof code. By the way, The only reason why I didn't overwrite the function isElementWithinColShape is because that function check if the element is in a specific colshape, where as this function checks whether the element is in A colshape.