Merge pull request #4675 from zsilencer/bugfixes

A couple of bugs that I noticed while playing online
This commit is contained in:
Ted John authored and GitHub committed 2016-10-22 12:28:06 +01:00
commit 188e2efe9c
3 files changed
+7 -5

No files matched your search

+1 -1
View File
@@ -1228,7 +1228,7 @@ void Network::RemoveClient(std::unique_ptr<NetworkConnection>& connection)
rct_peep* pickup_peep = network_get_pickup_peep(connection_player->id);
if(pickup_peep) {
game_command_playerid = connection_player->id;
game_do_command(0, GAME_COMMAND_FLAG_APPLY, 1, 0, pickup_peep->type == PEEP_TYPE_GUEST ? GAME_COMMAND_PICKUP_GUEST : GAME_COMMAND_PICKUP_STAFF, network_get_pickup_peep_old_x(connection_player->id), 0);
game_do_command(pickup_peep->sprite_index, GAME_COMMAND_FLAG_APPLY, 1, 0, pickup_peep->type == PEEP_TYPE_GUEST ? GAME_COMMAND_PICKUP_GUEST : GAME_COMMAND_PICKUP_STAFF, network_get_pickup_peep_old_x(connection_player->id), 0);
}
gNetwork.Server_Send_EVENT_PLAYER_DISCONNECTED((char*)connection_player->name.c_str(), connection->GetLastDisconnectReason());
}
+3 -3
View File
@@ -1993,11 +1993,11 @@ bool peep_pickup_place(rct_peep* peep, int x, int y, int z, bool apply)
bool peep_pickup_command(int peepnum, int x, int y, int z, int action, bool apply)
{
rct_peep* peep = GET_PEEP(peepnum);
if (!peep || peep->sprite_identifier != SPRITE_IDENTIFIER_PEEP) {
return false;
}
switch (action) {
case 0: // pickup
if (!peep) {
return false;
}
if (!peep_can_be_picked_up(peep)) {
return false;
}
+3 -1
View File
@@ -913,7 +913,9 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i
return;
}
map_element_remove_banner_entry(map_element);
if (flags & GAME_COMMAND_FLAG_APPLY) {
map_element_remove_banner_entry(map_element);
}
rct_scenery_entry* scenery_entry = get_large_scenery_entry(map_element->properties.scenerymultiple.type & 0x3FF);
rct_xyz16 firstTile = {