| 72 | |
| 73 | |
| 74 | int LuaControl::Fire(lua_State* L) { |
| 75 | if (!ValidScript(L)) { |
| 76 | luaL_error(L, "this script can not control firing"); |
| 77 | } |
| 78 | LocalPlayer* myTank = LocalPlayer::getMyTank(); |
| 79 | if ((myTank == NULL) || !myTank->isAlive() || myTank->isObserver()) { |
| 80 | lua_pushboolean(L, false); |
| 81 | return 1; |
| 82 | } |
| 83 | lua_pushboolean(L, myTank->fireShot() != NULL); |
| 84 | return 1; |
| 85 | } |
| 86 | |
| 87 | |
| 88 | int LuaControl::Jump(lua_State* L) { |
nothing calls this directly
no test coverage detected