Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-18 19:22:39 +0000
committerStijn Buys <ingar@osirion.org>2008-05-18 19:22:39 +0000
commit2f4c20a0b6fa0397d623d883ee48ba59563f1e2f (patch)
tree2186c4ada36a9bc832a89c662029d3b12bf1840e /src/game/game.cc
parentcc0a133a616aeff57887b27497e4a978b5697c04 (diff)
standard hail
Diffstat (limited to 'src/game/game.cc')
-rw-r--r--src/game/game.cc25
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);