mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
add shooting stars
This commit is contained in:
parent
aba2b6638e
commit
af845e3fbf
8 changed files with 419 additions and 1 deletions
|
@ -1910,7 +1910,20 @@ void Server::SendSetStars(session_t peer_id, const StarParams ¶ms)
|
|||
|
||||
pkt << params.visible << params.count
|
||||
<< params.starcolor << params.scale
|
||||
<< params.day_opacity;
|
||||
<< params.day_opacity
|
||||
<< params.shooting_stars_enabled
|
||||
<< params.shooting_star_chance
|
||||
<< params.shooting_star_speed
|
||||
<< params.shooting_star_size;
|
||||
|
||||
// Send the number of colors first
|
||||
u16 color_count = params.shooting_star_colors.size();
|
||||
pkt << color_count;
|
||||
|
||||
// Then send each color
|
||||
for (const auto &color : params.shooting_star_colors) {
|
||||
pkt << color;
|
||||
}
|
||||
|
||||
Send(&pkt);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue