31 "-500.00 165.00 5231.69",
32 "-500.00 300.00 9934.41",
33 "10406.86 192.00 15860.00",
34 "4811.75 370.00 15860.00",
35 "-500.00 453.00 15860.00"
41 "7440.00 417.00 -500.00",
42 "-500.00 276.00 5473.00",
43 "-500.00 265.00 9852.00",
44 "4953.00 240.00 13300.00",
45 "9620.00 188.00 13300.00",
46 "13300.00 204.00 10322.00",
47 "13300.00 288.00 6204.00",
48 "13300.00 296.00 -500.00"
89 super.OnMissionStart();
97 UpdateDummyScheduler();
100 m_WorldData.UpdateBaseEnvTemperature(timeslice);
105 super.OnUpdate(timeslice);
113 InitialiseWorldData();
154 for (
int i = 0; i < randFireNb; i++)
158 if (usedIndices.Count() <= 0 || usedIndices.Find(randPos) < 0)
169 usedIndices.Insert(randPos);
199 foreach (Man man : players)
207 moduleLifespan.UpdateLifespan(player);
233 identity = player.GetIdentity();
267 OnClientPrepareEvent(clientPrepareParams.param1, clientPrepareParams.param2, clientPrepareParams.param3, clientPrepareParams.param4, clientPrepareParams.param5);
273 player =
OnClientNewEvent(newParams.param1, newParams.param2, newParams.param3);
276 Debug.
Log(
"ClientNewEvent: Player is empty");
279 identity = newParams.param1;
291 identity = readyParams.param1;
295 Debug.
Log(
"ClientReadyEvent: Player is empty");
310 identity = respawnParams.param1;
314 Debug.
Log(
"ClientRespawnEvent: Player is empty");
325 identity = reconnectParams.param1;
329 Debug.
Log(
"ClientReconnectEvent: Player is empty");
340 identity = discoParams.param1;
342 int logoutTime = discoParams.param3;
343 bool authFailed = discoParams.param4;
347 Debug.
Log(
"ClientDisconnectenEvent: Player is empty");
359 identity = player.GetIdentity();
364 Print(
"[Logout]: Player " + identity.
GetId() +
" cancelled");
368 Print(
"[Logout]: Player cancelled");
387 player.OnDisconnect();
401 pos =
"1189.3 0.0 5392.48";
412 Param1<bool> personal_light_toggle =
new Param1<bool>(is_personal_light);
417 Error(
"Error! Player was not initialized at the right time. Thus cannot send RPC command to enable or disable personal light!");
427 Param1<int> lightID =
new Param1<int>(lightingID);
455 string attachment_type;
456 for (
int i = 0; i < DefaultCharacterCreationMethods.GetAttachmentSlotsArray().
Count(); i++)
458 slot_ID = DefaultCharacterCreationMethods.GetAttachmentSlotsArray().Get(i);
459 attachment_type =
"";
463 if (DefaultCharacterCreationMethods.GetConfigArrayCountFromSlotID(slot_ID) > 0)
465 attachment_type = DefaultCharacterCreationMethods.GetConfigAttachmentTypes(slot_ID).GetRandomElement();
471 if (attachment_type !=
"")
473 m_player.GetInventory().CreateAttachmentEx(attachment_type,slot_ID);
487 return DefaultCharacterCreationMethods.GetConfigAttachmentTypes(slot_ID).Find(attachment_type) > -1;
493 bool generateRandomEquip =
false;
498 if (
GetGame().ListAvailableCharacters().Find(
GetGame().GetMenuDefaultCharacterData().GetCharacterType()) > -1)
503 generateRandomEquip =
true;
509 if (presetData && presetData.
IsValid())
512 if (presetCharType ==
string.
Empty)
513 presetCharType = characterType;
521 ErrorEx(
"Failed to create character from type: " + presetCharType +
", using default spawning method");
526 ErrorEx(
"Failed to load PlayerSpawnPreset data properly, using default spawning method");
532 if (generateRandomEquip)
544 #ifdef DIAG_DEVELOPER
545 if (FeatureTimeAccel.m_CurrentTimeAccel)
556 if (player.IsUnconscious() || player.IsRestrained())
558 PluginAdminLog adm = PluginAdminLog.Cast(
GetPlugin(PluginAdminLog));
559 adm.PlayerKilledByRespawn(player);
562 player.SetHealth(
"",
"", 0.0);
566 #ifdef DIAG_DEVELOPER
567 if (FeatureTimeAccel.m_CurrentTimeAccel)
578 player.OnReconnect();
584 bool disconnectNow =
true;
590 if (player.IsAlive())
594 Print(
"[Logout]: New player " + identity.
GetId() +
" with logout time " + logoutTime.ToString());
597 player.StatSyncToClient();
614 disconnectNow =
false;
622 Print(
"[Logout]: New player " + identity.
GetId() +
" with instant logout");
636 Print(
"[Logout]: Skipping player " + uid +
", already removed");
646 Print(
"[Logout]: Player " + uid +
" finished");
658 player.ReleaseNetworkControls();
669 if (player.IsUnconscious() || player.IsRestrained())
671 switch (player.GetKickOffReason())
691 if (player.IsAlive())
695 PluginAdminLog adm = PluginAdminLog.Cast(
GetPlugin(PluginAdminLog));
696 adm.PlayerKilledByDisconnect(player);
698 player.SetHealth(
"",
"", 0.0);
713 for (
int i = 0; i < tick_count_max; i++)
723 currentPlayer.OnTick();
746 if (!corpse_data || (corpse_data && (!corpse_data.
m_Player || !corpse_data.
m_bUpdate)))
748 invalid_corpses.Insert(i);
758 if (invalid_corpses.Count() > 0)
760 for (i = invalid_corpses.Count() - 1; i > -1; i--)
772 rpc.
Send(null,
ERPCs.RPC_SERVER_RESPAWN_MODE,
true, identity);
782 return m_ActiveRefresherLocations;
proto native Hive GetHive()
PluginBase GetPlugin(typename plugin_type)
const string STAT_PLAYTIME
const string STAT_DISTANCE
override string CreateRandomPlayer()
proto native void GetPlayers(out array< Man > players)
proto native void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
proto native void SelectPlayer(PlayerIdentity identity, Object player)
Selects player's controlled object.
proto native World GetWorld()
override ScriptCallQueue GetCallQueue(int call_category)
proto native Entity CreatePlayer(PlayerIdentity identity, string name, vector pos, float radius, string spec)
Assign player entity to client (in multiplayer)
void SetDebugMonitorEnabled(int value)
proto native void DisconnectPlayer(PlayerIdentity identity, string uid="")
Destroy player info and disconnect.
proto native void RPC(Object target, int rpcType, notnull array< ref Param > params, bool guaranteed, PlayerIdentity recipient=null)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
proto native void SendLogoutTime(Object player, int time)
Inform client about logout time (creates logout screen on specified client)
proto int GetTime()
returns mission time in milliseconds
proto native int ServerConfigGetInt(string name)
Server config parsing. Returns 0 if not found.
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
static bool GetDisableRespawnDialog()
static void SyncDataSendEx(notnull PlayerIdentity identity)
static void SyncDataSend(notnull PlayerIdentity identity)
Super root of all classes in Enforce script.
void UpdateCorpseState(bool force_check=false)
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
static void CreateZones()
proto native void CharacterExit(Man player)
void RandomArtillery(float deltaTime)
ref array< vector > m_FiringPos
void EquipCharacter(MenuDefaultCharacterData char_data)
Spawns character equip from received data. Checks validity against config, randomizes if invalid valu...
override void OnUpdate(float timeslice)
int m_MaxSimultaneousStrikes
PluginAdditionalInfo m_moduleDefaultCharacter
DEPRECATED.
ref array< Man > m_Players
void AddNewPlayerLogout(PlayerBase player, notnull LogoutInfo info)
void SyncGlobalLighting(PlayerBase player)
override bool InsertCorpse(Man player)
void UpdateCorpseStatesServer()
override RainProcurementHandler GetRainProcurementHandler()
override void OnGameplayDataHandlerLoad()
void HandleBody(PlayerBase player)
const int SCHEDULER_PLAYERS_PER_TICK
void TickScheduler(float timeslice)
const ref array< vector > CHERNARUS_STRIKE_POS
override void OnEvent(EventType eventTypeId, Param params)
void UpdatePlayersStats()
bool ProcessLoginData(ParamsReadContext ctx)
returns whether received data is valid, ctx can be filled on client in StoreLoginData()
ref RainProcurementHandler m_RainProcHandler
void InvokeOnConnect(PlayerBase player, PlayerIdentity identity)
PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
void PlayerDisconnected(PlayerBase player, PlayerIdentity identity, string uid)
bool ShouldPlayerBeKilled(PlayerBase player)
void InvokeOnDisconnect(PlayerBase player)
void ControlPersonalLight(PlayerBase player)
bool VerifyAttachmentType(int slot_ID, string attachment_type)
ref map< PlayerBase, ref LogoutInfo > m_NewLogoutPlayers
const ref array< vector > LIVONIA_STRIKE_POS
void StartingEquipSetup(PlayerBase player, bool clothesChosen)
can be overriden to manually set up starting equip. 'clothesChosen' is legacy parameter,...
void OnClientReadyEvent(PlayerIdentity identity, PlayerBase player)
void OnClientPrepareEvent(PlayerIdentity identity, out bool useDB, out vector pos, out float yaw, out int preloadTimeout)
override void SyncRespawnModeInfo(PlayerIdentity identity)
void OnClientDisconnectedEvent(PlayerIdentity identity, PlayerBase player, int logoutTime, bool authFailed)
ref map< PlayerBase, ref LogoutInfo > m_LogoutPlayers
void UpdateLogoutPlayers()
override void OnMissionStart()
void OnClientReconnectEvent(PlayerIdentity identity, PlayerBase player)
PlayerBase OnClientNewEvent(PlayerIdentity identity, vector pos, ParamsReadContext ctx)
override array< vector > GetActiveRefresherLocations()
void OnClientRespawnEvent(PlayerIdentity identity, PlayerBase player)
ref array< ref CorpseData > m_DeadPlayersArray
int m_MinSimultaneousStrikes
override bool IsPlayerDisconnecting(Man player)
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
proto string GetId()
unique id of player (hashed steamID, database Xbox id...) can be used in database or logs
The class that will be instanced (moddable)
static bool IsInitialized()
static bool ProcessEquipmentData(PlayerBase player, PlayerSpawnPreset data)
equips character with the chosen preset
static PlayerSpawnPreset GetRandomCharacterPreset()
string GetRandomCharacterType()
proto void Remove(func fn)
remove specific call from queue
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native void Send(Object target, int rpc_type, bool guaranteed, PlayerIdentity recipient=NULL)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
proto bool Write(void value_out)
static void SendPlayerList()
static void SyncDataSend(PlayerIdentity identity)
static void SpawnAllTriggerCarriers()
proto native void GetPlayerList(out array< Man > players)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
const EventType LogoutCancelEventTypeID
params: LogoutCancelEventParams
Param1< Man > LogoutCancelEventParams
Player.
const EventType ClientNewEventTypeID
params: ClientNewEventParams
Param5< PlayerIdentity, bool, vector, float, int > ClientPrepareEventParams
PlayerIdentity, useDB, pos, yaw, preloadTimeout (= additional time in seconds to how long server wait...
Serializer ParamsReadContext
Param2< PlayerIdentity, Man > ClientRespawnEventParams
PlayerIdentity, Man.
const EventType ClientReconnectEventTypeID
params: ClientReconnectEventParams
Param4< PlayerIdentity, Man, int, bool > ClientDisconnectedEventParams
PlayerIdentity, Man, LogoutTime, AuthFailed.
const EventType ClientRespawnEventTypeID
params: ClientRespawnEventParams
Param2< PlayerIdentity, Man > ClientReconnectEventParams
PlayerIdentity, Man.
Param2< PlayerIdentity, Man > ClientReadyEventParams
PlayerIdentity, Man.
Param3< PlayerIdentity, vector, Serializer > ClientNewEventParams
PlayerIdentity, PlayerPos, Top, Bottom, Shoe, Skin.
const EventType ClientDisconnectedEventTypeID
params: ClientDisconnectedEventParams
proto native CGame GetGame()
const EventType ClientReadyEventTypeID
params: ClientReadyEventParams
const EventType ClientPrepareEventTypeID
params: ClientPrepareEventParams
void Error(string err)
Messagebox with error message.
proto void Print(void var)
Prints content of variable to console/log.
const int RESPAWN_MODE_CUSTOM
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Min(float x, float y)
Returns smaller of two given values.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Param2< int, string > LogoutInfo
int time of the logout end