mirror of
https://github.com/Tribes2-SCP/AssetCompat.git
synced 2026-07-14 23:24:32 +00:00
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:
parent
da9cd53b97
commit
849df151aa
2 changed files with 33 additions and 3 deletions
22
scripts/audioFunctions.cs
Normal file
22
scripts/audioFunctions.cs
Normal 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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,15 @@
|
||||||
// sophisicated engines must be implemented as engine functions.
|
// 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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue