[BUG - RESOLVED] Infinite loop EngFunc_FindEntityInSphere for some maps
Hi Friends,
Since some days i've noticed a bug by using Find Entity In Sphere method that work fine on "basics" maps (that contain few entities), but make an infinite loop for maps like de_torn, de_airstrip, cs_manoir, etc. After logging entity list, it appears that same entities are processed, when the count is over 32 entities in the sphere. The loop will appears when the radius reach a certain ammount (approximatively 700.0 for de_airstrip). Please note that the loop appears too when using engine method !!!! I will provide my plugin test (use "dotest" command to spawn a entity) : when the entity is touching certains obstacle, the game is freezed. Code:
#include <amxmodx> http://www.hebusletroll.com/publish/..._airstrip1.jpg http://www.hebusletroll.com/publish/..._airstrip2.jpg Any body has find an issue ? Best regards. |
Re: [BUG ???] Infinite loop EngFunc_FindEntityInSphere for some maps
Shouldn't you remove the entity inside of the while loop ??
Else, there is no reason to do a loop, just do victim = enfgunc... -edit- I may have read too fast :P |
Re: [BUG ???] Infinite loop EngFunc_FindEntityInSphere for some maps
Touch is called very often per second, while you do a tracesphere among all entities each time. Maybe should you try to delay a bit.
|
Re: [BUG ???] Infinite loop EngFunc_FindEntityInSphere for some maps
Hello Arkshine,
Touch is a CallBack event function, and the sphere detection is only called once (because toucher entity is removed after processing). So i ununderstand how it is possible that the touche is called back again if no entity that has "try" classname exists. When reducing the radius, the freeze disappears :( |
Re: [BUG ???] Infinite loop EngFunc_FindEntityInSphere for some maps
Just tried with a radius of 1000 on de_airstrip... No problem at all. ( I've modified a bit your code ).
Is there a specific way to do the test ? Or just when I spawn, I do the command in random angle, is fine ? |
Re: [BUG - RESOLVED] Infinite loop EngFunc_FindEntityInSphere for some maps
It crash where the screenshot was made.
OK i will fix it by creating a Stock : Code:
stock get_entities_near_origin(Float:origin[3],entitylist[],Float:radius) Code:
new entitylist[512], victim Yeah ! |
Re: [BUG - RESOLVED] Infinite loop EngFunc_FindEntityInSphere for some maps
Really, I don't understand your problem lol.
With this code ( radius 2000 / 139 entities found ) : Code:
It returns, when I do the command at the terrorist spawn : Code:
L 09/20/2008 - 18:26:36: [Untitled.amxx] Entity ID = 2 |
Re: [BUG - RESOLVED] Infinite loop EngFunc_FindEntityInSphere for some maps
I've tested your plugin, crashing on de_airstrip, de_torn, de_piranesi and de_tides.
With your stock, it work fine ! GG ! :mrgreen: |
Re: [BUG - RESOLVED] Infinite loop EngFunc_FindEntityInSphere for some maps
Arkshine,
Please read the post again ! I've mentionned that the game crash when you firing where the SCREENSHOTS are displayed :). And i've find a members that have already the problem : http://forums.alliedmods.net/showthr...=sphere+radius |
Re: [BUG - RESOLVED] Infinite loop EngFunc_FindEntityInSphere for some maps
Ahh ~~ :D ; I'm trying again. ^^
|
All times are GMT -4. The time now is 02:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.