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

Method Fire

src/lua/LuaControl.cpp:74–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
73
74int 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
88int LuaControl::Jump(lua_State* L) {

Callers

nothing calls this directly

Calls 6

ValidScriptFunction · 0.85
luaL_errorFunction · 0.50
lua_pushbooleanFunction · 0.50
isAliveMethod · 0.45
isObserverMethod · 0.45
fireShotMethod · 0.45

Tested by

no test coverage detected