mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-21 14:58:09 +00:00
Optimize scripts for faster compilation (#597)
* Implement Precompiled Headers * First volume of optimizations * Scripts A-B Gonna be doing this in alphabetical order now. * C Scripts and remove unneeded includes from base cppscripts header Remove the MissionComponent and Loot includes from all base scripts and place their needed includes in the respective scripts. * D scripts * F scripts * F scripts 2 Finish up removing extraneous includes from scripts that start with the letter F * G scripts Removing extraneous includes from scripts that start with the letter G * I scripts Removing extraneous includes from scripts that start with the letter I * M-Z scripts Removing extraneous includes from scripts that start with the letter M-Z * Revert "Implement Precompiled Headers" This reverts commitd79d8d4991
. * Revert "Revert "Implement Precompiled Headers"" This reverts commit0597faf308
. * Add back in PCH Add back in PCH * Fix CMake Whitespace Remove duplicate file glob Remove newline
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
#include "NpcAgCourseStarter.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GeneralUtils.h"
|
||||
#include "ScriptedActivityComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "LeaderboardManager.h"
|
||||
#include "Game.h"
|
||||
#include "dLogger.h"
|
||||
#include "MissionComponent.h"
|
||||
#include <ctime>
|
||||
|
||||
void NpcAgCourseStarter::OnStartup(Entity* self) {
|
||||
@@ -35,8 +33,6 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3
|
||||
}
|
||||
|
||||
if (identifier == u"player_dialog_cancel_course" && button == 1) {
|
||||
Game::logger->Log("OnMessageBoxResponse", "Removing player %llu\n", sender->GetObjectID());
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"stop_timer", 0, 0, LWOOBJID_EMPTY, "", sender->GetSystemAddress());
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"cancel_timer", 0, 0, LWOOBJID_EMPTY, "", sender->GetSystemAddress());
|
||||
@@ -58,8 +54,6 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3
|
||||
|
||||
data->values[1] = *(float*)&startTime;
|
||||
|
||||
Game::logger->Log("NpcAgCourseStarter", "Start time: %llu / %f\n", startTime, data->values[1]);
|
||||
|
||||
EntityManager::Instance()->SerializeEntity(self);
|
||||
}
|
||||
else if (identifier == u"FootRaceCancel") {
|
||||
@@ -94,9 +88,6 @@ void NpcAgCourseStarter::OnFireEventServerSide(Entity *self, Entity *sender, std
|
||||
time_t endTime = std::time(0);
|
||||
time_t finish = (endTime - *(time_t *) &data->values[1]);
|
||||
|
||||
Game::logger->Log("NpcAgCourseStarter", "End time: %llu, start time %llu, finish: %llu\n", endTime,
|
||||
*(time_t *) &data->values[1], finish);
|
||||
|
||||
data->values[2] = *(float *) &finish;
|
||||
|
||||
auto *missionComponent = sender->GetComponent<MissionComponent>();
|
||||
|
Reference in New Issue
Block a user