Commit 0cd38d99 authored by Mikleo's avatar Mikleo
Browse files

--

parent 3d5b5905
Pipeline #9621 passed with stages
in 13 seconds
......@@ -10,7 +10,7 @@
#include <SteamWorks>
#define PluginVersion "1.09"
#define PluginVersion "1.12"
float pVersion;
// note linearmap field is unstable
......@@ -54,7 +54,6 @@ char lastCommand[64];
bool usedFlagIndex[32] = {false,...};
ConVar ef_editlock,ef_baseswap,ef_scenario_vote_delay,ef_scenario_vote_duration,ef_scenario_vote_runoff_duration,ef_scenario_vote_min_timeleft,ef_scenario_vote_display_description,ef_scenario_vote_display_name,ef_scenario_vote_display_tags,ef_scenario_reload_map_config,ef_votelist_base,ef_alledit,ef_downloadeditorcfg,ef_disabletakedamage,ef_useblockmodels;
ConVar emp_sv_commander_freeze_time, emp_sv_player_refinery_multiplier, emp_sv_refinery_multiplier;
......@@ -340,15 +339,15 @@ public OnMapStart()
{
AddFileToDownloadsTable("models/empfun/platform2.dx90.vtx");
AddFileToDownloadsTable("models/empfun/platform2.mdl");
AddFileToDownloadsTable("models/empfun/platform2.phys");
AddFileToDownloadsTable("models/empfun/platform2.phy");
AddFileToDownloadsTable("models/empfun/platform2.vvd");
AddFileToDownloadsTable("models/empfun/platform4.dx90.vtx");
AddFileToDownloadsTable("models/empfun/platform4.mdl");
AddFileToDownloadsTable("models/empfun/platform4.phys");
AddFileToDownloadsTable("models/empfun/platform4.phy");
AddFileToDownloadsTable("models/empfun/platform4.vvd");
AddFileToDownloadsTable("models/empfun/platform8.dx90.vtx");
AddFileToDownloadsTable("models/empfun/platform8.mdl");
AddFileToDownloadsTable("models/empfun/platform8.phys");
AddFileToDownloadsTable("models/empfun/platform8.phy");
AddFileToDownloadsTable("models/empfun/platform8.vvd");
AddFileToDownloadsTable("materials/models/empfun/platform.vmt");
......@@ -800,6 +799,10 @@ public OnClientDisconnect(int client)
delete selectedEntities[client];
selectedEntities[client] = null;
}
if(grabbedEntity[client] != -1)
{
Release_Grab(client);
}
}
......@@ -3102,7 +3105,7 @@ public int Create_Flag(int client,int args,float position[3], float angles[3])
owner = GetTeamArg(arg);
// if creating a flag with a specific team disable basewap variable for this scenario.
if(owner >= 2)
currentScenarioKV.SetNum("BaseSwap",0);
currentScenarioKV.SetString("CanBaseSwap","no");
}
if(GetCmdArg(3, arg, sizeof(arg)))
{
......@@ -3622,7 +3625,7 @@ public Action Command_Scenario_Var(int client, int args)
char arg2 [128];
if(!GetCmdArg(1, arg1, sizeof(arg1)) || !GetCmdArg(2, arg2, sizeof(arg2)))
{
PrintToChat(client,"Options: Description,Details,CommFreezeTime,RefineryMultiplier,PlayerRefineryMultiplier Baseswap(1/0). eg /scenariovar description \"This is My Description\"");
PrintToChat(client,"Options: Description,Details,CommFreezeTime,RefineryMultiplier,PlayerRefineryMultiplier CanBaseSwap(yes/no/-1(default)). eg /scenariovar description \"This is My Description\"");
return Plugin_Handled;
}
if(StrEqual(arg1,"Description",false))
......@@ -3635,10 +3638,10 @@ public Action Command_Scenario_Var(int client, int args)
currentScenarioKV.SetString("details",arg2);
PrintToChat(client,"Set Details to:%s",arg2);
}
if(StrEqual(arg1,"BaseSwap",false))
if(StrEqual(arg1,"CanBaseSwap",false))
{
currentScenarioKV.SetString("BaseSwap",arg2);
PrintToChat(client,"Set BaseSwap to:%s",arg2);
currentScenarioKV.SetString("CanBaseSwap",arg2);
PrintToChat(client,"Set CanBaseSwap to:%s",arg2);
}
if(StrEqual(arg1,"CommFreezeTime",false))
{
......@@ -4108,10 +4111,19 @@ bool LoadScenario(int client,char[] filename)
SteamWorks_SetMapName(mapName);
}
char baseSwapValue[32];
//-1 or blank default, never and always.
currentScenarioKV.GetString("CanBaseSwap",baseSwapValue,sizeof(baseSwapValue),"-1");
if(StrEqual(baseSwapValue,"-1",false))
{
currentScenarioKV.GetString("BaseSwap",baseSwapValue,sizeof(baseSwapValue),"-1");
}
int scenarioBaseSwap = currentScenarioKV.GetNum("BaseSwap",-1);
if(ef_baseswap.IntValue == 1 && scenarioBaseSwap != 0 || (ef_baseswap.IntValue == 0 && scenarioBaseSwap > 0) )
if((ef_baseswap.IntValue == 1 && StrEqual(baseSwapValue,"-1",false)) || StrEqual(baseSwapValue,"yes",false) || StrEqual(baseSwapValue,"1",false) )
{
DelayedBaseSwap();
}
......
......@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "1.09"
"Latest" "1.12"
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment