mirror of
https://github.com/Tribes2-SCP/AssetCompat.git
synced 2026-02-24 00:53:47 +00:00
Moved compat scripts to scripts/t2Compat; Added an etcFunctions.cs for unclassified compat fixes; Added isDemo() to always return false
This commit is contained in:
parent
849df151aa
commit
72bee49824
4 changed files with 17 additions and 1 deletions
22
scripts/t2Compat/audioFunctions.cs
Normal file
22
scripts/t2Compat/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)
|
||||
{
|
||||
|
||||
}
|
||||
14
scripts/t2Compat/etcFunctions.cs
Normal file
14
scripts/t2Compat/etcFunctions.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// etcFunctions.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.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// We pretty much will always return false here because we're obviously
|
||||
// not doing demo builds.
|
||||
function isDemo()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
20
scripts/t2Compat/playerFunctions.cs
Normal file
20
scripts/t2Compat/playerFunctions.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// 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.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package PlayerCompatability
|
||||
{
|
||||
// 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);
|
||||
12
scripts/t2Compat/t2Compat.cs
Normal file
12
scripts/t2Compat/t2Compat.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// scriptCompat.cs
|
||||
//
|
||||
// Tribes 2 script compatability layer for Torque3D. This compatability
|
||||
// layer helps Tribes 2 scripts run on the Torque3D engine via various
|
||||
// Torque Script & engine declared functions that implement missing
|
||||
// functionality.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
exec("t2Compat/etcFunctions.cs");
|
||||
exec("t2Compat/audioFunctions.cs");
|
||||
exec("t2Compat/playerFunctions.cs");
|
||||
Loading…
Add table
Add a link
Reference in a new issue