From ef5a8e5a5ffd15e88d894eacfb6b619ee726739c Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 6 Jul 2013 21:42:29 +0100 Subject: [PATCH] [Fix] Few lua script fixes. --- scripts/ai/collective.lua | 2 +- scripts/ai/include/basic.lua | 24 +++++++++++------------ src/pack.c | 37 ++++++++++++++++++------------------ 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/ai/collective.lua b/scripts/ai/collective.lua index f9cba4d..420a6be 100644 --- a/scripts/ai/collective.lua +++ b/scripts/ai/collective.lua @@ -1,4 +1,4 @@ -include("ai/include/basic.lua" +include("ai/include/basic.lua") -- Required control rate. control_rate = 2 diff --git a/scripts/ai/include/basic.lua b/scripts/ai/include/basic.lua index d5e1339..a98822a 100644 --- a/scripts/ai/include/basic.lua +++ b/scripts/ai/include/basic.lua @@ -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() diff --git a/src/pack.c b/src/pack.c index fb7ce46..6415673 100644 --- a/src/pack.c +++ b/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)