Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » 4.0 Server Damage
4.0 Server Damage [message #467120] Mon, 07 May 2012 06:46 Go to next message
cAmpa is currently offline  cAmpa
Messages: 597
Registered: March 2006
Karma: 0
Colonel
I got a few question's about these changes.

1. What is the different between "StockDamageHook" and "TtDamageHook", how do they work? When do they get triggered and when not?

2. On 3.4 scripts we always had the problem that we never knew what tool was used to kill or to destroy something, is there now a better way? In RR we had for example a KillHook what gave me always the correct information.

3. Is there now a way to get the information if the shot was a headshot?



Bückstabü!
Re: 4.0 Server Damage [message #467122 is a reply to message #467120] Mon, 07 May 2012 06:57 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4300
Registered: April 2011
Karma: 0
General (4 Stars)
1. The 'StockDamageHook' gets triggered when a non-4.0 player does direct damage and the 'TtDamageHook' gets triggered when a 4.0 player does direct damage, the difference is that the 'TtDamageHook' sends out the ammo used and the bone hit.

2. No, but you can write something that gives you 99% accurate information, see the attached file.

3. For non-4.0 players you can check the direct damage done with a table of neck shot/head shot damage values for a warhead, the 'TtDamageHook' gives you the bone that a 4.0 player hit. See the attached file for an implementation.

The 1% it fucks up is when a player kills another player with splash or burn damage and he does some really quick weapon switching. The Apache and Orca share the same damage value and warhead and I haven't worked on probably reporting kills done with them yet. The next 4.0 beta will give you the ability to check burn damage (special damage types) so you'll just have to add checking for that and fix the Orca and Apache, and then test it on a server, if you're only using it for a sniper server you shouldn't have any issue and you can remove most of the code. Oh and the squish detection sometimes doesn't trigger.


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Mon, 07 May 2012 07:13]

Report message to a moderator

Re: 4.0 Server Damage [message #467124 is a reply to message #467120] Mon, 07 May 2012 07:04 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

1.StockDamageHook is called when damage is done by a < 4.0 player, TtDamageHook is called when damage is done by a 4.0 player.
2.On 4.0, you can call Get_Damage_Warhead to get the warhead used to carry out damage (i.e. you call it from inside the ::Damaged or ::Killed event of a script, not from inside the damage hook). To convert a string warhead into the number returned by Get_Damage_Warhead, call ArmorWarheadManager::Get_Warhead_Type.
3.No there is no way to tell if it was a head-shot or not.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: 4.0 Server Damage [message #467147 is a reply to message #467120] Tue, 08 May 2012 02:11 Go to previous message
EvilWhiteDragon is currently offline  EvilWhiteDragon
Messages: 3751
Registered: October 2005
Location: The Netherlands
Karma: 0
General (3 Stars)

JW, you can guestimate whether it was a headshot. Based on the damage tables. Is it possible to do the amount of damage with a weapon of that warhead? No? Then is it possible to do that damage with that warhead divided by 5 to get the normal damage.

http://www.blackintel.org/usr/evilwhitedragon/pointfix.gif
BlackIntel admin/founder/PR dude (not a coder)
Please visit http://www.blackintel.org/

V, V for Vendetta

People should not be afraid of their governments.
Governments should be afraid of their people.
Previous Topic: damage ratios
Next Topic: Looking for testers for a bot/regulator I'm working on.
Goto Forum:
  


Current Time: Tue Jun 04 08:17:26 MST 2024

Total time taken to generate the page: 0.00666 seconds