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

[L4D2] Lethal Weapon (Charge Shot)


Post New Thread Reply   
 
Thread Tools Display Modes
wyxls
Junior Member
Join Date: Jul 2010
Location: China
Old 03-09-2020 , 10:47   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #91

Updates:
1. (2020/09/06 Reported by Tan Wei Qi) Fix can still charge and shot with 0 reserved ammunition.
2. (2021/02/25) Might fix the "blast" damage taken from lethal weapon to survivor players.

Now, the plugin will check reserved ammo.
The charging only trigger if reserved ammo >= l4d2_lw_useammocount.
If reserved ammo < l4d2_lw_useammocount, the lethal can only be shot once and cost all reserve ammo.
The clip size will be reset and no need to reload after shooting lethal.

In a word, save enough backup ammo for "Charge Shot".

As the same, contact me via email. [email protected]
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_lethal.sp - 363 views - 32.4 KB)

Last edited by wyxls; 01-25-2021 at 02:51.
wyxls is offline
Apeboy21
Junior Member
Join Date: Feb 2019
Old 06-07-2020 , 20:04   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #92

Upon trying out the new version of the plugin i was super excited to use the l4d2_lw_friendlyfire option to stop the explosion from damaging players but even when i have this set to 0 survivors are still taking a chunk of damage. am i possibly doing something wrong?
Apeboy21 is offline
canadianjeff
BANNED
Join Date: Sep 2016
Old 10-05-2020 , 00:17   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #93

L 10/04/2020 - 22:06:44: [SM] Blaming: l4d2_lethal_weapon.smx
L 10/04/2020 - 22:06:44: [SM] Call stack trace:
L 10/04/2020 - 22:06:44: [SM] [0] GetClientAbsOrigin
L 10/04/2020 - 22:06:44: [SM] [1] Line 285, /home/groups/alliedmodders/forums/files/7/2/3/6/1/61794.attach::Event_Player_Hurt
L 10/04/2020 - 22:06:44: [SM] Exception reported: Client index 0 is invalid
canadianjeff is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 10-05-2020 , 16:43   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #94

Quote:
Originally Posted by canadianjeff View Post
L 10/04/2020 - 22:06:44: [SM] Blaming: l4d2_lethal_weapon.smx
L 10/04/2020 - 22:06:44: [SM] Call stack trace:
L 10/04/2020 - 22:06:44: [SM] [0] GetClientAbsOrigin
L 10/04/2020 - 22:06:44: [SM] [1] Line 285, /home/groups/alliedmodders/forums/files/7/2/3/6/1/61794.attach::Event_Player_Hurt
L 10/04/2020 - 22:06:44: [SM] Exception reported: Client index 0 is invalid
Looks like you're using 1st post version. There are several updated versions in this thread some of which fixed this.
__________________
Silvers is offline
canadianjeff
BANNED
Join Date: Sep 2016
Old 10-05-2020 , 18:23   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #95

using the SMX from post #91

I get [SM] Fatal error encountered parsing translation file "Lethal_AR.phrases.txt"
canadianjeff is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-05-2020 , 18:35   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #96

https://forums.alliedmods.net/showpo...5&postcount=80
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
3aljiyavslgazana
Member
Join Date: Dec 2018
Old 11-29-2020 , 14:50   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #97

@wyxls @Dragokas

Quote:
Originally Posted by wyxls View Post
Updates:
1. (2020/09/06 Reported by Tan Wei Qi) Fix can still charge and shot with 0 reserved ammunition.

Now, the plugin will check reserved ammo.
The charging only trigger if reserved ammo >= l4d2_lw_useammocount.
If reserved ammo < l4d2_lw_useammocount, the lethal can only be shot once and cost all reserve ammo.
The clip size will be reset and no need to reload after shooting lethal.

In a word, save enough backup ammo for "Charge Shot".

As the same, contact me via email. [email protected]
Quote:
Originally Posted by Dragokas View Post
There are two issues with both plugins

1). The Lethal Shot doesn't kill teammates anymore, but it just incapacitated them ..
2). You can still charge and shoot The Lethal Shot if you are incapacitated and holding down the control button ..

If you guys or anyone else have time, please fix these two problems
3aljiyavslgazana is offline
wyxls
Junior Member
Join Date: Jul 2010
Location: China
Old 01-25-2021 , 02:45   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #98

Quote:
Originally Posted by 3aljiyavslgazana View Post
@wyxls @Dragokas





There are two issues with both plugins

1). The Lethal Shot doesn't kill teammates anymore, but it just incapacitated them ..
2). You can still charge and shoot The Lethal Shot if you are incapacitated and holding down the control button ..

If you guys or anyone else have time, please fix these two problems
The first one might fixed and I reuploaded in my post #91 above.

the key part:
Code:
if ((g_bBlockBlastDamage && damagetype == DMG_BLAST) || (g_bBlockFireDamage && (damagetype & (DMG_BURN | DMG_DIRECT) != 0)))
damagetype == DMG_BLAST doesn't trigger True while lethal blast damage happens.

Edit to:
Code:
if ((g_bBlockBlastDamage && (damagetype & DMG_BLAST == 64)) || (g_bBlockFireDamage && (damagetype & DMG_BURN == 8)))
Only tested for some circumstances. Direct damage and flame burning damage deals correctly with infected and not survivors. But I don't know if the explosive damage is properly inflicted on the infected

As the second question, The lethal charge won't trigger. Because the plugin only works with sniper weapons and incapacitated players should equip pistols or magnum.

Last edited by wyxls; 01-25-2021 at 02:52.
wyxls is offline
3aljiyavslgazana
Member
Join Date: Dec 2018
Old 01-25-2021 , 04:17   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #99

Quote:
Originally Posted by wyxls View Post
The first one might fixed and I reuploaded in my post #91 above.

the key part:
Code:
if ((g_bBlockBlastDamage && damagetype == DMG_BLAST) || (g_bBlockFireDamage && (damagetype & (DMG_BURN | DMG_DIRECT) != 0)))
damagetype == DMG_BLAST doesn't trigger True while lethal blast damage happens.

Edit to:
Code:
if ((g_bBlockBlastDamage && (damagetype & DMG_BLAST == 64)) || (g_bBlockFireDamage && (damagetype & DMG_BURN == 8)))
Only tested for some circumstances. Direct damage and flame burning damage deals correctly with infected and not survivors. But I don't know if the explosive damage is properly inflicted on the infected

As the second question, The lethal charge won't trigger. Because the plugin only works with sniper weapons and incapacitated players should equip pistols or magnum.
I just tested it, and yes it does the exact damage set in "l4d2_lw_lethaldamage" to the infected, and it burns them too but I'm not so sure about the explosive damage
One thing that i noticed too is that the witch don't recognize that the fire that's burning her is from the Lethal Weapon so she doesn't come after you and just burns to death

Unfortunately it still that doesn't kill teammates when they are directly hit by it and it only incapacitate them
They only die from falling if they are sent way too high in air by the "l4d2_lw_lethalforce" setting if it's set a little high
Or they die slowly by taking damage from the fire

And the second part is my fault, i didn't explain it well
I'm using Incapped Weapons Patch plugin by Silvers which is why i can use snipers while I'm incapacitated and I can charge the lethal weapon ..

Thank you for trying though!
3aljiyavslgazana is offline
wyxls
Junior Member
Join Date: Jul 2010
Location: China
Old 01-25-2021 , 06:12   Re: [L4D2] Lethal Weapon (Charge Shot)
Reply With Quote #100

Quote:
Originally Posted by 3aljiyavslgazana View Post
I just tested it, and yes it does the exact damage set in "l4d2_lw_lethaldamage" to the infected, and it burns them too but I'm not so sure about the explosive damage
One thing that i noticed too is that the witch don't recognize that the fire that's burning her is from the Lethal Weapon so she doesn't come after you and just burns to death

Unfortunately it still that doesn't kill teammates when they are directly hit by it and it only incapacitate them
They only die from falling if they are sent way too high in air by the "l4d2_lw_lethalforce" setting if it's set a little high
Or they die slowly by taking damage from the fire

And the second part is my fault, i didn't explain it well
I'm using Incapped Weapons Patch plugin by Silvers which is why i can use snipers while I'm incapacitated and I can charge the lethal weapon ..

Thank you for trying though!
The direct damage is seperate from both blast and burn damage. It deals with entities by "Smash" Function.

I don't quite learn about this part before. This direct damage (default 3000) may be handled differently from normal way and will not apply the damage to incapacitated players.

The plugin cause all damage in a custom method. It creates an impersonal nonexsistent entity at where the shooter aimming ,does all the damage and is deleted immediately. So, Of course, The witch chases the real attacker but it disapears so quickly that she has no target anymore. (It's the same while she alreay killed the survivor who attack her).

This problem could be fixed by passing the lethal shooter to witch correctly but i'm not specialized in it.

It's a special case for the last problem and the origin author didn't think of it. Maybe you can add a bool into chargetimer function to check whether the shooter is incapacitated.

I'll look over in another spare time.

Last edited by wyxls; 01-25-2021 at 06:15.
wyxls 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 21:01.


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