Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UTPlusStandaloneHitSounds.MutUTPlusHitSounds


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
/******************************************************************************
MutUTPlusHitSounds

Creation date: 2010-12-22 17:48
Last change: $Id$
Copyright © 2010, Wormbo
Website: http://www.koehler-homepage.de/Wormbo/
Feel free to reuse this code. Send me a note if you found it helpful or want
to report bugs/provide improvements.
Please ask for permission first, if you intend to make money off reused code.
******************************************************************************/

class MutUTPlusHitSounds extends Mutator config;


//=============================================================================
// Configuration
//=============================================================================

var config bool bAllowVariableHitSounds;
var config bool bLineOfSightHitSounds;
var config bool bObjectiveHitSounds;


//=============================================================================
// Localization
//=============================================================================

var localized string lblAllowVariableHitSounds;
var localized string lblLineOfSightHitSounds;
var localized string lblObjectiveHitSounds;
var localized string descAllowVariableHitSounds;
var localized string descLineOfSightHitSounds;
var localized string descObjectiveHitSounds;


function PreBeginPlay()
{
	local UTPlusHitSounds HitSounds;

	// check for server actor first
	foreach AllActors(class'UTPlusHitSounds', HitSounds) {
		return;
	}
	Spawn(class'UTPlusHitSounds');
}


/**
Add the configuration options to the PlayInfo.
*/
static function FillPlayInfo(PlayInfo PlayInfo)
{
	Super.FillPlayInfo(PlayInfo);

	PlayInfo.AddSetting(default.FriendlyName, "bAllowVariableHitSounds", default.lblAllowVariableHitSounds, 0, 0, "Check");
	PlayInfo.AddSetting(default.FriendlyName, "bLineOfSightHitSounds",   default.lblLineOfSightHitSounds,   0, 0, "Check");
	PlayInfo.AddSetting(default.FriendlyName, "bObjectiveHitSounds",     default.lblObjectiveHitSounds,     0, 0, "Check");
}


/**
Returns a description for the specified configuration option.
*/
static event string GetDescriptionText(string PropName)
{
	switch (PropName) {
		case "bAllowVariableHitSounds": return default.descAllowVariableHitSounds;
		case "bLineOfSightHitSounds":   return default.descLineOfSightHitSounds;
		case "bObjectiveHitSounds":     return default.descObjectiveHitSounds;
	}

	return Super.GetDescriptionText(PropName);
}


//=============================================================================
// Default values
//=============================================================================

defaultproperties
{
	FriendlyName  = "UTPlus 2 HitSounds (Standalone)"
	GroupName     = "HitSounds"
	Description   = "Activates UTPlus hit sounds."

	bAllowVariableHitSounds = True
	bLineOfSightHitSounds   = True
	bObjectiveHitSounds     = True

	lblAllowVariableHitSounds = "Allow variable hit sounds"
	lblLineOfSightHitSounds   = "Use line-of-sight hit sounds"
	lblObjectiveHitSounds     = "Objective hit sounds"

	descAllowVariableHitSounds  = "Allow variable hit sounds pitch based on damage."
	descLineOfSightHitSounds    = "Hit sounds will only play if the attacker has a line of sight to the victim."
	descObjectiveHitSounds      = "Plays hit sounds for damaging destroyable objectives in assault and power nodes/cores in Onslaught."
}


Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mo 29.8.2011 14:22:58.000 - Creation time: Sa 23.8.2014 09:18:54.664 - Created with UnCodeX