TTT-2 / ttt2-role_siki

This is the "Sidekick" role for TTT2
4 stars 6 forks source link

Inflictor fix #6

Closed NickCloudAT closed 5 years ago

NickCloudAT commented 5 years ago

Improvised fix for GetInflictor.

Alf21 commented 5 years ago

Couldn't you just set the sidekick deagle as inflictor and check this instead of checking whether the active (current) weapon is the sidekick deagle?

NickCloudAT commented 5 years ago

Well if you tell me where I should do so.. But in my mind thinkin about that, it would still not fix that? I mean, how would I AT FIRST check that it's the sidekick deagle that shot, and then set it as inflictor? I mean I can't set it as inflicor when it was damage from like a grenade or so.

Alf21 commented 5 years ago

AFAIK you don‘t need to set the inflictor manually. This should be done automatically if you are doing damage with this weapon.

NickCloudAT commented 5 years ago

Yeah but dmginfo:GetInflictor() does not return the sidekick deagle, only the Player. It only returns entitys like grenades or projectiles for me.. and for what ever reason also my crowbar.

Alf21 commented 5 years ago

Is this still a thing?

lebroomer commented 5 years ago

I think, I have a solution for this problem: We can use ShootBullet with a callback function for a save feedback. I can test this and draft a new PR if you want to :)

Alf21 commented 5 years ago

Hmm if it‘s still a bug and you have a nice solution, it would be really helpful :)