MOBs and Minor typo
In mob.cpp Mob::CalculateDistance it reads:
Code:
return (float)sqrt( ((x_pos-x)*(x_pos-x)) + ((y_pos-x)*(y_pos-x)) + ((z_pos-z)*(z_pos-z)) ); Code:
return (float)sqrt( ((x_pos-x)*(x_pos-x)) + ((y_pos-y)*(y_pos-y)) + ((z_pos-z)*(z_pos-z)) ); |
good catch! I'll fix that tonight :)
|
Quote:
To be honest, I was in the process of replacing it with some expiremental code when I noticed it... expiremental code: Code:
float xDiff=(x_pos-x); |
That was probably my mistake when I was refactoring the DIST calculations.. Doh! Classic cut and paste error!
Good catch and thanks! Scorp, I tried to use the inline asm, but the implementation doesnt work well with gcc/gas. I'll see if I can convert it over, but I stopped worrying about it when I eliminated 99.99% of the dist calls in the 1st place... (did a precheck before calling the dist function so its only called when its needed) At this point, converting it too assembly might be an overcomplication with minimal performance gains, not that I dont appreciate the work necessary to generate it. |
Quote:
Quote:
Quote:
Quote:
There are some people who might 1) do it just to prove to himself that it works and 2) think cutting clock cycles with ingenuity is actually fun. The fifth amendment gives me the right to not mention the name of one of these people. |
I'm all for performance/process improvement (look up 6 sigma blackbelts if you get the chance..lol... Thats a big part of what i do).. If I can test the compile of it on VS.net (I've only got 6) , we can put the inline assembly in an #ifdef WIN32 , clause until i can work out the gas implementation...
|
I just wanted to mention that I did not find the line Scorp listed above,
in mob.cpp. I found it in MobAI.cpp. -bobzub |
Quote:
Quote:
|
All times are GMT -4. The time now is 01:21 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.