diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/game.cc | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/game/game.cc b/src/game/game.cc index aa78e41..ea72ce0 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -102,6 +102,15 @@ void func_buy(core::Player *player, std::string const &args) core::server()->send(player, "Usage: buy <" + helpstr + "^N>"); } } + +/// a player sends standard hails +void func_hail(core::Player *player, std::string const &args) +{ + core::server()->send(player, "You broadcast a standard standard hail."); + core::server()->broadcast("^B" + player->name() + " ^Bbroadcasts a standard hail!", player); + core::server()->broadcast_sound("com/hail"); +} + /*----- Game ------------------------------------------------------ */ Game::Game() : core::Module("Project::OSiRiON") @@ -253,16 +262,24 @@ void Game::init() if (!default_shipmodel) { con_error << "No default ship model in ini/ships.ini!\n"; + abort(); return; } // add engine game functions - core::Func::add("buy", (core::GameFuncPtr) func_buy); - core::Func::add("join", (core::GameFuncPtr) func_join); - core::Func::add("spectate", (core::GameFuncPtr) func_spectate); + core::Func *func = 0; + func = core::Func::add("buy", (core::GameFuncPtr) func_buy); + func->set_info("buy a ship"); + func = core::Func::add("join", (core::GameFuncPtr) func_join); + func->set_info("join the game"); + func = core::Func::add("hail", (core::GameFuncPtr) func_hail); + func->set_info("send a standard hail"); + func = core::Func::add("spectate", (core::GameFuncPtr) func_spectate); + func->set_info("leave the game and spectate"); // add engine core functions - core::Func::add("list_ship", (core::FuncPtr) func_list_ship); + func = core::Func::add("list_ship", (core::FuncPtr) func_list_ship); + func->set_info("list ship statistics"); // add engine game variables core::Cvar::set("g_testgamevariable", "1", core::Cvar::Game); |