mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
fix #2161
This commit is contained in:
@@ -9021,12 +9021,12 @@ money32 set_peep_name(int flags, int state, uint16 sprite_index, uint8* text_1,
|
||||
}
|
||||
|
||||
utf8* fullText = RCT2_ADDRESS(0x00F1AEF6, utf8);
|
||||
if (flags & GAME_COMMAND_FLAG_APPLY) {
|
||||
//if (flags & GAME_COMMAND_FLAG_APPLY) { // this check seems to be useless and causes problems in multiplayer
|
||||
uint8 position = (state - 1) % 3;
|
||||
memcpy(fullText + position * 12, text_1, 4);
|
||||
memcpy(fullText + 4 + position * 12, text_2, 4);
|
||||
memcpy(fullText + 8 + position * 12, text_3, 4);
|
||||
}
|
||||
//}
|
||||
|
||||
if (state != 0)
|
||||
return 0;
|
||||
|
||||
@@ -4919,7 +4919,7 @@ void game_command_set_ride_name(int *eax, int *ebx, int *ecx, int *edx, int *esi
|
||||
int nameChunkIndex = *eax & 0xFFFF;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_RIDE_RUNNING_COSTS * 4;
|
||||
if (*ebx & GAME_COMMAND_FLAG_APPLY) {
|
||||
//if (*ebx & GAME_COMMAND_FLAG_APPLY) { // this check seems to be useless and causes problems in multiplayer
|
||||
int nameChunkOffset = nameChunkIndex - 1;
|
||||
if (nameChunkOffset < 0)
|
||||
nameChunkOffset = 2;
|
||||
@@ -4927,7 +4927,7 @@ void game_command_set_ride_name(int *eax, int *ebx, int *ecx, int *edx, int *esi
|
||||
RCT2_GLOBAL(newName + nameChunkOffset + 0, uint32) = *edx;
|
||||
RCT2_GLOBAL(newName + nameChunkOffset + 4, uint32) = *ebp;
|
||||
RCT2_GLOBAL(newName + nameChunkOffset + 8, uint32) = *edi;
|
||||
}
|
||||
//}
|
||||
|
||||
if (nameChunkIndex != 0) {
|
||||
*ebx = 0;
|
||||
|
||||
@@ -869,7 +869,7 @@ void game_command_set_park_name(int *eax, int *ebx, int *ecx, int *edx, int *esi
|
||||
int nameChunkIndex = *eax & 0xFFFF;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
||||
if (*ebx & GAME_COMMAND_FLAG_APPLY) {
|
||||
//if (*ebx & GAME_COMMAND_FLAG_APPLY) { // this check seems to be useless and causes problems in multiplayer
|
||||
int nameChunkOffset = nameChunkIndex - 1;
|
||||
if (nameChunkOffset < 0)
|
||||
nameChunkOffset = 2;
|
||||
@@ -877,7 +877,7 @@ void game_command_set_park_name(int *eax, int *ebx, int *ecx, int *edx, int *esi
|
||||
RCT2_GLOBAL(newName + nameChunkOffset + 0, uint32) = *edx;
|
||||
RCT2_GLOBAL(newName + nameChunkOffset + 4, uint32) = *ebp;
|
||||
RCT2_GLOBAL(newName + nameChunkOffset + 8, uint32) = *edi;
|
||||
}
|
||||
//}
|
||||
|
||||
if (nameChunkIndex != 0) {
|
||||
*ebx = 0;
|
||||
|
||||
Reference in New Issue
Block a user