Update calculateSpawn_worker.cpp