[Fix] Few lua script fixes.
This commit is contained in:
parent
19cbc18ff3
commit
ef5a8e5a5f
@ -1,4 +1,4 @@
|
||||
include("ai/include/basic.lua"
|
||||
include("ai/include/basic.lua")
|
||||
|
||||
-- Required control rate.
|
||||
control_rate = 2
|
||||
|
@ -1,13 +1,13 @@
|
||||
[[
|
||||
Basic tasks for a pilot, no need to reinvent the wheel with these.
|
||||
-- [[
|
||||
-- Basic tasks for a pilot, no need to reinvent the wheel with these.
|
||||
--
|
||||
-- The idea is to have it all here and only really work on the "control"
|
||||
-- functions and such for each AI.
|
||||
--]]
|
||||
|
||||
The idea is to have it all here and only really work on the "control"
|
||||
functions and such for each AI.
|
||||
]]
|
||||
|
||||
[[
|
||||
Attacks the current target, task pops when target is dead.
|
||||
]]
|
||||
--[[
|
||||
-- Attacks the current target, task pops when target is dead.
|
||||
--]]
|
||||
function attack()
|
||||
target = ai.targetid()
|
||||
|
||||
@ -37,9 +37,9 @@ function attack()
|
||||
end
|
||||
end
|
||||
|
||||
[[
|
||||
Attempts to run from the target.
|
||||
]]
|
||||
--[[
|
||||
-- Attempts to run from the target.
|
||||
--]]
|
||||
function runaway()
|
||||
target = ai.targetid()
|
||||
|
||||
|
37
src/pack.c
37
src/pack.c
@ -9,24 +9,25 @@
|
||||
#include "log.h"
|
||||
#include "md5.h"
|
||||
|
||||
/* == Store data in a funky format. ======================= */
|
||||
/* Format: */
|
||||
/* -- Index. */
|
||||
/* -- Magic number (16 bytes). */
|
||||
/* -- Number of files (uint32_t). */
|
||||
/* -- Files in format name/location. */
|
||||
/* -- File name (128 bytes max, ending in \0). */
|
||||
/* -- File location (uint32_t). */
|
||||
/* -- File data in format Size/Data. */
|
||||
/* -- File size (uint32_t). */
|
||||
/* -- File data (char*). */
|
||||
/* -- File MD5 (16 byte char*). */
|
||||
/* -- EOF */
|
||||
/* */
|
||||
/* -- Write magic number and number of files. */
|
||||
/* -- Write the index. */
|
||||
/* -- Pack the files. */
|
||||
/* ======================================================== */
|
||||
/* == Store data in a funky format. =======================
|
||||
* Format:
|
||||
* -- Index.
|
||||
* -- Magic number (16 bytes).
|
||||
* -- Number of files (uint32_t).
|
||||
* -- Files in format name/location.
|
||||
* -- File name (128 bytes max, ending in \0).
|
||||
* -- File location (uint32_t).
|
||||
* -- File data in format Size/Data.
|
||||
* -- File size (uint32_t).
|
||||
* -- File data (char*).
|
||||
* -- File MD5 (16 byte char*).
|
||||
* -- EOF.
|
||||
*
|
||||
* -- Write magic number and number of files.
|
||||
* -- Write the index.
|
||||
* -- Pack the files.
|
||||
* ========================================================
|
||||
*/
|
||||
|
||||
#undef DEBUG /* this will be spammy. */
|
||||
#define DEBUG(str, args...) do{;} while(0)
|
||||
|
Loading…
Reference in New Issue
Block a user