first commit

This commit is contained in:
cclecle
2022-07-23 12:26:06 +02:00
commit db5d495ce7
5 changed files with 211 additions and 0 deletions

65
Help/TeamBeacon2k4.txt Normal file
View File

@@ -0,0 +1,65 @@
Team Beacon 2k4
===============
by Wormbo (Website: http://www.koehler-homepage.de/Wormbo/)
Contacting me:
Either via the email address on my website or one of the following ways:
Forum PM:
http://forums.epicgames.com/
http://forums.beyondunreal.com/
http://forums.ingame.de/unreal/ (german forum)
IRC:
#beyondunreal on irc.enterthegame.com
#unrealadmin on irc.quakenet.org
#inUnreal on irc.quakenet.org (german channel)
Description
-----------
Team Beacon 2k4 adds UT2004-style team beacons over players' heads. If players
are close enough, their name and health is drawn next to their team beacon as
well. A player's health is not rendered in resolutions below 640x480 to save
screen space. Unless you are a spectator, team beacons are only rendered for
players on your team.
Installing
----------
Extract the contens of the ZIP file to your UT base directory, maintaining the
directory struction of the archive. This should place all files in the correct
directories:
Help\
TeamBeacon2k4.txt (this file)
System\
TeamBeacon2k4.int
TeamBeacon2k4.u
To be able to host LAN or online games, add the following lines to the
[Engine.GameEngine] section of your UnrealTournament.ini or whatever INI file
your server will use:
ServerPackages=TeamBeacon2k4
How to use
----------
Simply add the Team Beacon 2k4 mutator to enable team beacons.
Remember to follow installation instructions for editing your INI files if you
want to host a server with the mutator.
Known Problems
--------------
Team beacons are opaque. They'd look to bright if rendered translucently and UT
doesn't support real alpha blending.
Feel free to contact me if if found another bug. Please tell me which mods
and/or mutators you used and please try to describe in detail how the bug can
be reproduced.
Happy Fragging!

2
Readme.md Normal file
View File

@@ -0,0 +1,2 @@
# TeamBeacon2k4 Release GIT repository

141
Run.sh Normal file
View File

@@ -0,0 +1,141 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
OUTPUT_DIR="$2"
CFG_FILE="$3"
DEFAULT_CFG_FILE=UnrealTournament.ini
function add_iniKeyEx() {
crudini --set $OUTPUT_DIR/System/$1 $2 __$3 $4
# Warning: ugly hack with sed to allow multiple key instances + to remove space around '='
sed -i "s/[[:space:]]*__$(echo $3 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')[[:space:]]*=[[:space:]]*/$(echo $3 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')=/g" $OUTPUT_DIR/System/$1
}
function set_iniKeyEx() {
crudini --set $OUTPUT_DIR/System/$1 $2 $3 $4
}
# !!Warning!! section is not considered
function del_iniKeyEx() {
sed -i "/[[:space:]]*$(echo $3 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')[[:space:]]*=[[:space:]]*$(echo $4 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')/d" $OUTPUT_DIR/System/$1
}
function add_iniKey() {
add_iniKeyEx $CFG_FILE $1 $2 $3
}
function set_iniKey() {
set_iniKeyEx $CFG_FILE $1 $2 $3
}
# !!Warning!! section is not considered
function del_iniKey() {
del_iniKeyEx $CFG_FILE $1 $2 $3
}
function add_ServerPackage() {
add_iniKey 'Engine.GameEngine' ServerPackages $1
add_iniKey 'XC_Engine.XC_GameEngine' ServerPackages $1
}
function del_ServerPackage() {
del_iniKey 'Engine.GameEngine' ServerPackages $1
del_iniKey 'XC_Engine.XC_GameEngine' ServerPackages $1
}
function add_ServerActors() {
add_iniKey 'Engine.GameEngine' ServerActors $1
add_iniKey 'XC_Engine.XC_GameEngine' ServerActors $1
}
function del_ServerActors() {
del_iniKey 'Engine.GameEngine' ServerActors $1
del_iniKey 'XC_Engine.XC_GameEngine' ServerActors $1
}
function getmodprefix() {
UFile=$(find $OUTPUT_DIR/System -type f -iname "TeamBeacon2k4*.u" -exec basename {} \;)
BaseName="${UFile%.*}"
echo "$BaseName"
}
function install() {
rsync -a $SCRIPT_DIR/Help/ $OUTPUT_DIR/Help/ --exclude '.git'
rsync -a $SCRIPT_DIR/System/ $OUTPUT_DIR/System/ --exclude '.git'
echo install ok
}
function enable() {
BaseName="$(getmodprefix)"
add_ServerPackage $BaseName
echo enable ok
}
function disable() {
BaseName="$(getmodprefix)"
del_ServerPackage $BaseName
echo disable ok
}
function show_help() {
echo
echo "Usage: $0 { getmodprefix | install | enable | disable } <UT99_INSTALL_DIR> [<UT99_CONFIG_FILE>] [<CONFIG_KEY> <CONFIG_VALUE>]"
echo
}
function check_cfg_file_config() {
if [ $# -eq 4 ]
then
echo "CFG_FILE is unset, setting it to $DEFAULT_CFG_FILE"
CFG_FILE=$DEFAULT_CFG_FILE
elif [ $# -eq 5 ]
then
echo "CFG_FILE is set to '$CFG_FILE'"
else
echo "Wrong number of arguments"
show_help
exit 9999 # die with error code 9999
fi
if [ ! -f $OUTPUT_DIR/System/$CFG_FILE ]
then
echo "$OUTPUT_DIR/System/$CFG_FILE does not exist"
show_help
exit 9999 # die with error code 9999
fi
}
function check_cfg_file_gen() {
if [ -z ${CFG_FILE} ]
then
echo "CFG_FILE is unset, setting it to $DEFAULT_CFG_FILE"
CFG_FILE=$DEFAULT_CFG_FILE
else
echo "CFG_FILE is set to '$CFG_FILE'"
fi
if [ ! -f $OUTPUT_DIR/System/$CFG_FILE ]
then
echo "$OUTPUT_DIR/System/$CFG_FILE does not exist"
show_help
exit 9999 # die with error code 9999
fi
}
function check_game_dir() {
### Check if a directory does not exist ###
if [ -z $OUTPUT_DIR ]
then
echo "incorrect <UT99_INSTALL_DIR>"
show_help
exit 9999 # die with error code 9999
fi
}
case "$1" in
'getmodprefix')
check_game_dir
getmodprefix
;;
'install')
check_game_dir "$@"
install "$@"
;;
'enable')
check_game_dir "$@"
check_cfg_file_gen "$@"
disable "$@"
enable "$@"
;;
'disable')
check_game_dir "$@"
check_cfg_file_gen "$@"
disable "$@"
;;
*)
show_help
exit 1
;;
esac
exit 0

3
System/TeamBeacon2k4.int Normal file
View File

@@ -0,0 +1,3 @@
[Public]
Object=(Name=TeamBeacon2k4.TeamBeacon2k4,Class=Class,MetaClass=Engine.Mutator,Description="Team Beacon 2k4,Identifies team members like in UT200x.")
Preferences=(Caption="TeamBeacon2k4",Parent="Game Settings",Class=TeamBeacon2k4.TeamBeacon2k4,Immediate=True)

BIN
System/TeamBeacon2k4.u Normal file

Binary file not shown.