mirror of
https://github.com/Ragora/T2-ACCM.git
synced 2026-01-19 19:04:46 +00:00
commit
72c3d5701d
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Buildings/
|
||||
fonts/
|
||||
StructInf/
|
||||
MergeToolTemp.txt
|
||||
*.dso
|
||||
lighting/
|
||||
ServerLogs/
|
||||
prefs/
|
||||
*.txt~
|
||||
*.cs~
|
||||
*.bat~
|
||||
*.sh~
|
||||
|
|
@ -1,3 +1,28 @@
|
|||
ACCM 1.5.0 --------------------------------------------------
|
||||
* DarkDragonDX takes up development.
|
||||
* Fixed saving of objects with names set via /name
|
||||
- Names of switches and generators now save albeit they need toggled first.
|
||||
* Removed a bunch of Sentinel Stuff (by Blnukem) -- their AI was never actually finished it seemed.
|
||||
* Chat command '/killzombies' used to only half the zombie population. Now it kills them all.
|
||||
* Several occurances of console spam were fixed.
|
||||
* Removed unused files, reorganized files slightly.
|
||||
* Added Linux shell script for deleting .dso files if you're weird like me and run on some Linux operating system via WINE.
|
||||
* Team 6 is now the 'offical zombie team'. This just means zombie targets are set to this by default.
|
||||
* Added player.setSkin() and player.setName() -- they need tested
|
||||
* Edited /changeName so that color sequences are accepted
|
||||
\c0 - Very Dark Blue-ish color
|
||||
\c1 - Bright Green in chat window / Cyan in Lobby
|
||||
\c2 - Faded Orange in Chat / Gray in Lobby
|
||||
\c3 - Bright Green in chat / Dark Green in Lobby
|
||||
\c4 - Blue in Chat (normal) / White in Lobby (Bright)
|
||||
\c5 - Gold in Chat / White in Lobby (Bright)
|
||||
\c6 - Blue in Chat (Normal) / White in Lobby (Normal)
|
||||
\c7 - Blue in Chat (Normal) / Gold in Lobby
|
||||
\c8 - Blue in Chat (Normal) / Blue In Lobby (smurf color)
|
||||
\c9 - Blue in Chat (Normal) / Green in Lobby (Bot)
|
||||
- Ex: /changename dx \cp\c7[Faction]\c6Name\co
|
||||
- Also any standard ASCII junk is supported as well -- figure it out yourself.
|
||||
|
||||
ACCM 1.4.0 [For Deflun :] ------------------------------
|
||||
* The turret override (disable / enable turrets) now works outside of purebuild.
|
||||
* Emplacements can no longer be controlled via the command circuit.
|
||||
|
|
|
|||
25
README.md
Normal file
25
README.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
Advanced Combat Construction Mod
|
||||
====
|
||||
|
||||
Advanced Combat Construction Mod (ACCM) was a Combat Construction Mod (CCM) derivative that aimed to enhance
|
||||
the zombie shooting experience with added weapons and armor types that add on to not only the Player vs Zombie
|
||||
experience but also the Player versus Player experience.
|
||||
|
||||
The Developers
|
||||
====
|
||||
|
||||
* Eolk
|
||||
* Blnukem
|
||||
* Dark Dragon DX
|
||||
|
||||
Playing the Mod
|
||||
====
|
||||
|
||||
You can legally obtain a Tribes 2 installer and multiplayer patch from the [TribesNext](http://tribesnext.com/)
|
||||
website.
|
||||
|
||||
If you have a working installation, you may click the "Download ZIP" button on this page to obtain a zipped version
|
||||
of the modification. You must then create a folder called "accm" in the GameData folder of your Tribes 2 installation
|
||||
and extract the contents of the ZIP here. After this, you simply run the game with the "-mod accm" parameter:
|
||||
|
||||
Tribes2.exe -online -mod accm
|
||||
2055
Scripts/CTFGame.cs
2055
Scripts/CTFGame.cs
File diff suppressed because it is too large
Load diff
|
|
@ -1,99 +0,0 @@
|
|||
//==============================================================================
|
||||
// ACCM Message Database - By Blnukem.
|
||||
//------------------------------------------------------------------------------
|
||||
// This is the message database for Sentinels and other miscellaneous functions
|
||||
// The following will be addressed in each message cluster on what can or cannot
|
||||
// be used in those messages.
|
||||
//
|
||||
// This was made for the pleasure of ACCM users to customize Sentinel responses
|
||||
// and a few other messages.
|
||||
//------------------------------------------------------------------------------
|
||||
// %1 = Sentinel's Name.
|
||||
// %2 = Sender's Name.
|
||||
// %3 = Sender/Target's Gender. (He/She)
|
||||
// %4 = Sender/Target's Present Tense Gender. (Him/Her)
|
||||
// %5 = Sender/Target's Possesive Gender. (His/Her)
|
||||
// %6 = Target's Name. (Only if there is a target defined)
|
||||
//==============================================================================
|
||||
// No Target Client for this cluster exists:
|
||||
|
||||
$SentinelDenyFollowCount = 5;
|
||||
$SentinelDenyFollow[0] = '\c2%1 ::\c0 %2, I am already occupied with a task, I cannot follow you.';
|
||||
$SentinelDenyFollow[1] = '\c2%1 ::\c0 I\'m already engaged in a task, %2.';
|
||||
$SentinelDenyFollow[2] = '\c2%1 ::\c0 I am occupied at the moment, %2. Sorry, but I cannot follow you.';
|
||||
$SentinelDenyFollow[3] = '\c2%1 ::\c0 %2, I\'m busy doing something. I cannot follow you.';
|
||||
$SentinelDenyFollow[4] = '\c2%1 ::\c0 I\'m already doing something, %2.';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Sender and Target Clients for this cluster exist:
|
||||
|
||||
$SentinelDenyAttackCount = 5;
|
||||
$SentinelDenyAttack[0] = '\c2%1 ::\c0 I\'m already doing something, %2';
|
||||
$SentinelDenyAttack[1] = '\c2%1 ::\c0 %2, I\'m busy doing something. I cannot engage %6.';
|
||||
$SentinelDenyAttack[2] = '\c2%1 ::\c0 I am occupied at the moment, %2. Sorry, but I cannot do what you ask.';
|
||||
$SentinelDenyAttack[3] = '\c2%1 ::\c0 %2, I am already occupied with a task, I cannot attack %6.';
|
||||
$SentinelDenyAttack[4] = '\c2%1 ::\c0 I\'m already engaged in a task, %2.';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Sender and Target Clients for this cluster exist:
|
||||
|
||||
$SentinelAcceptAttackCount = 4;
|
||||
$SentinelAcceptAttack[0] = '\c2%1 ::\c0 I\'m now engaging %6.';
|
||||
$SentinelAcceptAttack[1] = '\c2%1 ::\c0 Command confirmed, I will now hunt down %6.';
|
||||
$SentinelAcceptAttack[2] = '\c2%1 ::\c0 Attack protocol engaged, I will now hunt down %6.';
|
||||
$SentinelAcceptAttack[3] = '\c2%1 ::\c0 Command confirmed %2, I will now attack %6.';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Sender and Target Clients for this cluster exist:
|
||||
|
||||
$SentinelAttackAlreadyDeadTargetCount = 1;
|
||||
$SentinelAttackAlreadyDeadTarget[0] = '\c2%1 ::\c0 %6 is already dead.';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Sender and Target Clients for this cluster exist:
|
||||
|
||||
$SentinelTargetTooFarCount = 1;
|
||||
$SentinelTargetTooFar[0] = '\c2%1 ::\c0 Command declined. %6 is out of range.';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// No Target Client for this cluster exists:
|
||||
|
||||
$SentinelAttackSenderCount = 1;
|
||||
$SentinelAttackSender[0] = '\c2%1 ::\c0 Command declined %2, I cannot kill the person giving me an order.';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// No Target Client for this cluster exists:
|
||||
|
||||
$SentinelAttackSenderNotAdminCount = 1;
|
||||
$SentinelAttackSenderNotAdmin[0] = '\c2%1 ::\c0 %2, you must be an admin to set an attack order.';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// No Sender Client for this cluster exists:
|
||||
|
||||
$SentinelAnnoyedCount = 3;
|
||||
$SentinelAnnoyed[0] = '\c2%1 ::\c0 %2, now you will learn not to fly around sentinels.';
|
||||
$SentinelAnnoyed[1] = '\c2%1 ::\c0 Target Designated. %2, you were warned not to fly around Sentinels.';
|
||||
$SentinelAnnoyed[2] = '\c2%1 ::\c0 %2, you need to learn to not fly around Sentinels.';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// No Sender Client for this cluster exists:
|
||||
|
||||
$SentinelWarnCount = 4;
|
||||
$SentinelWarn[0] = '\c2%1 ::\c0 Please stop flying around me, %2.';
|
||||
$SentinelWarn[1] = '\c2%1 ::\c0 Quit flying around me %2.';
|
||||
$SentinelWarn[2] = '\c2%1 ::\c0 Do not fly around me, %2.';
|
||||
$SentinelWarn[3] = '\c2%1 ::\c0 %2, if you do not stop flying around me, you will be killed.';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
$ACCMTipCount = 10;
|
||||
$ACCMTip[0] = "Random Tip:<font:Broadway Bt:14>\nRemember, type /help for a list of useful commands.";
|
||||
$ACCMTip[1] = "Sentinel Network:<font:Broadway Bt:14>\nSentinels are your allies and will not attack you, unless you provoke them to do so.";
|
||||
$ACCMTip[2] = "Central Command Intel Report:<font:Broadway Bt:14>\nYou can launch drop pods from Golem heavy transports by pressing your mine key while you're piloting.";
|
||||
$ACCMTip[3] = "Random Tip:<font:Broadway Bt:14>\nThe easiest way to kill a Zombie or anyone for that matter, is to aim for the head.";
|
||||
$ACCMTip[4] = "Central Command Intel Report:<font:Broadway Bt:14>\nThe medic pack has an antidote option for infected players, useable by pressing the right mouse button.";
|
||||
$ACCMTip[5] = "Central Command Intel Report:<font:Broadway Bt:14>\nThe Flame turret barrel is the most effective turret barrel to kill Zombies, followed by the Chaingun turret barrel. The least effective is the Flak barrel.";
|
||||
$ACCMTip[6] = "Sentinel Network:<font:Broadway Bt:14>\nSentinels are intended for Zombie containment and control, and will not attack humans unless provoked to do so.";
|
||||
$ACCMTip[7] = "Central Command Intel Report:<font:Broadway Bt:14>\nThe Purge Field Generator is made to defend an area against Zombies, it's particle field will electrocute any Zombies within the field, but requires heavy maintenece.";
|
||||
$ACCMTip[8] = "Random Tip:<font:Broadway Bt:14>\nUse /CheckStats to check out your current rank and how many points you need for your next rank.";
|
||||
$ACCMTip[9] = "Random Tip:<font:Broadway Bt:14>\nThe Vehicle Repair Pad, Deployable Sentry Turret and the Purge Field Generator require power to operate, be sure to give them a power source when using them!";
|
||||
|
|
@ -1,616 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// LobbyGui.cs
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
$InLobby = false;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyGui::onAdd( %this )
|
||||
{
|
||||
// Add the Player popup menu:
|
||||
new GuiControl(LobbyPlayerActionDlg) {
|
||||
profile = "GuiModelessDialogProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
|
||||
new ShellPopupMenu( LobbyPlayerPopup ) {
|
||||
profile = "ShellPopupProfile";
|
||||
position = "0 0";
|
||||
extent = "0 0";
|
||||
minExtent = "0 0";
|
||||
visible = "1";
|
||||
maxPopupHeight = "200";
|
||||
noButtonStyle = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyGui::onWake( %this )
|
||||
{
|
||||
if ( !%this.initialized )
|
||||
{
|
||||
LobbyPlayerList.setSortColumn( $pref::Lobby::SortColumnKey );
|
||||
LobbyPlayerList.setSortIncreasing( $pref::Lobby::SortInc );
|
||||
|
||||
%this.initialized = true;
|
||||
}
|
||||
|
||||
$InLobby = true;
|
||||
|
||||
//pop any key maps
|
||||
moveMap.pop();
|
||||
if ( isObject( passengerkeys ) )
|
||||
passengerKeys.pop();
|
||||
if ( isObject( observerBlockMap ) )
|
||||
observerBlockMap.pop();
|
||||
if ( isObject( observerMap ) )
|
||||
observerMap.pop();
|
||||
|
||||
$enableDirectInput = "0";
|
||||
deactivateDirectInput();
|
||||
|
||||
LobbyMessageVector.attach(HudMessageVector);
|
||||
LobbyMessageScroll.scrollToBottom();
|
||||
updateLobbyPlayerList();
|
||||
|
||||
LobbyServerName.setText( $clServerName );
|
||||
|
||||
%headerStyle = "<font:" @ $ShellLabelFont @ ":" @ $ShellFontSize @ "><color:00DC00>";
|
||||
%statusText = "<spop><spush>" @ %headerStyle @ "MISSION TYPE:<spop>" SPC $clMissionType
|
||||
NL "<spush>" @ %headerStyle @ "MISSION:<spop>" SPC $clMissionName
|
||||
NL "<spush>" @ %headerStyle @ "OBJECTIVES:<spop>";
|
||||
|
||||
for ( %line = 0; %this.objLine[%line] !$= ""; %line++ )
|
||||
%statusText = %statusText NL "<lmargin:10>* <lmargin:24>" @ %this.objLine[%line];
|
||||
|
||||
LobbyStatusText.setText( %statusText );
|
||||
|
||||
fillLobbyVoteMenu();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyGui::onSleep( %this )
|
||||
{
|
||||
if ( %this.playerDialogOpen )
|
||||
LobbyPlayerPopup.forceClose();
|
||||
|
||||
LobbyVoteMenu.clear();
|
||||
LobbyVoteMenu.mode = "";
|
||||
LobbyCancelBtn.setVisible( false );
|
||||
LobbyStatusText.setText( "" );
|
||||
$InLobby = false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function lobbyDisconnect()
|
||||
{
|
||||
MessageBoxYesNo( "CONFIRM", "Are you sure you want to leave this game?", "lobbyLeaveGame();", "" );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function lobbyLeaveGame()
|
||||
{
|
||||
Canvas.popDialog( LobbyGui );
|
||||
Disconnect();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function lobbyReturnToGame()
|
||||
{
|
||||
Canvas.setContent( PlayGui );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyChatEnter::onEscape( %this )
|
||||
{
|
||||
%this.setValue( "" );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyChatEnter::send( %this )
|
||||
{
|
||||
%text = %this.getValue();
|
||||
if ( %text $= "" )
|
||||
%text = " ";
|
||||
commandToServer( 'MessageSent', %text );
|
||||
%this.setValue( "" );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyPlayerList::initColumns( %this )
|
||||
{
|
||||
%this.clear();
|
||||
%this.clearColumns();
|
||||
%this.addColumn( 0, " ", 24, 24, 24, "center" ); // Flag column
|
||||
%this.addColumn( 6, "lobby_headset", 36, 36, 36, "headericon" ); // Voice Com column
|
||||
%this.addColumn( 1, "Player", $pref::Lobby::Column1, 50, 200 );
|
||||
if ( $clTeamCount > 1 )
|
||||
%this.addColumn( 2, "Team", $pref::Lobby::Column2, 50, 200 );
|
||||
%this.addColumn( 3, "Score", $pref::Lobby::Column3, 25, 200, "numeric center" );
|
||||
%this.addColumn( 4, "Ping", $pref::Lobby::Column4, 25, 200, "numeric center" );
|
||||
%this.addColumn( 5, "PL", $pref::Lobby::Column5, 25, 200, "numeric center" );
|
||||
|
||||
commandToServer( 'getScores' );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyPlayerList::onColumnResize( %this, %col, %size )
|
||||
{
|
||||
$pref::Lobby::Column[%this.getColumnKey( %col )] = %size;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyPlayerList::onSetSortKey( %this, %key, %increasing )
|
||||
{
|
||||
$pref::Lobby::SortColumnKey = %key;
|
||||
$pref::Lobby::SortInc = %increasing;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function updateLobbyPlayerList()
|
||||
{
|
||||
if ( $InLobby )
|
||||
{
|
||||
// Let the server know we want an update:
|
||||
commandToServer( 'getScores' );
|
||||
schedule( 4000, 0, updateLobbyPlayerList );
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function lobbyUpdatePlayer( %clientId )
|
||||
{
|
||||
%player = $PlayerList[%clientId];
|
||||
if ( !isObject( %player ) )
|
||||
{
|
||||
warn( "lobbyUpdatePlayer( " @ %clientId @ " ) - there is no client object with that id!" );
|
||||
return;
|
||||
}
|
||||
|
||||
// Build the text:
|
||||
if ( %player.isSuperAdmin )
|
||||
%tag = "SA";
|
||||
else if ( %player.isAdmin )
|
||||
%tag = "A";
|
||||
else if ( %player.isZombieKeeper )
|
||||
%tag = "ZK";
|
||||
else if ( %player.isBot )
|
||||
%tag = "B";
|
||||
else
|
||||
%tag = " ";
|
||||
|
||||
if ( %player.canListen )
|
||||
{
|
||||
if ( %player.voiceEnabled )
|
||||
{
|
||||
%voiceIcons = "lobby_icon_speak";
|
||||
if ( %player.isListening )
|
||||
%voiceIcons = %voiceIcons @ ":lobby_icon_listen";
|
||||
}
|
||||
else
|
||||
%voiceIcons = %player.isListening ? "lobby_icon_listen" : "";
|
||||
}
|
||||
else
|
||||
%voiceIcons = "shll_icon_timedout";
|
||||
|
||||
if ( $clTeamCount > 1 )
|
||||
{
|
||||
if ( %player.teamId == 0 )
|
||||
%teamName = "Observer";
|
||||
else
|
||||
%teamName = $clTeamScore[%player.teamId, 0] $= "" ? "-" : $clTeamScore[%player.teamId, 0];
|
||||
%text = %tag TAB %voiceIcons TAB %player.name TAB %teamName TAB %player.score TAB %player.ping TAB %player.packetLoss;
|
||||
}
|
||||
else
|
||||
%text = %tag TAB %voiceIcons TAB %player.name TAB %player.score TAB %player.ping TAB %player.packetLoss;
|
||||
|
||||
if ( LobbyPlayerList.getRowNumById( %clientId ) == -1 )
|
||||
LobbyPlayerList.addRow( %clientId, %text );
|
||||
else
|
||||
LobbyPlayerList.setRowById( %clientId, %text );
|
||||
|
||||
if ( $InLobby )
|
||||
LobbyPlayerList.sort();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function lobbyRemovePlayer( %clientId )
|
||||
{
|
||||
LobbyPlayerList.removeRowById( %clientId );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyPlayerList::onRightMouseDown( %this, %column, %row, %mousePos )
|
||||
{
|
||||
// Open the action menu:
|
||||
%clientId = %this.getRowId( %row );
|
||||
LobbyPlayerPopup.player = $PlayerList[%clientId];
|
||||
|
||||
if ( LobbyPlayerPopup.player !$= "" )
|
||||
{
|
||||
LobbyPlayerPopup.position = %mousePos;
|
||||
Canvas.pushDialog( LobbyPlayerActionDlg );
|
||||
LobbyPlayerPopup.forceOnAction();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyPlayerActionDlg::onWake( %this )
|
||||
{
|
||||
LobbyGui.playerDialogOpen = true;
|
||||
fillPlayerPopupMenu();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyPlayerActionDlg::onSleep( %this )
|
||||
{
|
||||
LobbyGui.playerDialogOpen = false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyPlayerPopup::onSelect( %this, %id, %text )
|
||||
{
|
||||
//the id's for these are used in DefaultGame::sendGamePlayerPopupMenu()...
|
||||
//mute: 1
|
||||
//admin: 2
|
||||
//kick: 3
|
||||
//ban: 4
|
||||
//force observer: 5
|
||||
//switch team: 6
|
||||
|
||||
switch( %id )
|
||||
{
|
||||
case 1: // Mute/Unmute
|
||||
togglePlayerMute(%this.player.clientId);
|
||||
|
||||
case 2: // Admin
|
||||
MessageBoxYesNo( "CONFIRM", "Are you sure you want to make " @ %this.player.name @ " an admin?",
|
||||
"lobbyPlayerVote( VoteAdminPlayer, \"ADMIN player\", " @ %this.player.clientId @ " );" );
|
||||
|
||||
case 3: // Kick
|
||||
MessageBoxYesNo( "CONFIRM", "Are you sure you want to kick " @ %this.player.name @ "?",
|
||||
"lobbyPlayerVote( VoteKickPlayer, \"KICK player\", " @ %this.player.clientId @ " );" );
|
||||
|
||||
case 4: // Ban
|
||||
MessageBoxYesNo( "CONFIRM", "Are you sure you want to ban " @ %this.player.name @ "?",
|
||||
"lobbyPlayerVote( BanPlayer, \"BAN player\", " @ %this.player.clientId @ " );" );
|
||||
|
||||
case 5: // force observer
|
||||
forceToObserver(%this.player.clientId);
|
||||
|
||||
case 6: //change team 1
|
||||
changePlayersTeam(%this.player.clientId, 1);
|
||||
|
||||
case 7: //change team 2
|
||||
changePlayersTeam(%this.player.clientId, 2);
|
||||
|
||||
case 8:
|
||||
adminAddPlayerToGame(%this.player.clientId);
|
||||
|
||||
case 9: // enable/disable voice communication
|
||||
togglePlayerVoiceCom( %this.player );
|
||||
|
||||
case 10:
|
||||
confirmAdminListAdd( %this.player, false );
|
||||
|
||||
case 11:
|
||||
confirmAdminListAdd( %this.player, true );
|
||||
|
||||
Canvas.popDialog( LobbyPlayerActionDlg );
|
||||
}
|
||||
}
|
||||
|
||||
function confirmAdminListAdd( %client, %super )
|
||||
{
|
||||
if( %super )
|
||||
MessageBoxYesNo( "CONFIRM", "Are you sure you want to add " @ %client.name @ " to the server super admin list?", "toSuperList( " @ %client.clientId @ " );" );
|
||||
|
||||
else
|
||||
MessageBoxYesNo( "CONFIRM", "Are you sure you want to add " @ %client.name @ " to the server admin list?", "toAdminList( " @ %client.clientId @ " );" );
|
||||
}
|
||||
|
||||
function toSuperList( %client )
|
||||
{
|
||||
commandToServer( 'AddToSuperAdminList', %client );
|
||||
}
|
||||
|
||||
function toAdminList( %client )
|
||||
{
|
||||
commandToServer( 'AddToAdminList', %client );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyPlayerPopup::onCancel( %this )
|
||||
{
|
||||
Canvas.popDialog( LobbyPlayerActionDlg );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function togglePlayerMute(%client)
|
||||
{
|
||||
commandToServer( 'togglePlayerMute', %client );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function togglePlayerVoiceCom( %playerRep )
|
||||
{
|
||||
commandToServer( 'ListenTo', %playerRep.clientId, !%playerRep.voiceEnabled, true );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function forceToObserver( %client )
|
||||
{
|
||||
commandToServer( 'forcePlayerToObserver', %client );
|
||||
}
|
||||
|
||||
function AdminAddPlayerToGame(%client)
|
||||
{
|
||||
CommandToServer( 'clientAddToGame', %client );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function changePlayersTeam(%client, %team)
|
||||
{
|
||||
commandToServer( 'changePlayersTeam', %client, %team);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
function fillLobbyVoteMenu()
|
||||
{
|
||||
LobbyVoteMenu.key++;
|
||||
LobbyVoteMenu.clear();
|
||||
LobbyVoteMenu.tourneyChoose = 0;
|
||||
commandToServer( 'GetVoteMenu', LobbyVoteMenu.key );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function fillLobbyTeamMenu()
|
||||
{
|
||||
LobbyVoteMenu.key++;
|
||||
LobbyVoteMenu.clear();
|
||||
LobbyVoteMenu.mode = "team";
|
||||
commandToServer( 'GetTeamList', LobbyVoteMenu.key );
|
||||
LobbyCancelBtn.setVisible( true );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function fillPlayerPopupMenu()
|
||||
{
|
||||
LobbyPlayerPopup.key++;
|
||||
LobbyPlayerPopup.clear();
|
||||
|
||||
LobbyPlayerPopup.add(LobbyPlayerPopup.player.name, 0);
|
||||
commandToServer( 'GetPlayerPopupMenu', LobbyPlayerPopup.player.clientId, LobbyPlayerPopup.key );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function fillLobbyMissionTypeMenu()
|
||||
{
|
||||
LobbyVoteMenu.key++;
|
||||
LobbyVoteMenu.clear();
|
||||
LobbyVoteMenu.mode = "type";
|
||||
commandToServer( 'GetMissionTypes', LobbyVoteMenu.key );
|
||||
LobbyCancelBtn.setVisible( true );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function fillLobbyMissionMenu( %type, %typeName )
|
||||
{
|
||||
LobbyVoteMenu.key++;
|
||||
LobbyVoteMenu.clear();
|
||||
LobbyVoteMenu.mode = "mission";
|
||||
LobbyVoteMenu.missionType = %type;
|
||||
LobbyVoteMenu.typeName = %typeName;
|
||||
commandToServer( 'GetMissionList', LobbyVoteMenu.key, %type );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function fillLobbyTimeLimitMenu()
|
||||
{
|
||||
LobbyVoteMenu.key++;
|
||||
LobbyVoteMenu.clear();
|
||||
LobbyVoteMenu.mode = "timeLimit";
|
||||
commandToServer( 'GetTimeLimitList', LobbyVoteMenu.key );
|
||||
LobbyCancelBtn.setVisible( true );
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
addMessageCallback( 'MsgVoteItem', handleVoteItemMessage );
|
||||
addMessageCallback( 'MsgPlayerPopupItem', handlePlayerPopupMessage );
|
||||
addMessageCallback( 'MsgVotePassed', handleVotePassedMessage );
|
||||
addMessageCallback( 'MsgVoteFailed', handleVoteFailedMessage );
|
||||
addMessageCallback( 'MsgAdminPlayer', handleAdminPlayerMessage );
|
||||
addMessageCallback( 'MsgAdminAdminPlayer', handleAdminAdminPlayerMessage );
|
||||
addMessageCallback( 'MsgSuperAdminPlayer', handleSuperAdminPlayerMessage );
|
||||
addMessageCallback( 'MsgAdminForce', handleAdminForceMessage );
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function handleAdminForceMessage()
|
||||
{
|
||||
alxPlay(AdminForceSound, 0, 0, 0);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function handleAdminAdminPlayerMessage( %msgType, %msgString, %client )
|
||||
{
|
||||
%player = $PlayerList[%client];
|
||||
if(%player)
|
||||
%player.isAdmin = true;
|
||||
alxPlay(AdminForceSound, 0, 0, 0);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function handleAdminPlayerMessage( %msgType, %msgString, %client )
|
||||
{
|
||||
%player = $PlayerList[%client];
|
||||
if(%player)
|
||||
%player.isAdmin = true;
|
||||
alxPlay(VotePassSound, 0, 0, 0);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function handleSuperAdminPlayerMessage( %msgType, %msgString, %client )
|
||||
{
|
||||
%player = $PlayerList[%client];
|
||||
if(%player)
|
||||
{
|
||||
%player.isSuperAdmin = true;
|
||||
%player.isAdmin = true;
|
||||
}
|
||||
alxPlay(AdminForceSound, 0, 0, 0);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function handleVoteItemMessage( %msgType, %msgString, %key, %voteName, %voteActionMsg, %voteText, %sort )
|
||||
{
|
||||
if ( %key != LobbyVoteMenu.key )
|
||||
return;
|
||||
|
||||
%index = LobbyVoteMenu.rowCount();
|
||||
LobbyVoteMenu.addRow( %index, detag( %voteText ) );
|
||||
if ( %sort )
|
||||
LobbyVoteMenu.sort( 0 );
|
||||
$clVoteCmd[%index] = detag( %voteName );
|
||||
$clVoteAction[%index] = detag( %voteActionMsg );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function handlePlayerPopupMessage( %msgType, %msgString, %key, %voteName, %voteActionMsg, %voteText, %popupEntryId )
|
||||
{
|
||||
if ( %key != LobbyPlayerPopup.key )
|
||||
return;
|
||||
|
||||
LobbyPlayerPopup.add( " " @ detag( %voteText ), %popupEntryId );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function handleVotePassedMessage( %msgType, %msgString, %voteName, %voteText )
|
||||
{
|
||||
if ( $InLobby )
|
||||
fillLobbyVoteMenu();
|
||||
|
||||
alxPlay(VotePassSound, 0, 0, 0);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function handleVoteFailedMessage( %msgType, %msgString, %voteName, %voteText )
|
||||
{
|
||||
if ( $InLobby )
|
||||
fillLobbyVoteMenu();
|
||||
|
||||
alxPlay(VoteNotPassSound, 0, 0, 0);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function lobbyVote()
|
||||
{
|
||||
%id = LobbyVoteMenu.getSelectedId();
|
||||
%text = LobbyVoteMenu.getRowTextById( %id );
|
||||
|
||||
switch$ ( LobbyVoteMenu.mode )
|
||||
{
|
||||
case "": // Default case...
|
||||
// Test for special cases:
|
||||
switch$ ( $clVoteCmd[%id] )
|
||||
{
|
||||
case "JoinGame":
|
||||
CommandToServer( 'clientJoinGame' );
|
||||
schedule( 100, 0, lobbyReturnToGame );
|
||||
return;
|
||||
|
||||
case "ChooseTeam":
|
||||
commandToServer( 'ClientJoinTeam', -1, true );
|
||||
schedule( 100, 0, lobbyReturnToGame );
|
||||
return;
|
||||
|
||||
case "VoteTournamentMode":
|
||||
LobbyVoteMenu.tourneyChoose = 1;
|
||||
fillLobbyMissionTypeMenu();
|
||||
return;
|
||||
|
||||
case "VoteMatchStart":
|
||||
startNewVote( "VoteMatchStart" );
|
||||
schedule( 100, 0, lobbyReturnToGame );
|
||||
return;
|
||||
|
||||
case "MakeObserver":
|
||||
commandToServer( 'ClientMakeObserver' );
|
||||
schedule( 100, 0, lobbyReturnToGame );
|
||||
return;
|
||||
|
||||
case "VoteChangeMission":
|
||||
fillLobbyMissionTypeMenu();
|
||||
return;
|
||||
|
||||
case "VoteChangeTimeLimit":
|
||||
fillLobbyTimeLimitMenu();
|
||||
return;
|
||||
|
||||
case "Addbot":
|
||||
commandToServer( 'addBot' );
|
||||
return;
|
||||
}
|
||||
|
||||
case "team":
|
||||
commandToServer( 'ClientJoinTeam', %id++ );
|
||||
LobbyVoteMenu.reset();
|
||||
return;
|
||||
|
||||
case "type":
|
||||
fillLobbyMissionMenu( $clVoteCmd[%id], %text );
|
||||
return;
|
||||
|
||||
case "mission":
|
||||
if( !LobbyVoteMenu.tourneyChoose )
|
||||
{
|
||||
startNewVote( "VoteChangeMission",
|
||||
%text, // Mission display name
|
||||
LobbyVoteMenu.typeName, // Mission type display name
|
||||
$clVoteCmd[%id], // Mission id
|
||||
LobbyVoteMenu.missionType ); // Mission type id
|
||||
}
|
||||
else
|
||||
{
|
||||
startNewVote( "VoteTournamentMode",
|
||||
%text, // Mission display name
|
||||
LobbyVoteMenu.typeName, // Mission type display name
|
||||
$clVoteCmd[%id], // Mission id
|
||||
LobbyVoteMenu.missionType ); // Mission type id
|
||||
LobbyVoteMenu.tourneyChoose = 0;
|
||||
}
|
||||
LobbyVoteMenu.reset();
|
||||
return;
|
||||
|
||||
case "timeLimit":
|
||||
startNewVote( "VoteChangeTimeLimit", $clVoteCmd[%id] );
|
||||
LobbyVoteMenu.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
startNewVote( $clVoteCmd[%id], $clVoteAction[%id] );
|
||||
fillLobbyVoteMenu();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function LobbyVoteMenu::reset( %this )
|
||||
{
|
||||
%this.mode = "";
|
||||
%this.tourneyChoose = 0;
|
||||
LobbyCancelBtn.setVisible( false );
|
||||
fillLobbyVoteMenu();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function lobbyPlayerVote(%voteType, %actionMsg, %playerId)
|
||||
{
|
||||
startNewVote(%voteType, %playerId, 0, 0, 0, true);
|
||||
fillLobbyVoteMenu();
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
$sent::patrolwaittime = 10; // 10 secs
|
||||
$sent::patrolsaturation = 2; // 2 sentinel patrolling one point at a time
|
||||
|
||||
// 1 = Normal Sentinel
|
||||
// 2 = Sentinel Monitor
|
||||
|
||||
//==============================================================================
|
||||
// CreateSentinel
|
||||
//------------------------------------------------------------------------------
|
||||
// %pos = position
|
||||
// %team = team
|
||||
// %quantity = how many sentinels to spawn
|
||||
// %type = the type of sentinel to spawn [regular/monitor]
|
||||
//------------------------------------------------------------------------------
|
||||
// It creates a sentinel.
|
||||
//==============================================================================
|
||||
function CreateSentinel(%pos, %quantity, %type)
|
||||
{
|
||||
if(%quantity < 1)
|
||||
return;
|
||||
|
||||
while(%quantity)
|
||||
{
|
||||
%data = (%type == 2 ? "SentinelMonitor" : "SentinelVehicle");
|
||||
%sent = new FlyingVehicle() {
|
||||
datablock = %data;
|
||||
};
|
||||
|
||||
%sent.setTransform(%pos SPC "0 0 1 0");
|
||||
%sent.team = 1;
|
||||
|
||||
MissionCleanup.add(%sent);
|
||||
|
||||
setTargetSensorGroup(%sent.getTarget(), 1);
|
||||
|
||||
$ignoreNextBotConnection = true;
|
||||
%ai = aiConnect("_AISent");
|
||||
ChangeName(%ai, "Sentinel"@%ai);
|
||||
|
||||
%ai.isSentinel = true;
|
||||
%ai.sentVehicle = %sent;
|
||||
%ai.sentinelType = %type;
|
||||
|
||||
%ai.setControlObject(%sent);
|
||||
|
||||
// SentinelAI_PatrolArea(%ai);
|
||||
warn("Sentinel created: "@%ai@", VEHID"@%sent);
|
||||
%quantity--;
|
||||
}
|
||||
}
|
||||
|
||||
function DropSentinel(%id)
|
||||
{
|
||||
if(!isObject(%id) || %id.isSentinel != true)
|
||||
return;
|
||||
|
||||
if(isObject(%id.sentVehicle) && %id.sentVehicle.getDamageState() !$= "Destroyed")
|
||||
%id.sentVehicle.setDamageState(Destroyed);
|
||||
|
||||
%id.drop();
|
||||
}
|
||||
|
||||
function AIConnection::Sentinel_MoveTo(%client, %coords)
|
||||
{
|
||||
%client.clearStep();
|
||||
|
||||
%client.setPilotAim(%coords);
|
||||
%client.setPilotDestination(%coords);
|
||||
}
|
||||
|
||||
function AIConnection::Sentinel_Damaged
|
||||
|
|
@ -1,654 +0,0 @@
|
|||
//==============================================================================
|
||||
// Sentinel Data - Made by Blnukem
|
||||
//==============================================================================
|
||||
// Sentinel Sounds
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
datablock EffectProfile(SentinelTurretSwitchEffect)
|
||||
{
|
||||
effectname = "powered/turret_light_activate";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 5.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(SentinelTurretFireEffect)
|
||||
{
|
||||
filename = "fx/vehicles/tank_chaingun.wav";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 8.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(SentinelDeactivateEffect)
|
||||
{
|
||||
effectname = "powered/turret_heavy_reload";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 5.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(SentinelActivateEffect)
|
||||
{
|
||||
effectname = "powered/turret_light_reload";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 5.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(SentinelIdleEffect)
|
||||
{
|
||||
effectname = "powered/turret_light_idle";
|
||||
minDistance = 1;
|
||||
maxDistance = 2;
|
||||
};
|
||||
|
||||
datablock AudioProfile(SentinelTurretSwitchSound)
|
||||
{
|
||||
filename = "fx/powered/turret_light_activate.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = SentinelTurretSwitchEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(SentinelTurretFireSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_chaingun.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = SentinelTurretFireEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(SentinelIdleSound)
|
||||
{
|
||||
filename = "fx/powered/turret_light_idle.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = SentinelIdleEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(SentinelActivateSound)
|
||||
{
|
||||
filename = "fx/powered/turret_light_reload.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = SentinelActivateEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(SentinelDeactivateSound)
|
||||
{
|
||||
filename = "fx/powered/turret_heavy_reload.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = SentinelDeactivateEffect;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Vehicle Data
|
||||
//==============================================================================
|
||||
// Standard Sentinel
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
datablock FlyingVehicleData(SentinelVehicle) : SentinelDamageProfile
|
||||
{
|
||||
spawnOffset = "0.0 0.0 0.1";
|
||||
|
||||
catagory = "Sentinels";
|
||||
shapeFile = "stackable2s.dts";
|
||||
multipassenger = false;
|
||||
computeCRC = true;
|
||||
|
||||
debrisShapeName = "debris_generic.dts";
|
||||
debris = TurretDebris;
|
||||
renderWhenDestroyed = false;
|
||||
|
||||
drag = 0.15;
|
||||
density = 1.0;
|
||||
|
||||
numMountPoints = 0;
|
||||
|
||||
cameraMaxDist = 15;
|
||||
cameraOffset = 2.5;
|
||||
cameraLag = 0.9;
|
||||
explosion = TurretExplosion;
|
||||
explosionDamage = 0.5;
|
||||
explosionRadius = 5.0;
|
||||
|
||||
maxDamage = 0.5;
|
||||
destroyedLevel = 0.5;
|
||||
|
||||
isShielded = true;
|
||||
energyPerDamagePoint = 160;
|
||||
maxEnergy = 280;
|
||||
rechargeRate = 0.8;
|
||||
|
||||
minDrag = 30;
|
||||
rotationalDrag = 2000;
|
||||
|
||||
maxAutoSpeed = 15;
|
||||
autoAngularForce = 400;
|
||||
autoLinearForce = 300;
|
||||
autoInputDamping = 0.95;
|
||||
|
||||
maxSteeringAngle = 5;
|
||||
horizontalSurfaceForce = 6;
|
||||
verticalSurfaceForce = 4;
|
||||
maneuveringForce = 5000;
|
||||
steeringForce = 3000;
|
||||
steeringRollForce = 0;
|
||||
rollForce = 10;
|
||||
hoverHeight = 10;
|
||||
createHoverHeight = 2;
|
||||
maxForwardSpeed = 15;
|
||||
|
||||
jetForce = 4500;
|
||||
minJetEnergy = 0;
|
||||
jetEnergyDrain = 0; // Auto stabilize speed
|
||||
vertThrustMultiple = 0;
|
||||
|
||||
mass = 100;
|
||||
bodyFriction = 0;
|
||||
bodyRestitution = 0.5;
|
||||
minRollSpeed = 0;
|
||||
softImpactSpeed = 14;
|
||||
hardImpactSpeed = 25;
|
||||
|
||||
minImpactSpeed = 10;
|
||||
speedDamageScale = 0.06;
|
||||
|
||||
collDamageThresholdVel = 23.0;
|
||||
collDamageMultiplier = 0.02;
|
||||
|
||||
jetSound = "";
|
||||
engineSound = SentinelIdleSound;
|
||||
softImpactSound = SoftImpactSound;
|
||||
hardImpactSound = HardImpactSound;
|
||||
|
||||
softSplashSoundVelocity = 10.0;
|
||||
mediumSplashSoundVelocity = 15.0;
|
||||
hardSplashSoundVelocity = 20.0;
|
||||
exitSplashSoundVelocity = 10.0;
|
||||
|
||||
exitingWater = VehicleExitWaterMediumSound;
|
||||
impactWaterEasy = VehicleImpactWaterSoftSound;
|
||||
impactWaterMedium = VehicleImpactWaterMediumSound;
|
||||
impactWaterHard = VehicleImpactWaterMediumSound;
|
||||
waterWakeSound = VehicleWakeMediumSplashSound;
|
||||
|
||||
dustEmitter = LiftoffDustEmitter;
|
||||
triggerDustHeight = 1.0;
|
||||
dustHeight = 0.1;
|
||||
canControl = false;
|
||||
|
||||
minMountDist = 4;
|
||||
|
||||
splashEmitter[0] = VehicleFoamDropletsEmitter;
|
||||
splashEmitter[1] = VehicleFoamEmitter;
|
||||
|
||||
shieldImpact = VehicleShieldImpact;
|
||||
|
||||
cmdCategory = "Tactical";
|
||||
cmdIcon = CMDFlyingScoutIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
|
||||
targetNameTag = 'Standard';
|
||||
targetTypeTag = 'Sentinel';
|
||||
sensorData = combatSensor;
|
||||
sensorRadius = combatSensor.detectRadius;
|
||||
sensorColor = "9 9 255";
|
||||
|
||||
checkRadius = 5.5;
|
||||
observeParameters = "1 5 5";
|
||||
canObserve = true;
|
||||
|
||||
runningLight[0] = ShrikeLight1;
|
||||
|
||||
shieldEffectScale = "2.0 2.0 2.0";
|
||||
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Sentinel Monitor Vehicle Data
|
||||
//==============================================================================
|
||||
|
||||
datablock FlyingVehicleData(SentinelMonitor) : SentinelDamageProfile
|
||||
{
|
||||
spawnOffset = "0.0 0.0 0.0";
|
||||
|
||||
catagory = "Sentinels";
|
||||
shapeFile = "beacon.dts";
|
||||
multipassenger = false;
|
||||
computeCRC = true;
|
||||
|
||||
debrisShapeName = "debris_generic.dts";
|
||||
debris = TurretDebris;
|
||||
renderWhenDestroyed = false;
|
||||
|
||||
drag = 4.15;
|
||||
density = 1.0;
|
||||
|
||||
numMountPoints = 0;
|
||||
|
||||
cameraMaxDist = 15;
|
||||
cameraOffset = 2.5;
|
||||
cameraLag = 0.9;
|
||||
explosion = TurretExplosion;
|
||||
explosionDamage = 0.5;
|
||||
explosionRadius = 5.0;
|
||||
|
||||
maxDamage = 50.00;
|
||||
destroyedLevel = 50.00;
|
||||
|
||||
isShielded = true;
|
||||
rechargeRate = 2.5;
|
||||
energyPerDamagePoint = 1;
|
||||
maxEnergy = 500;
|
||||
rechargeRate = 50.0;
|
||||
|
||||
minDrag = 30;
|
||||
rotationalDrag = 2000;
|
||||
|
||||
maxAutoSpeed = 15;
|
||||
autoAngularForce = 400;
|
||||
autoLinearForce = 300;
|
||||
autoInputDamping = 0.95;
|
||||
|
||||
maxSteeringAngle = 5;
|
||||
horizontalSurfaceForce = 6;
|
||||
verticalSurfaceForce = 4;
|
||||
maneuveringForce = 5000;
|
||||
steeringForce = 1000;
|
||||
steeringRollForce = 0;
|
||||
rollForce = 100;
|
||||
hoverHeight = 15;
|
||||
createHoverHeight = 2;
|
||||
maxForwardSpeed = 15;
|
||||
|
||||
jetForce = 1500;
|
||||
minJetEnergy = 0;
|
||||
jetEnergyDrain = 0; // Auto stabilize speed
|
||||
vertThrustMultiple = 0;
|
||||
|
||||
mass = 100;
|
||||
bodyFriction = 0;
|
||||
bodyRestitution = 0.5;
|
||||
minRollSpeed = 0;
|
||||
softImpactSpeed = 14;
|
||||
hardImpactSpeed = 25;
|
||||
|
||||
minImpactSpeed = 25;
|
||||
speedDamageScale = 0.06;
|
||||
|
||||
collDamageThresholdVel = 23.0;
|
||||
collDamageMultiplier = 0.02;
|
||||
|
||||
minTrailSpeed = 0.1;
|
||||
trailEmitter = ContrailEmitter;
|
||||
|
||||
jetSound = "";
|
||||
engineSound = SentinelIdleSound;
|
||||
softImpactSound = SoftImpactSound;
|
||||
hardImpactSound = HardImpactSound;
|
||||
|
||||
softSplashSoundVelocity = 10.0;
|
||||
mediumSplashSoundVelocity = 15.0;
|
||||
hardSplashSoundVelocity = 20.0;
|
||||
exitSplashSoundVelocity = 10.0;
|
||||
|
||||
exitingWater = VehicleExitWaterMediumSound;
|
||||
impactWaterEasy = VehicleImpactWaterSoftSound;
|
||||
impactWaterMedium = VehicleImpactWaterMediumSound;
|
||||
impactWaterHard = VehicleImpactWaterMediumSound;
|
||||
waterWakeSound = VehicleWakeMediumSplashSound;
|
||||
|
||||
dustEmitter = LiftoffDustEmitter;
|
||||
triggerDustHeight = 2.0;
|
||||
dustHeight = 0.0;
|
||||
canControl = false;
|
||||
|
||||
damageEmitter[0] = LightDamageSmoke;
|
||||
damageEmitter[1] = LightDamageSmoke;
|
||||
damageEmitter[2] = DamageBubbles;
|
||||
damageEmitterOffset[0] = "0.0 0.0 0.0 ";
|
||||
damageLevelTolerance[0] = 0.3;
|
||||
damageLevelTolerance[1] = 0.7;
|
||||
numDmgEmitterAreas = 1;
|
||||
|
||||
minMountDist = 4;
|
||||
|
||||
splashEmitter[0] = VehicleFoamDropletsEmitter;
|
||||
splashEmitter[1] = VehicleFoamEmitter;
|
||||
|
||||
shieldImpact = VehicleShieldImpact;
|
||||
|
||||
cmdCategory = "Tactical";
|
||||
cmdIcon = CMDCameraIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_camera_grey";
|
||||
targetNameTag = '';
|
||||
targetTypeTag = 'Monitor';
|
||||
sensorData = combatSensor;
|
||||
sensorRadius = combatSensor.detectRadius;
|
||||
sensorColor = "9 9 255";
|
||||
|
||||
checkRadius = 10.5;
|
||||
observeParameters = "1 5 5";
|
||||
canObserve = true;
|
||||
|
||||
runningLight[0] = ShrikeLight1;
|
||||
|
||||
shieldEffectScale = "2.0 2.0 2.0";
|
||||
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Image Data
|
||||
//==============================================================================
|
||||
// Standard Sentinel Image Data:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(BodyImage) : SentinelVehicle
|
||||
{
|
||||
offset = "0.0 -0.2 0.3";
|
||||
rotation = "0 0 1 0";
|
||||
shapeFile = "turret_mortar_large.dts";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(RightWing) : SentinelVehicle
|
||||
{
|
||||
offset = "0.2 0.0 0.4";
|
||||
rotation = "0 0 -1 90";
|
||||
shapeFile = "pack_deploy_sensor_pulse.dts";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(LeftWing) : SentinelVehicle
|
||||
{
|
||||
offset = "-0.2 0.0 0.4";
|
||||
rotation = "0 0 1 90";
|
||||
shapeFile = "pack_deploy_sensor_pulse.dts";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(Eye) : SentinelVehicle
|
||||
{
|
||||
offset = "0.0 1.1 0.22";
|
||||
rotation = "1 0 0 90";
|
||||
shapeFile = "beacon.dts";
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Sentinel Monitor Image Data:
|
||||
//==============================================================================
|
||||
|
||||
datablock ShapeBaseImageData(Front) : SentinelMonitor
|
||||
{
|
||||
offset = "0.0 -0.02 0.0";
|
||||
rotation = "1.0 0.0 0.0 90.0";
|
||||
shapeFile = "camera.dts";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(Rear) : SentinelMonitor
|
||||
{
|
||||
offset = "0.0 0.02 0.0";
|
||||
rotation = "-1.0 0.0 0.0 90.0";
|
||||
shapeFile = "camera.dts";
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Decals and Projectiles
|
||||
//==============================================================================
|
||||
// Default Sentinel bullet Decal image:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
datablock DecalData(SentinelDecal1)
|
||||
{
|
||||
sizeX = 0.15;
|
||||
sizeY = 0.15;
|
||||
textureName = "special/bullethole3";
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Standard Sentinel Bullet:
|
||||
//==============================================================================
|
||||
|
||||
datablock TracerProjectileData(SentinelBullet)
|
||||
{
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.15;
|
||||
directDamageType = $DamageType::Sentinel;
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
HeadMultiplier = 1.5;
|
||||
LegsMultiplier = 0.5;
|
||||
|
||||
kickBackStrength = 50.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
dryVelocity = 800.0;
|
||||
wetVelocity = 100.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 3000;
|
||||
lifetimeMS = 3000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 10.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = 10.0/255.0 @ " " @ 30.0/255.0 @ " " @ 240.0/255.0 @ " 0.75";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = 0.15;
|
||||
crossSize = 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
decalData[0] = SentinelDecal1;
|
||||
|
||||
hasLight = true;
|
||||
lightRadius = 8.0;
|
||||
lightColor = "0.5 0.5 0.175";
|
||||
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Turret Data
|
||||
//==============================================================================
|
||||
// Standard Sentinel Turret:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
datablock TurretData(SentinelTurret) : TurretDamageProfile
|
||||
{
|
||||
className = VehicleTurret;
|
||||
catagory = "Turrets";
|
||||
shapeFile = "turret_belly_base.dts";
|
||||
preload = true;
|
||||
|
||||
mass = 1.0;
|
||||
maxDamage = 1.0;
|
||||
destroyedLevel = 1.0;
|
||||
repairRate = 0;
|
||||
maxDamage = SentinelVehicle.maxDamage;
|
||||
destroyedLevel = SentinelVehicle.destroyedLevel;
|
||||
rechargeRate = 0.15;
|
||||
|
||||
thetaMin = 90;
|
||||
thetaMax = 180;
|
||||
thetaNull = 90;
|
||||
|
||||
rechargeRate = 0.15;
|
||||
|
||||
isShielded = false;
|
||||
energyPerDamagePoint = 110;
|
||||
maxEnergy = 60;
|
||||
renderWhenDestroyed = true;
|
||||
barrel = SentinelTurretBarrel;
|
||||
heatSignature = 0;
|
||||
|
||||
canControl = false;
|
||||
cmdCategory = "DTactical";
|
||||
cmdIcon = CMDTurretIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
|
||||
targetNameTag = 'Sentinel';
|
||||
targetTypeTag = 'Turret';
|
||||
|
||||
firstPersonOnly = true;
|
||||
|
||||
debrisShapeName = "debris_generic_small.dts";
|
||||
debris = TurretDebrisSmall;
|
||||
};
|
||||
|
||||
datablock TurretImageData(SentinelTurretBarrel)
|
||||
{
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
mountPoint = 0;
|
||||
|
||||
projectile = SentinelBullet;
|
||||
projectileType = TracerProjectile;
|
||||
|
||||
usesEnergy = true;
|
||||
fireEnergy = 0.0;
|
||||
minEnergy = 10.0;
|
||||
emap = true;
|
||||
|
||||
activationMS = 700;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 120;
|
||||
degPerSecTheta = 2000;
|
||||
degPerSecPhi = 2000;
|
||||
attackRadius = 100;
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "0.0 -0.5 -0.5";
|
||||
shellExitOffset = "0.0 0.0 0.0";
|
||||
shellExitVariance = 20.0;
|
||||
shellVelocity = 5.0;
|
||||
|
||||
projectileSpread = 2.0 / 1000.0;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "Dead";
|
||||
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateSequence[1] = "Activate";
|
||||
stateSound[1] = SentinelActivateSound;
|
||||
stateTimeoutValue[1] = 1;
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateSequence[3] = "Fire";
|
||||
stateSequenceRandomFlash[3] = true;
|
||||
stateSound[3] = ChaingunFireSound;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateEmitter[3] = "GunFireEffectEmitter";
|
||||
stateEmitterNode[3] = "muzzlepoint1";
|
||||
stateEmitterTime[3] = 0.1;
|
||||
stateScript[3] = "onFire";
|
||||
stateFire[3] = true;
|
||||
stateEjectShell[3] = true;
|
||||
stateTimeoutValue[3] = 0.1;
|
||||
stateTransitionOnTimeout[3] = "Fire";
|
||||
stateTransitionOnTriggerUp[3] = "Reload";
|
||||
stateTransitionOnNoAmmo[3] = "noAmmo";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTimeoutValue[4] = 0.01;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateWaitForTimeout[4] = true;
|
||||
stateSequence[4] = "Reload";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTransitionOnNotLoaded[4] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
|
||||
stateName[5] = "Deactivate";
|
||||
stateSequence[5] = "Activate";
|
||||
stateSound[5] = SentinelDeactivateSound;
|
||||
stateEmitter[5] = "GunFireEffectEmitter";
|
||||
stateEmitterNode[5] = "muzzlepoint1";
|
||||
stateEmitterTime[5] = 0.2;
|
||||
stateDirection[5] = false;
|
||||
stateTimeoutValue[5] = 1;
|
||||
stateTransitionOnLoaded[5] = "ActivateReady";
|
||||
stateTransitionOnTimeout[5] = "Dead";
|
||||
|
||||
stateName[6] = "Dead";
|
||||
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||
|
||||
stateName[7] = "NoAmmo";
|
||||
stateTransitionOnAmmo[7] = "Reload";
|
||||
stateSequence[7] = "NoAmmo";
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Vehicle Functions
|
||||
//==============================================================================
|
||||
// Sentinel Functions:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
function SentinelVehicle::deleteAllMounted(%data, %obj) {
|
||||
$HostGamePlayerCount = ClientGroup.GetCount();
|
||||
%turret = %obj.getMountNodeObject(10);
|
||||
if (!%turret)
|
||||
return;
|
||||
|
||||
%turret.altTrigger = 0;
|
||||
%turret.fireTrigger = 0;
|
||||
|
||||
if (%client = %turret.getControllingClient()) {
|
||||
%client.player.setControlObject(%client.player);
|
||||
%client.player.mountImage(%client.player.lastWeapon, $WeaponSlot);
|
||||
%client.player.mountVehicle = false;
|
||||
|
||||
%client.player.bomber = false;
|
||||
%client.player.isBomber = false;
|
||||
}
|
||||
%turret.schedule(0, delete);
|
||||
}
|
||||
|
||||
function SentinelVehicle::onAdd(%this, %obj)
|
||||
{
|
||||
Parent::onAdd(%this, %obj);
|
||||
if (%obj.clientControl)
|
||||
serverCmdResetControlObject(%obj.clientControl);
|
||||
|
||||
%obj.mountImage(BodyImage, 1);
|
||||
%obj.mountImage(RightWing, 2);
|
||||
%obj.mountImage(LeftWing, 3);
|
||||
%obj.mountImage(Eye, 4);
|
||||
|
||||
%turret = TurretData::create(SentinelTurret);
|
||||
%turret.scale = "0.45 0.45 0.45";
|
||||
MissionCleanup.add(%turret);
|
||||
%turret.team = 1;
|
||||
%turret.selectedWeapon = 1;
|
||||
%turret.setSelfPowered();
|
||||
%obj.mountObject(%turret, 10);
|
||||
%turret.mountImage(SentinelTurretBarrel, 0);
|
||||
%obj.turretObject = %turret;
|
||||
%turret.setCapacitorRechargeRate( %turret.getDataBlock().capacitorRechargeRate );
|
||||
%turret.vehicleMounted = %obj;
|
||||
%turret.setAutoFire(true);
|
||||
%turret.mountImage(AIAimingTurretBarrel, 1);
|
||||
|
||||
setTargetSensorGroup(%turret.getTarget(), %turret.team);
|
||||
setTargetNeverVisMask(%turret.getTarget(), 0xffffffff);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// Monitor Functions:
|
||||
//==============================================================================
|
||||
|
||||
function SentinelMonitor::onAdd(%this, %obj)
|
||||
{
|
||||
Parent::onAdd(%this, %obj);
|
||||
if (%obj.clientControl)
|
||||
serverCmdResetControlObject(%obj.clientControl);
|
||||
|
||||
%obj.mountImage(Front, 1);
|
||||
%obj.mountImage(Rear, 2);
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,43 +0,0 @@
|
|||
|
||||
datablock TSShapeConstructor(TR2MediumMaleDts)
|
||||
{
|
||||
baseShape = "TR2medium_male.dts";
|
||||
sequence0 = "TR2medium_male_root.dsq root";
|
||||
sequence1 = "TR2medium_male_forward.dsq run";
|
||||
sequence2 = "TR2medium_male_back.dsq back";
|
||||
sequence3 = "TR2medium_male_side.dsq side";
|
||||
sequence4 = "medium_male_lookde.dsq look";
|
||||
sequence5 = "medium_male_head.dsq head";
|
||||
sequence6 = "TR2medium_male_fall.dsq fall";
|
||||
sequence7 = "TR2medium_male_jet.dsq jet";
|
||||
sequence8 = "TR2medium_male_land.dsq land";
|
||||
sequence9 = "TR2medium_male_jump.dsq jump";
|
||||
sequence10 = "medium_male_recoilde.dsq light_recoil";
|
||||
sequence11 = "medium_male_headside.dsq headside";
|
||||
sequence12 = "medium_male_looksn.dsq looksn";
|
||||
sequence13 = "medium_male_lookms.dsq lookms";
|
||||
sequence14 = "TR2medium_male_sitting.dsq sitting";
|
||||
sequence15 = "TR2medium_male_diehead.dsq death1";
|
||||
sequence16 = "TR2medium_male_diechest.dsq death2";
|
||||
sequence17 = "TR2medium_male_dieback.dsq death3";
|
||||
sequence18 = "TR2medium_male_diesidelf.dsq death4";
|
||||
sequence19 = "TR2medium_male_diesidert.dsq death5";
|
||||
sequence20 = "TR2medium_male_dieleglf.dsq death6";
|
||||
sequence21 = "TR2medium_male_diechest.dsq death7"; // medium_male_dielegrt
|
||||
sequence22 = "TR2medium_male_dieback.dsq death8";
|
||||
sequence23 = "TR2medium_male_dieknees.dsq death9";
|
||||
sequence24 = "TR2medium_male_dieforward.dsq death10";
|
||||
sequence25 = "TR2medium_male_diespin.dsq death11";
|
||||
sequence26 = "medium_male_idlepda.dsq pda";
|
||||
sequence27 = "TR2medium_male_celsalute.dsq cel1";
|
||||
sequence28 = "TR2medium_male_celwave.dsq cel2";
|
||||
sequence29 = "TR2medium_male_tauntbest.dsq cel3";
|
||||
sequence30 = "TR2medium_male_tauntimp.dsq cel4";
|
||||
sequence31 = "TR2medium_male_celdance.dsq cel5";
|
||||
sequence32 = "TR2medium_male_celflex.dsq cel6";
|
||||
sequence33 = "TR2medium_male_celtaunt.dsq cel7";
|
||||
sequence34 = "TR2medium_male_celrocky.dsq cel8";
|
||||
sequence35 = "TR2medium_male_ski.dsq ski";
|
||||
sequence36 = "TR2medium_male_standjump.dsq standjump";
|
||||
sequence37 = "medium_male_looknw.dsq looknw";
|
||||
};
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
|
||||
// Tribes 2 Arena [Rev2] 1.0 Final
|
||||
// Written By Teribaen (teribaen@planettribes.com)
|
||||
// http://www.planettribes.com/t2arena/
|
||||
|
||||
$Arena::AI::Version = 1.0;
|
||||
|
||||
|
||||
// ========================================================================== //
|
||||
// | | //
|
||||
// | AI TASKS | //
|
||||
// | | //
|
||||
// ========================================================================== //
|
||||
|
||||
// ------------------------------------------------------------------ //
|
||||
// ArenaGame::onAIRespawn()
|
||||
// Gives the bots their objectives
|
||||
|
||||
function ArenaGame::onAIRespawn( %game, %client )
|
||||
{
|
||||
// Setup AI tasks
|
||||
if ( !%client.defaultTasksAdded )
|
||||
{
|
||||
%client.defaultTasksAdded = true;
|
||||
%client.addTask(AIEngageTask);
|
||||
%client.addTask(AIPickupItemTask);
|
||||
// %client.addTask(AITauntCorpseTask); // Heh, this makes the bots sitting ducks while they taunt
|
||||
%client.addTask(AIUseInventoryTask);
|
||||
// %client.addtask(AIEngageTurretTask);
|
||||
%client.addtask(AIDetectMineTask);
|
||||
%client.addTask(AIPatrolTask);
|
||||
}
|
||||
|
||||
// Use an inv whenever we spawn?
|
||||
%client.spawnUseInv = true;
|
||||
|
||||
// Mark the bot as alive (they just spawned)
|
||||
arenaSetClientAlive( %client );
|
||||
}
|
||||
|
||||
|
||||
// ========================================================================== //
|
||||
// | | //
|
||||
// | AI CALLBACK HANDLERS | //
|
||||
// | | //
|
||||
// ========================================================================== //
|
||||
|
||||
function ArenaGame::AIInit( %game )
|
||||
{
|
||||
// Call the default AIInit() function
|
||||
AIInit();
|
||||
}
|
||||
|
||||
function ArenaGame::onAIDamaged(%game, %clVictim, %clAttacker, %damageType, %implement )
|
||||
{
|
||||
if ( %clAttacker && %clAttacker != %clVictim && %clAttacker.team == %clVictim.team )
|
||||
{
|
||||
// Clear the "lastDamageClient" tag so we don't turn on teammates
|
||||
%clVictim.lastDamageClient = -1;
|
||||
}
|
||||
}
|
||||
|
||||
function ArenaGame::onAIKilledClient(%game, %clVictim, %clAttacker, %damageType, %implement)
|
||||
{
|
||||
if ( %clVictim.team != %clAttacker.team )
|
||||
DefaultGame::onAIKilledClient( %game, %clVictim, %clAttacker, %damageType, %implement );
|
||||
}
|
||||
|
||||
function ArenaGame::onAIFriendlyFire(%game, %clVictim, %clAttacker, %damageType, %implement)
|
||||
{
|
||||
// if ( %clAttacker && %clAttacker.team == %clVictim.team && %clAttacker != %clVictim )
|
||||
// AIMessageThread("ChatSorry", %clAttacker, %clVictim);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// chatMenuHud.cs
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
if ( isFile( "prefs/customVoiceBinds.cs" ) )
|
||||
$defaultVoiceBinds = false;
|
||||
else
|
||||
$defaultVoiceBinds = true;
|
||||
|
||||
// Load in all of the installed chat items:
|
||||
exec( "scripts/cannedChatItems.cs" );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Chat menu loading function:
|
||||
new SimSet( ChatMenuList ); // Store all of the chat menu maps here so that we can delete them later:
|
||||
function activateChatMenu( %filename )
|
||||
{
|
||||
if ( isFile( %filename ) || isFile( %filename @ ".dso" ) )
|
||||
{
|
||||
// Clear the old chat menu:
|
||||
ChatMenuList.clear();
|
||||
|
||||
// Create the root of the new menu:
|
||||
$RootChatMenu = new ActionMap();
|
||||
ChatMenuList.add( $RootChatMenu );
|
||||
$CurrentChatMenu = $RootChatMenu;
|
||||
$CurrentChatMenu.optionCount = 0;
|
||||
$CurrentChatMenu.bindCmd(keyboard, escape, "cancelChatMenu();", "");
|
||||
|
||||
// Build the new chat menu:
|
||||
exec( %filename );
|
||||
}
|
||||
else
|
||||
error( "Chat menu file \"" @ %filename @ "\" not found!" );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Chat menu building functions:
|
||||
function startChatMenu(%heading)
|
||||
{
|
||||
%key = firstWord(%heading);
|
||||
%text = restWords(%heading);
|
||||
%menu = new ActionMap();
|
||||
ChatMenuList.add( %menu );
|
||||
%cm = $CurrentChatMenu;
|
||||
%cm.bindCmd(keyboard, %key, "setChatMenu(\"" @ %text @ "\", " @ %menu @ ");", "");
|
||||
%cm.option[%cm.optionCount] = %key @ ": " @ %text;
|
||||
%cm.command[%cm.optionCount] = %menu; // Save this off here for later...
|
||||
%cm.isMenu[%cm.optionCount] = 1;
|
||||
%cm.optionCount++;
|
||||
%menu.parent = %cm;
|
||||
%menu.bindCmd(keyboard, escape, "cancelChatMenu();", "");
|
||||
%menu.optionCount = 0;
|
||||
$CurrentChatMenu = %menu;
|
||||
}
|
||||
|
||||
function endChatMenu()
|
||||
{
|
||||
$CurrentChatMenu = $CurrentChatMenu.parent;
|
||||
}
|
||||
|
||||
function addChat(%keyDesc, %command)
|
||||
{
|
||||
%key = firstWord(%keyDesc);
|
||||
%text = restWords(%keyDesc);
|
||||
%cm = $CurrentChatMenu;
|
||||
%cm.bindCmd(keyboard, %key, "issueChatCmd(" @ %cm @ "," @ %cm.optionCount @ ");", "");
|
||||
%cm.option[%cm.optionCount] = %key @ ": " @ %text;
|
||||
%cm.command[%cm.optionCount] = %command;
|
||||
%cm.isMenu[%cm.optionCount] = 0;
|
||||
%cm.optionCount++;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Chat menu hud functions:
|
||||
$ChatMenuHudLineCount = 0;
|
||||
function activateChatMenuHud( %make )
|
||||
{
|
||||
if(%make && !TaskHudDlg.isVisible())
|
||||
showChatMenuHud();
|
||||
}
|
||||
|
||||
function showChatMenuHud()
|
||||
{
|
||||
Canvas.pushDialog(ChatMenuHudDlg);
|
||||
ChatMenuHudDlg.setVisible(true);
|
||||
setChatMenu(Root, $RootChatMenu);
|
||||
}
|
||||
|
||||
function cancelChatMenu()
|
||||
{
|
||||
$CurrentChatMenu.pop();
|
||||
$CurrentChatMenu = $RootChatMenu;
|
||||
Canvas.popDialog(ChatMenuHudDlg);
|
||||
ChatMenuHudDlg.setVisible(false);
|
||||
}
|
||||
|
||||
function setChatMenu( %name, %menu )
|
||||
{
|
||||
for ( %i = 0; %i < $ChatMenuHudLineCount; %i++ )
|
||||
chatMenuHud.remove( $ChatMenuHudText[%i] );
|
||||
|
||||
$ChatMenuHudLineCount = %menu.optionCount + 1;
|
||||
chatMenuHud.extent = "170" SPC ( $ChatMenuHudLineCount * 15 ) + 8;
|
||||
|
||||
// First add the menu title line:
|
||||
$ChatMenuHudText[0] = new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiHudVoiceMenuProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 3";
|
||||
extent = "165 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
helpTag = "0";
|
||||
text = "\c2" @ %name @ " Menu:";
|
||||
};
|
||||
chatMenuHud.add( $ChatMenuHudText[0] );
|
||||
|
||||
// Now add all of the menu options:
|
||||
for ( %option = 0; %option < %menu.optionCount; %option++ )
|
||||
{
|
||||
%yOffset = ( %option * 15 ) + 18;
|
||||
|
||||
if ( %menu.isMenu[%option] == 1 )
|
||||
{
|
||||
$ChatMenuHudText[%option + 1] = new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiHudVoiceMenuProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 " @ %yOffset;
|
||||
extent = "165 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
helpTag = "0";
|
||||
text = " " @ %menu.option[%option];
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
$ChatMenuHudText[%option + 1] = new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiHudVoiceCommandProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 " @ %yOffset;
|
||||
extent = "165 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
helpTag = "0";
|
||||
text = " " @ %menu.option[%option];
|
||||
};
|
||||
}
|
||||
|
||||
chatMenuHud.add( $ChatMenuHudText[%option + 1] );
|
||||
}
|
||||
|
||||
//bind "anykey" to closing the chat menu, so if you press an invalid entry, you don't accidently
|
||||
//open the commander map or something...
|
||||
%menu.bindCmd(keyboard, "anykey", "cancelChatMenu();", "");
|
||||
|
||||
// Pop the old menu map and push the new menu's map:
|
||||
$CurrentChatMenu.pop();
|
||||
$CurrentChatMenu = %menu;
|
||||
%menu.push();
|
||||
}
|
||||
|
||||
function issueChatCmd( %menu, %index )
|
||||
{
|
||||
processChatItemCallbacks( %menu.command[%index] );
|
||||
commandToServer( 'CannedChat', %menu.command[%index], false );
|
||||
cancelChatMenu();
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Canned chat handler:
|
||||
function serverCmdCannedChat( %client, %command, %fromAI )
|
||||
{
|
||||
if(%client.isSilenced)
|
||||
return;
|
||||
|
||||
%cmdCode = getWord( %command, 0 );
|
||||
%cmdId = getSubStr( %cmdCode, 1, strlen( %command ) - 1 );
|
||||
%cmdString = getWord( %command, 1 );
|
||||
if ( %cmdString $= "" )
|
||||
%cmdString = getTaggedString( %cmdCode );
|
||||
|
||||
if ( !isObject( $ChatTable[%cmdId] ) )
|
||||
{
|
||||
error( %cmdString @ " is not a recognized canned chat command." );
|
||||
return;
|
||||
}
|
||||
|
||||
%chatItem = $ChatTable[%cmdId];
|
||||
|
||||
//if there is text
|
||||
if (%chatItem.text !$= "" || !%chatItem.play3D)
|
||||
{
|
||||
%message = %chatItem.text @ "~w" @ %chatItem.audioFile;
|
||||
|
||||
if ( %chatItem.teamOnly )
|
||||
cannedChatMessageTeam( %client, %client.team, '\c3%1: %2', %client.name, %message, %chatItem.defaultKeys );
|
||||
else
|
||||
cannedChatMessageAll( %client, '\c4%1: %2', %client.name, %message, %chatItem.defaultKeys );
|
||||
}
|
||||
|
||||
//if no text, see if the audio is to be played in 3D...
|
||||
else if ( %chatItem.play3D && %client.player )
|
||||
playTargetAudio(%client.target, addTaggedString(%chatItem.audioFile), AudioClosest3d, true);
|
||||
|
||||
if ( %chatItem.animation !$= "" )
|
||||
serverCmdPlayAnim(%client, %chatItem.animation);
|
||||
|
||||
// Let the AI respond to the canned chat messages (from humans only)
|
||||
if (!%fromAI)
|
||||
CreateVoiceServerTask(%client, %cmdCode);
|
||||
}
|
||||
|
||||
if ( $defaultVoiceBinds )
|
||||
activateChatMenu( "scripts/voiceBinds.cs" );
|
||||
else
|
||||
activateChatMenu( "prefs/customVoiceBinds.cs" );
|
||||
|
||||
2439
Scripts/client.cs
2439
Scripts/client.cs
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,144 +0,0 @@
|
|||
function LaunchCredits()
|
||||
{
|
||||
Canvas.setContent(CreditsGui);
|
||||
}
|
||||
|
||||
function cancelCredits()
|
||||
{
|
||||
//delete the action map
|
||||
CreditsActionMap.pop();
|
||||
|
||||
//kill the schedules
|
||||
cancel($CreditsScrollSchedule);
|
||||
cancel($CreditsSlideShow);
|
||||
|
||||
//kill the music
|
||||
MusicPlayer.stop();
|
||||
|
||||
//load the launch gui back...
|
||||
Canvas.setContent(LaunchGui);
|
||||
|
||||
//delete the contents of the ML ctrl so as to free up memory...
|
||||
Credits_Text.setText("");
|
||||
}
|
||||
|
||||
function CreditsGui::onWake(%this)
|
||||
{
|
||||
//create an action map to use "esc" to exit the credits screen...
|
||||
if (!isObject(CreditsActionMap))
|
||||
{
|
||||
new ActionMap(CreditsActionMap);
|
||||
CreditsActionMap.bindCmd(keyboard, anykey, "cancelCredits();", "");
|
||||
CreditsActionMap.bindCmd(keyboard, space, "cancelCredits();", "");
|
||||
CreditsActionMap.bindCmd(keyboard, escape, "cancelCredits();", "");
|
||||
CreditsActionMap.bindCmd(mouse, button0, "$CreditsPaused = true;", "$CreditsPaused = false;");
|
||||
CreditsActionMap.bindCmd(mouse, button1, "$CreditsSpeedUp = true;", "$CreditsSpeedUp = false;");
|
||||
if (!isDemo())
|
||||
CreditsActionMap.bindCmd(mouse, button2, "creditsNextPic();", "");
|
||||
}
|
||||
CreditsActionMap.push();
|
||||
|
||||
//build the ML text ctrl...
|
||||
exec("scripts/creditsText.cs");
|
||||
if (!isDemo())
|
||||
{
|
||||
$CreditsPicIndex = 1;
|
||||
CREDITS_Pic.setBitmap("gui/ACCM_" @ $CreditsPicIndex @ ".png");
|
||||
}
|
||||
else
|
||||
CREDITS_Pic.setBitmap("gui/ACCM_1.png");
|
||||
|
||||
//music array
|
||||
if (!isDemo())
|
||||
{
|
||||
$CreditsMusic[0] = "ACCM_Warrior";
|
||||
$CreditsMusic[1] = "ACCM_Warrior";
|
||||
$CreditsMusic[2] = "ACCM_Warrior";
|
||||
$CreditsMusic[3] = "ACCM_Warrior";
|
||||
$CreditsMusic[4] = "ACCM_Warrior";
|
||||
}
|
||||
else
|
||||
{
|
||||
$CreditsMusic[0] = "lush";
|
||||
$CreditsMusic[1] = "desert";
|
||||
$CreditsMusic[2] = "desert";
|
||||
$CreditsMusic[3] = "lush";
|
||||
$CreditsMusic[4] = "desert";
|
||||
}
|
||||
|
||||
//start the credits from the beginning
|
||||
$CreditsOffset = 0.0;
|
||||
%screenHeight = getWord(getResolution(), 1);
|
||||
Credits_Text.resize(getWord(Credits_Text.position, 0),
|
||||
mFloor(%screenHeight / 2) - 125,
|
||||
getWord(Credits_Text.extent, 0),
|
||||
getWord(Credits_Text.extent, 1));
|
||||
|
||||
//start the scrolling
|
||||
$CreditsPaused = false;
|
||||
$CreditsSpeedUp = false;
|
||||
$CreditsScrollSchedule = schedule(3000, 0, scrollTheCredits);
|
||||
|
||||
//start cycling the bitmaps
|
||||
if (!isDemo())
|
||||
$CreditsSlideShow = schedule(5000, 0, creditsNextPic);
|
||||
|
||||
//start some music
|
||||
%chooseTrack = mFloor(getRandom() * 4.99);
|
||||
MusicPlayer.playTrack($CreditsMusic[%chooseTrack]);
|
||||
}
|
||||
|
||||
function addCreditsLine(%text, %lastLine)
|
||||
{
|
||||
CREDITS_Text.addText(%text @ "\n", %lastline);
|
||||
}
|
||||
|
||||
function scrollTheCredits()
|
||||
{
|
||||
//make sure we're not paused
|
||||
if (!$CreditsPaused)
|
||||
{
|
||||
//if we've scrolled off the top, set the position back down to the bottom
|
||||
%parentCtrl = CREDITS_Text.getGroup();
|
||||
if (getWord(Credits_Text.position, 1) + getWord(Credits_Text.extent, 1) < 0)
|
||||
{
|
||||
Credits_Text.position = getWord(Credits_Text.position, 0) SPC getWord(%parentCtrl.extent, 1);
|
||||
$CreditsOffset = getWord(Credits_Text.position, 1);
|
||||
}
|
||||
|
||||
if ($CreditsSpeedUp)
|
||||
%valueToScroll = 10;
|
||||
else
|
||||
%valueToScroll = 1;
|
||||
|
||||
//scroll the control up a bit
|
||||
Credits_Text.resize(getWord(Credits_Text.position, 0),
|
||||
getWord(Credits_Text.position, 1) - %valueToScroll,
|
||||
getWord(Credits_Text.extent, 0),
|
||||
getWord(Credits_Text.extent, 1));
|
||||
}
|
||||
|
||||
//schedule the next scroll...
|
||||
$CreditsScrollSchedule = schedule(30, 0, scrollTheCredits);
|
||||
}
|
||||
|
||||
function creditsNextPic()
|
||||
{
|
||||
//no slide show in the demo...
|
||||
if (isDemo())
|
||||
return;
|
||||
|
||||
cancel($CreditsSlideShow);
|
||||
if (!$CreditsPaused)
|
||||
{
|
||||
$CreditsPicIndex += 1;
|
||||
if ($CreditsPicIndex > 10)
|
||||
$CreditsPicindex = 1;
|
||||
|
||||
//set the bitmap
|
||||
CREDITS_Pic.setBitmap("gui/ACCM_" @ $CreditsPicIndex @ ".png");
|
||||
}
|
||||
|
||||
//schedule the next bitmap
|
||||
$CreditsSlideShow = schedule(5000, 0, creditsNextPic);
|
||||
}
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
// Portions Copyright (c) 2001 by Sierra Online, Inc.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Hard coded images referenced from C++ code
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// editor/SelectHandle.png
|
||||
// editor/DefaultHandle.png
|
||||
// editor/LockedHandle.png
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Functions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Mission Editor
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
function Editor::create()
|
||||
{
|
||||
// Not much to do here, build it and they will come...
|
||||
// Only one thing... the editor is a gui control which
|
||||
// expect the Canvas to exist, so it must be constructed
|
||||
// before the editor.
|
||||
new EditManager(Editor)
|
||||
{
|
||||
profile = "GuiContentProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
helpTag = "0";
|
||||
open = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function Editor::onAdd(%this)
|
||||
{
|
||||
// Basic stuff
|
||||
exec("scripts/cursors.cs");
|
||||
exec("scripts/EditorProfiles.cs");
|
||||
|
||||
// Tools
|
||||
exec("scripts/editor.bind.cs");
|
||||
exec("gui/ObjectBuilderGui.gui");
|
||||
|
||||
// New World Editor
|
||||
exec("gui/EditorGui.gui");
|
||||
exec("scripts/EditorGui.cs");
|
||||
exec("gui/AIEWorkingDlg.gui");
|
||||
|
||||
// World Editor
|
||||
exec("gui/WorldEditorSettingsDlg.gui");
|
||||
|
||||
// Terrain Editor
|
||||
exec("gui/TerrainEditorVSettingsGui.gui");
|
||||
exec("gui/HelpDlg.gui");
|
||||
exec("scripts/help.cs");
|
||||
|
||||
// do gui initialization...
|
||||
EditorGui.init();
|
||||
|
||||
//
|
||||
exec("scripts/editorRender.cs");
|
||||
}
|
||||
|
||||
function Editor::checkActiveLoadDone()
|
||||
{
|
||||
if(isObject(EditorGui) && EditorGui.loadingMission)
|
||||
{
|
||||
Canvas.setContent(EditorGui);
|
||||
EditorGui.loadingMission = false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function toggleEditor(%make)
|
||||
{
|
||||
if (%make)
|
||||
{
|
||||
if (!$missionRunning)
|
||||
{
|
||||
MessageBoxOK("Mission Required", "You must load a mission before starting the Mission Editor.", "");
|
||||
return;
|
||||
}
|
||||
|
||||
// $testcheats = 1;
|
||||
if (!isObject(Editor))
|
||||
{
|
||||
Editor::create();
|
||||
MissionCleanup.add(Editor);
|
||||
}
|
||||
if (Canvas.getContent() == EditorGui.getId())
|
||||
Editor.close();
|
||||
else
|
||||
Editor.open();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,147 +0,0 @@
|
|||
|
||||
function GameBaseData::onAdd(%data, %obj)
|
||||
{
|
||||
if(%data.targetTypeTag !$= "")
|
||||
{
|
||||
// use the name given to the object in the mission file
|
||||
if(%obj.nameTag !$= "")
|
||||
{
|
||||
%obj.nameTag = addTaggedString(%obj.nameTag);
|
||||
%nameTag = %obj.nameTag;
|
||||
}
|
||||
else
|
||||
%nameTag = %data.targetNameTag;
|
||||
|
||||
%obj.target = createTarget(%obj, %nameTag, "", "", %data.targetTypeTag, 0, 0);
|
||||
}
|
||||
else
|
||||
%obj.target = -1;
|
||||
}
|
||||
|
||||
function GameBaseData::onRemove(%data, %obj)
|
||||
{
|
||||
%target = %obj.getTarget();
|
||||
|
||||
// first 32 targets are team targets
|
||||
if(%target >= 32)
|
||||
{
|
||||
if(%obj.nameTag !$= "")
|
||||
removeTaggedString(%obj.nameTag);
|
||||
freeTarget(%target);
|
||||
}
|
||||
}
|
||||
|
||||
function InteriorInstance::damage()
|
||||
{
|
||||
}
|
||||
|
||||
function TerrainBlock::damage()
|
||||
{
|
||||
}
|
||||
|
||||
function WaterBlock::damage() {
|
||||
}
|
||||
|
||||
function ForceFieldBare::damage(%this, %sourceObject, %position, %amount, %damageType) {
|
||||
%this.getDataBlock().damageObject(%this, %sourceObject, %position, %amount, %damageType);
|
||||
}
|
||||
|
||||
function ForceFieldBareData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType) {
|
||||
StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType);
|
||||
}
|
||||
|
||||
function ForceFieldBare::applyDamage(%obj,%amount,%sourceObject,%position,%damageType) {
|
||||
%dataBlockName = %obj.getDataBlock().getName();
|
||||
if (getSubStr(%dataBlockName,0,18) $= "DeployedForceField" || getSubStr(%dataBlockName,0,20) $= "DeployedGravityField") {
|
||||
%count = getWordCount($PowerList);
|
||||
for(%i=0;%i<%count;%i++) {
|
||||
%powerObj = getWord($PowerList,%i);
|
||||
if (genPoweringObj(%powerObj,%obj))
|
||||
%powerList = %powerList SPC %powerObj;
|
||||
}
|
||||
%powerList = trim(%powerList);
|
||||
%genDamage = (%amount * 1) / getWordCount(%powerList);
|
||||
%count = getWordCount(%powerList);
|
||||
for(%i=0;%i<%count;%i++) {
|
||||
%powerObj = getWord(%powerList,%i);
|
||||
%mult = (1 - 0.05) + (getRandom() * 0.10);
|
||||
%powerObj.damage(%sourceObject,%position,%genDamage * %mult,%damageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ForceFieldBare::isEnabled() {
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
||||
function GameBaseData::shouldApplyImpulse(%data, %obj)
|
||||
{
|
||||
return %data.shouldApplyImpulse;
|
||||
}
|
||||
|
||||
|
||||
function ShapeBaseData::onAdd(%data, %obj)
|
||||
{
|
||||
Parent::onAdd(%data, %obj);
|
||||
// if it's a deployed object, schedule the ambient thread to play in a little while
|
||||
if(%data.deployAmbientThread)
|
||||
%obj.schedule(750, "playThread", $AmbientThread, "ambient");
|
||||
// check for ambient animation that should always be played
|
||||
if(%data.alwaysAmbient)
|
||||
%obj.playThread($AmbientThread, "ambient");
|
||||
}
|
||||
|
||||
function SimObject::setOwnerClient(%obj, %cl)
|
||||
{
|
||||
%obj.client = %cl;
|
||||
}
|
||||
|
||||
function SimObject::getOwnerClient(%obj)
|
||||
{
|
||||
if(isObject(%obj))
|
||||
return %obj.client;
|
||||
return 0;
|
||||
}
|
||||
// recursive objective init functions for mission group
|
||||
|
||||
function SimGroup::objectiveInit(%this)
|
||||
{
|
||||
for (%i = 0; %i < %this.getCount(); %i++)
|
||||
%this.getObject(%i).objectiveInit();
|
||||
}
|
||||
|
||||
function SimObject::objectiveInit(%this)
|
||||
{
|
||||
}
|
||||
|
||||
function GameBase::objectiveInit(%this)
|
||||
{
|
||||
//error("Initializing object " @ %this @ ", " @ %this.getDataBlock().getName());
|
||||
%this.getDataBlock().objectiveInit(%this);
|
||||
}
|
||||
|
||||
// tag strings are ignored if they start with an underscore
|
||||
function GameBase::getGameName(%this)
|
||||
{
|
||||
%name = "";
|
||||
|
||||
if(%this.nameTag !$= "")
|
||||
%name = %this.nameTag;
|
||||
else
|
||||
{
|
||||
%name = getTaggedString(%this.getDataBlock().targetNameTag);
|
||||
if((%name !$= "") && (getSubStr(%name, 0, 1) $= "_"))
|
||||
%name = "";
|
||||
}
|
||||
|
||||
%type = getTaggedString(%this.getDataBlock().targetTypeTag);
|
||||
if((%type !$= "") && (getSubStr(%type, 0, 1) !$= "_"))
|
||||
{
|
||||
if(%name !$= "")
|
||||
return(%name @ " " @ %type);
|
||||
else
|
||||
return(%type);
|
||||
}
|
||||
|
||||
return(%name);
|
||||
}
|
||||
|
|
@ -1,373 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// Object control
|
||||
//------------------------------------------------------------------------------
|
||||
function getControlObjectType(%obj,%user)
|
||||
{
|
||||
// turrets (camera is a turret)
|
||||
if (%obj.getType() & $TypeMasks::TurretObjectType)
|
||||
{
|
||||
%barrel = %obj.getMountedImage(0);
|
||||
if (isObject(%barrel))
|
||||
return(addTaggedString(%barrel.getName()));
|
||||
}
|
||||
|
||||
// unknown
|
||||
return('Unknown');
|
||||
}
|
||||
|
||||
function serverCmdControlObject(%client, %targetId)
|
||||
{
|
||||
// match started:
|
||||
if (!$MatchStarted)
|
||||
{
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "mission has not started.");
|
||||
return;
|
||||
}
|
||||
|
||||
// object:
|
||||
%obj = getTargetObject(%targetId);
|
||||
if (%obj == -1)
|
||||
{
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "failed to find target object.");
|
||||
return;
|
||||
}
|
||||
|
||||
// shapebase:
|
||||
if (!(%obj.getType() & $TypeMasks::ShapeBaseObjectType))
|
||||
{
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "object cannot be controlled.");
|
||||
return;
|
||||
}
|
||||
|
||||
// can control:
|
||||
if (!%obj.getDataBlock().canControl)
|
||||
{
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "object cannot be controlled.");
|
||||
return;
|
||||
}
|
||||
|
||||
// check damage:
|
||||
if (%obj.getDamageState() !$= "Enabled")
|
||||
{
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "object is " @ %obj.getDamageState());
|
||||
return;
|
||||
}
|
||||
|
||||
// powered:
|
||||
if (!%obj.isPowered())
|
||||
{
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "object is not powered.");
|
||||
return;
|
||||
}
|
||||
|
||||
// controlled already:
|
||||
%control = %obj.getControllingClient();
|
||||
if (%control)
|
||||
{
|
||||
if (%control == %client)
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "you are already controlling that object.");
|
||||
else
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "someone is already controlling that object.");
|
||||
return;
|
||||
}
|
||||
|
||||
// same team?
|
||||
if (getTargetSensorGroup(%targetId) != %client.getSensorGroup())
|
||||
{
|
||||
commandToClient(%client, 'ControlObjectResonse', false, "cannot control enemy objects.");
|
||||
return;
|
||||
}
|
||||
|
||||
// dead?
|
||||
if (%client.player == 0 && getTargetDataBlock(%targetId).getName() !$= "TurretPrisonCamera") {
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "dead people cannot control objects.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (%client.isJailed) {
|
||||
return;
|
||||
}
|
||||
|
||||
// turret in purebuild mode?
|
||||
if ((%obj.getType() & $TypeMasks::TurretObjectType)
|
||||
&& $Host::Purebuild == 1
|
||||
&& !(%client.isAdmin || %client.isSuperAdmin)
|
||||
&& %obj.getDataBlock().getName() !$= "TurretDeployedCamera"
|
||||
&& %obj.getDataBlock().getName() !$= "TurretPrisonCamera") {
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "cannot control turrets in purebuild mode.");
|
||||
return;
|
||||
}
|
||||
|
||||
//[[CHANGE]]Make sure you can command a bomber... and ride it the same time ;)
|
||||
|
||||
//mounted in a vehicle?
|
||||
//if (%client.player.isMounted())
|
||||
//{
|
||||
// commandToClient(%client, 'ControlObjectResponse', false, "can't control objects while mounted in a vehicle.");
|
||||
// return;
|
||||
//}
|
||||
|
||||
%client.setControlObject(%obj);
|
||||
commandToClient(%client, 'ControlObjectResponse', true, getControlObjectType(%obj,%client.player));
|
||||
%objName = getTaggedString(getTargetName(%obj.target)) SPC getTaggedString(getTargetType(%obj.target));
|
||||
if (%obj $= "")
|
||||
%objName = %obj.getDataBlock().getName();
|
||||
if ($Host::Purebuild == 1)
|
||||
messageAll('msgClient','\c2%1 is now controlling %2.',%client.name,%objName);
|
||||
else
|
||||
messageTeam(%client.team,'msgClient','\c2%1 is now controlling %2.',%client.name,%objName);
|
||||
|
||||
//[[CHANGE]] Make sure the controlled object knows how is controlling it.
|
||||
%obj.clientControl = %client;
|
||||
|
||||
///[[CHANGE]] Includes the remote station functionality.
|
||||
|
||||
if (%obj.getType() & $TypeMasks::StationObjectType)
|
||||
{
|
||||
//Lost of commented stuff... should not be nessesary.
|
||||
%colObj = %client.player;
|
||||
//%colObj.inStation = true;
|
||||
|
||||
//commandToClient(%colObj.client,'setStationKeys', true);
|
||||
messageClient(%colObj.client, 'CloseHud', "", 'inventoryScreen');
|
||||
//commandToClient(%colObj.client, 'TogglePlayHuds', true);
|
||||
%obj.triggeredBy = %colObj;
|
||||
//%obj.getDataBlock().stationTriggered(%obj, 1);
|
||||
%colObj.station = %obj;
|
||||
//%colObj.lastWeapon = ( %colObj.getMountedImage($WeaponSlot) == 0 ) ? "" : %colObj.getMountedImage($WeaponSlot).getName().item;
|
||||
//%colObj.unmountImage($WeaponSlot);
|
||||
// Make sure none of the other popup huds are active:
|
||||
//messageClient( %obj.triggeredBy.client, 'CloseHud', "", 'scoreScreen' );
|
||||
//messageClient( %obj.triggeredBy.client, 'CloseHud', "", 'inventoryScreen' );
|
||||
//Make sure the client doesn't transport.. but does get command.
|
||||
%client.telebuy = 1;
|
||||
|
||||
|
||||
//Stuff from observing
|
||||
%data = %obj.getDataBlock();
|
||||
|
||||
%obsData = %data.observeParameters;
|
||||
%obsX = firstWord(%obsData);
|
||||
%obsY = getWord(%obsData, 1);
|
||||
%obsZ = getWord(%obsData, 2);
|
||||
|
||||
// don't set the camera mode so that it does not interfere with spawning
|
||||
%transform = %obj.getTransform();
|
||||
|
||||
// create a fresh camera to observe through... (could add to a list on
|
||||
// the observed camera to be removed when that object dies/...)
|
||||
|
||||
if ( !isObject( %client.comCam ) )
|
||||
{
|
||||
%client.comCam = new Camera()
|
||||
{
|
||||
dataBlock = CommanderCamera;
|
||||
};
|
||||
MissionCleanup.add(%client.comCam);
|
||||
}
|
||||
|
||||
%client.comCam.setTransform(%transform);
|
||||
%client.comCam.setOrbitMode(%obj, %transform, %obsX, %obsY, %obsZ);
|
||||
|
||||
%client.setControlObject(%client.comCam);
|
||||
commandToClient(%client, 'CameraAttachResponse', true);
|
||||
|
||||
//Display the Vehicle Station GUI
|
||||
//%client.player.AttachBeacon();
|
||||
//%client.player.schedule(20000,"RemoveBeacon");
|
||||
//%client.player.scheduel(1000,RemoveBeacon());
|
||||
|
||||
commandToClient(%obj.triggeredBy.client, 'StationVehicleShowHud');
|
||||
}
|
||||
if (isObject(%client.player)) {
|
||||
%client.player.RemoveBeacon();
|
||||
%client.player.AttachBeacon();
|
||||
}
|
||||
//[[End CHANGE]]
|
||||
}
|
||||
|
||||
//[[CHANGE]] Pretty straigh forward functions.
|
||||
function Player::AttachBeacon(%obj)
|
||||
{
|
||||
%beacon = new BeaconObject(){
|
||||
datablock = BomberBeacon;
|
||||
};
|
||||
if (%obj.team == 1)
|
||||
%team = 2;
|
||||
else
|
||||
%team = 1;
|
||||
%beacon.team = %team;
|
||||
%beacon.owner = %obj;
|
||||
%beacon.setTarget(%team);
|
||||
%obj.mountObject(%beacon, 4);
|
||||
%obj.enemyBeacon = %beacon;
|
||||
MissionCleanup.add(%beacon);
|
||||
%beacon.setBeaconType(enemy);
|
||||
}
|
||||
function Player::RemoveBeacon(%obj)
|
||||
{
|
||||
if (%obj.enemybeacon)
|
||||
%obj.enemyBeacon.delete();
|
||||
%obj.enemyBeacon = "";
|
||||
}
|
||||
//[[End CHANGE]]
|
||||
//------------------------------------------------------------------------------
|
||||
// TV Functions
|
||||
//------------------------------------------------------------------------------
|
||||
function resetControlObject(%client) {
|
||||
if ( isObject( %client.comCam ) )
|
||||
%client.comCam.delete();
|
||||
if (isObject(%client.player) && !%client.player.isDestroyed() && $MatchStarted)
|
||||
%client.setControlObject(%client.player);
|
||||
else
|
||||
%client.setControlObject(%client.camera);
|
||||
|
||||
// [[CHANGE]] make sure all is reset.
|
||||
if (isObject(%client.player)) {
|
||||
%client.player.station.triggeredBy = "";
|
||||
%client.player.station = "";
|
||||
%client.player.RemoveBeacon();
|
||||
}
|
||||
}
|
||||
|
||||
function serverCmdResetControlObject(%client) {
|
||||
resetControlObject(%client);
|
||||
commandToClient(%client, 'ControlObjectReset');
|
||||
// --------------------------------------------------------
|
||||
// z0dd - ZOD 4/18/02. Vehicle reticle disappearance fix.
|
||||
// commandToClient(%client, 'RemoveReticle');
|
||||
//if(isObject(%client.player))
|
||||
//{
|
||||
// %weapon = %client.player.getMountedImage($WeaponSlot);
|
||||
// %client.setWeaponsHudActive(%weapon.item);
|
||||
//}
|
||||
if(isObject(%client.player))
|
||||
{
|
||||
if(%client.player.isPilot() || %client.player.isWeaponOperator())
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
commandToClient(%client, 'RemoveReticle');
|
||||
%weapon = %client.player.getMountedImage($WeaponSlot);
|
||||
%client.setWeaponsHudActive(%weapon.item);
|
||||
}
|
||||
}
|
||||
// End z0dd - ZOD
|
||||
// --------------------------------------------------------
|
||||
|
||||
// [[CHANGE]] make sure all is reset.
|
||||
if (isObject(%client.player)) {
|
||||
%client.player.station.triggeredBy = "";
|
||||
%client.player.station = "";
|
||||
%client.player.RemoveBeacon();
|
||||
}
|
||||
}
|
||||
|
||||
function serverCmdAttachCommanderCamera(%client, %target)
|
||||
{
|
||||
// dont allow observing until match has started
|
||||
if (!$MatchStarted)
|
||||
{
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
%obj = getTargetObject(%target);
|
||||
if ((%obj == -1) || (%target == -1))
|
||||
{
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
// shape base object?
|
||||
if (!(%obj.getType() & $TypeMasks::ShapeBaseObjectType))
|
||||
{
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
// can be observed?
|
||||
if (!%obj.getDataBlock() || !%obj.getDataBlock().canObserve)
|
||||
{
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
// same team?
|
||||
if (getTargetSensorGroup(%target) != %client.getSensorGroup())
|
||||
{
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
// powered?
|
||||
if (!%obj.isPowered())
|
||||
{
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
// client connection?
|
||||
if (%obj.getClassName() $= "GameConnection")
|
||||
{
|
||||
%player = %obj.player;
|
||||
if (%obj == %client)
|
||||
{
|
||||
if (isObject(%player) && !%player.isDestroyed())
|
||||
{
|
||||
|
||||
%client.setControlObject(%player);
|
||||
commandToClient(%client, 'CameraAttachResponse', true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
%obj = %player;
|
||||
}
|
||||
|
||||
if (!isObject(%obj) || %obj.isDestroyed())
|
||||
{
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
%data = %obj.getDataBlock();
|
||||
|
||||
%obsData = %data.observeParameters;
|
||||
%obsX = firstWord(%obsData);
|
||||
%obsY = getWord(%obsData, 1);
|
||||
%obsZ = getWord(%obsData, 2);
|
||||
|
||||
// don't set the camera mode so that it does not interfere with spawning
|
||||
%transform = %obj.getTransform();
|
||||
|
||||
// create a fresh camera to observe through... (could add to a list on
|
||||
// the observed camera to be removed when that object dies/...)
|
||||
if ( !isObject( %client.comCam ) )
|
||||
{
|
||||
%client.comCam = new Camera()
|
||||
{
|
||||
dataBlock = CommanderCamera;
|
||||
};
|
||||
MissionCleanup.add(%client.comCam);
|
||||
}
|
||||
|
||||
%client.comCam.setTransform(%transform);
|
||||
%client.comCam.setOrbitMode(%obj, %transform, %obsX, %obsY, %obsZ);
|
||||
|
||||
%client.setControlObject(%client.comCam);
|
||||
commandToClient(%client, 'CameraAttachResponse', true);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Scoping
|
||||
function serverCmdScopeCommanderMap(%client, %scope)
|
||||
{
|
||||
if (%scope)
|
||||
resetControlObject(%client);
|
||||
%client.scopeCommanderMap(%scope);
|
||||
|
||||
commandToClient(%client, 'ScopeCommanderMap', %scope);
|
||||
}
|
||||
|
|
@ -1,178 +0,0 @@
|
|||
$Host::teamskin[0] = "base";
|
||||
$Host::teamskin[1] = "basebbot";
|
||||
$Host::teamskin[2] = "basebot";
|
||||
$Host::teamskin[3] = "beagle";
|
||||
$Host::teamskin[4] = "dsword";
|
||||
$Host::teamskin[5] = "cotp";
|
||||
$Host::teamskin[6] = "swolf";
|
||||
|
||||
$Host::teamname[0] = "Outcasts";
|
||||
$Host::teamname[1] = "Constructors";
|
||||
$Host::teamname[2] = "Builders";
|
||||
$Host::teamname[3] = "Admins";
|
||||
$Host::teamname[4] = "Rebels";
|
||||
$Host::teamname[5] = "Rouges";
|
||||
$Host::teamname[6] = "Zombies";
|
||||
|
||||
$Host::holoName[0] = "";
|
||||
$Host::holoName[1] = "Storm";
|
||||
$Host::holoName[2] = "Inferno";
|
||||
$Host::holoName[3] = "Starwolf";
|
||||
$Host::holoName[4] = "DSword";
|
||||
$Host::holoName[5] = "BloodEagle";
|
||||
$Host::holoName[6] = "Harbinger";
|
||||
|
||||
// Demo-specific preferences:
|
||||
if ( isDemo() )
|
||||
{
|
||||
$Host::GameName = "Tribes 2 Demo Server";
|
||||
$Host::Info = "This is a Tribes 2 Demo Server.";
|
||||
$Host::Map = "SlapDash";
|
||||
$Host::MaxPlayers = 32;
|
||||
}
|
||||
else
|
||||
{
|
||||
$Host::GameName = "ACCM Server";
|
||||
$Host::Info = "<Color:ffffff>This is an ACCM server.";
|
||||
$Host::Map = "Lost World";
|
||||
$Host::MaxPlayers = 20;
|
||||
}
|
||||
|
||||
$Host::AdminList = "";
|
||||
$Host::SuperAdminList = "";
|
||||
$Host::BindAddress = "";
|
||||
$Host::Port = 28000;
|
||||
$Host::Password = "";
|
||||
$Host::AdminPassword = "";
|
||||
$Host::PureServer = 1;
|
||||
$Host::Dedicated = 0;
|
||||
$Host::MissionType = "Infection";
|
||||
$Host::TimeLimit = 30;
|
||||
$Host::BotCount = 2;
|
||||
$Host::BotsEnabled = 0;
|
||||
$Host::MinBotDifficulty = 0.5;
|
||||
$Host::MaxBotDifficulty = 0.75;
|
||||
$Host::NoSmurfs = 0;
|
||||
$Host::VoteTime = 30; // amount of time before votes are calculated
|
||||
$Host::VotePassPercent = 60; // percent needed to pass a vote
|
||||
$Host::KickBanTime = 60; // specified in seconds
|
||||
$Host::BanTime = 1800; // specified in seconds
|
||||
$Host::PlayerRespawnTimeout = 60; // time before a dead player is forced into observer mode
|
||||
$Host::warmupTime = 20;
|
||||
$Host::TournamentMode = 0;
|
||||
$Host::allowAdminPlayerVotes = 0;
|
||||
$Host::FloodProtectionEnabled = 0;
|
||||
$Host::MaxMessageLen = 120;
|
||||
$Host::VoteSpread = 20;
|
||||
$Host::TeamDamageOn = 0;
|
||||
$Host::Siege::Halftime = 20000;
|
||||
$Host::CRCTextures = 0;
|
||||
|
||||
// Construction-specific defaults.
|
||||
$Host::ACCMChatLogging = 1;
|
||||
$Host::ACCMEchoChat = 1;
|
||||
$Host::AdminOnlyFadeObject = 0;
|
||||
$Host::AllowKeeperPlayerVotes = 1;
|
||||
$Host::AntidoteStationMaxAntidotes = 20;
|
||||
$Host::Cascade = 0;
|
||||
$Host::ExpertMode = 1;
|
||||
$Host::Hazard::Enabled = 0;
|
||||
$Host::InvincibleArmors = 0;
|
||||
$Host::InvincibleDeployables = 1;
|
||||
$Host::KeepersGetMakerAbility = 1;
|
||||
$Host::LockedTeams = "0";
|
||||
$Host::NoAnnoyingVoiceChatSpam = 0;
|
||||
$Host::NoInfection = 0;
|
||||
$Host::NoPulseSCG = 0;
|
||||
$Host::ObserversCannotChat = 1;
|
||||
$Host::OnlyOwnerCascade = 1;
|
||||
$Host::OnlyOwnerCubicReplace = 1;
|
||||
$Host::OnlyOwnerDeconstruct = 1;
|
||||
$Host::OnlyOwnerRotate = 1;
|
||||
$Host::Prison::DeploySpam = 0;
|
||||
$Host::Prison::DeploySpamCheckTimeMS = 1000;
|
||||
$Host::Prison::DeploySpamMaxTime = 300;
|
||||
$Host::Prison::DeploySpamMultiply = 1;
|
||||
$Host::Prison::DeploySpamRemoveRecentMS = 15000;
|
||||
$Host::Prison::DeploySpamResetWarnCountTime = 30;
|
||||
$Host::Prison::DeploySpamTime = 60;
|
||||
$Host::Prison::DeploySpamWarnings = 10;
|
||||
$Host::Prison::Enabled = 0;
|
||||
$Host::Prison::JailMode = 0;
|
||||
$Host::Prison::Kill = 0;
|
||||
$Host::Prison::KillTime = 120;
|
||||
$Host::Prison::ReleaseMode = 1;
|
||||
$Host::Prison::TeamKill = 0;
|
||||
$Host::Purebuild = 0;
|
||||
$Host::SADProtection = 1;
|
||||
$Host::StationHoldTime = 1600; // Specified in seconds.
|
||||
$Host::SuperAdminPassword = "";
|
||||
$Host::Vehicles = 1;
|
||||
|
||||
// 0: .v12 (1.2 kbits/sec), 1: .v24 (2.4 kbits/sec), 2: .v29 (2.9kbits/sec)
|
||||
// 3: GSM (6.6 kbits/sec)
|
||||
$Audio::maxEncodingLevel = 3;
|
||||
$Audio::maxVoiceChannels = 2;
|
||||
|
||||
$Host::MapPlayerLimits["Abominable", "CnH"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["AgentsOfFortune", "TeamHunters"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Alcatraz", "Siege"] = "-1 48";
|
||||
$Host::MapPlayerLimits["Archipelago", "CTF"] = "16 -1";
|
||||
$Host::MapPlayerLimits["AshesToAshes", "CnH"] = "16 -1";
|
||||
$Host::MapPlayerLimits["BeggarsRun", "CTF"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Caldera", "Siege"] = "-1 48";
|
||||
$Host::MapPlayerLimits["CasernCavite", "Hunters"] = "-1 32";
|
||||
$Host::MapPlayerLimits["CasernCavite", "DM"] = "-1 32";
|
||||
$Host::MapPlayerLimits["CasernCavite", "Bounty"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Damnation", "CTF"] = "-1 32";
|
||||
$Host::MapPlayerLimits["DeathBirdsFly", "CTF"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Desiccator", "CTF"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["DustToDust", "CTF"] = "-1 32";
|
||||
$Host::MapPlayerLimits["DustToDust", "Hunters"] = "-1 32";
|
||||
$Host::MapPlayerLimits["DustToDust", "TeamHunters"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Equinox", "CnH"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Equinox", "DM"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Escalade", "Hunters"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Escalade", "TeamHunters"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Escalade", "DM"] = "16 -1";
|
||||
$Host::MapPlayerLimits["Escalade", "Bounty"] = "16 32";
|
||||
$Host::MapPlayerLimits["Escalade", "Rabbit"] = "16 -1";
|
||||
$Host::MapPlayerLimits["Firestorm", "CTF"] = "-1 24";
|
||||
$Host::MapPlayerLimits["Firestorm", "CnH"] = "-1 24";
|
||||
$Host::MapPlayerLimits["Flashpoint", "CnH"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Gauntlet", "Siege"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Gehenna", "Hunters"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Gehenna", "TeamHunters"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Icebound", "Siege"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Insalubria", "CnH"] = "-1 32";
|
||||
$Host::MapPlayerLimits["JacobsLadder", "CnH"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Katabatic", "CTF"] = "-1 48";
|
||||
$Host::MapPlayerLimits["Masada", "Siege"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Minotaur", "CTF"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Myrkwood", "Hunters"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Myrkwood", "DM"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Myrkwood", "Rabbit"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Oasis", "DM"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Overreach", "CnH"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Quagmire", "CTF"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Rasp", "TeamHunters"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Rasp", "Bounty"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Recalescence", "CTF"] = "16 -1";
|
||||
$Host::MapPlayerLimits["Respite", "Siege"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Reversion", "CTF"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Rimehold", "Hunters"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Rimehold", "Hunters"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Riverdance", "CTF"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Sanctuary", "CTF"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Sirocco", "CnH"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Slapdash", "CTF"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["SunDried", "DM"] = "8 -1";
|
||||
$Host::MapPlayerLimits["SunDried", "Bounty"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Talus", "Bounty"] = "-1 32";
|
||||
$Host::MapPlayerLimits["ThinIce", "CTF"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Tombstone", "CTF"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["UltimaThule", "Siege"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Underhill", "DM"] = "-1 -1";
|
||||
$Host::MapPlayerLimits["Underhill", "Bounty"] = "-1 32";
|
||||
$Host::MapPlayerLimits["Whiteout", "DM"] = "8 -1";
|
||||
$Host::MapPlayerLimits["Whiteout", "Bounty"] = "8 -1";
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
$Host::ACCMChatLogging = 1;
|
||||
$Host::ACCMConnectionLogging = 1;
|
||||
$Host::ACCMEchoChat = 1;
|
||||
$Host::AdminOnlyFadeObject = 0;
|
||||
$Host::allowAdminPlayerVotes = "1";
|
||||
$Host::AllowKeeperPlayerVotes = 1;
|
||||
$Host::AllowMapScript = 1;
|
||||
$Host::AllowUnderground = 0;
|
||||
$Host::AntidoteStationMaxAntidotes = 20;
|
||||
$Host::BanTime = 1800;
|
||||
$Host::BotCount = 2;
|
||||
$Host::BotsEnabled = "0";
|
||||
$Host::Cascade = 0;
|
||||
$Host::ClientSaving = 1;
|
||||
$Host::CRCTextures = 0;
|
||||
$Host::Dedicated = 1;
|
||||
$Host::ExpertMode = 1;
|
||||
$Host::FloodProtectionEnabled = 1;
|
||||
$Host::GameName = "Tribes 2 Server";
|
||||
$Host::Hazard::Enabled = 0;
|
||||
$Host::HiVisibility = "0";
|
||||
$Host::holoName1 = "Storm";
|
||||
$Host::holoName2 = "Inferno";
|
||||
$Host::holoName3 = "Starwolf";
|
||||
$Host::holoName4 = "DSword";
|
||||
$Host::holoName5 = "BloodEagle";
|
||||
$Host::holoName6 = "Harbinger";
|
||||
$Host::Info = "This is a Tribes 2 Server.";
|
||||
$Host::InvincibleArmors = 0;
|
||||
$Host::InvincibleDeployables = 1;
|
||||
$Host::KeepersGetMakerAbility = 1;
|
||||
$Host::KickBanTime = 300;
|
||||
$Host::LockedTeams = "0";
|
||||
$Host::Map = "ACCMFlatland";
|
||||
$Host::MapPlayerLimitsAbominable_CnH = "-1 -1";
|
||||
$Host::MapPlayerLimitsAgentsOfFortune_TeamHunters = "-1 32";
|
||||
$Host::MapPlayerLimitsAlcatraz_Siege = "-1 48";
|
||||
$Host::MapPlayerLimitsArchipelago_CTF = "16 -1";
|
||||
$Host::MapPlayerLimitsAshesToAshes_CnH = "16 -1";
|
||||
$Host::MapPlayerLimitsBeggarsRun_CTF = "-1 32";
|
||||
$Host::MapPlayerLimitsCaldera_Siege = "-1 48";
|
||||
$Host::MapPlayerLimitsCasernCavite_Bounty = "-1 32";
|
||||
$Host::MapPlayerLimitsCasernCavite_DM = "-1 32";
|
||||
$Host::MapPlayerLimitsCasernCavite_Hunters = "-1 32";
|
||||
$Host::MapPlayerLimitsDamnation_CTF = "-1 32";
|
||||
$Host::MapPlayerLimitsDeathBirdsFly_CTF = "8 -1";
|
||||
$Host::MapPlayerLimitsDesiccator_CTF = "-1 -1";
|
||||
$Host::MapPlayerLimitsDustToDust_CTF = "-1 32";
|
||||
$Host::MapPlayerLimitsDustToDust_Hunters = "-1 32";
|
||||
$Host::MapPlayerLimitsDustToDust_TeamHunters = "-1 32";
|
||||
$Host::MapPlayerLimitsEquinox_CnH = "-1 -1";
|
||||
$Host::MapPlayerLimitsEquinox_DM = "-1 32";
|
||||
$Host::MapPlayerLimitsEscalade_Bounty = "16 32";
|
||||
$Host::MapPlayerLimitsEscalade_DM = "16 -1";
|
||||
$Host::MapPlayerLimitsEscalade_Hunters = "8 -1";
|
||||
$Host::MapPlayerLimitsEscalade_Rabbit = "16 -1";
|
||||
$Host::MapPlayerLimitsEscalade_TeamHunters = "8 -1";
|
||||
$Host::MapPlayerLimitsFirestorm_CnH = "-1 24";
|
||||
$Host::MapPlayerLimitsFirestorm_CTF = "-1 24";
|
||||
$Host::MapPlayerLimitsFlashpoint_CnH = "-1 -1";
|
||||
$Host::MapPlayerLimitsGauntlet_Siege = "-1 32";
|
||||
$Host::MapPlayerLimitsGehenna_Hunters = "-1 -1";
|
||||
$Host::MapPlayerLimitsGehenna_TeamHunters = "-1 -1";
|
||||
$Host::MapPlayerLimitsIcebound_Siege = "-1 -1";
|
||||
$Host::MapPlayerLimitsInsalubria_CnH = "-1 32";
|
||||
$Host::MapPlayerLimitsJacobsLadder_CnH = "-1 -1";
|
||||
$Host::MapPlayerLimitsKatabatic_CTF = "-1 48";
|
||||
$Host::MapPlayerLimitsMasada_Siege = "-1 32";
|
||||
$Host::MapPlayerLimitsMinotaur_CTF = "-1 32";
|
||||
$Host::MapPlayerLimitsMyrkwood_DM = "-1 32";
|
||||
$Host::MapPlayerLimitsMyrkwood_Hunters = "-1 32";
|
||||
$Host::MapPlayerLimitsMyrkwood_Rabbit = "-1 32";
|
||||
$Host::MapPlayerLimitsOasis_DM = "-1 32";
|
||||
$Host::MapPlayerLimitsOverreach_CnH = "8 -1";
|
||||
$Host::MapPlayerLimitsQuagmire_CTF = "-1 -1";
|
||||
$Host::MapPlayerLimitsRasp_Bounty = "-1 32";
|
||||
$Host::MapPlayerLimitsRasp_TeamHunters = "-1 32";
|
||||
$Host::MapPlayerLimitsRecalescence_CTF = "16 -1";
|
||||
$Host::MapPlayerLimitsRespite_Siege = "-1 32";
|
||||
$Host::MapPlayerLimitsReversion_CTF = "-1 -1";
|
||||
$Host::MapPlayerLimitsRimehold_Hunters = "8 -1";
|
||||
$Host::MapPlayerLimitsRiverdance_CTF = "-1 -1";
|
||||
$Host::MapPlayerLimitsSanctuary_CTF = "-1 -1";
|
||||
$Host::MapPlayerLimitsSirocco_CnH = "8 -1";
|
||||
$Host::MapPlayerLimitsSlapdash_CTF = "-1 -1";
|
||||
$Host::MapPlayerLimitsSunDried_Bounty = "8 -1";
|
||||
$Host::MapPlayerLimitsSunDried_DM = "8 -1";
|
||||
$Host::MapPlayerLimitsTalus_Bounty = "-1 32";
|
||||
$Host::MapPlayerLimitsThinIce_CTF = "-1 -1";
|
||||
$Host::MapPlayerLimitsTombstone_CTF = "-1 -1";
|
||||
$Host::MapPlayerLimitsUltimaThule_Siege = "8 -1";
|
||||
$Host::MapPlayerLimitsUnderhill_Bounty = "-1 32";
|
||||
$Host::MapPlayerLimitsUnderhill_DM = "-1 -1";
|
||||
$Host::MapPlayerLimitsWhiteout_Bounty = "8 -1";
|
||||
$Host::MapPlayerLimitsWhiteout_DM = "8 -1";
|
||||
$Host::MarkDnDObjectives = 1;
|
||||
$Host::MaxBotDifficulty = "0.75";
|
||||
$Host::MaxClientSaves = 10;
|
||||
$Host::MaxMessageLen = 120;
|
||||
$Host::MaxPieceVote = 400;
|
||||
$Host::MaxPlayers = "64";
|
||||
$Host::MaxZombies = 35;
|
||||
$Host::MinBotDifficulty = "0.5";
|
||||
$Host::MissionType = "Infection";
|
||||
$Host::NoAnnoyingVoiceChatSpam = 0;
|
||||
$Host::NoDeployEffects = 1;
|
||||
$Host::NoInfection = 0;
|
||||
$Host::NoPulseSCG = 0;
|
||||
$Host::NoSmurfs = 1;
|
||||
$Host::ObserversCannotChat = 1;
|
||||
$Host::OnlyOwnerCascade = 1;
|
||||
$Host::OnlyOwnerCubicReplace = 1;
|
||||
$Host::OnlyOwnerDeconstruct = 1;
|
||||
$Host::OnlyOwnerRotate = 1;
|
||||
$Host::PlayerRespawnTimeout = "60";
|
||||
$Host::Port = "28000";
|
||||
$Host::Prison::DeploySpam = 0;
|
||||
$Host::Prison::DeploySpamCheckTimeMS = 1000;
|
||||
$Host::Prison::DeploySpamMaxTime = 300;
|
||||
$Host::Prison::DeploySpamMultiply = 1;
|
||||
$Host::Prison::DeploySpamRemoveRecentMS = 15000;
|
||||
$Host::Prison::DeploySpamResetWarnCountTime = 30;
|
||||
$Host::Prison::DeploySpamTime = 60;
|
||||
$Host::Prison::DeploySpamWarnings = 10;
|
||||
$Host::Prison::Enabled = 0;
|
||||
$Host::Prison::JailMode = 0;
|
||||
$Host::Prison::Kill = 0;
|
||||
$Host::Prison::KillTime = 120;
|
||||
$Host::Prison::ReleaseMode = 1;
|
||||
$Host::Prison::TeamKill = 0;
|
||||
$Host::Purebuild = 1;
|
||||
$Host::PureServer = 1;
|
||||
$Host::RepairPatchOnDeath = 0;
|
||||
$Host::SADProtection = 1;
|
||||
$Host::SatchelChargeEnabled = 0;
|
||||
$Host::SentinelProtection = 0;
|
||||
$Host::Siege::Halftime = 20000;
|
||||
$host::slowmodist = 100;
|
||||
$Host::StationHoldTime = 1600;
|
||||
$Host::SuperAdminList = "2000181";
|
||||
$Host::SuperAdminPassword = "gay";
|
||||
$Host::TeamDamageOn = "1";
|
||||
$Host::TeamName0 = "Unassigned";
|
||||
$Host::TeamName1 = "Storm";
|
||||
$Host::TeamName2 = "Inferno";
|
||||
$Host::TeamName3 = "Starwolf";
|
||||
$Host::TeamName4 = "Diamond Sword";
|
||||
$Host::TeamName5 = "Blood Eagle";
|
||||
$Host::TeamName6 = "Phoenix";
|
||||
$Host::TeamSkin0 = "blank";
|
||||
$Host::TeamSkin1 = "base";
|
||||
$Host::TeamSkin2 = "baseb";
|
||||
$Host::TeamSkin3 = "swolf";
|
||||
$Host::TeamSkin4 = "dsword";
|
||||
$Host::TeamSkin5 = "beagle";
|
||||
$Host::TeamSkin6 = "cotp";
|
||||
$Host::TimeLimit = "10080";
|
||||
$Host::TN::beat = 3;
|
||||
$Host::TN::echo = 1;
|
||||
$Host::TournamentMode = "0";
|
||||
$Host::Vehicles = 1;
|
||||
$Host::VotePassPercent = "60";
|
||||
$Host::VoteSpread = 20;
|
||||
$Host::VoteTime = "30";
|
||||
$Host::warmupTime = "20";
|
||||
|
|
@ -1076,7 +1076,7 @@ function CombatConGame::vehicleDestroyed(%game, %vehicle, %destroyer){
|
|||
%pref = (%vehicleType $= "Assault Tank") ? "an" : "a";
|
||||
messageAll( 'msgVehicleTeamDestroy', '\c0%1 TEAMKILLED %3 %2!', %destroyerName, %vehicleType, %pref);
|
||||
}
|
||||
else{
|
||||
else if (%destroyerName !$= "") {
|
||||
messageTeamExcept(%destroyer, 'msgVehicleDestroy', '\c0%1 destroyed an enemy %2.', %destroyerName, %vehicleType);
|
||||
messageTeam(%enemyTeam, 'msgVehicleDestroy', '\c0%1 destroyed your team\'s %2.', %destroyerName, %vehicleType);
|
||||
|
||||
|
|
@ -363,17 +363,20 @@ function SimObject::AIMissionInit(%this)
|
|||
|
||||
function ItemData::AIMissionInit(%data, %object)
|
||||
{
|
||||
$AIItemSet.add(%object);
|
||||
if (isObject($AIItemSet))
|
||||
$AIItemSet.add(%object);
|
||||
}
|
||||
|
||||
function AIThrowObject(%object)
|
||||
{
|
||||
$AIItemSet.add(%object);
|
||||
if (isObject($AIItemSet))
|
||||
$AIItemSet.add(%object);
|
||||
}
|
||||
|
||||
function AIGrenadeThrown(%object)
|
||||
{
|
||||
$AIGrenadeSet.add(%object);
|
||||
if (isObject($AIItemSet))
|
||||
$AIGrenadeSet.add(%object);
|
||||
}
|
||||
|
||||
function AIDeployObject(%client, %object)
|
||||
|
|
@ -905,4 +908,4 @@ function AIProcessVehicle(%client)
|
|||
function AIPilotVehicle(%client)
|
||||
{
|
||||
//this is not very well supported, but someone will find a use for this function...
|
||||
}
|
||||
}
|
||||
15
scripts/data/messagedata.cs
Normal file
15
scripts/data/messagedata.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
//==============================================================================
|
||||
// ACCM Message Database - By Blnukem.
|
||||
//==============================================================================
|
||||
|
||||
$ACCMTipCount = 10;
|
||||
$ACCMTip[0] = "Random Tip:<font:Broadway Bt:14>\nRemember, type /help for a list of useful commands.";
|
||||
$ACCMTip[1] = "Sentinel Network:<font:Broadway Bt:14>\nSentinels are your allies and will not attack you, unless you provoke them to do so.";
|
||||
$ACCMTip[2] = "Central Command Intel Report:<font:Broadway Bt:14>\nYou can launch drop pods from Golem heavy transports by pressing your mine key while you're piloting.";
|
||||
$ACCMTip[3] = "Random Tip:<font:Broadway Bt:14>\nThe easiest way to kill a Zombie or anyone for that matter, is to aim for the head.";
|
||||
$ACCMTip[4] = "Central Command Intel Report:<font:Broadway Bt:14>\nThe medic pack has an antidote option for infected players, useable by pressing the right mouse button.";
|
||||
$ACCMTip[5] = "Central Command Intel Report:<font:Broadway Bt:14>\nThe Flame turret barrel is the most effective turret barrel to kill Zombies, followed by the Chaingun turret barrel. The least effective is the Flak barrel.";
|
||||
$ACCMTip[6] = "Sentinel Network:<font:Broadway Bt:14>\nSentinels are intended for Zombie containment and control, and will not attack humans unless provoked to do so.";
|
||||
$ACCMTip[7] = "Central Command Intel Report:<font:Broadway Bt:14>\nThe Purge Field Generator is made to defend an area against Zombies, it's particle field will electrocute any Zombies within the field, but requires heavy maintenece.";
|
||||
$ACCMTip[8] = "Random Tip:<font:Broadway Bt:14>\nUse /CheckStats to check out your current rank and how many points you need for your next rank.";
|
||||
$ACCMTip[9] = "Random Tip:<font:Broadway Bt:14>\nThe Vehicle Repair Pad, Deployable Sentry Turret and the Purge Field Generator require power to operate, be sure to give them a power source when using them!";
|
||||
|
|
@ -406,80 +406,6 @@ function chatMessageAll( %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7,
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// Interactive Sentinel AI. By Blnukem.
|
||||
//==============================================================================
|
||||
// Sentinel Interaction:
|
||||
|
||||
if ($Host::SentinelProtection $= 1 && MonitorGroup.GetCount() == 1 && strstr(%a2, "Follow me") != -1 || strstr(%a2, "follow me") != -1
|
||||
|| strstr(%a2, "Come") != -1 || strstr(%a2, "come") != -1)
|
||||
{
|
||||
Call("ccFollow", %sender);
|
||||
}
|
||||
|
||||
if ($Host::SentinelProtection $= 1 && MonitorGroup.GetCount() == 1 && strstr(%a2, "Stop") != -1 || strstr(%a2, "stop") != -1
|
||||
|| strstr(%a2, "Don't follow") != -1 || strstr(%a2, "Dont follow") != -1 || strstr(%a2, "don't follow") != -1 || strstr(%a2, "dont follow") != -1)
|
||||
{
|
||||
Call("ccStop", %sender);
|
||||
}
|
||||
|
||||
if ($Host::SentinelProtection == 1 && MonitorGroup.GetCount() == 1 && strstr(%a2, "Kill") == 0)
|
||||
{
|
||||
%rest = getsubstr(%a2, 1, 255);
|
||||
%target = plnametocid(getword(%rest, 0));
|
||||
%message = getsubstr(%rest, strlen(getword(%rest, 0)) + 1, 255);
|
||||
ccAttack(%sender, %message);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Monitor Interaction:
|
||||
|
||||
%sentinelcount = SentinelGroup.GetCount();
|
||||
%zombiecount = ZombieGroup.GetCount();
|
||||
if ($Host::SentinelProtection !$= 1 || MonitorGroup.GetCount() != 1)
|
||||
{
|
||||
}
|
||||
|
||||
if ($Host::SentinelProtection $= 1 && MonitorGroup.GetCount() $= 1 && strstr(%a2, "spawn a sentinel") != -1 || strstr(%a2, "Spawn a sentinel") != -1
|
||||
|| strstr(%a2, "Spawn a Sentinel") != -1 || strstr(%a2, "spawn another sentinel") != -1 || strstr(%a2, "Spawn another sentinel") != -1 || strstr(%a2, "Spawn another Sentinel") != -1)
|
||||
{
|
||||
Call("ccCreateSentinel", %sender);
|
||||
}
|
||||
|
||||
if ($Host::SentinelProtection $= 1 && MonitorGroup.GetCount() == 1 && strstr(%a2, "How many sentinels") != -1 || strstr(%a2, "how many sentinels") != -1 ||
|
||||
strstr(%a2, "Display sentinel count") != -1 || strstr(%a2, "display sentinel count") != -1)
|
||||
{
|
||||
if (SentinelGroup.GetCount() == 0)
|
||||
{
|
||||
Schedule(1, 0, MessageAll, "Msg", "\c2Monitor ::\c0 There are no Sentinel units currently deployed.");
|
||||
} else if (SentinelGroup.GetCount() == 1)
|
||||
{
|
||||
Schedule(1, 0, MessageAll, "Msg", "\c2Monitor ::\c0 There is 1 Sentinel unit currently deployed.");
|
||||
} else if (SentinelGroup.GetCount() >= 1)
|
||||
{
|
||||
Schedule(1, 0, MessageAll, "Msg", "\c2Monitor ::\c0 There are "@%sentinelcount@" Sentinel units currently deployed.");
|
||||
}
|
||||
} else if ($Host::SentinelProtection $= 1 && MonitorGroup.GetCount() == 1 && strstr(%a2, "How many zombies") != -1 || strstr(%a2, "how many zombies") != -1 ||
|
||||
strstr(%a2, "Display zombie count") != -1 || strstr(%a2, "display zombie count") != -1)
|
||||
{
|
||||
if (ZombieGroup.GetCount() == 0)
|
||||
{
|
||||
Schedule(1, 0, MessageAll, "Msg", "\c2Monitor ::\c0 No zombies have been detected by the Sentinel Network.");
|
||||
} else if (ZombieGroup.GetCount() == 1)
|
||||
{
|
||||
Schedule(1, 0, MessageAll, "Msg", "\c2Monitor ::\c0 There is 1 zombie currently detected by the Sentinel Network.");
|
||||
} else if (ZombieGroup.GetCount() >= 1)
|
||||
{
|
||||
Schedule(1, 0, MessageAll, "Msg", "\c2Monitor ::\c0 There are "@%zombiecount@" zombies detected by the Sentinel Network.");
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// End of Interactive Sentinel AI.
|
||||
//==============================================================================
|
||||
|
||||
|
||||
if ( ( %msgString $= "" ) || spamAlert( %sender ) )
|
||||
return;
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -687,14 +687,17 @@ function ccLoadBuilding(%sender, %args)
|
|||
}
|
||||
|
||||
// Blnukem
|
||||
function ccTurrets(%sender) {
|
||||
function ccTurrets(%sender)
|
||||
{
|
||||
if (!%sender.isAdmin)
|
||||
return;
|
||||
if ($TurretEnableOverride) {
|
||||
if ($TurretEnableOverride)
|
||||
{
|
||||
$TurretEnableOverride = 0;
|
||||
messageAll('MsgAdminForce', "\c3"@%sender.nameBase@"\c2 has disabled turrets.");
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
$TurretEnableOverride = 1;
|
||||
messageAll('MsgAdminForce', "\c3"@%sender.nameBase@"\c2 has enabled turrets.");
|
||||
}
|
||||
|
|
@ -702,7 +705,8 @@ if (!%sender.isAdmin)
|
|||
}
|
||||
|
||||
// Blnukem
|
||||
function ccBuySCG(%sender) {
|
||||
function ccBuySCG(%sender)
|
||||
{
|
||||
if (!%sender.isAdmin)
|
||||
return;
|
||||
|
||||
|
|
@ -744,6 +748,7 @@ function ccChangeName(%sender, %args)
|
|||
return;
|
||||
}
|
||||
|
||||
%name = collapseEscape(%name);
|
||||
ChangeName(%target, %name);
|
||||
messageClient(%target, "", "\c2Your new name is \c3"@%name@"\c2.");
|
||||
warn(%sender.nameBase@" ("@%sender@") changed "@%target.nameBase@"'s ("@%target@") name to "@%name);
|
||||
|
|
@ -444,6 +444,7 @@ function ccBf(%sender,%args)
|
|||
if (!isObject(%sender.player))
|
||||
{ // No player object? Bitch, you can't use this command.
|
||||
MessageClient(%sender, "Msg", "\c2You you have a player object in order to buy your inventory. ~wfx/misc/misc.error.wav");
|
||||
return;
|
||||
}
|
||||
|
||||
if (%sender.BasicTimer > 0)
|
||||
|
|
@ -512,6 +513,7 @@ function ccName(%sender,%args, %special)
|
|||
}
|
||||
messageclient(%sender, 'MsgClient', "\c2Object name set to \c3"@%args@"");
|
||||
%obj.nametag = %args;
|
||||
%obj.name = %args;
|
||||
setTargetName(%obj.target,addTaggedString("\c6"@%args@""));
|
||||
return;
|
||||
}
|
||||
|
|
@ -261,7 +261,7 @@ function ccKillZombies(%sender)
|
|||
logEcho(%sender.nameBase@" ("@%sender@") killed all zombies and cured all infected people");
|
||||
%zgroup = nameToID("MissionCleanup/ZombieGroup");
|
||||
%zcount = %zgroup.getCount();
|
||||
for (%i = 0; %i < %zcount; %i++)
|
||||
for (%i = %zcount; %i > 0; %i--)
|
||||
{
|
||||
%zombie = %zgroup.getObject(%i);
|
||||
if (isObject(%zombie))
|
||||
58
scripts/modscripts/player.cs
Normal file
58
scripts/modscripts/player.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
// -------------------------------------------
|
||||
// player.cs
|
||||
// ACCM Player-bound commands
|
||||
// ===========================================
|
||||
|
||||
function Player::setSkin(%self, %skin)
|
||||
{
|
||||
freeTarget(%self.getTarget());
|
||||
|
||||
%self.skin = %skin;
|
||||
// Zombitch
|
||||
if (!isObject(%self.client))
|
||||
{
|
||||
%self.target = createTarget(%self, %self.name, %skin, "Derm3", '', 6, PlayerSensor);
|
||||
setTargetSensorGroup(%self.target, 6);
|
||||
}
|
||||
else
|
||||
{
|
||||
%self.target = createTarget(%self, %self.client.name, %skin, %self.client.voice, '', 0, PlayerSensor);
|
||||
setTargetSensorGroup(%self.target, %self.client.team);
|
||||
setTargetName(%obj.target, %self.client.name);
|
||||
%self.client.skin = addTaggedString(%skin);
|
||||
%self.client.target = %self.target;
|
||||
}
|
||||
setTargetSkin(%self.target, addTaggedString(%skin));
|
||||
setTargetDataBlock(%self.target, %self.getDatablock());
|
||||
setTargetSensorData(%self.target, PlayerSensor);
|
||||
%self.setTarget(%self.target);
|
||||
return true;
|
||||
}
|
||||
|
||||
function Player::setName(%self, %name)
|
||||
{
|
||||
|
||||
%self.name = %name;
|
||||
if (!isObject(%self.client))
|
||||
{
|
||||
freeTarget(%self.getTarget());
|
||||
%self.target = createTarget(%self, %self.name, %skin, "Derm3", '', 6, PlayerSensor);
|
||||
setTargetSensorGroup(%self.target, 6);
|
||||
}
|
||||
else
|
||||
{
|
||||
%ptarget = %self.target;
|
||||
%skin = getTaggedString(getTargetSkin(%self.getTarget()));
|
||||
%self.target = createTarget(%self, %name, %skin, %self.client.voice, '', 0, PlayerSensor);
|
||||
freeTarget(%ptarget);
|
||||
setTargetSensorGroup(%self.target, %self.client.team);
|
||||
setTargetName(%self.target, %name);
|
||||
%self.client.target = %self.target;
|
||||
}
|
||||
setTargetSkin(%self.target, addTaggedString(%self.skin));
|
||||
setTargetDataBlock(%self.target, %self.getDatablock());
|
||||
setTargetSensorData(%self.target, PlayerSensor);
|
||||
%self.setTarget(%self.target);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -129,3 +129,6 @@ exec("scripts/packs/artillerybarrelpack.cs");
|
|||
exec("scripts/packs/generator.cs");
|
||||
exec("scripts/packs/solarpanel.cs");
|
||||
exec("scripts/packs/switch.cs");
|
||||
|
||||
// --- Misc
|
||||
exec("scripts/packs/waypointpack.cs");
|
||||
277
scripts/packs/ZSpawnpack.cs
Normal file
277
scripts/packs/ZSpawnpack.cs
Normal file
|
|
@ -0,0 +1,277 @@
|
|||
//---------------------------------------------------------
|
||||
// Zombie Spawn Point
|
||||
//---------------------------------------------------------
|
||||
|
||||
$zombie::detectDist = 500;
|
||||
$zombie::lungDist = 10;
|
||||
$zombie::LKillDist = 5;
|
||||
$zombie::Rupvec = 750;
|
||||
$zombie::killpoints = 2;
|
||||
|
||||
datablock AudioProfile(ZombieMoan)
|
||||
{
|
||||
filename = "fx/environment/growl3.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ZombieHOWL)
|
||||
{
|
||||
filename = "fx/environment/Yeti_Howl1.wav";
|
||||
description = AudioBomb3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock StaticShapeData(DeployedZSpawnBase) : StaticShapeDamageProfile {
|
||||
className = "lightbase";
|
||||
shapeFile = "pack_deploy_sensor_motion.dts";
|
||||
|
||||
maxDamage = 2.5;
|
||||
destroyedLevel = 2.5;
|
||||
disabledLevel = 2.0;
|
||||
|
||||
maxEnergy = 50;
|
||||
rechargeRate = 0.25;
|
||||
|
||||
explosion = HandGrenadeExplosion;
|
||||
expDmgRadius = 1.0;
|
||||
expDamage = 0.05;
|
||||
expImpulse = 200;
|
||||
|
||||
dynamicType = $TypeMasks::StaticShapeObjectType;
|
||||
deployedObject = true;
|
||||
cmdCategory = "DSupport";
|
||||
cmdIcon = CMDSensorIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_deploymotionsensor";
|
||||
targetNameTag = 'Deployed Zombie Spawner';
|
||||
deployAmbientThread = true;
|
||||
debrisShapeName = "debris_generic_small.dts";
|
||||
debris = DeployableDebris;
|
||||
heatSignature = 0;
|
||||
needsPower = true;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ZSpawnDeployableImage) {
|
||||
mass = 20;
|
||||
emap = true;
|
||||
shapeFile = "stackable1s.dts";
|
||||
item = ZSpawnDeployable;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
deployed = DeployedZSpawnBase;
|
||||
heatSignature = 0;
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Idle";
|
||||
|
||||
isLarge = false;
|
||||
maxDepSlope = 360;
|
||||
deploySound = ItemPickupSound;
|
||||
|
||||
minDeployDis = 0.5;
|
||||
maxDeployDis = 50.0;
|
||||
};
|
||||
|
||||
datablock ItemData(ZSpawnDeployable) {
|
||||
className = Pack;
|
||||
catagory = "Deployables";
|
||||
shapeFile = "stackable1s.dts";
|
||||
mass = 5.0;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 1;
|
||||
rotate = true;
|
||||
image = "ZSpawnDeployableImage";
|
||||
pickUpName = "a Zombie Spawn pack";
|
||||
heatSignature = 0;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ZHead)
|
||||
{
|
||||
shapeFile = "bioderm_heavy.dts";
|
||||
emap = false;
|
||||
mountPoint = 1;
|
||||
offset = "0 0.25 -1.5";
|
||||
rotation = "1 0 0 15";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ZBack)
|
||||
{
|
||||
shapeFile = "bioderm_medium.dts";
|
||||
emap = false;
|
||||
mountPoint = 1;
|
||||
offset = "0 0.25 -1.25";
|
||||
rotation = "-1 0 0 10";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ZDummyslotImg)
|
||||
{
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
emap = false;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ZDummyslotImg2)
|
||||
{
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
emap = false;
|
||||
offset = "-1.5 0 0";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ZWingImage)
|
||||
{
|
||||
shapeFile = "flag.dts";
|
||||
mountPoint = 1;
|
||||
|
||||
offset = "0 0 0"; // L/R - F/B - T/B
|
||||
rotation = "0 1 0 90"; // L/R - F/B - T/B
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ZWingImage2)
|
||||
{
|
||||
shapeFile = "flag.dts";
|
||||
mountPoint = 1;
|
||||
|
||||
offset = "0 0 0"; // L/R - F/B - T/B
|
||||
rotation = "0 -1 0 90"; // L/R - F/B - T/B
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ZWingAltImage)
|
||||
{
|
||||
shapeFile = "flag.dts";
|
||||
mountPoint = 1;
|
||||
|
||||
offset = "0 0 0"; // L/R - F/B - T/B
|
||||
rotation = "-0.5 2 0 35"; // L/R - F/B - T/B
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ZWingAltImage2)
|
||||
{
|
||||
shapeFile = "flag.dts";
|
||||
mountPoint = 1;
|
||||
|
||||
offset = "0 0 0"; // L/R - F/B - T/B
|
||||
rotation = "-0.5 -2 0 35"; // L/R - F/B - T/B
|
||||
};
|
||||
|
||||
function ZSpawnDeployableImage::testObjectTooClose(%item) {
|
||||
return "";
|
||||
}
|
||||
function ZSpawnDeployableImage::testNoTerrainFound(%item) {}
|
||||
function ZSpawnDeployable::onPickup(%this, %obj, %shape, %amount) {}
|
||||
|
||||
function ZSpawnDeployableImage::onDeploy(%item, %plyr, %slot) {
|
||||
%className = "StaticShape";
|
||||
|
||||
%playerVector = vectorNormalize(-1 * getWord(%plyr.getEyeVector(),1) SPC getWord(%plyr.getEyeVector(),0) SPC "0");
|
||||
|
||||
if (vAbs(floorVec(%item.surfaceNrm,100)) $= "0 0 1")
|
||||
%item.surfaceNrm2 = %playerVector;
|
||||
else
|
||||
%item.surfaceNrm2 = vectorNormalize(vectorCross(%item.surfaceNrm,"0 0 -1"));
|
||||
|
||||
%rot = fullRot(%item.surfaceNrm,%item.surfaceNrm2);
|
||||
|
||||
%deplObj = new (%className)() {
|
||||
dataBlock = %item.deployed;
|
||||
};
|
||||
|
||||
// set orientation
|
||||
%deplObj.setTransform(%item.surfacePt SPC %rot);
|
||||
|
||||
// set the recharge rate right away
|
||||
if (%deplObj.getDatablock().rechargeRate)
|
||||
%deplObj.setRechargeRate(%deplObj.getDatablock().rechargeRate);
|
||||
|
||||
// set team, owner, and handle
|
||||
%deplObj.team = %plyr.client.Team;
|
||||
%deplObj.setOwner(%plyr);
|
||||
%deplObj.light.lightBase = %deplObj;
|
||||
|
||||
// set the sensor group if it needs one
|
||||
if (%deplObj.getTarget() != -1)
|
||||
setTargetSensorGroup(%deplObj.getTarget(), %plyr.client.team);
|
||||
|
||||
// place the deployable in the MissionCleanup/Deployables group (AI reasons)
|
||||
addToDeployGroup(%deplObj);
|
||||
|
||||
//let the AI know as well...
|
||||
AIDeployObject(%plyr.client, %deplObj);
|
||||
|
||||
// play the deploy sound
|
||||
serverPlay3D(%item.deploySound, %deplObj.getTransform());
|
||||
|
||||
// increment the team count for this deployed object
|
||||
$TeamDeployedCount[%plyr.team, %item.item]++;
|
||||
|
||||
addDSurface(%item.surface,%deplObj);
|
||||
|
||||
%deplObj.playThread($PowerThread,"Power");
|
||||
%deplObj.playThread($AmbientThread,"ambient");
|
||||
|
||||
// take the deployable off the player's back and out of inventory
|
||||
%plyr.unmountImage(%slot);
|
||||
%plyr.decInventory(%item.item, 1);
|
||||
|
||||
// set power frequency
|
||||
%deplObj.powerFreq = %plyr.powerFreq;
|
||||
|
||||
// Power object
|
||||
checkPowerObject(%deplObj);
|
||||
|
||||
%deplObj.Ztype = %plyr.packSet + 1;
|
||||
if(%deplObj.Ztype == 3) // Lord Zombie
|
||||
%deplObj.numZ = 2;
|
||||
if(%deplObj.Ztype == 6) // Demon Mother
|
||||
%deplObj.numZ = 2;
|
||||
|
||||
%deplobj.spawnTypeSet = %plyr.expertset;
|
||||
|
||||
return %deplObj;
|
||||
}
|
||||
|
||||
function DeployedZSpawnBase::onDestroyed(%this,%obj,%prevState) {
|
||||
if (%obj.isRemoved)
|
||||
return;
|
||||
%obj.isRemoved = true;
|
||||
Parent::onDestroyed(%this,%obj,%prevState);
|
||||
$TeamDeployedCount[%obj.team, ZSpawnDeployable]--;
|
||||
remDSurface(%obj);
|
||||
%obj.schedule(500, "delete");
|
||||
if (%obj.ZCloop !$= "")
|
||||
Cancel(%obj.ZCLoop);
|
||||
}
|
||||
|
||||
function DeployedZSpawnBase::disassemble(%data,%plyr,%obj) {
|
||||
if (%obj.ZCloop !$= "")
|
||||
Cancel(%obj.ZCLoop);
|
||||
disassemble(%data,%plyr,%obj);
|
||||
}
|
||||
|
||||
function ZSpawnDeployableImage::onMount(%data, %obj, %node) {
|
||||
%obj.hasZSpawn = true;
|
||||
%obj.expertset = 0;
|
||||
}
|
||||
|
||||
function ZSpawnDeployableImage::onUnmount(%data, %obj, %node) {
|
||||
%obj.hasZSpawn = "";
|
||||
}
|
||||
|
||||
function DeployedZSpawnBase::onGainPowerEnabled(%data,%obj) {
|
||||
if(%obj.spawnTypeSet == 1)
|
||||
%obj.numz = 0;
|
||||
if (%obj.ZCloop !$= "")
|
||||
Cancel(%obj.ZCLoop);
|
||||
%obj.ZCLoop = schedule(1000, 0, "ZcreateLoop", %obj);
|
||||
Parent::onGainPowerEnabled(%data,%obj);
|
||||
}
|
||||
|
||||
function DeployedZSpawnBase::onLosePowerDisabled(%data,%obj) {
|
||||
if (%obj.ZCloop !$= "")
|
||||
Cancel(%obj.ZCLoop);
|
||||
Parent::onLosePowerDisabled(%data,%obj);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue