s1lentq / reapi

AMX Mod X module, using API regamedll & rehlds
GNU General Public License v3.0
158 stars 103 forks source link

[bug] TraceAttack vecDirection #79

Closed fl0werD closed 4 years ago

fl0werD commented 7 years ago

Неверные значения выводит. Например { 0.0, очень_гиганское.0, очень_гиганское.0 } С ham'ом всё ок. Причем баг работает только на врагов.

s1lentq commented 7 years ago

Please give me a script or whatever to reproduce this issue

fl0werD commented 7 years ago

Стреляя по врагам баг, по тиммейтам - норм.

#include < amxmodx >
#include < reapi >

public plugin_init( )
{
    RegisterHookChain( RG_CBasePlayer_TraceAttack, "CBasePlayer__TraceAttack_Post", true );
}

public CBasePlayer__TraceAttack_Post( iVictim, iAttacker, Float: flDamage, Float: vecDir[ 3 ], iTrace, iBitsDamageType )
{
    client_print( 0, pritn_chat, "%.2f %.2f %.2f", vecDir[ 0 ], vecDir[ 1 ], vecDir[ 2 ] );
}
fl0werD commented 7 years ago

В догонку: как получить в трейсаттаке уже получившийся урон как в тейкдмг? Либо как в тейкдмг взять позицию vecEndPos, ибо через global_get криво.

s1lentq commented 7 years ago

@fl0werD i can't reproduce that issue what is your version reapi, regamedll and amxmodx?