mirror of https://github.com/OpenRCT2/OpenRCT2.git
Refactored insert_thought
This commit is contained in:
parent
95557bc732
commit
bfe45e5996
|
@ -892,14 +892,9 @@ void peep_insert_new_thought(rct_peep *peep, uint8 thought_type, uint8 thought_a
|
|||
if (thought->type == PEEP_THOUGHT_TYPE_NONE) break;
|
||||
|
||||
if (thought->type == thought_type && thought->item == thought_arguments){
|
||||
for (int j = i; j < PEEP_MAX_THOUGHTS; ++j){
|
||||
if (j == PEEP_MAX_THOUGHTS - 1){
|
||||
peep->thoughts[j].type = PEEP_THOUGHT_TYPE_NONE;
|
||||
memmove(thought, thought + 1, sizeof(rct_peep_thought)*(PEEP_MAX_THOUGHTS - i - 1));
|
||||
break;
|
||||
}
|
||||
peep->thoughts[j] = peep->thoughts[j + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue