FM_ClientKill not triggering on Enviromental Deaths
As the title says, this is not hooking environmental deaths (fall, trigger_hurt, amx_slap/slay or death by monsters).
Suicides hook correctly. Game: Sven Co-op |
Re: FM_ClientKill not triggering on Enviromental Deaths
It's expected. This engine function has been always triggered only when "kill" command is used from a player's console.
|
Re: FM_ClientKill not triggering on Enviromental Deaths
you simply need to hook Ham_Killed and check whether attacker is the monster or there are no attacker at all.
|
Re: FM_ClientKill not triggering on Enviromental Deaths
Quote:
Lynx, try the following: PHP Code:
Looks like Killed is located at index 20, where it previously was at 17. The previous code works because, regarding current hamdata.ini, IsTrigger is found at index 20 for (older version of) SC. That code just makes an alias for it, kind of. Here is a table I dumped with IDA from the SC server binary, although it's a few months old one as I got it just as SC 5.0 got released. It would be great if someone could upload the newest released server binary (Linux). Code:
// Auto reconstructed from vtable block @ 0x007D3CA0 |
Re: FM_ClientKill not triggering on Enviromental Deaths
edit: nvm it doesn't work
Your method does though! Thank you! Also, I can give you an updated linux library of the current SC ver. (5.03), but I doubt the table changed since it was mostly bugfixes. Quote:
|
Re: FM_ClientKill not triggering on Enviromental Deaths
Quote:
PHP Code:
You can't put raw numbers in there because these Ham_* constants aren't actually virtual table indexes, but just some numbers that Hamsandwich identifies and does stuff with the virtual function that constant represents for the running mod on your server. That's why we don't need Spawn to be prefixed for every mod, like Ham_CS_Spawn and Ham_TFC_Spawn, as these indexes are found in hamdata.ini. Some Ham constants that represent certain virtual functions are prefixed because these virtual functions exist only in one or a few games. So just look at hamdata.ini at "svencoop" Linux section and you'll find which ones you can use to "hack" around hamdata.ini not being updated yet for SC5.0. Quote:
Quote:
|
Re: FM_ClientKill not triggering on Enviromental Deaths
1 Attachment(s)
Quote:
Here's the latest linux server binary. (originally it's called server.so, but my metamod-p version required this specific name) |
| All times are GMT -4. The time now is 18:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.