[Change] Mkay, escorts should properly hang if they have no target to
escort.
This commit is contained in:
parent
ace738021f
commit
8c3836ce50
@ -20,7 +20,7 @@ function escort()
|
|||||||
target = mem.escort
|
target = mem.escort
|
||||||
|
|
||||||
-- Will just float without a target to escort.
|
-- Will just float without a target to escort.
|
||||||
if target == nil then
|
if not ai.exists(target) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
4
src/ai.c
4
src/ai.c
@ -266,9 +266,13 @@ static void ai_setMemory(void) {
|
|||||||
L = cur_pilot->ai->L;
|
L = cur_pilot->ai->L;
|
||||||
|
|
||||||
lua_getglobal(L, "pilotmem");
|
lua_getglobal(L, "pilotmem");
|
||||||
|
/* pilotmem */
|
||||||
lua_pushnumber(L, cur_pilot->id);
|
lua_pushnumber(L, cur_pilot->id);
|
||||||
|
/* pilotmem, id */
|
||||||
lua_gettable(L, -2);
|
lua_gettable(L, -2);
|
||||||
|
/* pilotmem, table */
|
||||||
lua_setglobal(L, "mem");
|
lua_setglobal(L, "mem");
|
||||||
|
/* pilotmem */
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user