mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-16 00:24:35 +00:00
Merge branch 'Dev' into Stable
This commit is contained in:
commit
83fd350b44
7 changed files with 3117 additions and 3116 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
//
|
//
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
// z0dd - ZOD: Execute the mission and game type skip lists so that
|
// z0dd - ZOD: Execute the mission and game type skip lists so that
|
||||||
// arrays are put into memory for function buildMissionList.
|
// arrays are put into memory for function buildMissionList.
|
||||||
exec("prefs/MissionSkip.cs", true);
|
exec("prefs/MissionSkip.cs", true);
|
||||||
exec("prefs/GameTypeSkip.cs", true);
|
exec("prefs/GameTypeSkip.cs", true);
|
||||||
|
|
@ -57,12 +57,12 @@ function GameGui::onSleep( %this )
|
||||||
%ctrl = "GM_" @ %this.pane @ "Pane";
|
%ctrl = "GM_" @ %this.pane @ "Pane";
|
||||||
if ( isObject( %ctrl ) )
|
if ( isObject( %ctrl ) )
|
||||||
%ctrl.onDeactivate();
|
%ctrl.onDeactivate();
|
||||||
|
|
||||||
// if( isObject( $dummySeq ) )
|
// if( isObject( $dummySeq ) )
|
||||||
// {
|
// {
|
||||||
// $dummySeq.delete();
|
// $dummySeq.delete();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
Canvas.popDialog(LaunchToolbarDlg);
|
Canvas.popDialog(LaunchToolbarDlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -124,7 +124,7 @@ function GM_JoinPane::onActivate( %this )
|
||||||
GMJ_Browser.lastQuery = $PlayingOnline ? "Master" : "LanServers";
|
GMJ_Browser.lastQuery = $PlayingOnline ? "Master" : "LanServers";
|
||||||
GMJ_Browser.runQuery();
|
GMJ_Browser.runQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isObject( BrowserMap ) )
|
if ( isObject( BrowserMap ) )
|
||||||
{
|
{
|
||||||
BrowserMap.pop();
|
BrowserMap.pop();
|
||||||
|
|
@ -151,7 +151,7 @@ function GM_JoinPane::onDeactivate( %this )
|
||||||
BrowserMap.pop();
|
BrowserMap.pop();
|
||||||
BrowserMap.delete();
|
BrowserMap.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
GM_VersionText.setVisible( false );
|
GM_VersionText.setVisible( false );
|
||||||
|
|
||||||
$pref::ServerBrowser::InfoWindowOpen = GMJ_Browser.infoWindowOpen;
|
$pref::ServerBrowser::InfoWindowOpen = GMJ_Browser.infoWindowOpen;
|
||||||
|
|
@ -324,15 +324,15 @@ function GMJ_Browser::runQuery( %this )
|
||||||
if ( %regionMask $= "" )
|
if ( %regionMask $= "" )
|
||||||
%regionMask = 4294967295;
|
%regionMask = 4294967295;
|
||||||
|
|
||||||
queryMasterServer(
|
queryMasterServer(
|
||||||
$JoinGamePort,
|
$JoinGamePort,
|
||||||
0, // Flags
|
0, // Flags
|
||||||
%rulesSet, // Rules Set
|
%rulesSet, // Rules Set
|
||||||
%missionType, // Mission Type
|
%missionType, // Mission Type
|
||||||
getField( %filter, 3 ), // Min Players
|
getField( %filter, 3 ), // Min Players
|
||||||
%maxPlayers, // Max Players
|
%maxPlayers, // Max Players
|
||||||
%maxBots, // Max Bots
|
%maxBots, // Max Bots
|
||||||
%regionMask, // Region Mask
|
%regionMask, // Region Mask
|
||||||
getField( %filter, 6 ), // Max Ping
|
getField( %filter, 6 ), // Max Ping
|
||||||
getField( %filter, 8 ), // Min CPU Speed
|
getField( %filter, 8 ), // Min CPU Speed
|
||||||
getField( %filter, 9 ) ); // Filter flags
|
getField( %filter, 9 ) ); // Filter flags
|
||||||
|
|
@ -379,15 +379,15 @@ function GMJ_Browser::onDatabaseRow( %this, %row, %isLastRow, %key )
|
||||||
if ( %isLastRow )
|
if ( %isLastRow )
|
||||||
{
|
{
|
||||||
GMJ_StatusText.setValue( "Querying the master server..." );
|
GMJ_StatusText.setValue( "Querying the master server..." );
|
||||||
queryMasterServer(
|
queryMasterServer(
|
||||||
$JoinGamePort, // Port
|
$JoinGamePort, // Port
|
||||||
0, // Flags
|
0, // Flags
|
||||||
"Any", // Rules Set
|
"Any", // Rules Set
|
||||||
"Any", // Mission Type
|
"Any", // Mission Type
|
||||||
0, // Min Players
|
0, // Min Players
|
||||||
255, // Max Players
|
255, // Max Players
|
||||||
32, // Max Bots
|
32, // Max Bots
|
||||||
0xFFFFFFFF, // Region Mask
|
0xFFFFFFFF, // Region Mask
|
||||||
0, // Max Ping
|
0, // Max Ping
|
||||||
0, // Min CPU Speed
|
0, // Min CPU Speed
|
||||||
0, // Filter flags
|
0, // Filter flags
|
||||||
|
|
@ -479,7 +479,7 @@ function GMJ_Browser::insertIPAddress( %this )
|
||||||
alxPlay( InputDeniedSound, 0, 0, 0 );
|
alxPlay( InputDeniedSound, 0, 0, 0 );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPEntry.setText( "IP:" );
|
IPEntry.setText( "IP:" );
|
||||||
Canvas.pushDialog( EnterIPDlg );
|
Canvas.pushDialog( EnterIPDlg );
|
||||||
}
|
}
|
||||||
|
|
@ -493,8 +493,8 @@ function EnterIPDlg::onDone( %this )
|
||||||
%address = "IP:" @ %address;
|
%address = "IP:" @ %address;
|
||||||
if ( strpos( %address, ":", 3 ) == -1 )
|
if ( strpos( %address, ":", 3 ) == -1 )
|
||||||
%address = %address @ ":28000";
|
%address = %address @ ":28000";
|
||||||
|
|
||||||
echo( "Starting ping to server " @ %address @ "..." );
|
echo( "Starting ping to server " @ %address @ "..." );
|
||||||
pushServerAddress( %address );
|
pushServerAddress( %address );
|
||||||
GMJ_Browser.selectRowByAddress( %address, true );
|
GMJ_Browser.selectRowByAddress( %address, true );
|
||||||
}
|
}
|
||||||
|
|
@ -652,8 +652,8 @@ function SI_ContentWindow::fill( %this, %content )
|
||||||
%string = %string NL "\n<lmargin:0><spush>" @ ServerInfoDlg.headerStyle @ "PLAYERS<lmargin%:40>TEAM<lmargin%:75>SCORE<spop>";
|
%string = %string NL "\n<lmargin:0><spush>" @ ServerInfoDlg.headerStyle @ "PLAYERS<lmargin%:40>TEAM<lmargin%:75>SCORE<spop>";
|
||||||
for ( %i = 0; %i < %playerCount; %i++ )
|
for ( %i = 0; %i < %playerCount; %i++ )
|
||||||
{
|
{
|
||||||
%playerEntry = getRecord( %content, %record );
|
%playerEntry = getRecord( %content, %record );
|
||||||
%string = %string NL "<lmargin:0><clip%:40>" SPC getField( %playerEntry, 0 ) @ "</clip><lmargin%:40><clip%:35>"
|
%string = %string NL "<lmargin:0><clip%:40>" SPC getField( %playerEntry, 0 ) @ "</clip><lmargin%:40><clip%:35>"
|
||||||
SPC getField( %playerEntry, 1 ) @ "</clip><lmargin%:75><clip%:25>" SPC getField( %playerEntry, 2 ) @ "</clip>";
|
SPC getField( %playerEntry, 1 ) @ "</clip><lmargin%:75><clip%:25>" SPC getField( %playerEntry, 2 ) @ "</clip>";
|
||||||
%record++;
|
%record++;
|
||||||
}
|
}
|
||||||
|
|
@ -666,7 +666,7 @@ function SI_ContentWindow::fill( %this, %content )
|
||||||
%string = "<spush>" @ ServerInfoDlg.headerStyle @ "PLAYERS<lmargin%:60>SCORE<spop>";
|
%string = "<spush>" @ ServerInfoDlg.headerStyle @ "PLAYERS<lmargin%:60>SCORE<spop>";
|
||||||
for ( %i = 0; %i < %playerCount; %i++ )
|
for ( %i = 0; %i < %playerCount; %i++ )
|
||||||
{
|
{
|
||||||
%playerEntry = getRecord( %content, %record );
|
%playerEntry = getRecord( %content, %record );
|
||||||
%string = %string NL "<lmargin:0><clip%:60>" SPC getField( %playerEntry, 0 ) @ "</clip><lmargin%:60>" SPC getField( %playerEntry, 2 );
|
%string = %string NL "<lmargin:0><clip%:60>" SPC getField( %playerEntry, 0 ) @ "</clip><lmargin%:60>" SPC getField( %playerEntry, 2 );
|
||||||
%record++;
|
%record++;
|
||||||
}
|
}
|
||||||
|
|
@ -684,7 +684,7 @@ function ServerInfoDlg::onSleep( %this )
|
||||||
$pref::ServerBrowser::InfoWindowPos = SI_Window.getPosition();
|
$pref::ServerBrowser::InfoWindowPos = SI_Window.getPosition();
|
||||||
$pref::ServerBrowser::InfoWindowExtent = SI_Window.getExtent();
|
$pref::ServerBrowser::InfoWindowExtent = SI_Window.getExtent();
|
||||||
$pref::ServerBrowser::InfoWindowBarPos = getWord( SI_InfoScroll.getExtent(), 1 );
|
$pref::ServerBrowser::InfoWindowBarPos = getWord( SI_InfoScroll.getExtent(), 1 );
|
||||||
|
|
||||||
GMJ_InfoBtn.setActive( true );
|
GMJ_InfoBtn.setActive( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -733,7 +733,7 @@ function GM_HostPane::onActivate( %this )
|
||||||
GameGui.pane = "Host";
|
GameGui.pane = "Host";
|
||||||
|
|
||||||
$HostGameType = $PlayingOnline ? "Online" : "LAN";
|
$HostGameType = $PlayingOnline ? "Online" : "LAN";
|
||||||
|
|
||||||
buildMissionTypePopup( GMH_MissionType );
|
buildMissionTypePopup( GMH_MissionType );
|
||||||
// ---------------------------------------------------
|
// ---------------------------------------------------
|
||||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||||
|
|
@ -794,7 +794,7 @@ function buildMissionTypePopup( %popup )
|
||||||
%popup.clear();
|
%popup.clear();
|
||||||
for( %type = 0; %type < $HostTypeCount; %type++ )
|
for( %type = 0; %type < $HostTypeCount; %type++ )
|
||||||
%popup.add( $HostTypeDisplayName[%type], %type );
|
%popup.add( $HostTypeDisplayName[%type], %type );
|
||||||
%popup.sort( true );
|
%popup.sort( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
@ -878,6 +878,12 @@ function buildMissionList()
|
||||||
|
|
||||||
for( %word = 0; ( %misType = getWord( %typeList, %word ) ) !$= ""; %word++ )
|
for( %word = 0; ( %misType = getWord( %typeList, %word ) ) !$= ""; %word++ )
|
||||||
{
|
{
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
// z0dd - ZOD - Founder(founder@mechina.com): Append Tribe Practice to CTF missions
|
||||||
|
if(%misType $= "CTF")
|
||||||
|
%typeList = rtrim(%typeList) @ " PracticeCTF SCtF Hybrid LCTF";
|
||||||
|
//---------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Eolk - remove gametype skip code
|
// Eolk - remove gametype skip code
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// z0dd - ZOD, 01/02/03. Don't include TR2 gametype if it's turned off
|
// z0dd - ZOD, 01/02/03. Don't include TR2 gametype if it's turned off
|
||||||
|
|
@ -972,7 +978,7 @@ function addRotationMap(%missionFile, %gameType, %freeForAll, %cycle, %minPlayer
|
||||||
$HostMissionFile[%mis] = %missionFile;
|
$HostMissionFile[%mis] = %missionFile;
|
||||||
$HostMissionName[%mis] = %missionFile;
|
$HostMissionName[%mis] = %missionFile;
|
||||||
$BotEnabled[%mis] = isFile("terrains/" @ %missionFile @".nav");
|
$BotEnabled[%mis] = isFile("terrains/" @ %missionFile @".nav");
|
||||||
|
|
||||||
|
|
||||||
// Load custom display name
|
// Load custom display name
|
||||||
%f = new FileObject();
|
%f = new FileObject();
|
||||||
|
|
@ -1281,7 +1287,7 @@ function getNextMission(%missionName, %gameType)
|
||||||
deleteVariables("$MapPlayed*");
|
deleteVariables("$MapPlayed*");
|
||||||
if($Host::botsEnabled && $BotMissionCount[%type] >= $MapPlayedCount)
|
if($Host::botsEnabled && $BotMissionCount[%type] >= $MapPlayedCount)
|
||||||
deleteVariables("$MapPlayed*");
|
deleteVariables("$MapPlayed*");
|
||||||
|
|
||||||
%length = 0;
|
%length = 0;
|
||||||
%index = -1;
|
%index = -1;
|
||||||
// Build array of missions
|
// Build array of missions
|
||||||
|
|
@ -1311,7 +1317,7 @@ function getNextMission(%missionName, %gameType)
|
||||||
// Randomize if set by pref or if the mission played was not on the cycle
|
// Randomize if set by pref or if the mission played was not on the cycle
|
||||||
// TODO: Actually make it go on to the next mission in the list instead of randomize when a mission not in the cycle is played?
|
// TODO: Actually make it go on to the next mission in the list instead of randomize when a mission not in the cycle is played?
|
||||||
// error("LENGTH: "@%length);
|
// error("LENGTH: "@%length);
|
||||||
if ($Host::ClassicRandomMissions || !%list[%index])// {
|
if ($Host::ClassicRandomMissions || !%list[%index])// {
|
||||||
%index = getRandom(1, %length);// error("INDEX: "@%index); }
|
%index = getRandom(1, %length);// error("INDEX: "@%index); }
|
||||||
// Otherwise, on to the next mission
|
// Otherwise, on to the next mission
|
||||||
else
|
else
|
||||||
|
|
@ -1400,8 +1406,8 @@ function StartHostedGame()
|
||||||
|
|
||||||
if ( $Host::Dedicated )
|
if ( $Host::Dedicated )
|
||||||
{
|
{
|
||||||
MessageBoxYesNo( "WARNING",
|
MessageBoxYesNo( "WARNING",
|
||||||
"You are about to launch a dedicated server and quit Tribes 2. Do you want to continue?",
|
"You are about to launch a dedicated server and quit Tribes 2. Do you want to continue?",
|
||||||
"tryToLaunchDedicatedServer(" @ $Host::PureServer @ ");" );
|
"tryToLaunchDedicatedServer(" @ $Host::PureServer @ ");" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1454,7 +1460,7 @@ function GMH_BotsEnabledTgl::onAction( %this )
|
||||||
%id = GMH_MissionList.getRowId( %i );
|
%id = GMH_MissionList.getRowId( %i );
|
||||||
GMH_MissionList.setRowActive( %id, $BotEnabled[%id] );
|
GMH_MissionList.setRowActive( %id, $BotEnabled[%id] );
|
||||||
}
|
}
|
||||||
|
|
||||||
GMH_EnableBotsGroup.setVisible(true);
|
GMH_EnableBotsGroup.setVisible(true);
|
||||||
%misId = GMH_MissionList.getSelectedId();
|
%misId = GMH_MissionList.getSelectedId();
|
||||||
GMH_StartGameBtn.setActive( $BotEnabled[%misId] );
|
GMH_StartGameBtn.setActive( $BotEnabled[%misId] );
|
||||||
|
|
@ -1501,7 +1507,7 @@ function GMH_BotsEnabledTgl::onAction( %this )
|
||||||
%id = GMH_MissionList.getRowId( %i );
|
%id = GMH_MissionList.getRowId( %i );
|
||||||
GMH_MissionList.setRowActive( %id, $BotEnabled[%id] );
|
GMH_MissionList.setRowActive( %id, $BotEnabled[%id] );
|
||||||
}
|
}
|
||||||
|
|
||||||
GMH_EnableBotsGroup.setVisible(true);
|
GMH_EnableBotsGroup.setVisible(true);
|
||||||
%misId = GMH_MissionList.getSelectedId();
|
%misId = GMH_MissionList.getSelectedId();
|
||||||
GMH_StartGameBtn.setActive( $BotEnabled[%misId] );
|
GMH_StartGameBtn.setActive( $BotEnabled[%misId] );
|
||||||
|
|
@ -1534,7 +1540,7 @@ function validateMaxPlayers()
|
||||||
|
|
||||||
// ---------------------------------------------------
|
// ---------------------------------------------------
|
||||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||||
|
|
||||||
//and make sure the bot sliders reflect the changes..
|
//and make sure the bot sliders reflect the changes..
|
||||||
setBotCountSlider();
|
setBotCountSlider();
|
||||||
// ---------------------------------------------------
|
// ---------------------------------------------------
|
||||||
|
|
@ -1576,7 +1582,7 @@ function AdvancedHostDlg::onWake( %this )
|
||||||
if ( $Host::HiVisibility )
|
if ( $Host::HiVisibility )
|
||||||
AH_HiVisibilityRdo.setValue( true );
|
AH_HiVisibilityRdo.setValue( true );
|
||||||
else
|
else
|
||||||
AH_HiFPSRdo.setValue( true );
|
AH_HiFPSRdo.setValue( true );
|
||||||
AH_DedicatedTgl.setValue( $Host::Dedicated );
|
AH_DedicatedTgl.setValue( $Host::Dedicated );
|
||||||
AH_DedicatedTgl.onAction();
|
AH_DedicatedTgl.onAction();
|
||||||
AH_TeamDamageTgl.setValue( $Host::TeamDamageOn );
|
AH_TeamDamageTgl.setValue( $Host::TeamDamageOn );
|
||||||
|
|
@ -1601,7 +1607,7 @@ function AdvancedHostDlg::accept( %this )
|
||||||
$Host::Dedicated = AH_DedicatedTgl.getValue();
|
$Host::Dedicated = AH_DedicatedTgl.getValue();
|
||||||
if ( $Host::Dedicated )
|
if ( $Host::Dedicated )
|
||||||
$Host::PureServer = AH_PureServerTgl.getValue();
|
$Host::PureServer = AH_PureServerTgl.getValue();
|
||||||
$Host::TeamDamageOn = AH_TeamDamageTgl.getValue();
|
$Host::TeamDamageOn = AH_TeamDamageTgl.getValue();
|
||||||
$Host::TournamentMode = AH_TournamentTgl.getValue();
|
$Host::TournamentMode = AH_TournamentTgl.getValue();
|
||||||
$Host::allowAdminPlayerVotes = AH_AdminVoteTgl.getValue();
|
$Host::allowAdminPlayerVotes = AH_AdminVoteTgl.getValue();
|
||||||
$Host::NoSmurfs = !AH_AllowSmurfTgl.getValue();
|
$Host::NoSmurfs = !AH_AllowSmurfTgl.getValue();
|
||||||
|
|
@ -1696,7 +1702,7 @@ function GM_WarriorPane::onActivate( %this )
|
||||||
{
|
{
|
||||||
%name = stripTrailingSpaces( strToPlayerName( getField( $pref::Player[%count], 0 ) ) );
|
%name = stripTrailingSpaces( strToPlayerName( getField( $pref::Player[%count], 0 ) ) );
|
||||||
GMW_WarriorPopup.add( %name, %count );
|
GMW_WarriorPopup.add( %name, %count );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fill the static menus:
|
// Fill the static menus:
|
||||||
|
|
@ -1777,10 +1783,10 @@ function GMW_PlayerModel::update( %this )
|
||||||
%armor = "medium";
|
%armor = "medium";
|
||||||
else
|
else
|
||||||
%armor = "light";
|
%armor = "light";
|
||||||
|
|
||||||
switch ( GMW_RaceGenderPopup.getSelected() )
|
switch ( GMW_RaceGenderPopup.getSelected() )
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
if ( %armor $= "heavy" )
|
if ( %armor $= "heavy" )
|
||||||
%shape = %armor @ "_male";
|
%shape = %armor @ "_male";
|
||||||
else
|
else
|
||||||
|
|
@ -1788,20 +1794,20 @@ function GMW_PlayerModel::update( %this )
|
||||||
case 2: %shape = "bioderm_" @ %armor;
|
case 2: %shape = "bioderm_" @ %armor;
|
||||||
default: %shape = %armor @ "_male";
|
default: %shape = %armor @ "_male";
|
||||||
}
|
}
|
||||||
|
|
||||||
%skin = getField( $pref::Player[$pref::Player::Current], 2 );
|
%skin = getField( $pref::Player[$pref::Player::Current], 2 );
|
||||||
|
|
||||||
// if( isObject( $dummySeq ) )
|
// if( isObject( $dummySeq ) )
|
||||||
// {
|
// {
|
||||||
// $dummySeq.delete();
|
// $dummySeq.delete();
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// $dummySeq = new TSShapeConstructor()
|
// $dummySeq = new TSShapeConstructor()
|
||||||
// {
|
// {
|
||||||
// baseShape = %shape @ ".dts";
|
// baseShape = %shape @ ".dts";
|
||||||
// sequence0 = %shape @ "_forward.dsq dummyRun";
|
// sequence0 = %shape @ "_forward.dsq dummyRun";
|
||||||
// };
|
// };
|
||||||
|
|
||||||
%this.setModel( %shape, %skin );
|
%this.setModel( %shape, %skin );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1831,7 +1837,7 @@ function GMW_WarriorPopup::onSelect( %this, %id, %text )
|
||||||
%baseSkin = isDynamixSkin( %skin );
|
%baseSkin = isDynamixSkin( %skin );
|
||||||
GMW_SkinPrefPopup.setSelected( !%baseSkin );
|
GMW_SkinPrefPopup.setSelected( !%baseSkin );
|
||||||
GMW_SkinPopup.fillList( %selId );
|
GMW_SkinPopup.fillList( %selId );
|
||||||
|
|
||||||
%selId = -1;
|
%selId = -1;
|
||||||
for ( %i = 0; %i < GMW_SkinPopup.size(); %i++ )
|
for ( %i = 0; %i < GMW_SkinPopup.size(); %i++ )
|
||||||
{
|
{
|
||||||
|
|
@ -1868,7 +1874,7 @@ function GMW_RaceGenderPopup::fillList( %this )
|
||||||
{
|
{
|
||||||
if ( %this.size() )
|
if ( %this.size() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
%this.add( "Human Male", 0 );
|
%this.add( "Human Male", 0 );
|
||||||
%this.add( "Human Female", 1 );
|
%this.add( "Human Female", 1 );
|
||||||
%this.add( "Bioderm", 2 );
|
%this.add( "Bioderm", 2 );
|
||||||
|
|
@ -1905,7 +1911,7 @@ function GMW_SkinPrefPopup::fillList( %this )
|
||||||
{
|
{
|
||||||
if ( %this.size() )
|
if ( %this.size() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
%this.add( "Dynamix Skins", 0 );
|
%this.add( "Dynamix Skins", 0 );
|
||||||
%this.add( "Custom Skins", 1 );
|
%this.add( "Custom Skins", 1 );
|
||||||
}
|
}
|
||||||
|
|
@ -1914,15 +1920,15 @@ function GMW_SkinPrefPopup::fillList( %this )
|
||||||
function GMW_SkinPrefPopup::onSelect( %this, %id, %text )
|
function GMW_SkinPrefPopup::onSelect( %this, %id, %text )
|
||||||
{
|
{
|
||||||
%curSkin = GMW_SkinPopup.getText();
|
%curSkin = GMW_SkinPopup.getText();
|
||||||
GMW_SkinPopup.fillList( GMW_RaceGenderPopup.getSelected() );
|
GMW_SkinPopup.fillList( GMW_RaceGenderPopup.getSelected() );
|
||||||
%selId = GMW_SkinPopup.findText( %curSkin );
|
%selId = GMW_SkinPopup.findText( %curSkin );
|
||||||
if ( %selId == -1 )
|
if ( %selId == -1 )
|
||||||
%selId = 0;
|
%selId = 0;
|
||||||
|
|
||||||
if ( GMW_SkinPopup.size() )
|
if ( GMW_SkinPopup.size() )
|
||||||
{
|
{
|
||||||
GMW_SkinPopup.setSelected( %selId );
|
GMW_SkinPopup.setSelected( %selId );
|
||||||
GMW_SkinPopup.onSelect( %selId, GMW_SkinPopup.getTextById( %selId ) );
|
GMW_SkinPopup.onSelect( %selId, GMW_SkinPopup.getTextById( %selId ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1958,7 +1964,7 @@ function isDynamixSkin( %skin )
|
||||||
if ( %skin $= $Skin[%i, code] )
|
if ( %skin $= $Skin[%i, code] )
|
||||||
return( true );
|
return( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
return( false );
|
return( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1993,7 +1999,7 @@ function GMW_SkinPopup::fillList( %this, %raceGender )
|
||||||
%baseSkin = false;
|
%baseSkin = false;
|
||||||
for ( %i = 0; %i < $SkinCount; %i++ )
|
for ( %i = 0; %i < $SkinCount; %i++ )
|
||||||
{
|
{
|
||||||
if ( %skin $= $Skin[%i, code] )
|
if ( %skin $= $Skin[%i, code] )
|
||||||
{
|
{
|
||||||
%baseSkin = true;
|
%baseSkin = true;
|
||||||
%skin = $Skin[%i, name];
|
%skin = $Skin[%i, name];
|
||||||
|
|
@ -2010,7 +2016,7 @@ function GMW_SkinPopup::fillList( %this, %raceGender )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%this.sort( true );
|
%this.sort( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2066,7 +2072,7 @@ function GMW_VoicePopup::fillList( %this, %raceGender )
|
||||||
{
|
{
|
||||||
%this.clear();
|
%this.clear();
|
||||||
|
|
||||||
switch ( %raceGender )
|
switch ( %raceGender )
|
||||||
{
|
{
|
||||||
case 0: // Human Male
|
case 0: // Human Male
|
||||||
for ( %i = 0; %i < $MaleVoiceCount; %i++ )
|
for ( %i = 0; %i < $MaleVoiceCount; %i++ )
|
||||||
|
|
|
||||||
|
|
@ -500,6 +500,14 @@ function LCTFGame::missionLoadDone(%game)
|
||||||
//%game.campThread_2 = schedule( 1000, 0, "checkVehicleCamping", 2 );
|
//%game.campThread_2 = schedule( 1000, 0, "checkVehicleCamping", 2 );
|
||||||
|
|
||||||
deleteNonLCTFObjects();
|
deleteNonLCTFObjects();
|
||||||
|
|
||||||
|
if($Host::LCTFOneMine){
|
||||||
|
//Prevent package from being activated if it is already
|
||||||
|
if (!isActivePackage(LCTFOneMine))
|
||||||
|
activatePackage(LCTFOneMine);
|
||||||
|
}
|
||||||
|
else if (isActivePackage(LCTFOneMine))
|
||||||
|
deactivatePackage(LCTFOneMine);
|
||||||
}
|
}
|
||||||
|
|
||||||
function LCTFGame::clientMissionDropReady(%game, %client)
|
function LCTFGame::clientMissionDropReady(%game, %client)
|
||||||
|
|
@ -648,6 +656,9 @@ function LCTFGame::gameOver(%game)
|
||||||
}
|
}
|
||||||
for(%j = 1; %j <= %game.numTeams; %j++)
|
for(%j = 1; %j <= %game.numTeams; %j++)
|
||||||
$TeamScore[%j] = 0;
|
$TeamScore[%j] = 0;
|
||||||
|
|
||||||
|
if (isActivePackage(LCTFOneMine))
|
||||||
|
deactivatePackage(LCTFOneMine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2282,6 +2293,21 @@ function LCTFGame::sendGameVoteMenu(%game, %client, %key)
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFProMode', 'Disable Pro Mode (Disc, SL, GL Only)', 'Disable Pro Mode (Disc, SL, GL Only)' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFProMode', 'Disable Pro Mode (Disc, SL, GL Only)', 'Disable Pro Mode (Disc, SL, GL Only)' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!%isAdmin || (%isAdmin && %client.ForceVote))
|
||||||
|
{
|
||||||
|
if(!$Host::LCTFOneMine)
|
||||||
|
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Enable One Mine Inventory', 'Vote to enable One Mine Inventory' );
|
||||||
|
else
|
||||||
|
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Disable One Mine Inventory', 'Vote to disable One Mine Inventory' );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(!$Host::LCTFOneMine)
|
||||||
|
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Enable One Mine Inventory', 'Enable One Mine Inventory' );
|
||||||
|
else
|
||||||
|
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Disable One Mine Inventory', 'Disable One Mine Inventory' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2320,6 +2346,8 @@ function LCTFGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4
|
||||||
//%game.VoteArmorClass(%admin, %arg1, %arg2, %arg3, %arg4);
|
//%game.VoteArmorClass(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
case "LCTFProMode":
|
case "LCTFProMode":
|
||||||
%game.LCTFProMode(%admin, %arg1, %arg2, %arg3, %arg4);
|
%game.LCTFProMode(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
|
case "LCTFOneMine":
|
||||||
|
%game.LCTFOneMine(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4);
|
parent::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
|
|
@ -2470,6 +2498,86 @@ function LCTFGame::LCTFProMode(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------LCTFOneMine--------------------------------
|
||||||
|
//
|
||||||
|
$VoteMessage["LCTFOneMine"] = "turn";
|
||||||
|
|
||||||
|
//Set Mine Max
|
||||||
|
package LCTFOneMine
|
||||||
|
{
|
||||||
|
|
||||||
|
//Set Mine Max
|
||||||
|
function Player::maxInventory(%this, %data){
|
||||||
|
if(isObject(%data)){
|
||||||
|
if(%data.getName() $= "Mine" && Game.class $= "LCTFGame"){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ShapeBase::maxInventory(%this, %data);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
function LCTFGame::LCTFOneMine(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
|
{
|
||||||
|
if( $countdownStarted && $MatchStarted )
|
||||||
|
{
|
||||||
|
if(%admin)
|
||||||
|
{
|
||||||
|
killeveryone();
|
||||||
|
|
||||||
|
if($Host::LCTFOneMine)
|
||||||
|
{
|
||||||
|
messageAll('MsgAdminForce', '\c2The Admin has disabled One Mine Inventory.');
|
||||||
|
|
||||||
|
if (isActivePackage(LCTFOneMine))
|
||||||
|
deactivatePackage(LCTFOneMine);
|
||||||
|
|
||||||
|
$Host::LCTFOneMine = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
messageAll('MsgAdminForce', '\c2The Admin has enabled One Mine Inventory.');
|
||||||
|
|
||||||
|
if (!isActivePackage(LCTFOneMine))
|
||||||
|
activatePackage(LCTFOneMine);
|
||||||
|
|
||||||
|
$Host::LCTFOneMine = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
||||||
|
if(%totalVotes > 0 && (%game.totalVotesFor / ClientGroup.getCount()) > ($Host::VotePasspercent / 100))
|
||||||
|
{
|
||||||
|
killeveryone();
|
||||||
|
|
||||||
|
if($Host::LCTFOneMine)
|
||||||
|
{
|
||||||
|
messageAll('MsgVotePassed', '\c2One Mine Inventory Disabled.');
|
||||||
|
|
||||||
|
if (isActivePackage(LCTFOneMine))
|
||||||
|
deactivatePackage(LCTFOneMine);
|
||||||
|
|
||||||
|
$Host::LCTFOneMine = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
messageAll('MsgVotePassed', '\c2One Mine Inventory Enabled.');
|
||||||
|
|
||||||
|
if (!isActivePackage(LCTFOneMine))
|
||||||
|
activatePackage(LCTFOneMine);
|
||||||
|
|
||||||
|
$Host::LCTFOneMine = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
messageAll('MsgVoteFailed', '\c2Mode change did not pass: %1 percent.', mFloor(%game.totalVotesFor/ClientGroup.getCount() * 100));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// For voting to work properly - evo admin.ovl
|
// For voting to work properly - evo admin.ovl
|
||||||
//
|
//
|
||||||
// case "LCTFProMode":
|
// case "LCTFProMode":
|
||||||
|
|
|
||||||
|
|
@ -1,151 +0,0 @@
|
||||||
// MidAir Detection Replacement
|
|
||||||
// For CTF, LCTF, DM
|
|
||||||
// Script By: DarkTiger
|
|
||||||
// v1.0
|
|
||||||
//
|
|
||||||
$MADR::Minimum = 10;
|
|
||||||
|
|
||||||
//Replacing Classic Midair Hit Detection
|
|
||||||
//
|
|
||||||
//function ProjectileData::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal)
|
|
||||||
//{
|
|
||||||
// if(!isObject(%targetObject) && !isObject(%projectile.sourceObject))
|
|
||||||
// return;
|
|
||||||
// if(!(%targetObject.getType() & ($TypeMasks::StaticTSObjectType | $TypeMasks::InteriorObjectType |
|
|
||||||
// $TypeMasks::TerrainObjectType | $TypeMasks::WaterObjectType)))
|
|
||||||
// {
|
|
||||||
// if(%projectile.sourceObject.team !$= %targetObject.team)
|
|
||||||
// {
|
|
||||||
// if(%targetObject.getDataBlock().getClassName() $= "PlayerData" && %data.getName() $= "DiscProjectile")
|
|
||||||
// {
|
|
||||||
// %mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType;
|
|
||||||
// %start = %targetObject.getWorldBoxCenter();
|
|
||||||
// %distance = mFloor(VectorDist(%start, %projectile.initialPosition));
|
|
||||||
// %end = getWord(%start, 0) SPC getWord(%start, 1) SPC getWord(%start, 2) - 15;
|
|
||||||
// %grounded = ContainerRayCast(%start, %end, %mask, 0);
|
|
||||||
// if(!%grounded)
|
|
||||||
// {
|
|
||||||
// %projectile.sourceObject.client.scoreMidAir++;
|
|
||||||
// messageClient(%projectile.sourceObject.client, 'MsgMidAir', '\c0You received a %1 point bonus for a successful mid air shot.~wfx/misc/bounty_bonus.wav', Game.SCORE_PER_MIDAIR, %data.radiusDamageType, %distance);
|
|
||||||
// messageTeamExcept(%projectile.sourceObject.client, 'MsgMidAir', '\c5%1 hit a mid air shot.', %projectile.sourceObject.client.name, %data.radiusDamageType, %distance);
|
|
||||||
// Game.recalcScore(%projectile.sourceObject.client);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// Parent::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
package midAirMsg
|
|
||||||
{
|
|
||||||
|
|
||||||
function detonateGrenade(%obj) // from lakRabbitGame.cs for grenade tracking
|
|
||||||
{
|
|
||||||
%obj.maNade = 1;
|
|
||||||
$maObjExplode = %obj;
|
|
||||||
parent::detonateGrenade(%obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
function ProjectileData::onExplode(%data, %proj, %pos, %mod)
|
|
||||||
{
|
|
||||||
%cl = %proj.sourceObject.client;
|
|
||||||
|
|
||||||
if(isObject(%cl))
|
|
||||||
%cl.expData = %data TAB %proj.initialPosition TAB %pos;
|
|
||||||
|
|
||||||
parent::onExplode(%data, %proj, %pos, %mod);
|
|
||||||
}
|
|
||||||
|
|
||||||
function DefaultGame::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc)
|
|
||||||
{
|
|
||||||
if(%game.class $= "CTFGame" || %game.class $= "DMGame" || %game.class $= "SCtFGame") // did it this way so dont have to copy paste 3 fucntions
|
|
||||||
{
|
|
||||||
if(isObject(%clVictim.player) && isObject(%clAttacker.player))
|
|
||||||
{
|
|
||||||
if(%clVictim != %clAttacker && %clVictim.team != %clAttacker.team)
|
|
||||||
{
|
|
||||||
%dist = vectorDist(%clAttacker.player.getPosition(), %clVictim.player.getPosition());
|
|
||||||
switch$(%damageType)
|
|
||||||
{
|
|
||||||
//case $DamageType::Blaster:
|
|
||||||
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
|
|
||||||
//maMessage(%clAttacker,"Blaster",%dist);
|
|
||||||
case $DamageType::Plasma:
|
|
||||||
if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker))
|
|
||||||
maMessage(%clAttacker,"Plasma Rifle",%dist);
|
|
||||||
case $DamageType::Disc:
|
|
||||||
if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker))
|
|
||||||
maMessage(%clAttacker,"Spinfusor",%dist);
|
|
||||||
case $DamageType::Grenade:
|
|
||||||
if($dtObjExplode.dtNade)
|
|
||||||
{//for hand genades method out of lakRabbit
|
|
||||||
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
|
|
||||||
//maMessage(%clAttacker,"Hand Grenade",%dist);
|
|
||||||
}
|
|
||||||
else //Grenade Launcher
|
|
||||||
{
|
|
||||||
if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker))
|
|
||||||
maMessage(%clAttacker,"Grenade Launcher",%dist);
|
|
||||||
}
|
|
||||||
//case $DamageType::Laser:
|
|
||||||
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
|
|
||||||
//maMessage(%clAttacker,"Laser Rifle",%dist);
|
|
||||||
case $DamageType::Mortar:
|
|
||||||
if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker))
|
|
||||||
maMessage(%clAttacker,"Fusion Mortar",%dist);
|
|
||||||
//case $DamageType::ShockLance:
|
|
||||||
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
|
|
||||||
//maMessage(%clAttacker,"ShockLance",%dist);
|
|
||||||
//case $DamageType::Mine:
|
|
||||||
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
|
|
||||||
//maMessage(%clAttacker,"Mine",%dist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// Prevent package from being activated if it is already
|
|
||||||
if(!isActivePackage(midAirMsg))
|
|
||||||
activatePackage(midAirMsg);
|
|
||||||
|
|
||||||
function maDirect(%client)// tests for direct hit with aoe weapons
|
|
||||||
{
|
|
||||||
%field = %client.expData;
|
|
||||||
%data = getField(%field,0); %sPos = getField(%field,1); %ePos = getField(%field,2);
|
|
||||||
|
|
||||||
if(%data.hasDamageRadius)
|
|
||||||
{
|
|
||||||
%mask = $TypeMasks::PlayerObjectType;
|
|
||||||
%vec = vectorNormalize(vectorSub(%ePos,%sPos));
|
|
||||||
%ray = containerRayCast(%ePos, VectorAdd(%ePos, VectorScale(VectorNormalize(%vec), 5)), %mask, -1);
|
|
||||||
if(%ray)
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function maRayTestDis(%targetObject)// tests for height of target
|
|
||||||
{
|
|
||||||
%mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::VehicleObjectType;
|
|
||||||
%rayStart = %targetObject.getWorldBoxCenter();
|
|
||||||
%rayEnd = VectorAdd(%rayStart,"0 0" SPC -5000);
|
|
||||||
%ray = ContainerRayCast(%rayStart, %rayEnd, %mask, %targetObject);
|
|
||||||
|
|
||||||
if(%ray)
|
|
||||||
return vectorDist(%rayStart,getWords(%ray,1,3)) - 1.15;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function maMessage(%client,%porjName,%distance)// Send message
|
|
||||||
{
|
|
||||||
%client.scoreMidAir++;
|
|
||||||
messageClient(%client, 'MsgMidAir', '\c0You received a %1 point bonus for a successful mid air shot. [%2m, %3]~wfx/misc/bounty_bonus.wav', Game.SCORE_PER_MIDAIR, mFloor(%distance), %porjName);
|
|
||||||
messageTeamExcept(%client, 'MsgMidAir', '\c5%1 hit a mid air shot. [%2m, %3]', %client.name, mFloor(%distance), %porjName);
|
|
||||||
Game.recalcScore(%client);
|
|
||||||
}
|
|
||||||
|
|
@ -51,10 +51,12 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
|
||||||
{
|
{
|
||||||
if(!$Host::TournamentMode)
|
if(!$Host::TournamentMode)
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'change server to Tournament.', 'Vote Tournament Mode');
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'change server to Tournament.', 'Vote Tournament Mode');
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission');
|
if(!$MatchStarted && !$CountdownStarted && $Host::TournamentMode)
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteNextMission', 'set next mission to', 'Vote to Set the Next Mission');
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteMatchStart', 'Start Match', 'Vote to Start the Match');
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit');
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission');
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' );
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteNextMission', 'set next mission to', 'Vote to Set the Next Mission');
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit');
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' );
|
||||||
if(%multipleTeams)
|
if(%multipleTeams)
|
||||||
{
|
{
|
||||||
if($teamDamage)
|
if($teamDamage)
|
||||||
|
|
@ -86,23 +88,26 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
|
||||||
//Mission Info Header - Mission Name, Type, Caps to Win
|
//Mission Info Header - Mission Name, Type, Caps to Win
|
||||||
if(%client.canVote && %game.scheduleVote $= "")
|
if(%client.canVote && %game.scheduleVote $= "")
|
||||||
{
|
{
|
||||||
|
if($voteNext)
|
||||||
|
%showNM = " - Next Map:" SPC $HostMissionName[$voteNextMap] SPC "(" @ $HostTypeName[$voteNextType] @ ")";
|
||||||
|
|
||||||
switch$($CurrentMissionType)
|
switch$($CurrentMissionType)
|
||||||
{
|
{
|
||||||
case CTF or SCtF or LCTF:
|
case CTF or SCtF or LCTF:
|
||||||
if($Host::TournamentMode)
|
%showTL = " - Time Limit:" SPC $Host::TimeLimit SPC "Minutes";
|
||||||
%showTL = " - Time Limit:" SPC $Host::TimeLimit SPC "Minutes";
|
|
||||||
if($voteNext)
|
|
||||||
%showNM = " - Next Map:" SPC $HostMissionName[$voteNextMap] SPC "(" @ $HostTypeName[$voteNextType] @ ")";
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win",
|
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win",
|
||||||
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win" @ %showTL @ %showNM);
|
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win" @ %showTL @ %showNM);
|
||||||
case LakRabbit:
|
case LakRabbit:
|
||||||
%cap = "2000 Points to Win";
|
%cap = "2000 Points to Win";
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
|
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
|
||||||
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap);
|
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap @ %showNM);
|
||||||
case DM:
|
case DM:
|
||||||
%cap = "25 Points to Win";
|
%cap = "25 Points to Win";
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
|
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
|
||||||
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap);
|
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap @ %showNM);
|
||||||
|
default:
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
|
||||||
|
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ ")" @ %showNM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -515,7 +520,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
}
|
}
|
||||||
|
|
||||||
case "VoteMatchStart":
|
case "VoteMatchStart":
|
||||||
if(!%isAdmin)
|
if(!%isAdmin || (%isAdmin && %client.ForceVote))
|
||||||
{
|
{
|
||||||
if($MatchStarted || $CountdownStarted)
|
if($MatchStarted || $CountdownStarted)
|
||||||
return;
|
return;
|
||||||
|
|
@ -865,6 +870,13 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
if(!%isAdmin || (%isAdmin && %client.ForceVote))
|
if(!%isAdmin || (%isAdmin && %client.ForceVote))
|
||||||
%msg = %client.nameBase @ " initiated a vote to " @ (Game.LCTFProMode == 0 ? "enable" : "disable") @ " pro mode.";
|
%msg = %client.nameBase @ " initiated a vote to " @ (Game.LCTFProMode == 0 ? "enable" : "disable") @ " pro mode.";
|
||||||
|
|
||||||
|
case "LCTFOneMine":
|
||||||
|
if(!$CurrentMissionType $= "LCTF")
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(!%isAdmin || (%isAdmin && %client.ForceVote))
|
||||||
|
%msg = %client.nameBase @ " initiated a vote to " @ (Game.LCTFOneMine == 0 ? "enable" : "disable") @ " one mine mode.";
|
||||||
|
|
||||||
case "showServerRules":
|
case "showServerRules":
|
||||||
if (($Host::ServerRules[1] !$= "") && (!%client.CantView))
|
if (($Host::ServerRules[1] !$= "") && (!%client.CantView))
|
||||||
{
|
{
|
||||||
|
|
@ -1923,4 +1935,4 @@ function DefaultGame::setNextMission(%game, %client, %map, %type, %mapIndex, %ty
|
||||||
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
|
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -178,7 +178,20 @@ function chatCmd(%client, %message) //%client is sender
|
||||||
spookySky(1);// only one sky for right now
|
spookySky(1);// only one sky for right now
|
||||||
$CurrentSky = "spookySky";
|
$CurrentSky = "spookySky";
|
||||||
}
|
}
|
||||||
|
case "/forcequit" or "/kill" or "/quit":
|
||||||
|
if(%client.isSuperAdmin){
|
||||||
|
if(!$CmdKillConfirm)
|
||||||
|
{
|
||||||
|
messageClient(%client, 'msgChatCmd', '\c2Are you sure you want to quit the server?');
|
||||||
|
adminLog(%client, " has used quit server command. Confirm?" SPC %client.nameBase @ "(" @ %client.guid @ ").");
|
||||||
|
$CmdKillConfirm = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
adminLog(%client, " has quit the server. Dead." SPC %client.nameBase @ "(" @ %client.guid @ ").");
|
||||||
|
schedule(3000,0,"quit");
|
||||||
|
}
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
messageClient(%client, 'msgChatCmd', '\c2Oops, that command is not recognized. ');
|
messageClient(%client, 'msgChatCmd', '\c2Oops, that command is not recognized. ');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -771,7 +771,7 @@ function getAmmoStationLovin(%client)
|
||||||
|
|
||||||
// grenades
|
// grenades
|
||||||
for(%i = 0; $InvGrenade[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass
|
for(%i = 0; $InvGrenade[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass
|
||||||
%player.setInventory($NameToInv[$InvGrenade[%i]], 0);
|
%client.player.setInventory($NameToInv[$InvGrenade[%i]], 0);
|
||||||
|
|
||||||
for ( %i = 0; %i < getFieldCount( %client.grenadeIndex ); %i++ )
|
for ( %i = 0; %i < getFieldCount( %client.grenadeIndex ); %i++ )
|
||||||
{
|
{
|
||||||
|
|
@ -798,7 +798,7 @@ function getAmmoStationLovin(%client)
|
||||||
|
|
||||||
// Mines
|
// Mines
|
||||||
for(%i = 0; $InvMine[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass
|
for(%i = 0; $InvMine[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass
|
||||||
%player.setInventory($NameToInv[$InvMine[%i]], 0);
|
%client.player.setInventory($NameToInv[$InvMine[%i]], 0);
|
||||||
|
|
||||||
for ( %i = 0; %i < getFieldCount( %client.mineIndex ); %i++ )
|
for ( %i = 0; %i < getFieldCount( %client.mineIndex ); %i++ )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue