AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [DoD:S] Bleed (https://forums.alliedmods.net/showthread.php?t=220425)

Root_ 07-10-2013 13:17

[DoD:S] Bleed
 
Once some guy requested a proper 'bleed' plugin with more function. I totally forgot about that, and remembered it in half an hour ago lol.
This plugin makes player bleeding after taking X damage for Y health every Z seconds.
Fully compatible with realism physics (you just need to disable native bleeding from this plugin, that's all.)

CONVARS:
  • dod_bleed_health - If mode is set to 0, start bleeding if player got less health, otherwise when player got damaged for more than this value. (Default: 30)
  • dod_bleed_mode - Determines a mode to start bleeding. 0 - if player is having less than X health. 1 - If player got damaged for more than X health
  • dod_bleed_delay - Delay between taking damage on bleed (in seconds). (Default:1.5 seconds)
  • dod_bleed_damage_head - Damage to take to a player which got hit in the head. (Default: 4 health)
  • dod_bleed_damage_chest - Damage to take to a player which got hit in a body. (Default: 3 health)
  • dod_bleed_damage_other - Default damage to take to a player while bleeding. (Default: 2 health)

Plugin generates config file (cfg/sourcemod/dod_bleed.cfg)

Servers with this plugin

Download plugin
Browse source code

Root_ 07-10-2013 13:39

Re: [DoD:S] Bleed
 
whoops! fixed serious bug (when attacker, which caused bleedings, disconnected)

RedSword 07-11-2013 19:20

Re: [DoD:S] Bleed
 
You may want to correct "dod_bleed_health"'s description. I believe it is doing something else than its definition @ line 167. You should say it is conditional to dod_bleed_mode. Also saying "A [something]" makes me believe there are more "minimum player's health needed to start bleeding".

Also in your plugin, it seems that if I bleed from the head/chest, then from a small region (i.e. left leg), I would lose less health per tick...

Code:

IsClientInGame(BleedInfo[i][attacker])
This is wrong. First, why would you stop bleeding when your attacker left ? Then let's say that was intended; then how would you explain someone else taking a recently-quit attacker's slot (attacker leave, someone else join), and get a kill, without even getting out of his spawn ? ... :/

And cool thing you commented.

Red

Root_ 07-12-2013 05:59

Re: [DoD:S] Bleed
 
Quote:

Originally Posted by RedSword (Post 1988952)
You may want to correct "dod_bleed_health"'s description

Done.
Quote:

Originally Posted by RedSword (Post 1988952)
Also in your plugin, it seems that if I bleed from the head/chest, then from a small region (i.e. left leg), I would lose less health per tick...

Indeed. I just suck at testing.... fixed now
Quote:

Originally Posted by RedSword (Post 1988952)
First, why would you stop bleeding when your attacker left ? Then let's say that was intended; then how would you explain someone else taking a recently-quit attacker's slot (attacker leave, someone else join)

I kicked a bot which injured me and I stopped bleeding... but I havent tested if another bot joined. Really new bot killed me somehow.

So plugin is updated, fixed all of above, hopefully

RedSword 07-12-2013 20:59

Re: [DoD:S] Bleed
 
Quote:

Originally Posted by Root_ (Post 1989222)
[...]
Quote:

Originally Posted by RedSword (Post 1988952)
Also in your plugin, it seems that if I bleed from the head/chest, then from a small region (i.e. left leg), I would lose less health per tick...

Indeed. I just suck at testing.... fixed now
Quote:

Originally Posted by RedSword (Post 1988952)
First, why would you stop bleeding when your attacker left ? Then let's say that was intended; then how would you explain someone else taking a recently-quit attacker's slot (attacker leave, someone else join)

I kicked a bot which injured me and I stopped bleeding... but I havent tested if another bot joined. Really new bot killed me somehow.

So plugin is updated, fixed all of above, hopefully

Not...

There are still 2 things I mentioned you did not correct...

Root_ 07-13-2013 02:19

Re: [DoD:S] Bleed
 
I've fixed bleeding damage when player received a shot in chest and then in arm or w/e, also changed descriptionn, and timer stopping when attacker is disconnected.
About thing when attacker is disconnected and another connected - player still receiving a damage, but from another 'new' player - I have no idea how to fix that (tried to pass event userid rather than real userid, but it not helped)
EDIT: fixed

RedSword 07-13-2013 03:16

Re: [DoD:S] Bleed
 
new attackerID = (GetClientOfUserId(BleedInfo[i][attacker]) != 0) ? GetClientOfUserId(BleedInfo[i][attacker]) : 0;

You can simply do "new attackerID = GetClientOfUserId(BleedInfo[i][attacker]);"

And you're still preventing someone from bleeding from a higher part.

i.e. StartBleed ==> OTHER

then the player receives a critical hit at the chest. In Event_Player_Damaged, the victim will be considered like "already bleeding". This means a player can "prevent" a higher blood-loss from a less higher one.

i.e. Get hit in the leg --> Bleeding 2/sec ; Bleeding --> Get hit in the stomach --> still bleed 2/sec, rather than 3/sec.





Red

Root_ 07-13-2013 03:50

Re: [DoD:S] Bleed
 
Okay RedSword I've fixed this - now damage is increasing every time player get damaged while bleeding.
Thanks for feedback! :up:

RedSword 07-13-2013 11:27

Re: [DoD:S] Bleed
 
Code:

if (GetClientHealth(i) > oldhp/bleedinghealth)
I think >= would be better.

But looks ok. Approved.

Red


All times are GMT -4. The time now is 10:49.

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