mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-01-20 00:24:49 +00:00
Vote System Adjustments
A lot of changes Stop vote fix Set Next Mission Added Description adjustments Admin "Vote for..." In Tourney Mode LCTF Pro Mode: Blaster >> Shocklance
This commit is contained in:
parent
9e08e5c489
commit
df06f0efcb
|
|
@ -40,7 +40,7 @@ function DMGame::setUpTeams(%game)
|
||||||
%group = nameToID("MissionGroup/Teams");
|
%group = nameToID("MissionGroup/Teams");
|
||||||
if(%group == -1)
|
if(%group == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// create a team0 if it does not exist
|
// create a team0 if it does not exist
|
||||||
%team = nameToID("MissionGroup/Teams/team0");
|
%team = nameToID("MissionGroup/Teams/team0");
|
||||||
if(%team == -1)
|
if(%team == -1)
|
||||||
|
|
@ -48,7 +48,7 @@ function DMGame::setUpTeams(%game)
|
||||||
%team = new SimGroup("team0");
|
%team = new SimGroup("team0");
|
||||||
%group.add(%team);
|
%group.add(%team);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'team0' is not counted as a team here
|
// 'team0' is not counted as a team here
|
||||||
%game.numTeams = 0;
|
%game.numTeams = 0;
|
||||||
while(%team != -1)
|
while(%team != -1)
|
||||||
|
|
@ -56,7 +56,7 @@ function DMGame::setUpTeams(%game)
|
||||||
// create drop set and add all spawnsphere objects into it
|
// create drop set and add all spawnsphere objects into it
|
||||||
%dropSet = new SimSet("TeamDrops" @ %game.numTeams);
|
%dropSet = new SimSet("TeamDrops" @ %game.numTeams);
|
||||||
MissionCleanup.add(%dropSet);
|
MissionCleanup.add(%dropSet);
|
||||||
|
|
||||||
%spawns = nameToID("MissionGroup/Teams/team" @ %game.numTeams @ "/SpawnSpheres");
|
%spawns = nameToID("MissionGroup/Teams/team" @ %game.numTeams @ "/SpawnSpheres");
|
||||||
if(%spawns != -1)
|
if(%spawns != -1)
|
||||||
{
|
{
|
||||||
|
|
@ -64,21 +64,21 @@ function DMGame::setUpTeams(%game)
|
||||||
for(%i = 0; %i < %count; %i++)
|
for(%i = 0; %i < %count; %i++)
|
||||||
%dropSet.add(%spawns.getObject(%i));
|
%dropSet.add(%spawns.getObject(%i));
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the 'team' field for all the objects in this team
|
// set the 'team' field for all the objects in this team
|
||||||
%team.setTeam(0);
|
%team.setTeam(0);
|
||||||
|
|
||||||
clearVehicleCount(%team+1);
|
clearVehicleCount(%team+1);
|
||||||
// get next group
|
// get next group
|
||||||
%team = nameToID("MissionGroup/Teams/team" @ %game.numTeams + 1);
|
%team = nameToID("MissionGroup/Teams/team" @ %game.numTeams + 1);
|
||||||
if (%team != -1)
|
if (%team != -1)
|
||||||
%game.numTeams++;
|
%game.numTeams++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the number of sensor groups (including team0) that are processed
|
// set the number of sensor groups (including team0) that are processed
|
||||||
setSensorGroupCount(%game.numTeams + 1);
|
setSensorGroupCount(%game.numTeams + 1);
|
||||||
%game.numTeams = 1;
|
%game.numTeams = 1;
|
||||||
|
|
||||||
// allow teams 1->31 to listen to each other (team 0 can only listen to self)
|
// allow teams 1->31 to listen to each other (team 0 can only listen to self)
|
||||||
for(%i = 1; %i < 32; %i++)
|
for(%i = 1; %i < 32; %i++)
|
||||||
setSensorGroupListenMask(%i, 0xfffffffe);
|
setSensorGroupListenMask(%i, 0xfffffffe);
|
||||||
|
|
@ -106,7 +106,7 @@ function DMGame::equip(%game, %player)
|
||||||
for(%i =0; %i<$InventoryHudCount; %i++)
|
for(%i =0; %i<$InventoryHudCount; %i++)
|
||||||
%player.client.setInventoryHudItem($InventoryHudData[%i, itemDataName], 0, 1);
|
%player.client.setInventoryHudItem($InventoryHudData[%i, itemDataName], 0, 1);
|
||||||
%player.client.clearBackpackIcon();
|
%player.client.clearBackpackIcon();
|
||||||
|
|
||||||
if( $Host::DMSLOnlyMode )
|
if( $Host::DMSLOnlyMode )
|
||||||
{
|
{
|
||||||
%player.clearInventory();
|
%player.clearInventory();
|
||||||
|
|
@ -122,7 +122,7 @@ function DMGame::equip(%game, %player)
|
||||||
buyFavorites(%player.client);
|
buyFavorites(%player.client);
|
||||||
%player.setEnergyLevel(%player.getDataBlock().maxEnergy);
|
%player.setEnergyLevel(%player.getDataBlock().maxEnergy);
|
||||||
%player.selectWeaponSlot( 0 );
|
%player.selectWeaponSlot( 0 );
|
||||||
|
|
||||||
// do we want to give players a disc launcher instead? GJL: Yes we do!
|
// do we want to give players a disc launcher instead? GJL: Yes we do!
|
||||||
%player.use("Disc");
|
%player.use("Disc");
|
||||||
}
|
}
|
||||||
|
|
@ -137,7 +137,7 @@ function DMGame::pickPlayerSpawn(%game, %client, %respawn)
|
||||||
function DMGame::clientJoinTeam( %game, %client, %team, %respawn )
|
function DMGame::clientJoinTeam( %game, %client, %team, %respawn )
|
||||||
{
|
{
|
||||||
%game.assignClientTeam( %client );
|
%game.assignClientTeam( %client );
|
||||||
|
|
||||||
// Spawn the player:
|
// Spawn the player:
|
||||||
%game.spawnPlayer( %client, %respawn );
|
%game.spawnPlayer( %client, %respawn );
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +146,7 @@ function DMGame::assignClientTeam(%game, %client)
|
||||||
{
|
{
|
||||||
for(%i = 1; %i < 32; %i++)
|
for(%i = 1; %i < 32; %i++)
|
||||||
$DMTeamArray[%i] = false;
|
$DMTeamArray[%i] = false;
|
||||||
|
|
||||||
%maxSensorGroup = 0;
|
%maxSensorGroup = 0;
|
||||||
%count = ClientGroup.getCount();
|
%count = ClientGroup.getCount();
|
||||||
for(%i = 0; %i < %count; %i++)
|
for(%i = 0; %i < %count; %i++)
|
||||||
|
|
@ -159,7 +159,7 @@ function DMGame::assignClientTeam(%game, %client)
|
||||||
%maxSensorGroup = %cl.team;
|
%maxSensorGroup = %cl.team;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//now loop through the team array, looking for an empty team
|
//now loop through the team array, looking for an empty team
|
||||||
for(%i = 1; %i < 32; %i++)
|
for(%i = 1; %i < 32; %i++)
|
||||||
{
|
{
|
||||||
|
|
@ -171,14 +171,14 @@ function DMGame::assignClientTeam(%game, %client)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set player's skin pref here
|
// set player's skin pref here
|
||||||
setTargetSkin(%client.target, %client.skin);
|
setTargetSkin(%client.target, %client.skin);
|
||||||
|
|
||||||
// Let everybody know you are no longer an observer:
|
// Let everybody know you are no longer an observer:
|
||||||
messageAll( 'MsgClientJoinTeam', '\c1%1 has joined the fray.', %client.name, "", %client, 1 );
|
messageAll( 'MsgClientJoinTeam', '\c1%1 has joined the fray.', %client.name, "", %client, 1 );
|
||||||
updateCanListenState( %client );
|
updateCanListenState( %client );
|
||||||
|
|
||||||
//now set the max number of sensor groups...
|
//now set the max number of sensor groups...
|
||||||
setSensorGroupCount(%maxSensorGroup + 1);
|
setSensorGroupCount(%maxSensorGroup + 1);
|
||||||
}
|
}
|
||||||
|
|
@ -190,9 +190,9 @@ function DMGame::clientMissionDropReady(%game, %client)
|
||||||
messageClient(%client, 'MsgDMPlayerDies', "", 0);
|
messageClient(%client, 'MsgDMPlayerDies', "", 0);
|
||||||
messageClient(%client, 'MsgDMKill', "", 0);
|
messageClient(%client, 'MsgDMKill', "", 0);
|
||||||
%game.resetScore(%client);
|
%game.resetScore(%client);
|
||||||
|
|
||||||
messageClient(%client, 'MsgMissionDropInfo', '\c0You are in mission %1 (%2).', $MissionDisplayName, $MissionTypeDisplayName, $ServerName );
|
messageClient(%client, 'MsgMissionDropInfo', '\c0You are in mission %1 (%2).', $MissionDisplayName, $MissionTypeDisplayName, $ServerName );
|
||||||
|
|
||||||
DefaultGame::clientMissionDropReady(%game, %client);
|
DefaultGame::clientMissionDropReady(%game, %client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -205,7 +205,7 @@ function DMGame::AIHasJoined(%game, %client)
|
||||||
function DMGame::checkScoreLimit(%game, %client)
|
function DMGame::checkScoreLimit(%game, %client)
|
||||||
{
|
{
|
||||||
%scoreLimit = MissionGroup.DM_scoreLimit;
|
%scoreLimit = MissionGroup.DM_scoreLimit;
|
||||||
|
|
||||||
if(%scoreLimit $= "")
|
if(%scoreLimit $= "")
|
||||||
%scoreLimit = 25;
|
%scoreLimit = 25;
|
||||||
if(%client.score >= %scoreLimit)
|
if(%client.score >= %scoreLimit)
|
||||||
|
|
@ -215,7 +215,7 @@ function DMGame::checkScoreLimit(%game, %client)
|
||||||
function DMGame::createPlayer(%game, %client, %spawnLoc, %respawn)
|
function DMGame::createPlayer(%game, %client, %spawnLoc, %respawn)
|
||||||
{
|
{
|
||||||
DefaultGame::createPlayer(%game, %client, %spawnLoc, %respawn);
|
DefaultGame::createPlayer(%game, %client, %spawnLoc, %respawn);
|
||||||
|
|
||||||
%client.setSensorGroup(%client.team);
|
%client.setSensorGroup(%client.team);
|
||||||
%client.isObserver = 0;
|
%client.isObserver = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -230,7 +230,7 @@ function DMGame::resetScore(%game, %client)
|
||||||
%client.MidAir = 0;
|
%client.MidAir = 0;
|
||||||
%client.Bonus = 0;
|
%client.Bonus = 0;
|
||||||
%client.KillStreakBonus = 0;
|
%client.KillStreakBonus = 0;
|
||||||
|
|
||||||
// not a score thing but needs to be reset
|
// not a score thing but needs to be reset
|
||||||
%client.killCounter = 0;
|
%client.killCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -244,35 +244,35 @@ function DMGame::forceObserver( %game, %client, %reason )
|
||||||
function DMGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLoc)
|
function DMGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLoc)
|
||||||
{
|
{
|
||||||
cancel(%clVictim.player.alertThread);
|
cancel(%clVictim.player.alertThread);
|
||||||
|
|
||||||
DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLoc);
|
DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLoc);
|
||||||
|
|
||||||
ProcessBonusDM(%game, %clVictim, %clKiller, %damageType, %implement, %damageLoc);
|
ProcessBonusDM(%game, %clVictim, %clKiller, %damageType, %implement, %damageLoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ProcessBonusDM(%game, %clVictim, %clKiller, %damageType, %implement, %damageLoc)
|
function ProcessBonusDM(%game, %clVictim, %clKiller, %damageType, %implement, %damageLoc)
|
||||||
{
|
{
|
||||||
if(%clVictim.isMarked && $DMGame::mode)
|
if(%clVictim.isMarked && $DMGame::mode)
|
||||||
{
|
{
|
||||||
if(%clKiller $= "" || %clVictim.killCounter < 3)
|
if(%clKiller $= "" || %clVictim.killCounter < 3)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(%clVictim == %clKiller || %damageType == $DamageType::Suicide || %damageType == $DamageType::Lava || %damageType == $DamageType::OutOfBounds || %damageType == $DamageType::Ground || %damageType == $DamageType::Lightning)
|
if(%clVictim == %clKiller || %damageType == $DamageType::Suicide || %damageType == $DamageType::Lava || %damageType == $DamageType::OutOfBounds || %damageType == $DamageType::Ground || %damageType == $DamageType::Lightning)
|
||||||
{
|
{
|
||||||
messageAll('Msgding', '\c2%1\'s Kill Streak has ended. No bonus rewarded.', %clVictim.name, %clVictim.killCounter);
|
messageAll('Msgding', '\c2%1\'s Kill Streak has ended. No bonus rewarded.', %clVictim.name, %clVictim.killCounter);
|
||||||
%game.lastGuy = 0;
|
%game.lastGuy = 0;
|
||||||
}
|
}
|
||||||
else if(%clVictim !$= %clKiller)
|
else if(%clVictim !$= %clKiller)
|
||||||
{
|
{
|
||||||
%temprampage = mfloor((%clVictim.killCounter - $DMGame::wpKillCount) * %game.SCORE_PER_KILLSTREAKBONUS);
|
%temprampage = mfloor((%clVictim.killCounter - $DMGame::wpKillCount) * %game.SCORE_PER_KILLSTREAKBONUS);
|
||||||
%s = "";
|
%s = "";
|
||||||
|
|
||||||
//single bonus
|
//single bonus
|
||||||
if(%clVictim.killCounter < $DMGame::wpKillCountDoubleBonus)
|
if(%clVictim.killCounter < $DMGame::wpKillCountDoubleBonus)
|
||||||
{
|
{
|
||||||
%clKiller.Bonus++; // stats rename to what ever
|
%clKiller.Bonus++; // stats rename to what ever
|
||||||
%clKiller.scoreBonus++;
|
%clKiller.scoreBonus++;
|
||||||
|
|
||||||
//messageAll('Msgding', '\c1%1 receives a bonus for ending %2\'s %3x kill streak.~wfx/misc/flag_lost.wav',%clKiller.name,%clVictim.name, %clVictim.killCounter);
|
//messageAll('Msgding', '\c1%1 receives a bonus for ending %2\'s %3x kill streak.~wfx/misc/flag_lost.wav',%clKiller.name,%clVictim.name, %clVictim.killCounter);
|
||||||
messageAllExcept(%clVictim, -1, 'Msgding', '\c4%1 is rewarded with a bonus for ending %5\'s %6X Kill Streak!~wfx/misc/flag_lost.wav', %clKiller.name, "", %clVictim, 1, %clVictim.name, %clVictim.killCounter );
|
messageAllExcept(%clVictim, -1, 'Msgding', '\c4%1 is rewarded with a bonus for ending %5\'s %6X Kill Streak!~wfx/misc/flag_lost.wav', %clKiller.name, "", %clVictim, 1, %clVictim.name, %clVictim.killCounter );
|
||||||
if(%temprampage > 0)
|
if(%temprampage > 0)
|
||||||
|
|
@ -284,11 +284,11 @@ function ProcessBonusDM(%game, %clVictim, %clKiller, %damageType, %implement, %d
|
||||||
messageClient(%clVictim, 'Msgding', '\c2%1 has ended your %2X Kill Streak.~wfx/misc/flag_lost.wav', %clKiller.name, %clVictim.killCounter);
|
messageClient(%clVictim, 'Msgding', '\c2%1 has ended your %2X Kill Streak.~wfx/misc/flag_lost.wav', %clKiller.name, %clVictim.killCounter);
|
||||||
}
|
}
|
||||||
//double bonus
|
//double bonus
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%clKiller.Bonus++; %clKiller.Bonus++;
|
%clKiller.Bonus++; %clKiller.Bonus++;
|
||||||
%clKiller.scoreBonus++; %clKiller.scoreBonus++;
|
%clKiller.scoreBonus++; %clKiller.scoreBonus++;
|
||||||
|
|
||||||
//messageAll('Msgding', '\c1%1 receives a double bonus for ending %2\'s %3x kill streak.~wfx/misc/flag_lost.wav',%clKiller.name,%clVictim.name, %clVictim.killCounter);
|
//messageAll('Msgding', '\c1%1 receives a double bonus for ending %2\'s %3x kill streak.~wfx/misc/flag_lost.wav',%clKiller.name,%clVictim.name, %clVictim.killCounter);
|
||||||
messageAllExcept(%clVictim, -1, 'Msgding', '\c4%1 is rewarded with a double bonus for ending %5\'s %6X Kill Streak!~wfx/misc/flag_lost.wav', %clKiller.name, "", %clVictim, 1, %clVictim.name, %clVictim.killCounter );
|
messageAllExcept(%clVictim, -1, 'Msgding', '\c4%1 is rewarded with a double bonus for ending %5\'s %6X Kill Streak!~wfx/misc/flag_lost.wav', %clKiller.name, "", %clVictim, 1, %clVictim.name, %clVictim.killCounter );
|
||||||
if(%temprampage > 0)
|
if(%temprampage > 0)
|
||||||
|
|
@ -323,19 +323,19 @@ function ProcessBonusDM(%game, %clVictim, %clKiller, %damageType, %implement, %d
|
||||||
}
|
}
|
||||||
%clKiller.killCounter++;
|
%clKiller.killCounter++;
|
||||||
%clVictim.killCounter = 0;
|
%clVictim.killCounter = 0;
|
||||||
|
|
||||||
switch$($DMGame::mode)
|
switch$($DMGame::mode)
|
||||||
{
|
{
|
||||||
case 1: // player with the highest kill streak if they are above $DMGame::wpKillCount
|
case 1: // player with the highest kill streak if they are above $DMGame::wpKillCount
|
||||||
%bonusClient = 0;
|
%bonusClient = 0;
|
||||||
for(%b = 0; %b < ClientGroup.getCount(); %b++)
|
for(%b = 0; %b < ClientGroup.getCount(); %b++)
|
||||||
{
|
{
|
||||||
%cl = ClientGroup.getObject(%b);
|
%cl = ClientGroup.getObject(%b);
|
||||||
if(%cl.killCounter >= $DMGame::wpKillCount && %cl.killCounter > %bonusClient.killCounter && !%cl.isObserver)
|
if(%cl.killCounter >= $DMGame::wpKillCount && %cl.killCounter > %bonusClient.killCounter && !%cl.isObserver)
|
||||||
{
|
{
|
||||||
%bonusClient = %cl;// we have a new
|
%bonusClient = %cl;// we have a new
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(%bonusClient !$= 0 && %clKiller == %bonusClient)
|
if(%bonusClient !$= 0 && %clKiller == %bonusClient)
|
||||||
{
|
{
|
||||||
if(%bonusClient !$= %game.lastGuy)
|
if(%bonusClient !$= %game.lastGuy)
|
||||||
|
|
@ -343,7 +343,7 @@ function ProcessBonusDM(%game, %clVictim, %clKiller, %damageType, %implement, %d
|
||||||
for(%i = 0; %i < ClientGroup.getCount(); %i++)
|
for(%i = 0; %i < ClientGroup.getCount(); %i++)
|
||||||
{
|
{
|
||||||
%cl = ClientGroup.getObject(%i);
|
%cl = ClientGroup.getObject(%i);
|
||||||
|
|
||||||
hideTargetWaypoint(%cl,%game.lastGuy);
|
hideTargetWaypoint(%cl,%game.lastGuy);
|
||||||
if(%cl !$= %bonusClient)
|
if(%cl !$= %bonusClient)
|
||||||
{
|
{
|
||||||
|
|
@ -352,13 +352,13 @@ function ProcessBonusDM(%game, %clVictim, %clKiller, %damageType, %implement, %d
|
||||||
}
|
}
|
||||||
messageAllExcept(%bonusClient, -1, 'MsgPingWaypoint', '\c2%1 is on a Kill Streak. Kill them for a bonus!~wgui/vote_nopass.wav', %bonusClient.name, "", %bonusClient, 1 );
|
messageAllExcept(%bonusClient, -1, 'MsgPingWaypoint', '\c2%1 is on a Kill Streak. Kill them for a bonus!~wgui/vote_nopass.wav', %bonusClient.name, "", %bonusClient, 1 );
|
||||||
messageClient(%bonusClient, 'MsgPingWaypoint', '\c2You\'re on a Kill Streak. Get more kills for extra points!~wfx/misc/target_waypoint.wav', %bonusClient.killCounter);
|
messageClient(%bonusClient, 'MsgPingWaypoint', '\c2You\'re on a Kill Streak. Get more kills for extra points!~wfx/misc/target_waypoint.wav', %bonusClient.killCounter);
|
||||||
|
|
||||||
%game.lastGuy.isMarked = 0;
|
%game.lastGuy.isMarked = 0;
|
||||||
%bonusClient.isMarked = 1;
|
%bonusClient.isMarked = 1;
|
||||||
%game.lastGuy = %bonusClient;
|
%game.lastGuy = %bonusClient;
|
||||||
}
|
}
|
||||||
else if(%bonusClient == %game.lastGuy && %bonusClient.killCounter > 3)
|
else if(%bonusClient == %game.lastGuy && %bonusClient.killCounter > 3)
|
||||||
{
|
{
|
||||||
//give waypointed player a kill bonus
|
//give waypointed player a kill bonus
|
||||||
%bonusClient.KillStreakBonus++;
|
%bonusClient.KillStreakBonus++;
|
||||||
%bonusClient.scoreKillStreakBonus++;
|
%bonusClient.scoreKillStreakBonus++;
|
||||||
|
|
@ -375,7 +375,7 @@ function ProcessBonusDM(%game, %clVictim, %clKiller, %damageType, %implement, %d
|
||||||
%bonusClient = %cl;
|
%bonusClient = %cl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(%bonusClient != 0 && %game.lastGuy != %bonusClient)
|
if(%bonusClient != 0 && %game.lastGuy != %bonusClient)
|
||||||
{
|
{
|
||||||
for(%i = 0; %i < ClientGroup.getCount(); %i++)
|
for(%i = 0; %i < ClientGroup.getCount(); %i++)
|
||||||
|
|
@ -423,7 +423,7 @@ function hideTargetWaypoint(%client,%clTarget)
|
||||||
%visMask = getSensorGroupAlwaysVisMask(%clTarget.getSensorGroup());
|
%visMask = getSensorGroupAlwaysVisMask(%clTarget.getSensorGroup());
|
||||||
%visMask &= ~(1 << %client.getSensorGroup());
|
%visMask &= ~(1 << %client.getSensorGroup());
|
||||||
setSensorGroupAlwaysVisMask(%clTarget.getSensorGroup(), %visMask);
|
setSensorGroupAlwaysVisMask(%clTarget.getSensorGroup(), %visMask);
|
||||||
removeClientTargetType(%client, "AssignedTask");
|
removeClientTargetType(%client, "AssignedTask");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -437,7 +437,7 @@ function DMGame::updateKillScores(%game, %clVictim, %clKiller, %damageType, %imp
|
||||||
}
|
}
|
||||||
else if (%game.testSuicide(%clVictim, %clKiller, %damageType)) //otherwise test for suicide
|
else if (%game.testSuicide(%clVictim, %clKiller, %damageType)) //otherwise test for suicide
|
||||||
%game.awardScoreSuicide(%clVictim);
|
%game.awardScoreSuicide(%clVictim);
|
||||||
|
|
||||||
messageClient(%clVictim, 'MsgDMPlayerDies', "", %clVictim.deaths + %clVictim.suicides);
|
messageClient(%clVictim, 'MsgDMPlayerDies', "", %clVictim.deaths + %clVictim.suicides);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -449,12 +449,12 @@ function DMGame::recalcScore(%game, %client)
|
||||||
%BonusValue = %client.Bonus * %game.SCORE_PER_BONUS;
|
%BonusValue = %client.Bonus * %game.SCORE_PER_BONUS;
|
||||||
%MidAirValue = %client.MidAir * %game.SCORE_PER_MIDAIR;
|
%MidAirValue = %client.MidAir * %game.SCORE_PER_MIDAIR;
|
||||||
%KillStreakBonusValue = %client.KillStreakBonus * %game.SCORE_PER_KILLSTREAKBONUS;
|
%KillStreakBonusValue = %client.KillStreakBonus * %game.SCORE_PER_KILLSTREAKBONUS;
|
||||||
|
|
||||||
if (%killValue - %deathValue == 0)
|
if (%killValue - %deathValue == 0)
|
||||||
%client.efficiency = %suicideValue;
|
%client.efficiency = %suicideValue;
|
||||||
else
|
else
|
||||||
%client.efficiency = ((%killValue * %killValue) / (%killValue - (%deathValue + %suicideValue))) + (%BonusValue + %MidAirValue + %KillStreakBonusValue);
|
%client.efficiency = ((%killValue * %killValue) / (%killValue - (%deathValue + %suicideValue))) + (%BonusValue + %MidAirValue + %KillStreakBonusValue);
|
||||||
|
|
||||||
%client.score = mFloatLength(%client.efficiency, 1);
|
%client.score = mFloatLength(%client.efficiency, 1);
|
||||||
messageClient(%client, 'MsgYourScoreIs', "", %client.score);
|
messageClient(%client, 'MsgYourScoreIs', "", %client.score);
|
||||||
%game.recalcTeamRanks(%client);
|
%game.recalcTeamRanks(%client);
|
||||||
|
|
@ -479,12 +479,12 @@ function DMGame::gameOver(%game)
|
||||||
{
|
{
|
||||||
//call the default
|
//call the default
|
||||||
DefaultGame::gameOver(%game);
|
DefaultGame::gameOver(%game);
|
||||||
|
|
||||||
messageAll('MsgGameOver', "Match has ended.~wvoice/announcer/ann.gameover.wav" );
|
messageAll('MsgGameOver', "Match has ended.~wvoice/announcer/ann.gameover.wav" );
|
||||||
|
|
||||||
cancel(%game.timeThread);
|
cancel(%game.timeThread);
|
||||||
messageAll('MsgClearObjHud', "");
|
messageAll('MsgClearObjHud', "");
|
||||||
for(%i = 0; %i < ClientGroup.getCount(); %i ++)
|
for(%i = 0; %i < ClientGroup.getCount(); %i ++)
|
||||||
{
|
{
|
||||||
%client = ClientGroup.getObject(%i);
|
%client = ClientGroup.getObject(%i);
|
||||||
%game.resetScore(%client);
|
%game.resetScore(%client);
|
||||||
|
|
@ -507,32 +507,32 @@ function plzBounceOffGrid(%obj, %bounceForce, %count)
|
||||||
%boundsNorth = getWord(%bounds, 1);
|
%boundsNorth = getWord(%bounds, 1);
|
||||||
%boundsEast = %boundsWest + getWord(%bounds, 2);
|
%boundsEast = %boundsWest + getWord(%bounds, 2);
|
||||||
%boundsSouth = %boundsNorth + getWord(%bounds, 3);
|
%boundsSouth = %boundsNorth + getWord(%bounds, 3);
|
||||||
|
|
||||||
%shapePos = %obj.getPosition();
|
%shapePos = %obj.getPosition();
|
||||||
%shapex = firstWord(%shapePos);
|
%shapex = firstWord(%shapePos);
|
||||||
%shapey = getWord(%shapePos, 1);
|
%shapey = getWord(%shapePos, 1);
|
||||||
|
|
||||||
if( %shapex >= %boundsWest && %shapex <= %boundsEast && %shapey >= %boundsNorth && %shapey <= %boundsSouth) {
|
if( %shapex >= %boundsWest && %shapex <= %boundsEast && %shapey >= %boundsNorth && %shapey <= %boundsSouth) {
|
||||||
// we don't need to bounce at all
|
// we don't need to bounce at all
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( %count == 8 ) {
|
if( %count == 8 ) {
|
||||||
// just kill this retard
|
// just kill this retard
|
||||||
%obj.scriptKill($DamageType::OutOfBounds);
|
%obj.scriptKill($DamageType::OutOfBounds);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (%bounceForce $= "")
|
if (%bounceForce $= "")
|
||||||
%bounceForce = 65;
|
%bounceForce = 65;
|
||||||
|
|
||||||
%oldVel = %obj.getVelocity();
|
%oldVel = %obj.getVelocity();
|
||||||
%obj.setVelocity("0 0 0");
|
%obj.setVelocity("0 0 0");
|
||||||
|
|
||||||
%vecx = firstWord(%oldVel);
|
%vecx = firstWord(%oldVel);
|
||||||
%vecy = getWord(%oldVel, 1);
|
%vecy = getWord(%oldVel, 1);
|
||||||
%vecz = getWord(%oldVel, 2);
|
%vecz = getWord(%oldVel, 2);
|
||||||
|
|
||||||
// four cases, not two cases you fucktard kineticpoet
|
// four cases, not two cases you fucktard kineticpoet
|
||||||
// no wonder the trives of vengrances failed
|
// no wonder the trives of vengrances failed
|
||||||
if(%shapex <= %boundsWest) {
|
if(%shapex <= %boundsWest) {
|
||||||
|
|
@ -541,16 +541,16 @@ function plzBounceOffGrid(%obj, %bounceForce, %count)
|
||||||
else if(%shapex >= %boundsEast) {
|
else if(%shapex >= %boundsEast) {
|
||||||
%vecx = -mAbs(%vecx);
|
%vecx = -mAbs(%vecx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(%shapey <= %boundsNorth) {
|
if(%shapey <= %boundsNorth) {
|
||||||
%vecy = mAbs(%vecy);
|
%vecy = mAbs(%vecy);
|
||||||
}
|
}
|
||||||
else if(%shapey >= %boundsSouth) {
|
else if(%shapey >= %boundsSouth) {
|
||||||
%vecy = -mAbs(%vecy);
|
%vecy = -mAbs(%vecy);
|
||||||
}
|
}
|
||||||
|
|
||||||
%vec = %vecx SPC %vecy SPC %vecz;
|
%vec = %vecx SPC %vecy SPC %vecz;
|
||||||
|
|
||||||
// If the object's speed was pretty slow, give it a boost
|
// If the object's speed was pretty slow, give it a boost
|
||||||
%oldSpeed = VectorLen(%oldVel);
|
%oldSpeed = VectorLen(%oldVel);
|
||||||
if (%oldSpeed < 25)
|
if (%oldSpeed < 25)
|
||||||
|
|
@ -560,11 +560,11 @@ function plzBounceOffGrid(%obj, %bounceForce, %count)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
%vec = VectorScale(%vec, 1.15);
|
%vec = VectorScale(%vec, 1.15);
|
||||||
|
|
||||||
// apply the impulse to the object
|
// apply the impulse to the object
|
||||||
//%obj.applyImpulse(%obj.getWorldBoxCenter(), %vec);
|
//%obj.applyImpulse(%obj.getWorldBoxCenter(), %vec);
|
||||||
%obj.setVelocity(%vec);
|
%obj.setVelocity(%vec);
|
||||||
|
|
||||||
// repeat this bounce 4 times per second. if we're oob for 2 seconds, take action
|
// repeat this bounce 4 times per second. if we're oob for 2 seconds, take action
|
||||||
// don't do this with the flag because that has its own thread
|
// don't do this with the flag because that has its own thread
|
||||||
if( %obj.dataBlock !$= "Flag" ) {
|
if( %obj.dataBlock !$= "Flag" ) {
|
||||||
|
|
@ -582,7 +582,7 @@ function isOutOfBounds(%position)
|
||||||
%boundsNorth = getWord(%bounds, 1);
|
%boundsNorth = getWord(%bounds, 1);
|
||||||
%boundsEast = %boundsWest + getWord(%bounds, 2);
|
%boundsEast = %boundsWest + getWord(%bounds, 2);
|
||||||
%boundsSouth = %boundsNorth + getWord(%bounds, 3);
|
%boundsSouth = %boundsNorth + getWord(%bounds, 3);
|
||||||
|
|
||||||
return (%shapex < %boundsWest || %shapex > %boundsEast ||
|
return (%shapex < %boundsWest || %shapex > %boundsEast ||
|
||||||
%shapey < %boundsNorth || %shapey > %boundsSouth);
|
%shapey < %boundsNorth || %shapey > %boundsSouth);
|
||||||
}
|
}
|
||||||
|
|
@ -591,7 +591,7 @@ function DMGame::leaveMissionArea(%game, %playerData, %player)
|
||||||
{
|
{
|
||||||
if(%player.getState() $= "Dead")
|
if(%player.getState() $= "Dead")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
plzBounceOffGrid(%player, 65);
|
plzBounceOffGrid(%player, 65);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -607,7 +607,7 @@ function DMGame::DMAlertPlayer(%game, %count, %player)
|
||||||
|
|
||||||
function DMGame::MissionAreaDamage(%game, %player)
|
function DMGame::MissionAreaDamage(%game, %player)
|
||||||
{
|
{
|
||||||
if(%player.getState() !$= "Dead")
|
if(%player.getState() !$= "Dead")
|
||||||
{
|
{
|
||||||
%player.setDamageFlash(0.1);
|
%player.setDamageFlash(0.1);
|
||||||
%prevHurt = %player.getDamageLevel();
|
%prevHurt = %player.getDamageLevel();
|
||||||
|
|
@ -622,27 +622,27 @@ function DMGame::updateScoreHud(%game, %client, %tag)
|
||||||
{
|
{
|
||||||
// Clear the header:
|
// Clear the header:
|
||||||
messageClient( %client, 'SetScoreHudHeader', "", "" );
|
messageClient( %client, 'SetScoreHudHeader', "", "" );
|
||||||
|
|
||||||
// Send the subheader:
|
// Send the subheader:
|
||||||
messageClient(%client, 'SetScoreHudSubheader', "", '<tab:15,200,280,360,465>\tPLAYER\tRATING\tKILLS\tDEATHS\tBONUS');
|
messageClient(%client, 'SetScoreHudSubheader', "", '<tab:15,200,280,360,465>\tPLAYER\tRATING\tKILLS\tDEATHS\tBONUS');
|
||||||
|
|
||||||
for (%index = 0; %index < $TeamRank[0, count]; %index++)
|
for (%index = 0; %index < $TeamRank[0, count]; %index++)
|
||||||
{
|
{
|
||||||
//get the client info
|
//get the client info
|
||||||
%cl = $TeamRank[0, %index];
|
%cl = $TeamRank[0, %index];
|
||||||
|
|
||||||
//get the score
|
//get the score
|
||||||
%clScore = %cl.score;
|
%clScore = %cl.score;
|
||||||
|
|
||||||
%clKills = mFloatLength( %cl.kills, 0 );
|
%clKills = mFloatLength( %cl.kills, 0 );
|
||||||
%clDeaths = mFloatLength( %cl.deaths + %cl.suicides, 0 );
|
%clDeaths = mFloatLength( %cl.deaths + %cl.suicides, 0 );
|
||||||
%clBonus = mFloor((%cl.Bonus * %game.SCORE_PER_BONUS) + (%cl.MidAir * %game.SCORE_PER_MIDAIR) + (%cl.KillStreakBonus * %game.SCORE_PER_KILLSTREAKBONUS ));
|
%clBonus = mFloor((%cl.Bonus * %game.SCORE_PER_BONUS) + (%cl.MidAir * %game.SCORE_PER_MIDAIR) + (%cl.KillStreakBonus * %game.SCORE_PER_KILLSTREAKBONUS ));
|
||||||
%clStyle = %cl == %client ? "<color:dcdcdc>" : "";
|
%clStyle = %cl == %client ? "<color:dcdcdc>" : "";
|
||||||
|
|
||||||
//%BonusValue = %client.Bonus * %game.SCORE_PER_BONUS;
|
//%BonusValue = %client.Bonus * %game.SCORE_PER_BONUS;
|
||||||
//%MidAirValue = %client.MidAir * %game.SCORE_PER_MIDAIR;
|
//%MidAirValue = %client.MidAir * %game.SCORE_PER_MIDAIR;
|
||||||
//%KillStreakBonusValue = %client.KillStreakBonus * %game.SCORE_PER_KILLSTREAKBONUS;
|
//%KillStreakBonusValue = %client.KillStreakBonus * %game.SCORE_PER_KILLSTREAKBONUS;
|
||||||
|
|
||||||
//if the client is not an observer, send the message
|
//if the client is not an observer, send the message
|
||||||
if (%client.team != 0)
|
if (%client.team != 0)
|
||||||
{ // <tab:15,235,340,415,500>\%5\%1\%2\%3\tBG'
|
{ // <tab:15,235,340,415,500>\%5\%1\%2\%3\tBG'
|
||||||
|
|
@ -656,7 +656,7 @@ function DMGame::updateScoreHud(%game, %client, %tag)
|
||||||
%cl.name, %clScore, %clKills, %clDeaths, %clStyle, %cl, %clBonus);
|
%cl.name, %clScore, %clKills, %clDeaths, %clStyle, %cl, %clBonus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tack on the list of observers:
|
// Tack on the list of observers:
|
||||||
%observerCount = 0;
|
%observerCount = 0;
|
||||||
for (%i = 0; %i < ClientGroup.getCount(); %i++)
|
for (%i = 0; %i < ClientGroup.getCount(); %i++)
|
||||||
|
|
@ -665,7 +665,7 @@ function DMGame::updateScoreHud(%game, %client, %tag)
|
||||||
if (%cl.team == 0)
|
if (%cl.team == 0)
|
||||||
%observerCount++;
|
%observerCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (%observerCount > 0)
|
if (%observerCount > 0)
|
||||||
{
|
{
|
||||||
messageClient( %client, 'SetLineHud', "", %tag, %index, "");
|
messageClient( %client, 'SetLineHud', "", %tag, %index, "");
|
||||||
|
|
@ -686,7 +686,7 @@ function DMGame::updateScoreHud(%game, %client, %tag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//clear the rest of Hud so we don't get old lines hanging around...
|
//clear the rest of Hud so we don't get old lines hanging around...
|
||||||
messageClient( %client, 'ClearHud', "", %tag, %index );
|
messageClient( %client, 'ClearHud', "", %tag, %index );
|
||||||
}
|
}
|
||||||
|
|
@ -698,13 +698,13 @@ function DMGame::updateScoreHud(%game, %client, %tag)
|
||||||
|
|
||||||
package DMGame
|
package DMGame
|
||||||
{
|
{
|
||||||
|
|
||||||
function deployMineCheck(%mineObj, %player)
|
function deployMineCheck(%mineObj, %player)
|
||||||
{
|
{
|
||||||
// explode it vgc
|
// explode it vgc
|
||||||
schedule(2000, %mineObj, "explodeMine", %mineObj, true);
|
schedule(2000, %mineObj, "explodeMine", %mineObj, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Take out anything vehicle related
|
//Take out anything vehicle related
|
||||||
function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC)
|
function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC)
|
||||||
{
|
{
|
||||||
|
|
@ -714,19 +714,19 @@ package DMGame
|
||||||
{
|
{
|
||||||
%amount *= 1.3;
|
%amount *= 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(%targetObject.client.armor $= "Heavy")
|
if(%targetObject.client.armor $= "Heavy")
|
||||||
{
|
{
|
||||||
%amount *= 1.43;
|
%amount *= 1.43;
|
||||||
}
|
}
|
||||||
|
|
||||||
//error("Armor::damageObject( "@%data@", "@%targetObject@", "@%sourceObject@", "@%position@", "@%amount@", "@%damageType@", "@%momVec@" )");
|
//error("Armor::damageObject( "@%data@", "@%targetObject@", "@%sourceObject@", "@%position@", "@%amount@", "@%damageType@", "@%momVec@" )");
|
||||||
if(%targetObject.invincible || %targetObject.getState() $= "Dead")
|
if(%targetObject.invincible || %targetObject.getState() $= "Dead")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
%targetClient = %targetObject.getOwnerClient();
|
%targetClient = %targetObject.getOwnerClient();
|
||||||
if(isObject(%mineSC))
|
if(isObject(%mineSC))
|
||||||
%sourceClient = %mineSC;
|
%sourceClient = %mineSC;
|
||||||
else
|
else
|
||||||
%sourceClient = isObject(%sourceObject) ? %sourceObject.getOwnerClient() : 0;
|
%sourceClient = isObject(%sourceObject) ? %sourceObject.getOwnerClient() : 0;
|
||||||
|
|
||||||
|
|
@ -740,8 +740,8 @@ package DMGame
|
||||||
//if (%sourceClient)
|
//if (%sourceClient)
|
||||||
// %sourceTeam = %sourceClient.getSensorGroup();
|
// %sourceTeam = %sourceClient.getSensorGroup();
|
||||||
//else if(%damageType == $DamageType::Suicide)
|
//else if(%damageType == $DamageType::Suicide)
|
||||||
// %sourceTeam = 0;
|
// %sourceTeam = 0;
|
||||||
|
|
||||||
// if teamdamage is off, and both parties are on the same team
|
// if teamdamage is off, and both parties are on the same team
|
||||||
// (but are not the same person), apply no damage
|
// (but are not the same person), apply no damage
|
||||||
//if(!$teamDamage && (%targetClient != %sourceClient) && (%targetTeam == %sourceTeam))
|
//if(!$teamDamage && (%targetClient != %sourceClient) && (%targetTeam == %sourceTeam))
|
||||||
|
|
@ -749,7 +749,7 @@ package DMGame
|
||||||
|
|
||||||
if(%targetObject.isShielded && %damageType != $DamageType::Blaster)
|
if(%targetObject.isShielded && %damageType != $DamageType::Blaster)
|
||||||
%amount = %data.checkShields(%targetObject, %position, %amount, %damageType);
|
%amount = %data.checkShields(%targetObject, %position, %amount, %damageType);
|
||||||
|
|
||||||
if(%amount == 0)
|
if(%amount == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -757,11 +757,11 @@ package DMGame
|
||||||
%damageScale = %data.damageScale[%damageType];
|
%damageScale = %data.damageScale[%damageType];
|
||||||
if(%damageScale !$= "")
|
if(%damageScale !$= "")
|
||||||
%amount *= %damageScale;
|
%amount *= %damageScale;
|
||||||
|
|
||||||
%flash = %targetObject.getDamageFlash() + (%amount * 2);
|
%flash = %targetObject.getDamageFlash() + (%amount * 2);
|
||||||
if (%flash > 0.75)
|
if (%flash > 0.75)
|
||||||
%flash = 0.75;
|
%flash = 0.75;
|
||||||
|
|
||||||
// Teratos: Originally from Eolk? Mine+Disc tracking/death message support.
|
// Teratos: Originally from Eolk? Mine+Disc tracking/death message support.
|
||||||
// No Schedules by DarkTiger Ver.2
|
// No Schedules by DarkTiger Ver.2
|
||||||
%targetClient.mineDisc = false;
|
%targetClient.mineDisc = false;
|
||||||
|
|
@ -770,17 +770,17 @@ package DMGame
|
||||||
case $DamageType::Disc:
|
case $DamageType::Disc:
|
||||||
if((getSimTime() - %targetClient.mdcTime1) < 256)
|
if((getSimTime() - %targetClient.mdcTime1) < 256)
|
||||||
%targetClient.mineDisc = true;
|
%targetClient.mineDisc = true;
|
||||||
|
|
||||||
%targetClient.mdcTime2 = getSimTime();
|
%targetClient.mdcTime2 = getSimTime();
|
||||||
|
|
||||||
case $DamageType::Mine:
|
case $DamageType::Mine:
|
||||||
if((getSimTime() - %targetClient.mdcTime2) < 256)
|
if((getSimTime() - %targetClient.mdcTime2) < 256)
|
||||||
%targetClient.mineDisc = true;
|
%targetClient.mineDisc = true;
|
||||||
|
|
||||||
%targetClient.mdcTime1 = getSimTime();
|
%targetClient.mdcTime1 = getSimTime();
|
||||||
}
|
}
|
||||||
// -- End Mine+Disc insert.
|
// -- End Mine+Disc insert.
|
||||||
|
|
||||||
%previousDamage = %targetObject.getDamagePercent();
|
%previousDamage = %targetObject.getDamagePercent();
|
||||||
%targetObject.setDamageFlash(%flash);
|
%targetObject.setDamageFlash(%flash);
|
||||||
%targetObject.applyDamage(%amount);
|
%targetObject.applyDamage(%amount);
|
||||||
|
|
@ -788,76 +788,69 @@ package DMGame
|
||||||
|
|
||||||
%targetClient.lastDamagedBy = %damagingClient;
|
%targetClient.lastDamagedBy = %damagingClient;
|
||||||
%targetClient.lastDamaged = getSimTime();
|
%targetClient.lastDamaged = getSimTime();
|
||||||
|
|
||||||
//now call the "onKilled" function if the client was... you know...
|
//now call the "onKilled" function if the client was... you know...
|
||||||
if(%targetObject.getState() $= "Dead")
|
if(%targetObject.getState() $= "Dead")
|
||||||
{
|
{
|
||||||
// where did this guy get it?
|
// where did this guy get it?
|
||||||
%damLoc = %targetObject.getDamageLocation(%position);
|
%damLoc = %targetObject.getDamageLocation(%position);
|
||||||
|
|
||||||
// should this guy be blown apart?
|
// should this guy be blown apart?
|
||||||
if( %damageType == $DamageType::Explosion ||
|
if( %damageType == $DamageType::Explosion ||
|
||||||
%damageType == $DamageType::Mortar ||
|
%damageType == $DamageType::Mortar ||
|
||||||
%damageType == $DamageType::SatchelCharge ||
|
%damageType == $DamageType::SatchelCharge ||
|
||||||
%damageType == $DamageType::Missile )
|
%damageType == $DamageType::Missile )
|
||||||
{
|
{
|
||||||
if( %previousDamage >= 0.35 ) // only if <= 35 percent damage remaining
|
if( %previousDamage >= 0.35 ) // only if <= 35 percent damage remaining
|
||||||
{
|
{
|
||||||
%targetObject.setMomentumVector(%momVec);
|
%targetObject.setMomentumVector(%momVec);
|
||||||
%targetObject.blowup();
|
%targetObject.blowup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we were killed, max out the flash
|
// If we were killed, max out the flash
|
||||||
%targetObject.setDamageFlash(0.75);
|
%targetObject.setDamageFlash(0.75);
|
||||||
|
|
||||||
%damLoc = %targetObject.getDamageLocation(%position);
|
%damLoc = %targetObject.getDamageLocation(%position);
|
||||||
Game.onClientKilled(%targetClient, %sourceClient, %damageType, %sourceObject, %damLoc);
|
Game.onClientKilled(%targetClient, %sourceClient, %damageType, %sourceObject, %damLoc);
|
||||||
}
|
}
|
||||||
else if ( %amount > 0.1 )
|
else if ( %amount > 0.1 )
|
||||||
{
|
{
|
||||||
if( %targetObject.station $= "" && %targetObject.isCloaked() )
|
if( %targetObject.station $= "" && %targetObject.isCloaked() )
|
||||||
{
|
{
|
||||||
%targetObject.setCloaked( false );
|
%targetObject.setCloaked( false );
|
||||||
%targetObject.reCloak = %targetObject.schedule( 500, "setCloaked", true );
|
%targetObject.reCloak = %targetObject.schedule( 500, "setCloaked", true );
|
||||||
}
|
}
|
||||||
|
|
||||||
playPain( %targetObject );
|
playPain( %targetObject );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function DMGame::sendGameVoteMenu(%game, %client, %key)
|
function DMGame::sendGameVoteMenu(%game, %client, %key)
|
||||||
{
|
{
|
||||||
parent::sendGameVoteMenu( %game, %client, %key );
|
parent::sendGameVoteMenu( %game, %client, %key );
|
||||||
|
|
||||||
%isAdmin = ( %client.isAdmin || %client.isSuperAdmin );
|
%isAdmin = ( %client.isAdmin || %client.isSuperAdmin );
|
||||||
|
|
||||||
if(!%client.canVote && !%isAdmin)
|
if(!%client.canVote && !%isAdmin)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( %game.scheduleVote $= "" )
|
if(%game.scheduleVote $= "")
|
||||||
{
|
{
|
||||||
if(!%client.isAdmin)
|
if(!%isAdmin || (%isAdmin && %client.ForceVote))
|
||||||
{
|
{
|
||||||
if(!$Host::DMSLOnlyMode)
|
if(!$Host::DMSLOnlyMode)
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Enable SL Only Mode', 'Vote to enable Shocklance Only Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Enable Shocklance Only Mode', 'Vote to enable Shocklance Only Mode' );
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Disable SL Only Mode', 'Vote to disable Shocklance Only Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Disable Shocklance Only Mode', 'Vote to disable Shocklance Only Mode' );
|
||||||
}
|
|
||||||
else if (%client.ForceVote > 0)
|
|
||||||
{
|
|
||||||
if(!$Host::DMSLOnlyMode)
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Enable SL Only Mode', 'Vote to enable Shocklance Only Mode' );
|
|
||||||
else
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Disable SL Only Mode', 'Vote to disable Shocklance Only Mode' );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!$Host::DMSLOnlyMode)
|
if(!$Host::DMSLOnlyMode)
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Enable SL Only Mode', 'Enable Shocklance Only Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Enable Shocklance Only Mode', 'Enable Shocklance Only Mode' );
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Disable SL Only Mode', 'Disable Shocklance Only Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'DMSLOnlyMode', 'Disable Shocklance Only Mode', 'Disable Shocklance Only Mode' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -869,7 +862,7 @@ function DMGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
case "DMSLOnlyMode":
|
case "DMSLOnlyMode":
|
||||||
%game.DMSLOnlyMode(%admin, %arg1, %arg2, %arg3, %arg4);
|
%game.DMSLOnlyMode(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4);
|
parent::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -884,17 +877,17 @@ function DMGame::DMSLOnlyMode(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
if(%admin)
|
if(%admin)
|
||||||
{
|
{
|
||||||
killeveryone();
|
killeveryone();
|
||||||
|
|
||||||
if( $Host::DMSLOnlyMode )
|
if( $Host::DMSLOnlyMode )
|
||||||
{
|
{
|
||||||
messageAll('MsgAdminForce', '\c2The Admin has disabled Shocklance Only Mode.');
|
messageAll('MsgAdminForce', '\c2The Admin has disabled Shocklance Only Mode.');
|
||||||
|
|
||||||
$Host::DMSLOnlyMode = false;
|
$Host::DMSLOnlyMode = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messageAll('MsgAdminForce', '\c2The Admin has enabled Shocklance Only Mode.');
|
messageAll('MsgAdminForce', '\c2The Admin has enabled Shocklance Only Mode.');
|
||||||
|
|
||||||
$Host::DMSLOnlyMode = true;
|
$Host::DMSLOnlyMode = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -904,17 +897,17 @@ function DMGame::DMSLOnlyMode(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
if(%totalVotes > 0 && (%game.totalVotesFor / ClientGroup.getCount()) > ($Host::VotePasspercent / 100))
|
if(%totalVotes > 0 && (%game.totalVotesFor / ClientGroup.getCount()) > ($Host::VotePasspercent / 100))
|
||||||
{
|
{
|
||||||
killeveryone();
|
killeveryone();
|
||||||
|
|
||||||
if( $Host::DMSLOnlyMode )
|
if( $Host::DMSLOnlyMode )
|
||||||
{
|
{
|
||||||
messageAll('MsgVotePassed', '\c2Shocklance Only Mode Disabled.');
|
messageAll('MsgVotePassed', '\c2Shocklance Only Mode Disabled.');
|
||||||
|
|
||||||
$Host::DMSLOnlyMode = false;
|
$Host::DMSLOnlyMode = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messageAll('MsgVotePassed', '\c2Shocklance Only Mode Enabled.');
|
messageAll('MsgVotePassed', '\c2Shocklance Only Mode Enabled.');
|
||||||
|
|
||||||
$Host::DMSLOnlyMode = true;
|
$Host::DMSLOnlyMode = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -932,13 +925,13 @@ function killEveryone(%ignore, %message)
|
||||||
else
|
else
|
||||||
messageAll('msgKillEveryone', %message);
|
messageAll('msgKillEveryone', %message);
|
||||||
|
|
||||||
for(%i = 0; %i < ClientGroup.getCount(); %i++)
|
for(%i = 0; %i < ClientGroup.getCount(); %i++)
|
||||||
{
|
{
|
||||||
%target = ClientGroup.getObject(%i);
|
%target = ClientGroup.getObject(%i);
|
||||||
|
|
||||||
if(!%target.player || %target.player == %ignore)
|
if(!%target.player || %target.player == %ignore)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
%target.player.blowup();
|
%target.player.blowup();
|
||||||
%target.player.scriptKill();
|
%target.player.scriptKill();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1172,42 +1172,20 @@ function LakRabbitGame::sendGameVoteMenu( %game, %client, %key )
|
||||||
|
|
||||||
if( %game.scheduleVote $= "" )
|
if( %game.scheduleVote $= "" )
|
||||||
{
|
{
|
||||||
if(!%isAdmin)
|
if(!%isAdmin || (%isAdmin && %client.ForceVote))
|
||||||
{
|
{
|
||||||
if(!Game.duelMode)
|
if(!Game.duelMode)
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Enable Duel Mode', 'Vote to enable Duel Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Enable Duel Mode', 'Vote to enable Duel Mode' );
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Disable Duel Mode', 'Vote to disable Duel Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Disable Duel Mode', 'Vote to disable Duel Mode' );
|
||||||
|
|
||||||
if(!Game.noSplashDamage)
|
if(!Game.noSplashDamage)
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Disable Splash Damage', 'Vote to disable Splash Damage' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Disable Splash Damage', 'Vote to disable Splash Damage' );
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Enable Splash Damage', 'Vote to enable Splash Damage' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Enable Splash Damage', 'Vote to enable Splash Damage' );
|
||||||
// DeVast - PubPro votes
|
if(!Game.PubPro) // DeVast - PubPro votes
|
||||||
if(!Game.PubPro)
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Enable Pro Mode (Disc, Blaster, Plasma Only)', 'Vote to enable Pro Mode (Disc, Blaster, Plasma Only)' );
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Enable Pro Mode', 'Vote to enable Pro Mode' );
|
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Disable Pro Mode', 'Vote to disable Pro Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Disable Pro Mode (Disc, Blaster, Plasma Only)', 'Vote to disable Pro Mode (Disc, Blaster, Plasma Only)' );
|
||||||
}
|
|
||||||
//Added so lak vote items are properly displayed in evo adminvotemenu
|
|
||||||
//A lot of changes were added to admin.ovl in evo
|
|
||||||
//see footnotes below
|
|
||||||
else if (%client.ForceVote > 0)
|
|
||||||
{
|
|
||||||
if(!Game.duelMode)
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Enable Duel Mode', 'Vote to enable Duel Mode' );
|
|
||||||
else
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Disable Duel Mode', 'Vote to disable Duel Mode' );
|
|
||||||
|
|
||||||
if(!Game.noSplashDamage)
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Disable Splash Damage', 'Vote to disable Splash Damage' );
|
|
||||||
else
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Enable Splash Damage', 'Vote to enable Splash Damage' );
|
|
||||||
// DeVast - PubPro votes
|
|
||||||
if(!Game.PubPro)
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Enable Pro Mode', 'Vote to enable Pro Mode' );
|
|
||||||
else
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Disable Pro Mode', 'Vote to disable Pro Mode' );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1215,16 +1193,14 @@ function LakRabbitGame::sendGameVoteMenu( %game, %client, %key )
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Enable Duel Mode', 'Enable Duel Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Enable Duel Mode', 'Enable Duel Mode' );
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Disable Duel Mode', 'Disable Duel Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Disable Duel Mode', 'Disable Duel Mode' );
|
||||||
|
|
||||||
if(!Game.noSplashDamage)
|
if(!Game.noSplashDamage)
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Disable Splash Damage', 'Disable Splash Damage' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Disable Splash Damage', 'Disable Splash Damage' );
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Enable Splash Damage', 'Enable Splash Damage' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteSplashDamage', 'Enable Splash Damage', 'Enable Splash Damage' );
|
||||||
// DeVast - PubPro votes
|
if(!Game.PubPro) // DeVast - PubPro votes
|
||||||
if(!Game.PubPro)
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Enable Pro Mode (Disc, Blaster, Plasma Only)', 'Enable Pro Mode (Disc, Blaster, Plasma Only)' );
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Enable Pro Mode', 'Enable Pro Mode' );
|
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Disable Pro Mode', 'Disable Pro Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VotePro', 'Disable Pro Mode (Disc, Blaster, Plasma Only)', 'Disable Pro Mode (Disc, Blaster, Plasma Only)' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -495,7 +495,7 @@ function SCtFGame::equip(%game, %player)
|
||||||
{
|
{
|
||||||
%player.clearInventory();
|
%player.clearInventory();
|
||||||
%player.setInventory(Disc,1);
|
%player.setInventory(Disc,1);
|
||||||
%player.setInventory(Blaster,1);
|
%player.setInventory(Shocklance,1);
|
||||||
%player.setInventory(GrenadeLauncher,1);
|
%player.setInventory(GrenadeLauncher,1);
|
||||||
%player.setInventory(DiscAmmo, %player.getDataBlock().max[DiscAmmo]);
|
%player.setInventory(DiscAmmo, %player.getDataBlock().max[DiscAmmo]);
|
||||||
%player.setInventory(GrenadeLauncherAmmo, %player.getDataBlock().max[GrenadeLauncherAmmo]);
|
%player.setInventory(GrenadeLauncherAmmo, %player.getDataBlock().max[GrenadeLauncherAmmo]);
|
||||||
|
|
@ -2214,33 +2214,26 @@ function SCtFGame::sendGameVoteMenu(%game, %client, %key)
|
||||||
if(!%client.canVote && !%isAdmin)
|
if(!%client.canVote && !%isAdmin)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( %game.scheduleVote $= "" )
|
if(%game.scheduleVote $= "")
|
||||||
{
|
{
|
||||||
if(!%client.isAdmin)
|
if(!%isAdmin || (%isAdmin && %client.ForceVote))
|
||||||
{
|
{
|
||||||
//messageClient( %client, 'MsgVoteItem', "", %key, 'VoteArmorClass', 'change the armor class to', 'Vote to change the Armor class' );
|
//messageClient( %client, 'MsgVoteItem', "", %key, 'VoteArmorClass', 'change the armor class to', 'Vote to change the Armor class' );
|
||||||
//messageClient( %client, 'MsgVoteItem', "", %key, 'VoteAntiTurtleTime', 'change the anti turtle time to', 'Vote Anti-Turtle time' );
|
//messageClient( %client, 'MsgVoteItem', "", %key, 'VoteAntiTurtleTime', 'change the anti turtle time to', 'Vote Anti-Turtle time' );
|
||||||
if(!$Host::SCtFProMode)
|
if(!$Host::SCtFProMode)
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Enable Pro Mode', 'Vote to enable Pro Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Enable Pro Mode (Disc, SL, GL Only)', 'Vote to enable Pro Mode (Disc, SL, GL Only)' );
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Disable Pro Mode', 'Vote to disable Pro Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Disable Pro Mode (Disc, SL, GL Only)', 'Vote to disable Pro Mode (Disc, SL, GL Only)' );
|
||||||
}
|
}
|
||||||
else if (%client.ForceVote > 0)
|
else
|
||||||
{
|
{
|
||||||
if(!$Host::SCtFProMode)
|
if(!$Host::SCtFProMode)
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Enable Pro Mode', 'Vote to enable Pro Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Enable Pro Mode (Disc, SL, GL Only)', 'Enable Pro Mode (Disc, SL, GL Only)' );
|
||||||
else
|
else
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Disable Pro Mode', 'Vote to disable Pro Mode' );
|
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Disable Pro Mode (Disc, SL, GL Only)', 'Disable Pro Mode (Disc, SL, GL Only)' );
|
||||||
}
|
}
|
||||||
else
|
//messageClient( %client, 'MsgVoteItem', "", %key, 'VoteArmorClass', 'change the armor class to', 'Change the Armor class' );
|
||||||
{
|
//messageClient( %client, 'MsgVoteItem', "", %key, 'VoteAntiTurtleTime', 'change the anti turtle time to', 'Change Anti-Turtle time' );
|
||||||
if(!$Host::SCtFProMode)
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Enable Pro Mode', 'Enable Pro Mode' );
|
|
||||||
else
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'SCtFProMode', 'Disable Pro Mode', 'Disable Pro Mode' );
|
|
||||||
}
|
|
||||||
//messageClient( %client, 'MsgVoteItem', "", %key, 'VoteArmorClass', 'change the armor class to', 'Change the Armor class' );
|
|
||||||
//messageClient( %client, 'MsgVoteItem', "", %key, 'VoteAntiTurtleTime', 'change the anti turtle time to', 'Change Anti-Turtle time' );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
//$Host::AllowPlayerVoteTournamentMode = 1;
|
//$Host::AllowPlayerVoteTournamentMode = 1;
|
||||||
//$Host::AllowPlayerVoteTeamDamage = 0;
|
//$Host::AllowPlayerVoteTeamDamage = 0;
|
||||||
//$Host::AllowPlayerTournamentModeVotekick = 0;
|
//$Host::AllowPlayerTournamentModeVotekick = 0;
|
||||||
|
$Host::AllowPlayerVoteNextMission = 1;
|
||||||
|
|
||||||
//Vote Delay
|
//Vote Delay
|
||||||
//Delay the ability to vote (For everyone) at the beginning of the match
|
//Delay the ability to vote (For everyone) at the beginning of the match
|
||||||
|
|
@ -22,19 +23,41 @@
|
||||||
package ExtraVoteMenu
|
package ExtraVoteMenu
|
||||||
{
|
{
|
||||||
|
|
||||||
|
function serverCmdGetVoteMenu( %client, %key )
|
||||||
|
{
|
||||||
|
if (isObject( Game ) && !%client.lockVMenu)
|
||||||
|
Game.sendGameVoteMenu( %client, %key );
|
||||||
|
%client.lockVMenu = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function CycleMissions()
|
||||||
|
{
|
||||||
|
if($voteNext)
|
||||||
|
{
|
||||||
|
%nextMission = $HostMissionFile[$voteNextMap];
|
||||||
|
%type = $HostTypeName[$voteNextType];
|
||||||
|
messageAll( 'MsgClient', 'Loading %1 (%2)...', %nextMission, $HostTypeDisplayName[$voteNextType] );
|
||||||
|
loadMission( %nextMission, %type );
|
||||||
|
$voteNextType = 0;
|
||||||
|
$voteNextMap = 0;
|
||||||
|
$voteNext = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
parent::CycleMissions();
|
||||||
|
}
|
||||||
|
|
||||||
function DefaultGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4)
|
function DefaultGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
{
|
{
|
||||||
switch$ (%typeName)
|
switch$ (%typeName)
|
||||||
{
|
{
|
||||||
case "cancelMatchStart":
|
case "cancelMatchStart":
|
||||||
%game.cancelMatchStart(%admin, %arg1, %arg2, %arg3, %arg4);
|
%game.cancelMatchStart(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
|
|
||||||
case "passRunningVote":
|
case "passRunningVote":
|
||||||
%game.passRunningVote(%admin, %arg1, %arg2, %arg3, %arg4);
|
%game.passRunningVote(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
|
|
||||||
case "stopRunningVote":
|
case "stopRunningVote":
|
||||||
%game.stopRunningVote(%admin, %arg1, %arg2, %arg3, %arg4);
|
%game.stopRunningVote(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
|
case "VoteNextMission":
|
||||||
|
%game.setNextMission(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
default:
|
default:
|
||||||
Parent::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4);
|
Parent::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4);
|
||||||
}
|
}
|
||||||
|
|
@ -42,205 +65,210 @@ function DefaultGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %a
|
||||||
|
|
||||||
function DefaultGame::sendGameVoteMenu(%game, %client, %key)
|
function DefaultGame::sendGameVoteMenu(%game, %client, %key)
|
||||||
{
|
{
|
||||||
%isAdmin = (%client.isAdmin || %client.isSuperAdmin);
|
%isAdmin = (%client.isAdmin || %client.isSuperAdmin);
|
||||||
%multipleTeams = %game.numTeams > 1;
|
%multipleTeams = %game.numTeams > 1;
|
||||||
|
%client.k = %key; //For set next mission
|
||||||
|
|
||||||
// ********************************************
|
if (%client.ForceVote > 0)
|
||||||
// Admin Vote For ... Submenu
|
%client.ForceVote = %client.ForceVote - 1;
|
||||||
// ********************************************
|
|
||||||
if (!$Host::TournamentMode)
|
|
||||||
{
|
|
||||||
if (%client.ForceVote > 0)
|
|
||||||
%client.ForceVote = %client.ForceVote - 1;
|
|
||||||
|
|
||||||
if (%client.ForceVote > 0)
|
//Admin Submenu
|
||||||
{
|
if (%client.ForceVote > 0)
|
||||||
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(!$Host::TournamentMode)
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit');
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'change server to Tournament.', 'Vote Tournament Mode');
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' );
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the 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($teamDamage)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Vote to Disable Team Damage');
|
||||||
|
else
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage');
|
||||||
|
}
|
||||||
|
messageClient(%client, 'MsgVoteItem',"", %key, 'ForceVote', 'Cancel Force Vote', "Cancel 'Vote To...'");
|
||||||
|
return; // Display no further vote options
|
||||||
|
}
|
||||||
|
|
||||||
if(%multipleTeams)
|
//Pass Stop Menu
|
||||||
{
|
if(%client.isAdmin && %game.scheduleVote !$= "")
|
||||||
if($teamDamage)
|
{
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Vote to Disable Team Damage');
|
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote)) // allow admins to stop votes
|
||||||
else
|
messageClient( %client, 'MsgVoteItem', "", %key, 'stopRunningVote', 'stop current vote', 'Stop the Vote');
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage');
|
|
||||||
}
|
|
||||||
|
|
||||||
messageClient(%client, 'MsgVoteItem',"", %key, 'ForceVote', 'Cancel Force Vote', "Cancel 'Vote To...'");
|
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminPassVote)) // allow admins to pass votes
|
||||||
return; // Display no further vote options
|
messageClient( %client, 'MsgVoteItem', "", %key, 'passRunningVote', 'pass current vote', 'Pass the Vote');
|
||||||
}
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Mission Info Header - Mission Name, Type, Caps to Win
|
//Mission Info Header - Mission Name, Type, Caps to Win
|
||||||
if(%client.canVote)
|
if(%client.canVote && %game.scheduleVote $= "")
|
||||||
{
|
{
|
||||||
switch$($CurrentMissionType)
|
switch$($CurrentMissionType)
|
||||||
{
|
{
|
||||||
case CTF or SCtF:
|
case CTF or SCtF:
|
||||||
if($Host::TournamentMode)
|
if($Host::TournamentMode)
|
||||||
%showTL = " - Time Limit:" SPC $Host::TimeLimit;
|
%showTL = " - Time Limit:" SPC $Host::TimeLimit SPC "Minutes";
|
||||||
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);
|
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win" @ %showTL);
|
||||||
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);
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEAM OPTIONS
|
// TEAM OPTIONS
|
||||||
if(!$Host::TournamentMode)
|
if(!$Host::TournamentMode)
|
||||||
{
|
{
|
||||||
if(%client.team != 0) // he isn't an observer
|
if(%client.team != 0) // he isn't an observer
|
||||||
{
|
{
|
||||||
if(%multipleTeams)
|
if(%multipleTeams)
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'ChooseTeam', "", 'Change your Team');
|
messageClient(%client, 'MsgVoteItem', "", %key, 'ChooseTeam', "", 'Change your Team');
|
||||||
|
if($MatchStarted)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'MakeObserver', "", 'Become an Observer');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(%client.isAdmin) // only admins can change team during tournament mode
|
||||||
|
{
|
||||||
|
if(%client.team != 0) // he isn't an observer
|
||||||
|
{
|
||||||
|
if(%multipleTeams)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'ChooseTeam', "", 'Change your Team');
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'MakeObserver', "", 'Become an Observer');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($MatchStarted)
|
//Beginning match Vote Delay
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'MakeObserver', "", 'Become an Observer');
|
if(!%client.isAdmin)
|
||||||
}
|
{
|
||||||
}
|
if((getSimTime() - $VoteDelay) < ($Host::VoteDelayTime * 1000))
|
||||||
else if(%client.isAdmin) // only admins can change team during tournament mode
|
return;
|
||||||
{
|
}
|
||||||
if(%client.team != 0) // he isn't an observer
|
|
||||||
{
|
|
||||||
if(%multipleTeams)
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'ChooseTeam', "", 'Change your Team');
|
|
||||||
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'MakeObserver', "", 'Become an Observer');
|
if(!%client.canVote && !%isAdmin)
|
||||||
}
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
//Beginning match Vote Delay
|
if(%game.scheduleVote $= "")
|
||||||
if(!%client.isAdmin)
|
{
|
||||||
{
|
if(!%client.isAdmin)
|
||||||
if((getSimTime() - $VoteDelay) < ($Host::VoteDelayTime * 1000))
|
{
|
||||||
return;
|
if(!$Host::TournamentMode)
|
||||||
}
|
{
|
||||||
|
//if($Host::AllowPlayerVoteChangeMission) //Tourny Only for now
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission');
|
||||||
|
if($Host::AllowPlayerVoteNextMission)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteNextMission', 'set next mission to', 'Vote to Set the Next Mission');
|
||||||
|
if($Host::AllowPlayerVoteTournamentMode)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'Change server to Tournament.', 'Vote Tournament Mode');
|
||||||
|
if($Host::AllowPlayerVoteTimeLimit)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit');
|
||||||
|
if($Host::AllowPlayerVoteSkipMission)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' );
|
||||||
|
|
||||||
if(!%client.canVote && !%isAdmin)
|
if(%multipleTeams && $Host::AllowPlayerVoteTeamDamage)
|
||||||
return;
|
{
|
||||||
|
if($teamDamage)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Vote to Disable Team Damage');
|
||||||
|
else
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(!$MatchStarted && !$CountdownStarted)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteMatchStart', 'Start Match', 'Vote to Start the Match');
|
||||||
|
if($Host::AllowPlayerVoteChangeMission)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission');
|
||||||
|
if($Host::AllowPlayerVoteNextMission)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteNextMission', 'set next mission to', 'Vote to Set the Next Mission');
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteFFAMode', 'Change server to Free For All.', 'Vote Free For All Mode');
|
||||||
|
if($Host::AllowPlayerVoteTimeLimit)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit');
|
||||||
|
|
||||||
if(%game.scheduleVote $= "")
|
if(%multipleTeams && $Host::AllowPlayerVoteTeamDamage)
|
||||||
{
|
{
|
||||||
if(!%client.isAdmin)
|
if($teamDamage)
|
||||||
{
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Vote to Disable Team Damage');
|
||||||
if(!$Host::TournamentMode)
|
else
|
||||||
{
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage');
|
||||||
if($Host::AllowPlayerVoteChangeMission)
|
}
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission');
|
}
|
||||||
if($Host::AllowPlayerVoteTournamentMode)
|
}
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'Change server to Tournament.', 'Vote Tournament Mode');
|
else
|
||||||
if($Host::AllowPlayerVoteTimeLimit)
|
{
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit');
|
if(!$Host::TournamentMode)
|
||||||
if($Host::AllowPlayerVoteSkipMission)
|
{
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' );
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'Change server to Tournament.', 'Tournament Mode');
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Change the Mission');
|
||||||
|
if(!$voteNext)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteNextMission', 'set next mission to', 'Set the Next Mission');
|
||||||
|
else
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'ClearNextMap', 'Clear Next Set Map', 'Clear Next Set Map');
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Skip the Mission' );
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Change the Time Limit');
|
||||||
|
if(%multipleTeams)
|
||||||
|
{
|
||||||
|
if($teamDamage)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Disable Team Damage');
|
||||||
|
else
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Enable Team Damage');
|
||||||
|
}
|
||||||
|
if($Host::AllowAdminVotes)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'ForceVote', 'Vote to ...', 'Vote to ...');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(!$MatchStarted && !$CountdownStarted)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteMatchStart', 'Start Match', 'Start Match');
|
||||||
|
if(!$MatchStarted && $CountdownStarted)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'cancelMatchStart', 'Cancel Match Start', 'Cancel Match Start');
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteFFAMode', 'Change server to Free For All.', 'Free For All Mode');
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Change the Mission');
|
||||||
|
if(!$voteNext)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteNextMission', 'set next mission to', 'Set the Next Mission');
|
||||||
|
else
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'ClearNextMap', 'Clear Next Set Map', 'Clear Next Set Map');
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Change the Time Limit');
|
||||||
|
if($Host::AllowAdminVotes)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'ForceVote', 'Vote to ...', 'Vote to ...');
|
||||||
|
if($Host::Password !$= "")
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Disable PUG Password', 'Disable PUG Password');
|
||||||
|
else
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Enable PUG Password', 'Enable PUG Password');
|
||||||
|
if($LockedTeams)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'ToggleLockedTeams', 'Disable Locked Teams', 'Disable Locked Teams');
|
||||||
|
else
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'ToggleLockedTeams', 'Enable Locked Teams', 'Enable Locked Teams');
|
||||||
|
if(%multipleTeams)
|
||||||
|
{
|
||||||
|
if($teamDamage)
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Disable Team Damage');
|
||||||
|
else
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Enable Team Damage');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(%multipleTeams && $Host::AllowPlayerVoteTeamDamage)
|
//Toggle Tournament Net Client
|
||||||
{
|
if(%client.isSuperAdmin)
|
||||||
if($teamDamage)
|
{
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Vote to Disable Team Damage');
|
if($Host::EnableNetTourneyClient)
|
||||||
else
|
messageClient( %client, 'MsgVoteItem', "", %key, 'ToggleTourneyNetClient', 'Disable Tournament Net Client', "Disable Tournament Net Client" );
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage');
|
else
|
||||||
}
|
messageClient( %client, 'MsgVoteItem', "", %key, 'ToggleTourneyNetClient', 'Enable Tournament Net Client', "Enable Tournament Net Client" );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if(!$MatchStarted && !$CountdownStarted)
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteMatchStart', 'Start Match', 'Vote to Start the Match');
|
|
||||||
if($Host::AllowPlayerVoteChangeMission)
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission');
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteFFAMode', 'Change server to Free For All.', 'Vote Free For All Mode');
|
|
||||||
if($Host::AllowPlayerVoteTimeLimit)
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit');
|
|
||||||
|
|
||||||
if(%multipleTeams && $Host::AllowPlayerVoteTeamDamage)
|
}
|
||||||
{
|
|
||||||
if($teamDamage)
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Vote to Disable Team Damage');
|
|
||||||
else
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Vote to Enable Team Damage');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(!$Host::TournamentMode)
|
|
||||||
{
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'Change server to Tournament.', 'Tournament Mode');
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Change the Mission');
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Skip the Mission' );
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Change the Time Limit');
|
|
||||||
|
|
||||||
if(%multipleTeams)
|
if ($Host::ServerRules[1] !$= "" )
|
||||||
{
|
messageClient( %client, 'MsgVoteItem', "", %key, 'showServerRules', 'show server rules', "Show Server Rules" );
|
||||||
if($teamDamage)
|
}
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Disable Team Damage');
|
|
||||||
else
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Enable Team Damage');
|
|
||||||
}
|
|
||||||
|
|
||||||
if( $Host::AllowAdminVotes )
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'ForceVote', 'Vote to ...', 'Vote to ...');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(!$MatchStarted && !$CountdownStarted)
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteMatchStart', 'Start Match', 'Start Match');
|
|
||||||
if(!$MatchStarted && $CountdownStarted)
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'cancelMatchStart', 'Cancel Match Start', 'Cancel Match Start');
|
|
||||||
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Change the Mission');
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteFFAMode', 'Change server to Free For All.', 'Free For All Mode');
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Change the Time Limit');
|
|
||||||
|
|
||||||
if($Host::Password !$= "")
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Disable PUG Password', 'Disable PUG Password');
|
|
||||||
else
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Enable PUG Password', 'Enable PUG Password');
|
|
||||||
|
|
||||||
if($LockedTeams)
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'ToggleLockedTeams', 'Disable Locked Teams', 'Disable Locked Teams');
|
|
||||||
else
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'ToggleLockedTeams', 'Enable Locked Teams', 'Enable Locked Teams');
|
|
||||||
|
|
||||||
if(%multipleTeams)
|
|
||||||
{
|
|
||||||
if($teamDamage)
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'disable team damage', 'Disable Team Damage');
|
|
||||||
else
|
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Enable Team Damage');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Toggle Tournament Net Client
|
|
||||||
if(%client.isSuperAdmin)
|
|
||||||
{
|
|
||||||
if($Host::EnableNetTourneyClient)
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'ToggleTourneyNetClient', 'Disable Tournament Net Client', "Disable Tournament Net Client" );
|
|
||||||
else
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'ToggleTourneyNetClient', 'Enable Tournament Net Client', "Enable Tournament Net Client" );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($Host::ServerRules[1] !$= "" )
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'showServerRules', 'show server rules', "Show Server Rules" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote)) // allow admins to stop votes
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'stopRunningVote', 'stop current vote', 'Stop the Vote');
|
|
||||||
|
|
||||||
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminPassVote)) // allow admins to pass votes
|
|
||||||
messageClient( %client, 'MsgVoteItem', "", %key, 'passRunningVote', 'pass current vote', 'Pass the Vote');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Eolk - completely re-wrote this.
|
// Eolk - completely re-wrote this.
|
||||||
|
|
@ -250,16 +278,90 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
if(!%client.canVote && !%isAdmin)
|
if(!%client.canVote && !%isAdmin)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(Game.scheduleVote !$= "" && (!%isAdmin || (%isAdmin && %client.adminVoteSet)))
|
if(Game.scheduleVote !$= "" && (!%isAdmin || (%isAdmin && %client.ForceVote)))
|
||||||
{
|
{
|
||||||
messageClient(%client, 'voteAlreadyRunning', "\c2A vote is already in progress.");
|
messageClient(%client, 'voteAlreadyRunning', "\c2A vote is already in progress.");
|
||||||
%client.adminVoteSet = 0;
|
%client.ForceVote = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
%teamSpecific = 0;
|
%teamSpecific = 0;
|
||||||
switch$(%typeName)
|
switch$(%typeName)
|
||||||
{
|
{
|
||||||
|
case "VoteNextMission":
|
||||||
|
%foundMap =0;
|
||||||
|
%client.lockVMenu = 1;
|
||||||
|
if(strpos(strlwr(%arg1),"next mission") != -1)
|
||||||
|
{
|
||||||
|
%key = %client.k++;
|
||||||
|
for ( %type = 0; %type < $HostTypeCount; %type++ )
|
||||||
|
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteNextMission', $HostTypeDisplayName[%type], $HostTypeDisplayName[%type], true );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
%key = %client.k++;
|
||||||
|
for ( %type = 0; %type < $HostTypeCount; %type++ )
|
||||||
|
{
|
||||||
|
if($HostTypeDisplayName[%type] $= %arg1)
|
||||||
|
{
|
||||||
|
$HostNextTypeIndex = %type;
|
||||||
|
|
||||||
|
|
||||||
|
for ( %i = $HostMissionCount[%type] - 1; %i >= 0; %i-- )
|
||||||
|
{
|
||||||
|
%idx = $HostMission[%type, %i];
|
||||||
|
// If we have bots, don't change to a mission that doesn't support bots:
|
||||||
|
if ( $HostGameBotCount > 0 )
|
||||||
|
{
|
||||||
|
if( !$BotEnabled[%idx] )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
messageClient( %client, 'MsgVoteItem', "", %key,'VoteNextMission',$HostMissionName[%idx],$HostMissionName[%idx], true );
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%type = $HostNextTypeIndex;
|
||||||
|
for ( %i = $HostMissionCount[%type] - 1; %i >= 0; %i-- )
|
||||||
|
{
|
||||||
|
%idx = $HostMission[%type, %i];
|
||||||
|
if ( $HostGameBotCount > 0 )
|
||||||
|
{
|
||||||
|
if( !$BotEnabled[%idx] )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(%arg1 $= $HostMissionName[%idx])
|
||||||
|
{
|
||||||
|
$hostNextMapIndex = %idx;
|
||||||
|
%foundMap = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//error("found map" SPC %foundMap SPC $HostNextTypeIndex SPC $hostNextMapIndex);
|
||||||
|
if(%foundMap)
|
||||||
|
{
|
||||||
|
%arg3 = $hostNextMapIndex;
|
||||||
|
%arg4 = $HostNextTypeIndex;
|
||||||
|
// Vote-spoof prevention right here
|
||||||
|
%arg1 = $HostMissionFile[%arg3];
|
||||||
|
%arg2 = $HostTypeName[%arg4];
|
||||||
|
if(!checkMapExist(%arg1, %arg2))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// We passed the spoof check, give it the fancy label
|
||||||
|
%arg1 = $HostMissionName[%arg3];
|
||||||
|
%arg2 = $HostTypeDisplayName[%arg4];
|
||||||
|
%client.lockVMenu = 0;
|
||||||
|
if((!%isAdmin && $Host::AllowPlayerVoteNextMission) || (%isAdmin && %client.ForceVote)) // not admin
|
||||||
|
{
|
||||||
|
if($CMHasVoted[%client.guid] >= $Host::ClassicMaxVotes && !%isAdmin) // they've voted too many times
|
||||||
|
{
|
||||||
|
messageClient(%client, "", "\c2You have exhausted your voting rights for this mission.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
%msg = %client.nameBase @ " initiated a vote to set the next mission to " @ %arg1 @ " (" @ %arg2 @ ").";
|
||||||
|
$CMHasVoted[%client.guid]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
case "VoteKickPlayer":
|
case "VoteKickPlayer":
|
||||||
if(%client == %arg1) // client is trying to votekick himself
|
if(%client == %arg1) // client is trying to votekick himself
|
||||||
return; // Use the leave button instead, pal.
|
return; // Use the leave button instead, pal.
|
||||||
|
|
@ -275,12 +377,12 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
else // Player is voting to kick
|
else // Player is voting to kick
|
||||||
{
|
{
|
||||||
if($Host::TournamentMode && !$Host::AllowPlayerTournamentModeVotekick) // Dont allow Votekicks in Tournament Mode
|
if($Host::TournamentMode && !$Host::AllowPlayerTournamentModeVotekick) // Dont allow Votekicks in Tournament Mode
|
||||||
{
|
{
|
||||||
messageClient(%client, "", "\c2No votekicks in Tournament Mode.");
|
messageClient(%client, "", "\c2No votekicks in Tournament Mode.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(%arg1.isAdmin) // target is an admin
|
if(%arg1.isAdmin) // target is an admin
|
||||||
{
|
{
|
||||||
messageClient(%client, "MsgClient", "\c2You cannot vote to kick "@%arg1.nameBase@", "@(%arg1.sex $= "Male" ? "he" : "she")@" is an admin!");
|
messageClient(%client, "MsgClient", "\c2You cannot vote to kick "@%arg1.nameBase@", "@(%arg1.sex $= "Male" ? "he" : "she")@" is an admin!");
|
||||||
return;
|
return;
|
||||||
|
|
@ -419,29 +521,29 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
|
|
||||||
//If proposed time is lower than server set or higher than unlimited
|
//If proposed time is lower than server set or higher than unlimited
|
||||||
if(%arg1 < $Host::TimeLimit || %arg1 > 999)
|
if(%arg1 < $Host::TimeLimit || %arg1 > 999)
|
||||||
{
|
{
|
||||||
if(!%isAdmin)
|
if(!%isAdmin)
|
||||||
{
|
{
|
||||||
messageClient(%client, "", "\c2Invalid time selection.");
|
messageClient(%client, "", "\c2Invalid time selection.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else //is an admin
|
else //is an admin
|
||||||
{
|
{
|
||||||
if($Host::TournamentMode) //Admins still have the option to set the time to 30 minutes in Tourney Mode
|
if($Host::TournamentMode) //Admins still have the option to set the time to 30 minutes in Tourney Mode
|
||||||
{
|
{
|
||||||
if(%arg1 !$= "30") //30 minutes only
|
if(%arg1 !$= "30") //30 minutes only
|
||||||
{
|
{
|
||||||
messageClient(%client, "", "\c2Invalid time selection.");
|
messageClient(%client, "", "\c2Invalid time selection.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messageClient(%client, "", "\c2Invalid time selection.");
|
messageClient(%client, "", "\c2Invalid time selection.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//If proposed time is something other than what is selectable
|
//If proposed time is something other than what is selectable
|
||||||
if(%arg1 !$= "30" && %arg1 !$= "45" && %arg1 !$= "60" && %arg1 !$= "75" && %arg1 !$= "90" && %arg1 !$= "180" && %arg1 !$= "360" && %arg1 !$= "999")
|
if(%arg1 !$= "30" && %arg1 !$= "45" && %arg1 !$= "60" && %arg1 !$= "75" && %arg1 !$= "90" && %arg1 !$= "180" && %arg1 !$= "360" && %arg1 !$= "999")
|
||||||
|
|
@ -518,19 +620,27 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
case "passRunningVote":
|
case "passRunningVote":
|
||||||
if (%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminPassVote))
|
if (%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminPassVote))
|
||||||
{
|
{
|
||||||
adminStartNewVote( %client, %typename, %arg1, %arg2, %arg3, %arg4);
|
passCurrentVote(%client);
|
||||||
adminLog(%client, " passed the vote in progress.");
|
adminLog(%client, " passed the vote in progress.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "stopRunningVote":
|
case "stopRunningVote":
|
||||||
if($VOStatus !$="InProgress" || $Host::TournamentMode) //Dont allow a stop vote after time has expired, then no new time is set - VoteOverTime
|
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote))
|
||||||
{
|
{
|
||||||
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote))
|
if($VOStatus !$="InProgress") //Dont allow a stop vote after time has expired, then no new time is set - VoteOverTime
|
||||||
{
|
{
|
||||||
adminStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4);
|
stopCurrentVote(%client);
|
||||||
adminLog(%client, " stopped the vote in progress.");
|
adminLog(%client, " stopped the vote in progress.");
|
||||||
}
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
messageClient(%client, "", "\c2Can't stop time vote after time has expired.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// LakRabbit Stuff
|
// LakRabbit Stuff
|
||||||
case "VoteDuelMode":
|
case "VoteDuelMode":
|
||||||
|
|
@ -647,33 +757,44 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case "ForceVote":
|
case "ForceVote":
|
||||||
if (%client.isAdmin && $Host::AllowAdminVotes)
|
if (!%client.isAdmin)
|
||||||
{
|
return;
|
||||||
if (%client.ForceVote)
|
|
||||||
{
|
if(%client.isAdmin && !$Host::AllowAdminVotes)
|
||||||
%client.ForceVote = 0;
|
return;
|
||||||
messageClient( %client, '', 'Vote to ... cancelled.' );
|
|
||||||
}
|
if (%client.ForceVote)
|
||||||
else
|
{
|
||||||
{
|
%client.ForceVote = 0;
|
||||||
%client.ForceVote = 2;
|
messageClient( %client, '', 'Vote to ... cancelled.' );
|
||||||
messageClient( %client, '', "Now select what to vote on, please." );
|
}
|
||||||
}
|
else
|
||||||
}
|
{
|
||||||
|
%client.ForceVote = 2;
|
||||||
|
messageClient( %client, '', "Now select what to vote on, please." );
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
case "ClearNextMap":
|
||||||
|
if (%client.isAdmin && $voteNext)
|
||||||
|
{
|
||||||
|
messageAll('MsgAdminForce', "\c2The Admin " @ %client.nameBase @ " has cleared the next set mission.");
|
||||||
|
adminLog(%client, " has cleared the next set mission.");
|
||||||
|
$voteNext = 0;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(%isAdmin && !%client.adminVoteSet && !%client.ForceVote)
|
if(%isAdmin && !%client.ForceVote)
|
||||||
adminStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4);
|
adminStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4);
|
||||||
else
|
else
|
||||||
playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %teamSpecific, %msg);
|
playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %teamSpecific, %msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
//exec("scripts/autoexec/VoteMenu.cs");
|
//exec("scripts/autoexec/VoteMenu.cs");
|
||||||
|
|
||||||
function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %teamSpecific, %msg)
|
function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %teamSpecific, %msg)
|
||||||
{
|
{
|
||||||
%clientsVoting = 0;
|
%clientsVoting = 0;
|
||||||
|
|
@ -717,6 +838,8 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
|
||||||
{
|
{
|
||||||
case "VoteChangeMission":
|
case "VoteChangeMission":
|
||||||
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "change the mission to", %arg1, %arg2);
|
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "change the mission to", %arg1, %arg2);
|
||||||
|
case "VoteNextMission":
|
||||||
|
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "set next mission to", %arg1, %arg2);
|
||||||
case "VoteSkipMission":
|
case "VoteSkipMission":
|
||||||
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "skip the mission");
|
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "skip the mission");
|
||||||
case "VoteChangeTimeLimit":
|
case "VoteChangeTimeLimit":
|
||||||
|
|
@ -883,6 +1006,7 @@ function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typ
|
||||||
if(isObject(%admin))
|
if(isObject(%admin))
|
||||||
{
|
{
|
||||||
messageAll('MsgAdminChangeMission', '\c2The Admin %3 has changed the mission to %1 (%2).', %missionDisplayName, %typeDisplayName, %admin.name );
|
messageAll('MsgAdminChangeMission', '\c2The Admin %3 has changed the mission to %1 (%2).', %missionDisplayName, %typeDisplayName, %admin.name );
|
||||||
|
$voteNext = 0;
|
||||||
%game.gameOver();
|
%game.gameOver();
|
||||||
loadMission( %mission, %missionType, false );
|
loadMission( %mission, %missionType, false );
|
||||||
adminLog(%admin, " has changed the mission to " @ %missionDisplayName @ " (" @ %typeDisplayName @ ")");
|
adminLog(%admin, " has changed the mission to " @ %missionDisplayName @ " (" @ %typeDisplayName @ ")");
|
||||||
|
|
@ -901,6 +1025,7 @@ function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typ
|
||||||
//Show Vote %
|
//Show Vote %
|
||||||
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);
|
||||||
|
|
||||||
|
$voteNext = 0;
|
||||||
%game.gameOver();
|
%game.gameOver();
|
||||||
loadMission( %mission, %missionType, false );
|
loadMission( %mission, %missionType, false );
|
||||||
}
|
}
|
||||||
|
|
@ -1346,27 +1471,6 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DefaultGame::passRunningVote(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
|
||||||
{
|
|
||||||
if ( %admin && Game.scheduleVote !$= "" )
|
|
||||||
{
|
|
||||||
passCurrentVote();
|
|
||||||
messageAll('MsgAdminForce', '\c2The Admin passed the vote.' );
|
|
||||||
echo("The admin" SPC %admin.nameBase SPC "has passed the vote.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function DefaultGame::stopRunningVote(%game, %admin, %arg1, %arg2, %arg3, %arg4)
|
|
||||||
{
|
|
||||||
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
|
||||||
if(%admin && Game.scheduleVote !$= "" && %curTimeLeftMS > 0)
|
|
||||||
{
|
|
||||||
stopCurrentVote();
|
|
||||||
messageAll('MsgAdminForce', '\c2The Admin stopped the vote.');
|
|
||||||
echo("The admin" SPC %admin.nameBase SPC "has stopped the vote.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function adminStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4)
|
function adminStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4)
|
||||||
{
|
{
|
||||||
if ( Game.scheduleVote !$= "" && Game.voteType $= %typeName )
|
if ( Game.scheduleVote !$= "" && Game.voteType $= %typeName )
|
||||||
|
|
@ -1414,28 +1518,29 @@ function checkMapExist(%missionName, %missionType)
|
||||||
|
|
||||||
// passCurrentVote()
|
// passCurrentVote()
|
||||||
// Info: passes a vote that is running.
|
// Info: passes a vote that is running.
|
||||||
function passCurrentVote() // Edit GG
|
// Eolk - Removed *** classic admin stuff.
|
||||||
|
function passCurrentVote(%admin)
|
||||||
{
|
{
|
||||||
if(Game.scheduleVote !$= "")
|
if(Game.scheduleVote !$= "")
|
||||||
{
|
{
|
||||||
messageAll('closeVoteHud', "");
|
messageAll('closeVoteHud', "");
|
||||||
cancel(Game.scheduleVote);
|
cancel(Game.scheduleVote);
|
||||||
Game.scheduleVote = "";
|
Game.scheduleVote = "";
|
||||||
Game.kickClient = "";
|
Game.kickClient = "";
|
||||||
|
|
||||||
if(Game.votingArgs[typeName] $= "VoteKickPlayer") // special case here
|
if(Game.votingArgs[typeName] $= "VoteKickPlayer") // special case here
|
||||||
{
|
{
|
||||||
Game.votesFor[Game.kickTeam] = ClientGroup.getCount() - $HostGameBotCount;
|
Game.votesFor[Game.kickTeam] = ClientGroup.getCount() - $HostGameBotCount;
|
||||||
Game.votesAgainst[Game.kickTeam] = 0;
|
Game.votesAgainst[Game.kickTeam] = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Game.totalVotesFor = ClientGroup.getCount() - $HostGameBotCount;
|
Game.totalVotesFor = ClientGroup.getCount() - $HostGameBotCount;
|
||||||
Game.totalVotesAgainst = 0;
|
Game.totalVotesAgainst = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Game.evalVote(Game.votingArgs[typeName], false, Game.votingArgs[arg1], Game.votingArgs[arg2], Game.votingArgs[arg3], Game.votingArgs[arg4]);
|
Game.evalVote(Game.votingArgs[typeName], false, Game.votingArgs[arg1], Game.votingArgs[arg2], Game.votingArgs[arg3], Game.votingArgs[arg4]);
|
||||||
clearVotes();
|
clearVotes();
|
||||||
|
|
||||||
//Stop vote chimes
|
//Stop vote chimes
|
||||||
for(%i = 0; %i < $Host::EnableVoteSoundReminders; %i++)
|
for(%i = 0; %i < $Host::EnableVoteSoundReminders; %i++)
|
||||||
|
|
@ -1444,20 +1549,25 @@ function passCurrentVote() // Edit GG
|
||||||
cancel(Game.voteReminder[%i]);
|
cancel(Game.voteReminder[%i]);
|
||||||
Game.voteReminder[%i] = "";
|
Game.voteReminder[%i] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
messageAll('MsgAdminForce', "\c2The Admin " @ getTaggedString(%admin.name) @ " has passed the vote.");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
messageClient(%admin, "MsgClient", "\c2There is no vote to pass...");
|
||||||
}
|
}
|
||||||
|
|
||||||
// stopCurrentVote()
|
// stopCurrentVote()
|
||||||
// Info: stop a vote that is still running
|
// Info: stop a vote that is still running
|
||||||
function stopCurrentVote()
|
function stopCurrentVote(%admin)
|
||||||
{
|
{
|
||||||
if(Game.scheduleVote !$= "")
|
if(Game.scheduleVote !$= "")
|
||||||
{
|
{
|
||||||
messageAll('closeVoteHud', "");
|
|
||||||
cancel(Game.scheduleVote);
|
messageAll('closeVoteHud', "");
|
||||||
Game.scheduleVote = "";
|
cancel(Game.scheduleVote);
|
||||||
Game.kickClient = "";
|
Game.scheduleVote = "";
|
||||||
clearVotes();
|
Game.kickClient = "";
|
||||||
|
clearVotes();
|
||||||
|
|
||||||
//Stop vote chimes
|
//Stop vote chimes
|
||||||
for(%i = 0; %i < $Host::EnableVoteSoundReminders; %i++)
|
for(%i = 0; %i < $Host::EnableVoteSoundReminders; %i++)
|
||||||
|
|
@ -1466,7 +1576,11 @@ function stopCurrentVote()
|
||||||
cancel(Game.voteReminder[%i]);
|
cancel(Game.voteReminder[%i]);
|
||||||
Game.voteReminder[%i] = "";
|
Game.voteReminder[%i] = "";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
messageAll('MsgAdminForce', "\c2The Admin " @ getTaggedString(%admin.name) @ " has cancelled the vote.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
messageClient(%admin, "MsgClient", "\c2There is no vote to stop...");
|
||||||
}
|
}
|
||||||
|
|
||||||
// calcVotes(%typeName, %arg1, %arg2, %arg3, %arg4)
|
// calcVotes(%typeName, %arg1, %arg2, %arg3, %arg4)
|
||||||
|
|
@ -1638,4 +1752,44 @@ function VoteSound(%teamSpecific, %typename, %arg1, %arg2, %msg)
|
||||||
echo(%vip SPC %msg);
|
echo(%vip SPC %msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function DefaultGame::setNextMission(%game, %client, %map, %type, %mapIndex, %typeIndex)
|
||||||
|
{
|
||||||
|
if(%client.isAdmin || %client.isSuperAdmin)
|
||||||
|
{
|
||||||
|
$voteNext = 1;
|
||||||
|
$voteNextType = %typeIndex;
|
||||||
|
$voteNextMap = %mapIndex;
|
||||||
|
messageAll('MsgAdminChangeMission', '\c2The Admin %3 has set the next mission to %1 (%2).~wfx/misc/hunters_greed.wav', $HostMissionName[%mapIndex], $HostTypeDisplayName[%typeIndex], %client.name );
|
||||||
|
adminLog(%client, " has set the next mission to" SPC $HostMissionName[%mapIndex] @ "(" @ $HostTypeDisplayName[%typeIndex] @ ").");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
|
||||||
|
// Added people who dont vote into the equation, now if you do not vote, it doesn't count as a no. - z0dd - ZOD
|
||||||
|
if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone)) > ($Host::VotePasspercent / 100))
|
||||||
|
{
|
||||||
|
$voteNext = 1;
|
||||||
|
$voteNextType = %typeIndex;
|
||||||
|
$voteNextMap = %mapIndex;
|
||||||
|
messageAll('MsgVotePassed', '\c2Next mission set to %1 (%2) by vote.', $HostMissionName[%mapIndex], $HostTypeDisplayName[%typeIndex]);
|
||||||
|
|
||||||
|
//Log Vote % - Must be before Game Over
|
||||||
|
%key = "Passed";
|
||||||
|
votePercentLog(%missionDisplayName, %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
|
||||||
|
//Show Vote %
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
messageAll('MsgVoteFailed', '\c2Next mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount - %game.totalVotesNone) * 100));
|
||||||
|
//Log Vote %
|
||||||
|
%key = "Failed";
|
||||||
|
votePercentLog(%missionDisplayName, %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
|
||||||
|
//Show Vote %
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue