Freeciv-3.3
|
#include <string.h>
#include "fcintl.h"
#include "log.h"
#include "shared.h"
#include "calendar.h"
#include "events.h"
#include "game.h"
#include "nation.h"
#include "packets.h"
#include "spaceship.h"
#include "plrhand.h"
#include "notify.h"
#include "srv_main.h"
#include "spacerace.h"
Go to the source code of this file.
Functions | |
void | spaceship_calc_derived (struct player_spaceship *ship) |
void | send_spaceship_info (struct player *src, struct conn_list *dest) |
void | handle_spaceship_launch (struct player *pplayer) |
void | handle_spaceship_place (struct player *pplayer, enum spaceship_place_type type, int num) |
bool | do_spaceship_place (struct player *pplayer, enum action_requester from, enum spaceship_place_type type, int num) |
void | spaceship_arrived (struct player *pplayer) |
void | spaceship_lost (struct player *pplayer) |
double | spaceship_arrival (const struct player *pplayer) |
int | rank_spaceship_arrival (struct player **result) |
bool do_spaceship_place | ( | struct player * | pplayer, |
enum action_requester | from, | ||
enum spaceship_place_type | type, | ||
int | num | ||
) |
Place a spaceship part
Definition at line 215 of file spacerace.c.
Referenced by adv_spaceship_autoplace(), and handle_spaceship_place().
Handle spaceship launch request.
Definition at line 167 of file spacerace.c.
Referenced by dai_manage_spaceship(), and server_handle_packet().
Handle spaceship part placement request
Definition at line 206 of file spacerace.c.
Referenced by server_handle_packet().
Rank launched player spaceships in order of arrival. 'result' is an array big enough to hold all the players. Returns number of launched spaceships, having filled the start of 'result' with that many players in order of predicted arrival. Uses shuffled player order in case of a tie.
Definition at line 460 of file spacerace.c.
Referenced by check_for_game_over().
Send details of src's spaceship (or spaceships of all players if src is NULL) to specified destinations. If dest is NULL then game.est_connections is used.
Definition at line 129 of file spacerace.c.
Referenced by city_build_building(), do_spaceship_place(), handle_spaceship_launch(), kill_player(), send_all_info(), and spaceship_lost().
Return arrival year of player's spaceship (fractional, as one spaceship may arrive before another in a given year). Only meaningful if spaceship has been launched.
Definition at line 446 of file spacerace.c.
Referenced by check_for_game_over(), and rank_spaceship_arrival().
Handle spaceship arrival.
Definition at line 420 of file spacerace.c.
Referenced by check_for_game_over().
void spaceship_calc_derived | ( | struct player_spaceship * | ship | ) |
Calculate and fill in the derived quantities about the spaceship. Data reverse engineered from Civ1. –dwp This could be in common, but its better for the client to take the values the server calculates, in case things change.
Definition at line 46 of file spacerace.c.
Referenced by do_spaceship_place(), sg_load_player_main(), and sg_load_player_main().
Handle spaceship loss.
Definition at line 431 of file spacerace.c.
Referenced by building_lost(), unit_conquer_city(), and unit_do_destroy_city().