Skip to content

Commit

Permalink
Merge branch 'master' of [email protected]:TurningWheel/Barony.git
Browse files Browse the repository at this point in the history
  • Loading branch information
SheridanR committed Oct 25, 2024
2 parents bcc6fc9 + 0628851 commit 57d9e4f
Show file tree
Hide file tree
Showing 7 changed files with 551 additions and 35 deletions.
12 changes: 10 additions & 2 deletions src/entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10927,8 +10927,16 @@ void Entity::attack(int pose, int charge, Entity* target)
else
{
strcpy((char*)net_packet->data, "SHAK");
net_packet->data[4] = 10; // turns into .1
net_packet->data[5] = 10;
if ( damage > 0 )
{
net_packet->data[4] = 10; // turns into .1
net_packet->data[5] = 10;
}
else
{
net_packet->data[4] = 5; // turns into .05
net_packet->data[5] = 5;
}
net_packet->address.host = net_clients[playerhit - 1].host;
net_packet->address.port = net_clients[playerhit - 1].port;
net_packet->len = 6;
Expand Down
8 changes: 5 additions & 3 deletions src/playfab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ void PlayfabUser_t::globalStat(int index, int value)

PlayFab::EventsModels::WriteEventsRequest eventRequest;
PlayFab::EventsModels::EventContents eventContent;
eventContent.EventNamespace = "custom.globalstats";
eventContent.Name = "globalstats";
eventContent.Payload[SteamGlobalStatStr[index]] = value;
eventContent.EventNamespace = "custom.statglobal";
eventContent.Name = "statglobal";
eventContent.Payload["stat"] = SteamGlobalStatStr[index].c_str();
eventContent.Payload["level"] = currentlevel;
eventContent.Payload["secret"] = secretlevel;
eventRequest.Events.push_back(eventContent);
PlayFab::PlayFabEventsAPI::WriteTelemetryEvents(eventRequest, OnEventsWrite, OnCloudScriptFailure);
}
Expand Down
Loading

0 comments on commit 57d9e4f

Please sign in to comment.