Removed setArmor as its a T2-script defined function; .blowup() auto-fade compatability logic was added; some audio wrapper functions for alx*

This commit is contained in:
Robert MacGregor 2015-11-22 03:32:19 -05:00
parent da9cd53b97
commit 849df151aa
2 changed files with 33 additions and 3 deletions

22
scripts/audioFunctions.cs Normal file
View file

@ -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)
{
}

View file

@ -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);