Fix bug with unit recruitment
This commit is contained in:
@@ -397,12 +397,12 @@ void updateBuildingRecruitment(ecs_iter_t *it) {
|
||||
Player player = owner[i].player;
|
||||
Vector2 placePos = {
|
||||
(building[i].pos.x + building[i].size.x * 0.5f) * 16.0f,
|
||||
(building[i].pos.y + building->size.y + 0.5f) * 16.0f
|
||||
(building[i].pos.y + building[i].size.y + 0.5f) * 16.0f
|
||||
};
|
||||
placePos.x += GetRandomValue(-building[i].size.x, building[i].size.x);
|
||||
placePos.y += GetRandomValue(-4, 4);
|
||||
|
||||
for (i32 slotIdx = 0; slotIdx < info[i].numSlots; i++) {
|
||||
for (i32 slotIdx = 0; slotIdx < info[i].numSlots; slotIdx++) {
|
||||
BuildingRecruitSlot *slot = &info[i].slots[slotIdx];
|
||||
|
||||
if (slot->numRecruiting <= 0) continue;
|
||||
|
||||
Reference in New Issue
Block a user