mirror of
https://github.com/Tomato-dayZ/DayZ-SA-Tomato.git
synced 2025-07-25 02:50:12 +00:00
CustomMission Fix
This commit is contained in:
Binary file not shown.
Binary file not shown.
@ -47,11 +47,7 @@ modded class MissionGameplay
|
||||
override void OnMissionStart()
|
||||
{
|
||||
super.OnMissionStart();
|
||||
|
||||
Widget welcomeMenu = GetGame().GetWorkspace().CreateWidgets( "DZ\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\WelcomeMenu.layout", NULL );
|
||||
//welcomeMenu.Show(true);
|
||||
|
||||
GetGame().GetCallQueue( CALL_CATEGORY_GUI ).CallLater( welcomeMenu.Show, 5000, false, false );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -68,11 +64,8 @@ modded class MissionGameplay
|
||||
}
|
||||
|
||||
if ( key == KeyCode.KC_INSERT )
|
||||
{
|
||||
|
||||
//devCam.SendRPC( isSpectating, GetCursorPos() );
|
||||
{
|
||||
adminMenuManager.CamTeleport( isSpectating, GetCursorPos() );
|
||||
|
||||
isSpectating = !isSpectating;
|
||||
}
|
||||
if ( key == KeyCode.KC_M )
|
||||
@ -80,19 +73,20 @@ modded class MissionGameplay
|
||||
if(GetGame().IsClient() || !GetGame().IsMultiplayer())
|
||||
{
|
||||
if ( player )
|
||||
{
|
||||
adminMenuManager.MenuOpen();
|
||||
{
|
||||
GetPlayer().MessageStatus( "Admin Menue Is Client" );
|
||||
adminMenuManager.MenuOpen();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Mission CreateCustomMission(string path)
|
||||
{
|
||||
if ( GetGame().IsServer() && GetGame().IsMultiplayer() ) {
|
||||
return new CommunityOfflineServer(); // this always runs because createcustommission isnt a client side function
|
||||
}
|
||||
return new MissionGameplay();
|
||||
}
|
||||
// class, function, params
|
||||
//Mission CreateCustomMission(string path)
|
||||
// {
|
||||
// if ( GetGame().IsServer() && GetGame().IsMultiplayer() ) {
|
||||
// return new CustomMission(); // this always runs because createcustommission isnt a client side function
|
||||
// }
|
||||
// return new MissionGameplay();
|
||||
// }
|
||||
//class, function, params
|
@ -60,4 +60,5 @@ enum M_RPCs
|
||||
M_Admin_Menu_Log_Debug = 7038;
|
||||
M_Admin_Menu_Log_Startup = 7039;
|
||||
M_Admin_Menu_Log_RPC = 7040;
|
||||
M_Admin_Menu_Message = 7041;
|
||||
}
|
||||
|
@ -19,32 +19,37 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with DayZ SA Tomato. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class CommunityOfflineServer : MissionServer
|
||||
modded class MissionServer
|
||||
{
|
||||
protected bool m_bLoaded;
|
||||
ref DevTeleport devTeleport;
|
||||
ref DevCam devCam;
|
||||
|
||||
ref AdminMenu adminMenu;
|
||||
ref DevCam devCam;
|
||||
protected float m_LogInTimerLength = 1;
|
||||
//admin list
|
||||
PlayerBase Admin = NULL;
|
||||
protected ref map<string, string> m_AdminList;
|
||||
static ref map<string, string> m_StaminaList;
|
||||
protected string m_AdminListPath = "$CurrentDir:\\DayZ-SA-Tomato\\Config\\";
|
||||
void CommunityOfflineServer()
|
||||
void MissionServer()
|
||||
{
|
||||
Print( "CommunityOfflineServer::CommunityOfflineServer()" );
|
||||
Print( "Dayz-Sa-Tomato initialized .." );
|
||||
m_bLoaded = false;
|
||||
devTeleport = new DevTeleport();
|
||||
devCam = new DevCam();
|
||||
|
||||
adminMenu = new AdminMenu();
|
||||
devCam = new DevCam();
|
||||
}
|
||||
|
||||
void ~CommunityOfflineServer()
|
||||
void ~MissionServer()
|
||||
{
|
||||
Print( "CommunityOfflineServer::~CommunityOfflineServer()" );
|
||||
}
|
||||
|
||||
void WelcomeMswgClient()
|
||||
{
|
||||
GetPlayer().MessageStatus( "Admin Menu Is Client" );
|
||||
}
|
||||
|
||||
//Create Mags And Custom Guns
|
||||
void addMags(PlayerBase player, string mag_type, int count)
|
||||
@ -355,7 +360,7 @@ class CommunityOfflineServer : MissionServer
|
||||
override void OnInit()
|
||||
{
|
||||
super.OnInit();
|
||||
SetupWeather();
|
||||
//SetupWeather();
|
||||
|
||||
//Admin list Insert from text
|
||||
m_AdminList = new map<string, string>; //UID, name
|
||||
@ -550,18 +555,18 @@ class CommunityOfflineServer : MissionServer
|
||||
}
|
||||
|
||||
|
||||
void InitHive()
|
||||
{
|
||||
Hive oHive = GetHive();
|
||||
// void InitHive()
|
||||
// {
|
||||
// Hive oHive = GetHive();
|
||||
|
||||
if( !oHive )
|
||||
{
|
||||
oHive = CreateHive();
|
||||
}
|
||||
// if( !oHive )
|
||||
// {
|
||||
// oHive = CreateHive();
|
||||
// }
|
||||
|
||||
if( oHive )
|
||||
{
|
||||
oHive.InitOffline();
|
||||
}
|
||||
}
|
||||
// if( oHive )
|
||||
// {
|
||||
// oHive.InitOffline();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
@ -258,9 +258,9 @@ static void SetFreezePlayer( ref PlayerBase player, bool freeze )
|
||||
player.GetInputController().OverrideAimChangeY( freeze, 0 );
|
||||
}
|
||||
|
||||
static CommunityOfflineServer GetServerMission()
|
||||
static MissionServer GetServerMission()
|
||||
{
|
||||
return CommunityOfflineServer.Cast( GetGame().GetMission() );
|
||||
return MissionServer.Cast( GetGame().GetMission() );
|
||||
}
|
||||
|
||||
static ref PlayerBase GetPlayer()
|
||||
|
@ -121,10 +121,7 @@ class AdminMenu //extends UIScriptedMenu
|
||||
ctx.Read( stringParam4 );
|
||||
RPCLog = stringParam4.param1;
|
||||
if ( GetGame().IsServer() )
|
||||
{
|
||||
//GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu, new Param1<vector>( GetCursorPos() ), false, NULL );
|
||||
// permission check - server mission file
|
||||
|
||||
{
|
||||
Admin = GetServerMission().IsAdminID(sender.GetName(), sender.GetPlainId());
|
||||
if ( Admin != NULL)
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with DayZ SA Tomato. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class DevCam
|
||||
{
|
||||
void DevCam()
|
||||
@ -69,4 +70,4 @@ class DevCam
|
||||
Print("Send Cam RPC");
|
||||
GetGame().RPCSingleParam( NULL, M_RPCs.M_SET_CAM, new Param2< bool, vector >( isSpectating, toPos ), false, NULL );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user