Raised This Month: $51 Target: $400
 12% 

SM Damage


Post New Thread Reply   
 
Thread Tools Display Modes
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 09-01-2008 , 15:35   Re: SM Damage
Reply With Quote #11

This adds damage after the initial hit, that's why.

Stat plugins just look at the actual hits.
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 09-01-2008 , 16:05   Re: SM Damage
Reply With Quote #12

Quote:
Originally Posted by Lebson506th View Post
This adds damage after the initial hit, that's why.

Stat plugins just look at the actual hits.
This is not good... the plugin is pretty much useless this way, if the stat plugins cannot track the actual damage...
__________________
LocutusH is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 09-01-2008 , 17:36   Re: SM Damage
Reply With Quote #13

Yes, but I found no event which is fired before the damage is taken.
I also didn't found any offsets for the weapon damage.

Therefore it was the only way for me to code this.
I have written Plugin_Handled, therefore I thought my plugin handled the damage.

But if you found another solution let me know.
__________________
SWAT_88 is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 09-02-2008 , 00:58   Re: SM Damage
Reply With Quote #14

Maybe with this: http://forums.alliedmods.net/showthread.php?t=69658 ?
__________________
LocutusH is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 09-02-2008 , 10:55   Re: SM Damage
Reply With Quote #15

Quote:
Originally Posted by LocutusH View Post
Yes, there are nice functions but no function to set the damage of an entity.
This extension would be useful if I want to get the weapon entity of the player, but there is no function to set the entities damage.

I searched the offset list.
Code:
114     CBaseEntity::GetDamageType() const
115     CBaseEntity::GetDamage()
116     CBaseEntity::SetDamage(float)
I found this nice offsets but I cannot use it because I get an invalid handle back.
FindSendPropOffs("CBaseEntity","SetDamage");
does not work.

Any idea?
__________________
SWAT_88 is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 09-02-2008 , 11:47   Re: SM Damage
Reply With Quote #16

Quote:
Originally Posted by SWAT_88 View Post
Yes, there are nice functions but no function to set the damage of an entity.
This extension would be useful if I want to get the weapon entity of the player, but there is no function to set the entities damage.

I searched the offset list.
Code:
114     CBaseEntity::GetDamageType() const
115     CBaseEntity::GetDamage()
116     CBaseEntity::SetDamage(float)
I found this nice offsets but I cannot use it because I get an invalid handle back.
FindSendPropOffs("CBaseEntity","SetDamage");
does not work.

Any idea?
Idea: Ask L.Duke
__________________
LocutusH is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 09-09-2008 , 16:04   Re: SM Damage
Reply With Quote #17

Good news @ everyone.

I found this hooker extension which can also hook damage.

The good news:
If I change the damage and return Plugin_Changed, then the damage is displayed correct in damage reports.

The bad news:
I need the attacker id for the damage multiplier, but the event always returns attacker 0.

If you would like to test a beta version with damage multiplier 2, you can download it in the attachments.

If I find a way to solve the problem, then sm_damage would be bugfree.
__________________

Last edited by SWAT_88; 09-13-2008 at 15:32.
SWAT_88 is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 09-11-2008 , 06:08   Re: SM Damage
Reply With Quote #18

I dont understand fully, whats exactly the bug now with this beta version?
__________________
LocutusH is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 09-11-2008 , 11:14   Re: SM Damage
Reply With Quote #19

Quote:
Originally Posted by LocutusH View Post
I dont understand fully, whats exactly the bug now with this beta version?
There is a fixed damage multiplier of 2 because I get no attacker id from the event.
I need the attacker id for the damage mutliplier.
Thats the bug.
__________________
SWAT_88 is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 09-11-2008 , 12:07   Re: SM Damage
Reply With Quote #20

And can i change the multiplier in the source code? Will it work?

And if i understand correctly, this versions altered damage is tracked by the stats plugins?
__________________
LocutusH is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode