AMX MOD X
Четверг, 28.03.2024, 22:51:49



Приветствую Вас Гость | RSS
[ Главная ] [ JumpStats v3.7.1 by exolent - AMX Mod X Форум ] [ Регистрация ] [ Вход ]
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]

Вниманию участников! Данный форум теперь является архивом и вскором времени здесь нельзя будет создавать новых тем! Просьба всем для общения и создания новых тем перейти на наш новый форум: http://amxmodx.su/

  • Страница 1 из 1
  • 1
Модератор форума: slogic, AlMod  
AMX Mod X Форум » Плагины » Обсуждение сторонних плагинов » JumpStats v3.7.1 by exolent
JumpStats v3.7.1 by exolent
aleshenjkeeДата: Суббота, 27.02.2010, 13:39:14 | Сообщение # 1
Рядовой
Группа: Пользователи
Сообщений: 1
Репутация: 0
Статус: Не в сети
Здравствуйте, Уважаемые форумчане!
захотелось поставить JumpStats v3.7.1 by exolent, но почему-то не показывает статистику. играю на серверах xtreme-jumps: на одном показывает стату нормально, на другом тоже, но если только не приседаю. а вот на своём сервере (линукс) вообще не показывает. в чём может быть проблема?
я новичок в коддерстве. вот открыл его темку и нашёл кое-что, только не всё понимаю:
Quote
Important Note About Correct Distance:

I have had so many people tell me that my stats are incorrect. However, my stats are 100% correct now.
There is no reason to tell me that my stats are incorrect. If you compare mine to the XJ plugin by NumB on v2.2b7, you are wrong.
I say this because of this reason here inside NumB's plugin:

Code
pev(id, pev_origin, vOrigin);

fDistance1 = get_distance_f(vJumpedAt[id], vOrigin)+32.0625;

Here are the flaws with this:
The distance addon is actually 32.0, not 32.0625. Ask eDark yourself.
The distance is wrong if the player ducks to land, because it also calculates the distance between the height which is not accounted for when the player ducks.
This is how it should be calculated:

Code
pev(id, pev_origin, vOrigin);
new bool:bDucking = is_in_duck(id);
if( bDucking )
     vOrigin[2]+=18.0;

fDistance1 = get_distance_f(vJumpedAt[id], vOrigin)+32.0;
if( bDucking ) // we only do this because it needs to be at its original position for later code.
     vOrigin[2]-=18.0;

The reason for this offset when the player ducks is that the player's height position changes so that it's not the same height as the jump off height.
After adding this to the XJ stats plugin, I tested:

Code
[XJ] Distance: 244.561187 - 244.650802
[JS] Distance: 244.561187 - 244.650802

Those are the 2 calculated distances within the plugins when compared for which distance is to be used.
As you can see, they are the exact same with the duck fix.

Here is some more proof for this.
Inside the code, I added a debug message to prove that the height origins were not the same when a player ducks at the end of the jump:

Code
pev(id, pev_origin, vOrigin);

fDistance1 = get_distance_f(vJumpedAt[id], vOrigin)+32.0;

server_print("[XJ] Jump Height: %f -- Land Height: %f", vJumpedAt[id][2], vOrigin[2]);

The result:

Code
[XJ] Jump Height: -91.968750 -- Land Height: -109.968750

Therefore, the distance is not correct because it has to also add the height distance into the final distance.

о чём он тут говорит? (в инглише тоже не очень =) )
Огромное спасибо за помощь!
 
AMX Mod X Форум » Плагины » Обсуждение сторонних плагинов » JumpStats v3.7.1 by exolent
  • Страница 1 из 1
  • 1
Поиск:

AMX Mod X Russian Community © 2006-2024