A tripmine mod for CS:GO. This is one of the mods I've written to help popularize our CS:GO server. However, the server hasn't been doing very well lately, and our community might be moving away from CS:GO. I figure its time to start releasing some of the plugins.
Originally, this was going to be your typical "on the floor" mines (like Socom's PMN mines), but I figured that would get out of hand with people hiding mines where they can't be seen (under bodies). I noticed there was already a tripmines mod available, but it didn't work with CS:GO. I figured it would be best to rewrite the mod completely to suit my tastes, but props to L. Duke for the original tripmines mod/idea!
This mod has only been tested with CS:GO!
Features
- Placement of trip-mines with a console command, or use of the unused key bindings.
- Mines beep a few times before arming, they make another sound and brighten their beam when they arm.
- Mines are colored according to team, teammates can set them off, but they don't take damage.
- The damage and radius of explosion from the mines are adjustable with two cvars.
- The mines can be defused by holding "USE" on them. They are then picked up and can be replaced. The defuse process takes 2 seconds and makes no noise. (although the client defusing will hear the "defuse" sound)
- Mine model included. Some people think the mine is too small, but I think it's perfect since it makes it harder for people to exploit them via shooting from a distance to set them off. (they are hard to hit if you are more than 10ft away)
- Team filtering feature.
Console Variables
- sm_pp_tripmines - Amount of mines to give each player at the round start. (default=0)
- sm_pp_minedmg - The damage the mine explosion deals. (default=100)
- sm_pp_minerad - Override value for the explosion damage radius. If 0, the radius will be computed with the damage value. (default=0)
- sm_pp_minefilter - 0 = Detonate if anyone touches the laser, 1 = enemies and owner only, 2 = enemies only (default=0)
Configuration
A few things can be configured by editing the #defines at the top of the source file and recompiling:
- MODEL_MINE - the model of the mine
- MODEL_BEAM - the sprite used for the laser beam
- LASER_WIDTH - the width of the laser beam
- LASER_COLOR_T/CT/D - the color of the laser beam (according to team)
- TRACE_LENGTH - the player's reach for placing mines
- COMMAND - the console command to set a mine
- ALTCOMMAND - an extra console command to set a mine (default = "buyammo2" which is unused in CS:GO (bound to ".")) This is so you can tell inexperienced users to "just press period", instead of explaining how to use a bind command.
Installation
Copy all files into your game folder if you have the default folder structure. It's highly recommended to mirror the material and model files to a webspace and point clients there with sv_downloadurl. Downloading files directly from the game server can be dreadfully slow (even though it's only 50KB of content)
Change Notes
Code:
// 11:48 PM 11/30/2012 - 1.0.4
// default mines to 3
// team filtering option
// finer laser texture (less aliasing)
// 1:23 PM 10/30/2012 - 1.0.3beta
// silent defusal
// reduced defuse time (3->2 seconds)
// 5:29 PM 10/29/2012 - 1.0.2beta
// mine defusal
// 10:37 PM 10/28/2012 - 1.0.1beta
// reduced explosion sound volume
// throttled explosion sounds (1 per 0.1 seconds)
// proper explosion sound panning
// placement on windows
// 4:12 PM 10/27/2012 - 1.0.0beta
// initial release