4.0 Server Damage [message #467120] |
Mon, 07 May 2012 06:46 |
|
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 |
iRANian
Messages: 4308 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 |
|
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
|
|
|
|