[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.
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()
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()

View File

@ -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)