1
0
forked from 0ad/0ad

# cleanup JS

fix tabs and indenting

This was SVN commit r4371.
This commit is contained in:
janwas 2006-09-21 11:30:40 +00:00
parent 054cbaf644
commit d34ae19788
9 changed files with 356 additions and 361 deletions

View File

@ -120,7 +120,6 @@ function messageBox (mbWidth, mbHeight, mbMessage, mbTitle, mbMode, mbButtonCapt
getGUIGlobal().mbButton1Code = mbButtonsCode[0];
getGUIGlobal().mbButton2Code = mbButtonsCode[1];
getGUIGlobal().mbButton3Code = mbButtonsCode[2];
}
// ====================================================================

View File

@ -166,7 +166,6 @@ function endSession (closeType)
break;
case ("exit"):
// If the player has chosen to shutdown and immediately return to operating system,
exit();
break;
}

View File

@ -64,13 +64,6 @@ function worldClickHandler(event)
args[1]=event.y;
break;
// entity target commands
// I'm guessing we no longer require these now that they have become generic events?
// case NMT_AttackMelee:
// case NMT_Gather:
// case NMT_Heal:
// args[0]=event.entity;
// args[1]=null;
// break;
case NMT_Generic:
args[0]=event.entity;
if ( event.clicks == 1)

View File

@ -1,22 +1,26 @@
function updateOrbital()
{
function updateOrbital()
{
if( !getGUIObjectByName( 'arena' ).hidden )
{
g_ballx += g_balldx;
g_bally += g_balldy;
if (g_ballx > 600) {
if (g_ballx > 600)
{
g_balldx *= -0.9;
g_ballx = 600-(g_ballx-600);
}
else if (g_ballx < 0) {
else if (g_ballx < 0)
{
g_balldx *= -0.9;
g_ballx = -g_ballx;
}
if (g_bally > 400) {
if (g_bally > 400)
{
g_balldy *= -0.9;
g_bally = 400-(g_bally-400);
}
else if (g_bally < 0) {
else if (g_bally < 0)
{
g_balldy *= -0.9;
g_bally = -g_bally;
}
@ -36,5 +40,5 @@
var r=5;
ball.size = new GUISize(g_ballx-r, g_bally-r, g_ballx+r, g_bally+r);
}
}
}