AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Hidden:Source] Team Aura / Tracer / Tracker (https://forums.alliedmods.net/showthread.php?t=85463)

paegus 02-11-2009 05:00

[Hidden:Source] Team Aura / Tracer / Tracker
 
7 Attachment(s)
Written for Hidden:Source Beta 4b

Code:

/* Hidden:SourceMod - Team-Aura
 *
 * Description:
 *  Emulated Beta 6's proposed IRIS Aura by showing a tracker sprite on players when they have +aura.
 *  Hiddens can always see fellow Hiddens (OVR).
 *  Dead/Spectators can see the IRIS sprite.
 *  Depending on settings either any or only admin spectators can see the Hidden's sprite.
 *  When IRIS emit radio messages, other IRIS can see their position despite render problems.
 *
 * Convars:
 *  hsm_ta_anyone      [bool] : Can anyone see Hidden sprites when dead? 0: No, Admins only. 1: Yes. Default: No.
 *  hsm_ta_irisaura  [0/1/2] : Draw team-sprites for IRIS? 0: Never. 1: When +AURA is held. 2: Only spectators. Default: Yes.
 *  hsm_ta_radioalarm  [bool] : Enable radio-alarms? 0: No, normal sonic alarms. 1: Yes, alarms transmit over radio instead.
 *  hsm_ta_radiosprite [bool] : Draw emitter sprites for IRIS & Alarm radio signals? 0: No, 1: Yes.
 *
 * Commands:
 *  None
 *
 * Changelog:
 *  v1.1.2
 *  Re-redid the radio signal timer code so signals cycle down naturally.
 *  Added a limit on how many alarms can be active across the whole map. They all still show up on IRIS's radar though.
 *  Added a minimum range within-which other alarms cannot trigger as it overwhelm the radios or something? Should prevent alarm-spam.
 *  v1.1.1
 *  Integrated Radio-alarm plugin to allow for alarm-location sprites.
 *  Re-did most of the code to reduce server-load & potential for errors.
 *  Changes IRIS aura to work in the same way as the radio calls so it defies vis-leaf optimizations.
 *  v1.1.0
 *  Added radio-call sprite that 'defies' render-block/vis-leaf limitations.
 *  v1.0.1
 *  Fixed sprite model array overflow & broken download table / precache.
 *  Added option to draw IRIS sprites.
 *  Optimized code to reduce un-needed work.
 *  v1.0.0
 *  Initial release.
 *
 * Known Issues:
 *  v1.0.0
 *  Possibly more work than it's worth throwing at the server? sprite spam...
 *
 *
 * Contact:
 *  Paegus: [email protected]
 *  SourceMod: http://www.Sourcemod.net
 *  Hidden:SOURCE: http://www.hidden-Source.com
 */

Functions similarly to ScuzTools Spectator Hidden Trail but works on both teams and doesn't have any trailing issues

B!PP 11-06-2009 14:04

Re: [Hidden:Source] Team Aura / Tracer / Tracker
 
Hi.

The source is the 1.1.1 version ?

Code:

#define PLUGIN_VERSION        "1.1.1"

paegus 11-07-2009 13:15

Re: [Hidden:Source] Team Aura / Tracer / Tracker
 
forgot to update that :)

DanGamingStudios 12-27-2012 11:57

Re: [Hidden:Source] Team Aura / Tracer / Tracker
 
Plugin failed to compile, I'm new to this, I wonder if this is outdated or if you could fix the Plugin failed to compile issue.
Thanks.

TheDoc 01-15-2014 05:22

Re: [Hidden:Source] Team Aura / Tracer / Tracker
 
I know the chances are slim that anyone will answer this, but I was wondering if it was possible to change the lengths/amount of sprites in the I.R.I.S. and Hidden trails.
Any help is appreciated.

thetwistedpanda 01-15-2014 05:42

Re: [Hidden:Source] Team Aura / Tracer / Tracker
 
Should be possible! I'm afraid I can't make the modifications in the code for you, but I'll throw enough out there that you'll be able to try poking it or someone else with more time can do it for you.

I'm assuming by length you're meaning the lifetime of the sprite (how long it appears before disappearing) in which case, it's governed by g_flSpriteUpdate, which is hardcoded to 0.1 seconds then subtracted from by 0.05. So on lines 637, 659, and 830 you can insert your own changes or simply change the value of the variable on line 143. The higher the number, the longer the sprite appears.

For the amount of sprites, that's slightly more difficult if you have no coding experience, but by no means impossible. Essentially the lines involving TE_SetupGlowSprite(...) are creating the sprite, and the lines involving TE_SendToClient(...) are sending it to the client. If you were to copy and paste those segments so that you have two back to back, you would in effect be sending two sprites to the client. However, they'd be at the same position. So you'd have to tweak vSpritePos (which is determined above each block containing the TE_* code) slightly so that the other sprite would be visible. Unfortunately this is where you get into some voodoo math if you want to have the sprites appear at the correct positions at all angles (vectors, are they your friend?). The easiest alternative with no evil math would be to merely modify the 'z' axies of vSpritePos so that you have multiple sprites above and below, in which case an easy vSpritePos[2] += 10.0 or -= 20.0, you'd have to fiddle with it to get something you like.

I don't know what material is being used to create the effect, or what the effect appears like in-game, but that should be the rough basics needed.

TheDoc 01-15-2014 07:13

Re: [Hidden:Source] Team Aura / Tracer / Tracker
 
I will say that I do not have any coding experience, and I think I got a little bit confused by your third paragraph, and I'm not entirely sure I was copying and pasting the proper segments, but to give you a better idea of what I'm trying to get done I took a screenshot of what the trail looks like with a custom sprite I was messing around with.
http://i.imgur.com/fQdKRT6.jpg

As you can see there is a trail of hank hill's face following behind the player, which I use to allow spectators to follow the hidden's movements, but at increased distances the length of the trail can appear much shorter and make it harder to keep track of him, so I was hoping there would be a simple way of just increasing the amount of sprites following, to therefore increase the length of the trail. I previously used this plugin (http://forums.alliedmods.net/showthread.php?p=713664) for tracking the hidden but there was a glitch that caused the trail to continue to follow players after winning a round, and then causing them to be killed, but the plugin on this page managed to fix that, while also allowing for more features such as viewing the trail through walls. If you could provide anymore help it would be greatly appreciated.

paegus 01-16-2014 02:58

Re: [Hidden:Source] Team Aura / Tracer / Tracker
 
If you increase the sprite duration modifier from -0.05 to say +0.1 you should get sprites that lasts 0.2 seconds instead of 0.05 so the trail will be easier to follow I guess.

g_flSpriteUpdate defines the overall update cycle. if you decrease it, you'll get more sprites rendering and disappearing faster. if you increase it, the sprites will be farther apart and should remain visible that much longer.

Remember though, if you alter g_flSpriteUpdate then you may need to adjust the modifier as well to compensate. But also keep in mind that the more sprites visible, the more work the server, network and clients are doing.

TheDoc 01-16-2014 15:52

Re: [Hidden:Source] Team Aura / Tracer / Tracker
 
Thanks a lot paegus that seems to have done exactly as I wanted, loving the plugin.

Earth2Luke 02-01-2014 04:21

Re: [Hidden:Source] Team Aura / Tracer / Tracker
 
Absolutely awesome. These plugins are really helping Hidden stay alive. Bravo, and thx for the tip Doc.


All times are GMT -4. The time now is 18:51.

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