View Single Post
naris
AlliedModders Donor
Join Date: Dec 2006
Old 06-06-2009 , 16:24   Re: [EXTENSION] Sidewinder
Reply With Quote #88

I have enhanced the Sidewinder extension to also allow rockets (soldier), grenades, arrows, flares, needles and syringes to be configured to be tracking projectiles, with convars for each one.

I also added native functions that can be called from plugins to enable or disable the various homing projectiles for individual players. There are also bits in the sidewinder flags to allow individual clients to be cloaked from the missiles, detected even if they are cloaked or designated as priority targets.

I have also attached a simple plugin that will reset everyone's sidewinder flags when they connect or disconnect.

6/8/2009 *Updated to change version number to 2.1.1
8/10/2009 *Changed sidewinder crit tracker to use bit flags in 1 convar instead of separate convars (to be consistent)
*Fixed sidewinder crit tracker available to all races bug
*Added forward to Sidewinder when a shot is fired to decide whether it should seek or not.
*Changed sidewinder to call OnSidewinderSweek() from the 1st Think Function when the tracking value is TrackCrits
*Added the critical flag to the OnSidewinderSeek() forward.

List of Convars:
sm_arrow_homingchance (0-100, default 100)
Percent chance that a sniper's arrow will home.

sm_flare_homingchance (0-100, default 100)
Percent chance that a pyro's flare will home

sm_pipe_homingchance (0-100, default 100)
Percent chance that a demo man's pipe bombs (grenades) will home.

sm_rocket_homingchance (0-100, default 100)
Percent chance that a soldier's rockets will home.

sm_syringe_homingchance (0-100, default 100)
Percent chance that a medic's syringe needles will home.

sm_sentryrocket_homingchance (0-100, default 100)
Percent chance that a sentry gun's rockets will home.

sm_sentryrocket_critchance (0-100, default 100)
Percent chance that a sentry gun's rockets will crit.

sm_sentryrocket_crit (1/0, default 1)
Enable/disable critical shots for sentry guns.

sm_sentryrocket_speedmul (Float, default 1.0)
Multiplier used to determine the speed that all projectiles turn at (from original plugin)
(resulting speed = value * 1100.0)

sm_sidewinder_enabled
(flags)
Flags that enable/disable sidewinder for each weapon type

sm_sidewinder_crit_tracker (flags)
Flags that enable/disable crit tracking for each weapon type

The flags used by both sm_sidewinder_enabled and sm_sidewinder_crit_tracker are:
Code:
enum SidewinderEnableFlags (<<= 1)
{
    SidewinderDisabled = 0,     // Completly disable sidewinder
    SidewinderSentry = 1,       // Enable sidewinder sentry rockets
    SidewinderRocket = 2,           // Enable sidewinder soldier rockets
    SidewinderArrow = 4,            // Enable sidewinder huntsman arrows
    SidewinderFlare = 8,            // Enable sidewinder pyro flares
    SidewinderPipe = 16,             // Enable sidewinder demo pipe bombs
    SidewinderSyringe = 32           // Enable sidewinder medic syringes
};
Attached Files
File Type: sp Get Plugin or Get Source (sidewinder.sp - 280 views - 2.0 KB)
File Type: inc sidewinder.inc (6.4 KB, 295 views)
File Type: zip sidewinder.zip (705.9 KB, 300 views)
File Type: zip sidewinder-source.zip (3.57 MB, 246 views)

Last edited by naris; 08-11-2009 at 11:30. Reason: Updated to change version number to 2.1.1
naris is offline