MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / Move

Method Move

src/lua/LuaControl.cpp:63–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61//============================================================================//
62
63int LuaControl::Move(lua_State* L) {
64 if (!ValidScript(L)) {
65 luaL_error(L, "this script can not control movement");
66 }
67 const float speed = luaL_optfloat(L, 1, 0.0f);
68 const float angVel = luaL_optfloat(L, 2, 0.0f);
69 forceControls(true, speed, angVel);
70 return 0;
71}
72
73
74int LuaControl::Fire(lua_State* L) {

Callers

nothing calls this directly

Calls 4

ValidScriptFunction · 0.85
luaL_optfloatFunction · 0.85
luaL_errorFunction · 0.50
forceControlsFunction · 0.50

Tested by

no test coverage detected