Freeciv-3.1
|
#include <string.h>
#include "fcintl.h"
#include "log.h"
#include "shared.h"
#include "calendar.h"
#include "events.h"
#include "game.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 214 of file spacerace.c.
Referenced by adv_spaceship_autoplace(), and handle_spaceship_place().
void handle_spaceship_launch | ( | struct player * | pplayer | ) |
Handle spaceship launch request.
Definition at line 166 of file spacerace.c.
Referenced by dai_manage_spaceship(), and server_handle_packet().
void handle_spaceship_place | ( | struct player * | pplayer, |
enum spaceship_place_type | type, | ||
int | num | ||
) |
Handle spaceship part placement request
Definition at line 205 of file spacerace.c.
Referenced by server_handle_packet().
int rank_spaceship_arrival | ( | struct player ** | result | ) |
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 459 of file spacerace.c.
Referenced by check_for_game_over().
void send_spaceship_info | ( | struct player * | src, |
struct conn_list * | dest | ||
) |
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 128 of file spacerace.c.
Referenced by city_build_building(), do_spaceship_place(), handle_spaceship_launch(), kill_player(), send_all_info(), and spaceship_lost().
double spaceship_arrival | ( | const struct player * | pplayer | ) |
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 445 of file spacerace.c.
Referenced by check_for_game_over(), and rank_spaceship_arrival().
void spaceship_arrived | ( | struct player * | pplayer | ) |
Handle spaceship arrival.
Definition at line 419 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 45 of file spacerace.c.
Referenced by do_spaceship_place(), sg_load_player_main(), and sg_load_player_main().
void spaceship_lost | ( | struct player * | pplayer | ) |
Handle spaceship loss.
Definition at line 430 of file spacerace.c.
Referenced by building_lost(), unit_conquer_city(), and unit_do_destroy_city().