memcpy and template deduction guide

This commit is contained in:
jadebenn
2024-11-21 18:37:50 -06:00
parent 3a0e37ee8a
commit 5aa8b1395b
12 changed files with 54 additions and 49 deletions

View File

@@ -258,8 +258,8 @@ void DestroyableComponent::SetMaxHealth(float value, bool playAnim) {
if (!characterComponent) return;
AMFArrayValue args;
args.Insert<std::string>("amount", std::to_string(difference));
args.Insert<std::string>("type", "health");
args.Insert("amount", std::to_string(difference));
args.Insert("type", "health");
GameMessages::SendUIMessageServerToSingleClient(m_Parent, characterComponent->GetSystemAddress(), "MaxPlayerBarUpdate", args);
}
@@ -300,8 +300,8 @@ void DestroyableComponent::SetMaxArmor(float value, bool playAnim) {
if (!characterComponent) return;
AMFArrayValue args;
args.Insert<std::string>("amount", std::to_string(value));
args.Insert<std::string>("type", "armor");
args.Insert("amount", std::to_string(value));
args.Insert("type", "armor");
GameMessages::SendUIMessageServerToSingleClient(m_Parent, characterComponent->GetSystemAddress(), "MaxPlayerBarUpdate", args);
}
@@ -341,8 +341,8 @@ void DestroyableComponent::SetMaxImagination(float value, bool playAnim) {
if (!characterComponent) return;
AMFArrayValue args;
args.Insert<std::string>("amount", std::to_string(difference));
args.Insert<std::string>("type", "imagination");
args.Insert("amount", std::to_string(difference));
args.Insert("type", "imagination");
GameMessages::SendUIMessageServerToSingleClient(m_Parent, characterComponent->GetSystemAddress(), "MaxPlayerBarUpdate", args);
}

View File

@@ -36,7 +36,7 @@ void PropertyEntranceComponent::OnUse(Entity* entity) {
AMFArrayValue args;
args.Insert<std::string>("state", "property_menu");
args.Insert("state", "property_menu");
GameMessages::SendUIMessageServerToSingleClient(entity, entity->GetSystemAddress(), "pushGameState", args);
}

View File

@@ -98,7 +98,7 @@ namespace GMZeroCommands {
{
AMFArrayValue args;
args.Insert<std::string>("state", "Story");
args.Insert("state", "Story");
GameMessages::SendUIMessageServerToSingleClient(entity, entity->GetSystemAddress(), "pushGameState", args);
}
@@ -121,7 +121,7 @@ namespace GMZeroCommands {
{
AMFArrayValue args;
args.Insert<std::string>("state", "Story");
args.Insert("state", "Story");
GameMessages::SendUIMessageServerToSingleClient(entity, entity->GetSystemAddress(), "pushGameState", args);
}