diff --git a/scripts/audioFunctions.cs b/scripts/audioFunctions.cs new file mode 100644 index 0000000..5ed3255 --- /dev/null +++ b/scripts/audioFunctions.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// playerFunctions.cs +// +// Various helper functions that many Tribes 2 scripts expect to exist which +// can be implemented wholly in script. Those that must perform more +// sophisicated engines must be implemented as engine functions. +//------------------------------------------------------------------------------ + +function alxCreateSource(%profile, %file) +{ + %handle = sfxCreateSource(%profile, %file); +} + +function alxPlay(%handle) +{ + %handle.play(-1); +} + +function alxGetWaveLen(%file) +{ + +} diff --git a/scripts/playerFunctions.cs b/scripts/playerFunctions.cs index 80233f9..ab2a59b 100644 --- a/scripts/playerFunctions.cs +++ b/scripts/playerFunctions.cs @@ -6,7 +6,15 @@ // sophisicated engines must be implemented as engine functions. //------------------------------------------------------------------------------ -function Player::setArmor(%this, %armor) +package PlayerCompatability { - %this.setDatablock(%armor @ %this.client.sex @ this.%client.race @ "Armor"); -} + // The Tribes 2 engine behavior is to auto-fade the blown up player + // upon calling this function. + function Player::blowup(%this) + { + parent::blowup(%this); + %this.startFade(1,0,1); + } +}; + +activatePackage(PlayerCompatability);