Lak SetNextMission support

This commit is contained in:
ChocoTaco 2019-02-26 22:33:46 -05:00
parent 3818007355
commit 833b469bd2
4 changed files with 16 additions and 12 deletions

Binary file not shown.

View file

@ -17,6 +17,9 @@
// Thanks for helping me test!
// maradona, pip, phantom jaguar, hilikus, the_ham, pip, wiggle, dragon, pancho villa, w/o, nectar and many others..
//
// v3.34 Febuary 2019
// Added SetNextMission support
//
// v3.33 January 2019
// Took out slap headshot.
// Added footnotes for voting references with evo admin mod.
@ -611,9 +614,9 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
}
if(%ma)
%points += 3;
%sound = %defaultSound;
%sourceObject.client.totalShockHits++;
%weapon = "ShockLance";
%sound = %defaultSound;
%sourceObject.client.totalShockHits++;
%weapon = "ShockLance";
}
else if(%damageType == $DamageType::Blaster)
{
@ -965,7 +968,7 @@ function LakRabbitGame::sendGameVoteMenu( %game, %client, %key )
//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)
else if (%client.ForceVote > 0 && %client.NextMission !$= 1 ) //Added for SetNextMission
{
if(!Game.duelMode)
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Enable Duel Mode', 'Vote to enable Duel Mode' );
@ -981,8 +984,8 @@ function LakRabbitGame::sendGameVoteMenu( %game, %client, %key )
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 if ( %client.NextMission !$= 1 ) //Added for SetNextMission
{
if(!Game.duelMode)
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteDuelMode', 'Enable Duel Mode', 'Enable Duel Mode' );

View file

@ -1,10 +1,6 @@
//Random Set Next Mission maps
//Runs for SetNextMisssion (Random) and Map Repetition Checker
//
//If this file isnt present. Presets are found in defaultGame.ovl in evo.vl2
//Presets are only meant as a fallback.
//Setting $EvoCachedNextMission = ""; can crash the server.
//
//This file is present
$GetRandomMapsLoaded = true;

View file

@ -16,7 +16,10 @@ function MapRepetitionChecker( %game )
//Debug
//%MapRepetitionCheckerDebug = true;
if( ($CurrentMissionType $= "CTF" || $CurrentMissionType $= "LakRabbit" ) && !$Host::TournamentMode && $MapRepetitionCheckerRunOnce !$= 1 && ($GetRandomMapsLoaded || $SNMPresetsLoaded))
if(!$GetRandomMapsLoaded)
return;
if( ($CurrentMissionType $= "CTF" || $CurrentMissionType $= "LakRabbit" ) && !$Host::TournamentMode && $MapRepetitionCheckerRunOnce !$= 1 )
{
if( $PreviousMission1back $= $EvoCachedNextMission || $PreviousMission2back $= $EvoCachedNextMission || $PreviousMission3back $= $EvoCachedNextMission || $PreviousMission4back $= $EvoCachedNextMission )
MapRepetitionCheckerFindRandom();
@ -44,13 +47,15 @@ function MapRepetitionCheckerFindRandom()
{
if($GetRandomMapsLoaded) //Make sure GetRandomMaps.cs is present
SetNextMapGetRandoms( %client ); //Get Random Set Next Mission maps
else
return;
if( $CurrentMissionType $= "CTF" )
{
%MapCheckerRandom = getRandom(1,6);
$EvoCachedNextMission = $SetNextMissionMapSlot[%MapCheckerRandom];
}
else if( $CurrentMissionType $= "LakRabbit" && $GetRandomMapsLoaded )
else if( $CurrentMissionType $= "LakRabbit" )
{
%MapCheckerRandom = getRandom(1,3);
$EvoCachedNextMission = $SetNextMissionMapSlot[%MapCheckerRandom];