mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 22:17:31 +00:00
add returns, lol
This commit is contained in:
parent
2ef45bd7ee
commit
1a14c29c39
@ -324,9 +324,16 @@ namespace GMGreaterThanZeroCommands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Spectate(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
|
void Spectate(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
|
||||||
if (args.empty()) GameMessages::SendSlashCommandFeedbackText(entity, u"No player Given");
|
if (args.empty()) {
|
||||||
|
GameMessages::SendSlashCommandFeedbackText(entity, u"No player Given");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto player = PlayerManager::GetPlayer(args);
|
auto player = PlayerManager::GetPlayer(args);
|
||||||
if (!player) GameMessages::SendSlashCommandFeedbackText(entity, u"Player not found");
|
if (!player) {
|
||||||
|
GameMessages::SendSlashCommandFeedbackText(entity, u"Player not found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
GameMessages::SendSlashCommandFeedbackText(entity, u"Spectating Player");
|
GameMessages::SendSlashCommandFeedbackText(entity, u"Spectating Player");
|
||||||
GameMessages::SendForceCameraTargetCycle(entity, false, eCameraTargetCyclingMode::DISALLOW_CYCLING, player->GetObjectID());
|
GameMessages::SendForceCameraTargetCycle(entity, false, eCameraTargetCyclingMode::DISALLOW_CYCLING, player->GetObjectID());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user