mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-07 11:14:11 +00:00
feat: Add ability to toggle skipping of cinematics (#1312)
* Cinematics: Add ability to toggle skipping them * Add docs * Move sections
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#include "eMissionTaskType.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
#include "eConnectionType.h"
|
||||
#include "ePlayerFlag.h"
|
||||
#include "dConfig.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -173,6 +175,13 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System
|
||||
GameMessages::SendPlayerReady(entity, sysAddr);
|
||||
GameMessages::SendPlayerReady(Game::zoneManager->GetZoneControlObject(), sysAddr);
|
||||
|
||||
if (Game::config->GetValue("allow_players_to_skip_cinematics") != "1"
|
||||
|| !entity->GetCharacter()
|
||||
|| !entity->GetCharacter()->GetPlayerFlag(ePlayerFlag::DLU_SKIP_CINEMATICS)) return;
|
||||
entity->AddCallbackTimer(0.5f, [entity, sysAddr]() {
|
||||
if (!entity) return;
|
||||
GameMessages::SendEndCinematic(entity->GetObjectID(), u"", sysAddr);
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user