[Fix] Few lua script fixes.

This commit is contained in:
Allanis 2013-07-06 21:42:29 +01:00
parent 19cbc18ff3
commit ef5a8e5a5f
3 changed files with 32 additions and 31 deletions

View File

@ -1,4 +1,4 @@
include("ai/include/basic.lua" include("ai/include/basic.lua")
-- Required control rate. -- Required control rate.
control_rate = 2 control_rate = 2

View File

@ -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() function attack()
target = ai.targetid() target = ai.targetid()
@ -37,9 +37,9 @@ function attack()
end end
end end
[[ --[[
Attempts to run from the target. -- Attempts to run from the target.
]] --]]
function runaway() function runaway()
target = ai.targetid() target = ai.targetid()

View File

@ -9,24 +9,25 @@
#include "log.h" #include "log.h"
#include "md5.h" #include "md5.h"
/* == Store data in a funky format. ======================= */ /* == Store data in a funky format. =======================
/* Format: */ * Format:
/* -- Index. */ * -- Index.
/* -- Magic number (16 bytes). */ * -- Magic number (16 bytes).
/* -- Number of files (uint32_t). */ * -- Number of files (uint32_t).
/* -- Files in format name/location. */ * -- Files in format name/location.
/* -- File name (128 bytes max, ending in \0). */ * -- File name (128 bytes max, ending in \0).
/* -- File location (uint32_t). */ * -- File location (uint32_t).
/* -- File data in format Size/Data. */ * -- File data in format Size/Data.
/* -- File size (uint32_t). */ * -- File size (uint32_t).
/* -- File data (char*). */ * -- File data (char*).
/* -- File MD5 (16 byte char*). */ * -- File MD5 (16 byte char*).
/* -- EOF */ * -- EOF.
/* */ *
/* -- Write magic number and number of files. */ * -- Write magic number and number of files.
/* -- Write the index. */ * -- Write the index.
/* -- Pack the files. */ * -- Pack the files.
/* ======================================================== */ * ========================================================
*/
#undef DEBUG /* this will be spammy. */ #undef DEBUG /* this will be spammy. */
#define DEBUG(str, args...) do{;} while(0) #define DEBUG(str, args...) do{;} while(0)