Raised This Month: $32 Target: $400
 8% 

[L4D2] DCExt - Freely Manipulate the m_nSequence netprop!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 09-06-2015 , 10:19   [L4D2] DCExt - Freely Manipulate the m_nSequence netprop!
Reply With Quote #1

About:
This extension simply provides a forward that allows complete manipulation over the m_nSequence netprop for any survivor or special infected.

This extension does nothing of its own other than provide a forward for other plugins to use.

Installation: Download the zip located at the bottom of the post and extract the contents of the DCExt folder into /left4dead2/addons/sourcemod/

Description:
Provides a forward for the manipulation of the m_nSequence netprop.

Forwards:
PHP Code:
/**
 * @brief Called when CBaseAnimating::SelectWeightedSequence(int Activity) is invoked for a survivor or si
 * @remarks Called every frame to update a client's m_nSequence netprop
 *
 * @param client   the client that is playing as a survivor or special infected
 * @param sequence  current selected sequence m_nSequence, option to override the return value with it
 *
 * @return         Pl_Handled to override return value, Pl_Continue otherwise.
 */
forward Action:L4D2_OnSelectWSequence(client, &sequence); 
Here's an example plugin of what can be done:
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <dcext>

public Action:L4D2_OnSelectWSequence(client, &sequence)
{
    if (
client && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == && IsPlayerAlive(client))
    {
        
decl String:model[64];
        
GetEntPropString(clientProp_Data"m_ModelName"modelsizeof(model));
        if (
StrContains(model"coach"false) != -&& sequence == 202 //coach_run_pistol)
        
{
            
sequence 227//Run_SMG
            
return Plugin_Handled;
        }
    }
    return 
Plugin_Continue;

This plugin for example, replaces Coach's buggy and glitchy Single Pistol/Magnum running animation, with his SMG running animation, which looks good enough while also not being buggy.

Thanks to:
Machine - For helping and compiling this extension for me!

Changelog -
Initial Release (09-06-2015)

NOTE:
As of now, this is a windows only release, since I have no real way of compiling extensions for Linux, if someone could help with that it'd be really appreciated (source is included in the zip)

DOWNLOAD THE EXTENSION (AND SOURCE) HERE
__________________
DeathChaos25 is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 09-06-2015 , 10:21   Re: [L4D2] DCExt - Freely Manipulate the m_nSequence netprop!
Reply With Quote #2

A plugin using this extension can be found here.
__________________
DeathChaos25 is offline
Sev
Veteran Member
Join Date: May 2010
Old 09-06-2015 , 10:27   Re: [L4D2] DCExt - Freely Manipulate the m_nSequence netprop!
Reply With Quote #3

Very nice and useful extension.

Hopefully someone is kind enough to come through with a linux compile.


Last edited by Sev; 09-06-2015 at 10:31.
Sev is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-06-2015 , 10:52   Re: [L4D2] DCExt - Freely Manipulate the m_nSequence netprop!
Reply With Quote #4

Quote:
Originally Posted by Sev View Post
Hopefully someone is kind enough to come through with a linux compile.
The same hook can be made with the DHooks extension for which there is a Linux build available (as well as a Windows build).
psychonic is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 09-06-2015 , 11:18   Re: [L4D2] DCExt - Freely Manipulate the m_nSequence netprop!
Reply With Quote #5

Quote:
Originally Posted by psychonic View Post
The same hook can be made with the DHooks extension for which there is a Linux build available (as well as a Windows build).
I did try DHooks, but my inexperience mostly got in the way, doesn't mean I've given up on it, so I decided to release this for now while I get that solved.
__________________
DeathChaos25 is offline
Krufftys Killers
Senior Member
Join Date: Jan 2014
Old 09-06-2015 , 11:47   Re: [L4D2] DCExt - Freely Manipulate the m_nSequence netprop!
Reply With Quote #6

Hi DeathChaos25 am getting this error L 09/06/2015 - 113:03: SourceMod error session started
L 09/06/2015 - 113:03: Info (map "c8m1_apartment_daytime") (file "errors_20150906.log")
L 09/06/2015 - 113:03: [SM] Unable to load extension "DCExt.ext": /home/tcagame/gun/1302/left4dead2/addons/sourcemod/extensions/DCExt.ext.so: cannot open shared object file: No such file or directory
Krufftys Killers is offline
spumer
Senior Member
Join Date: Aug 2011
Old 09-30-2015 , 01:02   Re: [L4D2] DCExt - Freely Manipulate the m_nSequence netprop!
Reply With Quote #7

By Sev request i build version for linux. New binary and sources with updated Makefile in attachment.

Sourcemod 1.6+ supported

GLHF!
Attached Files
File Type: so DCExt.ext.so (191.4 KB, 421 views)
File Type: gz DCExtSrc.tar.gz (17.9 KB, 276 views)
__________________
spumer is offline
Reply


Thread Tools
Display Modes

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:28.


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