Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Damage+ not working for weapon_hegrenade #388

Open
DeewaTT91 opened this issue Feb 1, 2023 · 5 comments
Open

Damage+ not working for weapon_hegrenade #388

DeewaTT91 opened this issue Feb 1, 2023 · 5 comments

Comments

@DeewaTT91
Copy link
Contributor

DeewaTT91 commented Feb 1, 2023

As the title says, changing values for weapon_hegrenade in the damage_weapons.cfg doesn't have any effect.

My Current config is:

"DamagePlusWeapons"
{
	"weapon_hegrenade"
	{
		"dmg_increase" "100000.1" //This is so high to test if it actually works. 
		"max_additional_dmg" "3500"
	}
	"weapon_m3"
	{
		"dmg_increase" "0.01"
		"max_additional_dmg" "3500"
	}
}
@DeewaTT91
Copy link
Contributor Author

Changing the value for all weapons in smrpg_upgrade_damage.cfg does affect the HE grenade aswell however.

@WanekWest
Copy link

WanekWest commented Feb 3, 2023

There is one unpleasant development option for grenades. After all, damage is added when a player takes damage. But at this moment, the enemy who attacked him is not the fact that he is holding a grenade. Because of this, this modification does not work for you.

`
int iWeapon = inflictor; // Why do we need this?

if(inflictor > 0 && inflictor <= MaxClients)
	iWeapon = Client_GetActiveWeapon(inflictor); // We get the enemy's active weapon (what he has in his hands at the time of the damage).

`

All this because:
SDKHook(client, SDKHook_OnTakeDamage, Hook_OnTakeDamage);

Most likely, in this case, it is necessary to change the logic of the entire skill, because it will not behave correctly in relation to grenades.

@peace-maker
Copy link
Owner

I believe we can check if the m_hThrower or m_hOwner prop is available on the attacker and use that instead of the active weapon. Would need some testing to get it right. I'm not sure which parameter would be the grenade projectile in OnTakeDamage.

@WanekWest
Copy link

WanekWest commented Feb 3, 2023

It seems to me that m_hThrower will be a more correct check, because after the cs go update in which were added grenades dropping, the damage is caused by the one who threw it.

@DeewaTT91
Copy link
Contributor Author

I could also circumvent this for now by giving every weapon the value I want, and then change the overall damage in smrpg_upgrade_damage.cfg to a higher value. That way only the HE Grenade would deal a higher amount of damage since the damage_weapons.cfg seems to be working for all the other weapons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants