mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-05-23 07:12:24 +00:00
Merge branch 'main' into components-wheeeee
This commit is contained in:
commit
197d1bcdee
@ -338,7 +338,7 @@ This is a Work in Progress, but below are some quick links to documentaion for s
|
||||
## Former Contributors
|
||||
* TheMachine
|
||||
* Matthew
|
||||
* [Raine](https://github.com/Rainebannister)
|
||||
* [Raine](https://github.com/uwainium)
|
||||
* Bricknave
|
||||
|
||||
## Special Thanks
|
||||
|
@ -418,7 +418,7 @@ void Character::WriteToDatabase() {
|
||||
delete printer;
|
||||
}
|
||||
|
||||
void Character::SetPlayerFlag(const int32_t flagId, const bool value) {
|
||||
void Character::SetPlayerFlag(const uint32_t flagId, const bool value) {
|
||||
// If the flag is already set, we don't have to recalculate it
|
||||
if (GetPlayerFlag(flagId) == value) return;
|
||||
|
||||
@ -465,7 +465,7 @@ void Character::SetPlayerFlag(const int32_t flagId, const bool value) {
|
||||
GameMessages::SendNotifyClientFlagChange(m_ObjectID, flagId, value, m_ParentUser->GetSystemAddress());
|
||||
}
|
||||
|
||||
bool Character::GetPlayerFlag(const int32_t flagId) const {
|
||||
bool Character::GetPlayerFlag(const uint32_t flagId) const {
|
||||
// Calculate the index first
|
||||
const auto flagIndex = uint32_t(std::floor(flagId / 64));
|
||||
|
||||
|
@ -415,14 +415,14 @@ public:
|
||||
* @param flagId the ID of the flag to set
|
||||
* @param value the value to set for the flag
|
||||
*/
|
||||
void SetPlayerFlag(int32_t flagId, bool value);
|
||||
void SetPlayerFlag(uint32_t flagId, bool value);
|
||||
|
||||
/**
|
||||
* Gets the value for a certain character flag
|
||||
* @param flagId the ID of the flag to get a value for
|
||||
* @return the value of the flag given the ID (the default is false, obviously)
|
||||
*/
|
||||
bool GetPlayerFlag(int32_t flagId) const;
|
||||
bool GetPlayerFlag(uint32_t flagId) const;
|
||||
|
||||
/**
|
||||
* Notifies the character that they're now muted
|
||||
|
@ -1266,19 +1266,6 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Failed to spawn entity.");
|
||||
return;
|
||||
}
|
||||
|
||||
auto* havokVehiclePhysicsComponent = newEntity->GetComponent<HavokVehiclePhysicsComponent>();
|
||||
if (havokVehiclePhysicsComponent) {
|
||||
auto newRot = newEntity->GetRotation();
|
||||
auto angles = newRot.GetEulerAngles();
|
||||
// make it right side up
|
||||
angles.x -= PI;
|
||||
// make it going in the direction of the player
|
||||
angles.y -= PI;
|
||||
newRot = NiQuaternion::FromEulerAngles(angles);
|
||||
newEntity->SetRotation(newRot);
|
||||
}
|
||||
|
||||
EntityManager::Instance()->ConstructEntity(newEntity);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user