[0.1] fixed an oversight where json files couldn't be sent.
anyhow, iceball-0.1.zip is about to be uploaded :D :D :D
This commit is contained in:
parent
99c6bc8292
commit
de434646d4
61
CREDITS.txt
61
CREDITS.txt
@ -1,40 +1,29 @@
|
|||||||
DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS.
|
This was out of date. I'm going to try and collate all the names.
|
||||||
|
If your name is missing, please prod us (even if we don't use your contribution anymore)
|
||||||
|
and we'll chuck it in.
|
||||||
|
|
||||||
GreaseMonkey [Lead Developer]:
|
Lead Developer + the guy who started the project out of frustration:
|
||||||
Everything other people didn't.
|
GreaseMonkey
|
||||||
|
|
||||||
|
And the rest in alphabetical order, without whom this project would not have been possible to run without a degree and a supercomputer:
|
||||||
|
10se1ucgo
|
||||||
|
Articsledder
|
||||||
|
BR
|
||||||
|
Bully
|
||||||
|
Dany0
|
||||||
|
learn_more
|
||||||
|
melchips
|
||||||
|
rakiru
|
||||||
|
Sonarpulse
|
||||||
|
topo
|
||||||
|
Triplefox
|
||||||
|
ulyssecarion
|
||||||
|
UnrealIncident
|
||||||
|
|
||||||
|
Special thanks to:
|
||||||
|
BR, for your countless contributions to the code and whatnot.
|
||||||
|
melchips, for your seriously awesome work on the OpenGL renderer.
|
||||||
|
rakiru, for hosting the server from day 42 (as well as some other cool things too).
|
||||||
|
Triplefox, for your GUI system I *still* have yet to learn how to use,
|
||||||
|
and the many other contributions you did earlier on.
|
||||||
|
|
||||||
And the rest in alphabetical order:
|
|
||||||
|
|
||||||
Arctic77:
|
|
||||||
Rifle model added January 2013
|
|
||||||
|
|
||||||
BR:
|
|
||||||
Player name list
|
|
||||||
Team switching
|
|
||||||
"Are you sure?" on quit
|
|
||||||
Improved key binding system
|
|
||||||
|
|
||||||
Dany0:
|
|
||||||
Czech translation
|
|
||||||
|
|
||||||
Ericson2314:
|
|
||||||
Rearranged the build tree
|
|
||||||
Added an SSE-optimised matrix-vector multiply
|
|
||||||
|
|
||||||
rakiru:
|
|
||||||
Scroll wheel to switch tools
|
|
||||||
Lent his VPS to host an Iceball server
|
|
||||||
|
|
||||||
topo:
|
|
||||||
FPS counter
|
|
||||||
Basic key binding system
|
|
||||||
|
|
||||||
Triplefox:
|
|
||||||
Widget system (in progress)
|
|
||||||
Miscellaneous utility functions
|
|
||||||
Kindly let me use his map, mesa.vxl
|
|
||||||
|
|
||||||
UnrealIncident:
|
|
||||||
Debug info (which is the reason I use string.format at all)
|
|
17
README.txt
17
README.txt
@ -8,6 +8,9 @@ If you've built this for not-Windows, running ./iceball should do the same.
|
|||||||
|
|
||||||
The tutorial files are located in pkg/iceball/halp/.
|
The tutorial files are located in pkg/iceball/halp/.
|
||||||
|
|
||||||
|
If you can't run the tutorial, or you can't read the text on it,
|
||||||
|
read docs/troubleshooting.txt.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
LICENSING NOTES:
|
LICENSING NOTES:
|
||||||
@ -27,7 +30,10 @@ It is marked accordingly.
|
|||||||
|
|
||||||
The manual is in the public domain, except where otherwise specified.
|
The manual is in the public domain, except where otherwise specified.
|
||||||
|
|
||||||
REQUIREMENTS:
|
MINIMUM SYSTEM REQUIREMENTS:
|
||||||
|
A computer.
|
||||||
|
|
||||||
|
BUILDING REQUIREMENTS:
|
||||||
- a C compiler that isn't crap (read: not MSVC++)
|
- a C compiler that isn't crap (read: not MSVC++)
|
||||||
- specifically, GCC
|
- specifically, GCC
|
||||||
- MinGW is a port of GCC for Windows: http://mingw.org/
|
- MinGW is a port of GCC for Windows: http://mingw.org/
|
||||||
@ -38,15 +44,12 @@ REQUIREMENTS:
|
|||||||
- zlib - http://zlib.net/
|
- zlib - http://zlib.net/
|
||||||
- sackit - https://github.com/iamgreaser/sackit/
|
- sackit - https://github.com/iamgreaser/sackit/
|
||||||
- you should copy libsackit.a and sackit.h to xlibinc.
|
- you should copy libsackit.a and sackit.h to xlibinc.
|
||||||
- enet 1.3 - http://enet.bespin.org/
|
- ENet 1.3 - http://enet.bespin.org/
|
||||||
- GNU make
|
- GNU make
|
||||||
- if someone has BSD make, please tell us :)
|
- if someone has BSD make, please tell us :)
|
||||||
|
|
||||||
STUFF TO DO BEFORE 0.1 CAN BE RELEASED:
|
On Windows, read Makefile.mingw for some instructions.
|
||||||
- DOCS!!! (ones which aren't crap)
|
On other OSes, some files for sackit and ENet need to be in xlibinc.
|
||||||
- make net_pack more solid
|
|
||||||
- JSON writer
|
|
||||||
- make kicking not suck
|
|
||||||
|
|
||||||
MSVC readme (wip):
|
MSVC readme (wip):
|
||||||
- create a folder 'winlibs' in the iceball dir
|
- create a folder 'winlibs' in the iceball dir
|
||||||
|
32
bigzipdist.sh
Executable file
32
bigzipdist.sh
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export ZIPNAME=nubdist/iceball-0.1.zip
|
||||||
|
|
||||||
|
#zip -r $ZIPNAME *.dll *.exe *.txt *.bat docs/ \
|
||||||
|
# pkg/base/*.lua \
|
||||||
|
# pkg/base/icegui/*.lua \
|
||||||
|
# pkg/maps/mesa.vxl \
|
||||||
|
# pkg/base/gfx/ pkg/base/pmf/ \
|
||||||
|
# pkg/iceball/snowtest/ \
|
||||||
|
# pkg/iceball/pmfedit/ \
|
||||||
|
# pkg/iceball/mapedit/ \
|
||||||
|
# dlcache/info.txt clsave/info.txt svsave/info.txt \
|
||||||
|
# clsave/config.json clsave/pub/user.json
|
||||||
|
|
||||||
|
zip -r $ZIPNAME *.dll *.exe *.txt opencmd.bat connect-*.bat docs/ \
|
||||||
|
pmfedit.bat mapedit.bat \
|
||||||
|
dlcache/info.txt clsave/info.txt \
|
||||||
|
clsave/config.json clsave/pub/user.json \
|
||||||
|
clsave/pub/skin/info.txt \
|
||||||
|
clsave/vol/dummy clsave/base/vol/dummy \
|
||||||
|
pkg/iceball/halp/ \
|
||||||
|
pkg/base/ pkg/maps/mesa.vxl pkg/maps/mesa.vxl.tga \
|
||||||
|
pkg/iceball/snowtest/ pkg/iceball/hack_console/ \
|
||||||
|
pkg/iceball/pmfedit/ pkg/iceball/mapedit/ \
|
||||||
|
svsave/info.txt \
|
||||||
|
svsave/pub/server.json svsave/pub/mods.json svsave/base/vol/dummy svsave/vol/dummy \
|
||||||
|
src/ include/ Makefile* CMakeLists.txt main.make \
|
||||||
|
clsave/pub/controls.json \
|
||||||
|
xlibinc/dummy winlibs/dummy \
|
||||||
|
-x pkg/base/srcwav16/ pkg/base/kv6/ pkg/base/glsl/
|
||||||
|
|
@ -3,6 +3,17 @@
|
|||||||
|
|
||||||
This file contains configuration for the engine itself.
|
This file contains configuration for the engine itself.
|
||||||
It cannot be read by any mods.
|
It cannot be read by any mods.
|
||||||
|
|
||||||
|
If you have a graphics card that's reasonably fast
|
||||||
|
and has at least 128MB of VRAM (64MB *might* cut it),
|
||||||
|
set gl_vbo to true.
|
||||||
|
(Yes, this DOES help on an Intel 3000 HD.)
|
||||||
|
If your game crashes when the map starts appearing, set it to false.
|
||||||
|
|
||||||
|
If you have an OpenGL-2.0-capable card (or one with non-power-of-two support),
|
||||||
|
and you wish to conserve a little bit of VRAM,
|
||||||
|
set gl_expand_textures to false.
|
||||||
|
If you get white boxes, it obviously wasn't capable - set it to true.
|
||||||
|
|
||||||
",
|
",
|
||||||
|
|
||||||
@ -15,7 +26,7 @@
|
|||||||
|
|
||||||
"antialiasinglevel": 0,
|
"antialiasinglevel": 0,
|
||||||
"smoothlighting": true,
|
"smoothlighting": true,
|
||||||
"gl_expand_textures": false,
|
"gl_expand_textures": true,
|
||||||
"gl_chunk_size": 16,
|
"gl_chunk_size": 16,
|
||||||
"gl_chunks_tesselated_per_frame": 4,
|
"gl_chunks_tesselated_per_frame": 4,
|
||||||
"gl_shaders": true,
|
"gl_shaders": true,
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
Ignore what this said about being obsolete.
|
This used to say these docs were obsolete.
|
||||||
We need to move to a better system. The weird python shit is not it.
|
However, we eventually got stuff sorted and now they're somewhat up to date.
|
||||||
READ_THIS_FIRST.txt is a bit old. Check the forums at
|
So just... ignore this file.
|
||||||
http://iceballga.me
|
|
||||||
for some more useful info.
|
|
||||||
|
|
||||||
modding_lua.txt is almost always up to date.
|
|
||||||
|
|
||||||
|
@ -86,12 +86,13 @@ server.hook_file = fn(neth, ftype, fname)->object
|
|||||||
|
|
||||||
can return nil to cancel the request
|
can return nil to cancel the request
|
||||||
can return true to perform the default request
|
can return true to perform the default request
|
||||||
|
can return a string to load a different file instead
|
||||||
otherwise, return an object to be serialised
|
otherwise, return an object to be serialised
|
||||||
|
|
||||||
currently supported values for ftype:
|
currently supported values for ftype:
|
||||||
- "icemap"
|
- "icemap"
|
||||||
|
|
||||||
the rest must be either nil or true.
|
the rest must be either nil, true, or a string.
|
||||||
|
|
||||||
client.hook_render = fn() @
|
client.hook_render = fn() @
|
||||||
sets a hook called every frame
|
sets a hook called every frame
|
||||||
|
38
docs/modding_scripts.txt
Normal file
38
docs/modding_scripts.txt
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
Each mod must be in its own directory in the form of:
|
||||||
|
pkg/author/mod/
|
||||||
|
|
||||||
|
You can nest further so you can, for example, do:
|
||||||
|
pkg/author/mod/submod/subsubmod/thisisgettingridiculous/
|
||||||
|
|
||||||
|
To load mods, set up a file named svsave/pub/mods.json with a "mods" list, e.g.
|
||||||
|
{
|
||||||
|
"mods" : [
|
||||||
|
"pkg/iceball/hack_console/",
|
||||||
|
"pkg/iceball/snowtest/"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
hack_console is very useful but also opens a huge gaping hole in the game that allows people to run really, really weird hacks. Don't use it on a really public server.
|
||||||
|
snowtest makes the map snow. It is not a good example of how you should code your mods - it's the oldest mod in Iceball's existance and predates iceballfornoobs-004... and the ability for the player to place blocks, for that matter.
|
||||||
|
|
||||||
|
Each mod has a mod.json file in its root, of the form (all fields are optional):
|
||||||
|
{
|
||||||
|
"depends": ["pkg/author/some_mod_you_depend_on", "pkg/other_author/another_mod"],
|
||||||
|
"preload": ["pre.lua"],
|
||||||
|
"preload_client": ["pre_client.lua"],
|
||||||
|
"preload_server": ["pre_server.lua"],
|
||||||
|
"load": ["load.lua"],
|
||||||
|
"load_client": ["load_client.lua"],
|
||||||
|
"load_server": ["load_server.lua"],
|
||||||
|
}
|
||||||
|
|
||||||
|
"depends" will autoload required mods if necessary.
|
||||||
|
|
||||||
|
"preload" executes code just after pkg/base/preconf.lua is loaded.
|
||||||
|
"load" executes code at the very end of main_server.lua / client_start.lua.
|
||||||
|
The client/server-specific versions execute after their generic counterparts.
|
||||||
|
|
||||||
|
Currently there is no documentation on the engine itself as it may change at any time. Beware!
|
||||||
|
Have a nosey through the code to see what you can override.
|
||||||
|
pkg/iceball/hack_console/ shows you how to do a rather complex override in a *cough* "class" *cough*.
|
||||||
|
|
@ -43,7 +43,7 @@ In my case I tend to prepend the commandline with "gdb --args ".
|
|||||||
Someone else can elaborate here if necessary.
|
Someone else can elaborate here if necessary.
|
||||||
|
|
||||||
*** How do I change my name? ***
|
*** How do I change my name? ***
|
||||||
Did you read the built-in tutorial?
|
Did you read the built-in tutorial? It mentioned a file. What was it called?
|
||||||
|
|
||||||
*** Anything else? ***
|
*** Anything else? ***
|
||||||
Join us on IRC: #iceball @ irc.quacknet.org (NOT quaKEnet!).
|
Join us on IRC: #iceball @ irc.quacknet.org (NOT quaKEnet!).
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define VERSION_W 0
|
#define VERSION_W 0
|
||||||
#define VERSION_X 0
|
#define VERSION_X 1
|
||||||
#define VERSION_Y 0
|
#define VERSION_Y 0
|
||||||
#define VERSION_A 0
|
#define VERSION_A 0
|
||||||
#define VERSION_Z 53
|
#define VERSION_Z 0
|
||||||
// Remember to bump "Z" basically every time you change the engine!
|
// Remember to bump "Z" basically every time you change the engine!
|
||||||
// Remember to bump the version in Lua too!
|
// Remember to bump the version in Lua too!
|
||||||
// Remember to document API changes in a new version!
|
// Remember to document API changes in a new version!
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
@echo off
|
@echo off
|
||||||
iceball -s 0 pkg/iceball/mapedit
|
iceball-gl -s 0 pkg/iceball/mapedit
|
||||||
|
@ -1 +1,4 @@
|
|||||||
iceball -c localhost 1337
|
@echo off
|
||||||
|
iceball-gl -c localhost 20737
|
||||||
|
pause
|
||||||
|
|
||||||
|
@ -1 +1,4 @@
|
|||||||
iceball.exe -s 1337 pkg/base
|
@echo off
|
||||||
|
iceball-gl.exe -d 20737 pkg/base
|
||||||
|
pause
|
||||||
|
|
||||||
|
@ -516,13 +516,6 @@ function h_tick_init(sec_current, sec_delta)
|
|||||||
intent[#intent+1] = new_intel({team = 1, iid = #intent+1})
|
intent[#intent+1] = new_intel({team = 1, iid = #intent+1})
|
||||||
intent[#intent+1] = new_tent({team = 1, iid = #intent+1})
|
intent[#intent+1] = new_tent({team = 1, iid = #intent+1})
|
||||||
|
|
||||||
--[[
|
|
||||||
chat_add(chat_text, sec_current, "Just testing the chat...", 0xFFFFFFFF)
|
|
||||||
chat_add(chat_text, sec_current, "BLUE MASTER RACE", 0xFF0000FF)
|
|
||||||
chat_add(chat_text, sec_current, "GREEN MASTER RACE", 0xFF00C000)
|
|
||||||
chat_add(chat_text, sec_current, "SALLY MASTER RACE", 0xFFAA00FF)
|
|
||||||
chat_add(chat_text, sec_current, "YOU ALL SUCK", 0xFFC00000)
|
|
||||||
]]
|
|
||||||
chat_add(chat_text, sec_current, "Welcome to Iceball!", 0xFFFF00AA)
|
chat_add(chat_text, sec_current, "Welcome to Iceball!", 0xFFFF00AA)
|
||||||
chat_add(chat_killfeed, sec_current, "If it's broken, fix it yourself.", 0xFFFF00AA)
|
chat_add(chat_killfeed, sec_current, "If it's broken, fix it yourself.", 0xFFFF00AA)
|
||||||
|
|
||||||
@ -879,7 +872,7 @@ function client.hook_kick(reason)
|
|||||||
client.hook_render = new_render
|
client.hook_render = new_render
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print("pkg/base/client_start.lua: Loading mods...")
|
||||||
|
load_mod_list(getfenv(), nil, {"load", "load_client"}, client_config)
|
||||||
print("pkg/base/client_start.lua loaded.")
|
print("pkg/base/client_start.lua loaded.")
|
||||||
|
|
||||||
--dofile("pkg/base/plug_snow.lua")
|
|
||||||
--dofile("pkg/base/plug_pmfedit.lua")
|
|
||||||
|
109
pkg/base/lib_mods.lua
Normal file
109
pkg/base/lib_mods.lua
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
--[[
|
||||||
|
This file is part of Ice Lua Components.
|
||||||
|
|
||||||
|
Ice Lua Components is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Ice Lua Components is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
]]
|
||||||
|
|
||||||
|
local loaded = {}
|
||||||
|
local failed = {}
|
||||||
|
local prevmod = {}
|
||||||
|
|
||||||
|
function get_mod_name(path)
|
||||||
|
if path ~= path:lower() then
|
||||||
|
error("Someone didn't follow the convention of all-lowercase names! This is more important than you futile Windows users think.")
|
||||||
|
end
|
||||||
|
while path:sub(path:len()) == "/" do
|
||||||
|
path = path:sub(1,path:len()-1)
|
||||||
|
end
|
||||||
|
path = path:lower()
|
||||||
|
return path
|
||||||
|
end
|
||||||
|
|
||||||
|
function load_mod(env, path, stages, ...)
|
||||||
|
print("Loading "..path)
|
||||||
|
if failed[path] then
|
||||||
|
error("Already failed earlier")
|
||||||
|
end
|
||||||
|
failed[path] = true -- pre-fail to avoid infinite loop
|
||||||
|
local mdata = loaded[path] or common.json_load(path.."/mod.json") -- use cached version if necessary
|
||||||
|
loaded[path] = nil -- remove from loaded list just in case we fail
|
||||||
|
|
||||||
|
-- check for any dependencies
|
||||||
|
local deps = mdata.depends
|
||||||
|
if deps then
|
||||||
|
local i
|
||||||
|
|
||||||
|
-- pre-scan dependencies
|
||||||
|
for i=1,#deps do
|
||||||
|
if failed[deps[i]] then
|
||||||
|
error("Mod failed a dependency before we got to it: "..deps[i])
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- load dependencies
|
||||||
|
for i=1,#deps do
|
||||||
|
load_mod(env, get_mod_name(deps[i]), stages, ...)
|
||||||
|
if not loaded[deps[i]] then
|
||||||
|
error("Dependency failed: "..deps[i])
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- load our scripts
|
||||||
|
local i
|
||||||
|
local farr = {}
|
||||||
|
for i=1,#stages do
|
||||||
|
local arr = mdata[stages[i]]
|
||||||
|
if arr then
|
||||||
|
local j
|
||||||
|
|
||||||
|
-- load files
|
||||||
|
for j=1,#arr do
|
||||||
|
local fname = path.."/"..arr[j]
|
||||||
|
print("- Loading file "..fname)
|
||||||
|
local f = loadfile(fname)
|
||||||
|
if not f then
|
||||||
|
error("Script failed to load: "..f)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
farr[#farr+1] = {fname, f}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- execute our scripts
|
||||||
|
for i=1,#farr do
|
||||||
|
-- if they throw an error... good. it can crash.
|
||||||
|
local f = farr[i][2]
|
||||||
|
setfenv(f, env)
|
||||||
|
f(...)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- add ourselves to the loaded list and unfail ourselves
|
||||||
|
loaded[path] = mdata
|
||||||
|
failed[path] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function load_mod_list(env, arr, stages, ...)
|
||||||
|
local i
|
||||||
|
arr = arr or prevmod
|
||||||
|
prevmod = arr
|
||||||
|
print(#arr)
|
||||||
|
for i=1,#arr do
|
||||||
|
load_mod(env, get_mod_name(arr[i]), stages, ...)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -15,6 +15,10 @@
|
|||||||
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
if common.version.num < 4194304 then
|
||||||
|
error("You need Iceball version 0.1 or later to connect to this server.")
|
||||||
|
end
|
||||||
|
|
||||||
function client.hook_kick(reason)
|
function client.hook_kick(reason)
|
||||||
print("Kicked - "..reason)
|
print("Kicked - "..reason)
|
||||||
function client.hook_tick()
|
function client.hook_tick()
|
||||||
@ -27,6 +31,11 @@ end
|
|||||||
|
|
||||||
dofile("pkg/base/preconf.lua")
|
dofile("pkg/base/preconf.lua")
|
||||||
|
|
||||||
|
-- load mod JSON files
|
||||||
|
mod_data = common.json_load("*MODCFG")
|
||||||
|
dofile("pkg/base/lib_mods.lua")
|
||||||
|
load_mod_list(getfenv(), mod_data.mods, {"preload", "preload_client"}, client_config, mod_data)
|
||||||
|
|
||||||
-- if you don't want music, set FILE_MUSIC to "true".
|
-- if you don't want music, set FILE_MUSIC to "true".
|
||||||
FILE_MUSIC = FILE_MUSIC or "music.it"
|
FILE_MUSIC = FILE_MUSIC or "music.it"
|
||||||
|
|
||||||
@ -112,14 +121,6 @@ You should have at least ]]..VERSION_ENGINE.str..[[.
|
|||||||
]]..bug_str..[[]]
|
]]..bug_str..[[]]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- BACKWARD COMPAT HACKS
|
|
||||||
client.camera_point_sky = client.camera_point_sky or function(dx,dy,dz,zoom,sx,sy,sz)
|
|
||||||
return client.camera_point(dx,dy,dz,zoom,0.0)
|
|
||||||
end
|
|
||||||
common.camera_point_sky = common.camera_point_sky or function(dx,dy,dz,zoom,sx,sy,sz)
|
|
||||||
return common.camera_point(dx,dy,dz,zoom,0.0)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- please excuse this hack.
|
-- please excuse this hack.
|
||||||
argarr = {...}
|
argarr = {...}
|
||||||
function argspew_gen(arr, idx)
|
function argspew_gen(arr, idx)
|
||||||
@ -311,6 +312,5 @@ function client.hook_tick()
|
|||||||
return 0.005
|
return 0.005
|
||||||
end
|
end
|
||||||
|
|
||||||
--dofile("pkg/base/client_start.lua")
|
|
||||||
print("pkg/base/main_client.lua loaded.")
|
print("pkg/base/main_client.lua loaded.")
|
||||||
|
|
||||||
|
@ -15,22 +15,42 @@
|
|||||||
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
if common.version.num < 4194304 then
|
||||||
|
error("You need Iceball version 0.1 or later to run this code.")
|
||||||
|
end
|
||||||
|
|
||||||
dofile("pkg/base/preconf.lua")
|
dofile("pkg/base/preconf.lua")
|
||||||
|
dofile("pkg/base/lib_util.lua")
|
||||||
|
|
||||||
print("pkg/base/main_server.lua starting")
|
print("pkg/base/main_server.lua starting")
|
||||||
print(...)
|
print(...)
|
||||||
|
|
||||||
if common.version == nil then
|
-- parse arguments
|
||||||
error("You must have at least version 0.0-1 to run this server!"
|
local loose, server_toggles, server_settings = parse_commandline_options({...})
|
||||||
.." iceballfornoobs-004 is FAR TOO OLD!"
|
local server_config_filename = server_settings['server'] or "svsave/pub/server.json"
|
||||||
.." If you are using an old git version, PLEASE UPDATE!")
|
server_config = common.json_load(server_config_filename)
|
||||||
|
-- TODO: Check that server_config ~= nil
|
||||||
|
if server_settings.svseed then
|
||||||
|
math.randomseed(0+server_settings.svseed)
|
||||||
|
elseif common.time ~= nil then
|
||||||
|
math.randomseed(common.time())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- load mod config
|
||||||
|
mod_conf_file = server_config.mod_config or "svsave/pub/mods.json"
|
||||||
|
mod_data = common.json_load(mod_conf_file)
|
||||||
|
|
||||||
|
-- load mod JSON files
|
||||||
|
dofile("pkg/base/lib_mods.lua")
|
||||||
|
load_mod_list(getfenv(), mod_data.mods, {"preload", "preload_server"}, server_config, mod_data)
|
||||||
|
|
||||||
dofile("pkg/base/common.lua")
|
dofile("pkg/base/common.lua")
|
||||||
dofile("pkg/base/commands.lua")
|
dofile("pkg/base/commands.lua")
|
||||||
|
|
||||||
client_list = {fdlist={}}
|
client_list = {fdlist={}}
|
||||||
server_tick_accum = 0.
|
server_tick_accum = 0
|
||||||
|
|
||||||
|
map_fname = loose[1]
|
||||||
|
|
||||||
function slot_add(neth, tidx, wpn, name)
|
function slot_add(neth, tidx, wpn, name)
|
||||||
local i
|
local i
|
||||||
@ -68,7 +88,6 @@ function slot_add(neth, tidx, wpn, name)
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function server.hook_file(neth, ftype, fname)
|
function server.hook_file(neth, ftype, fname)
|
||||||
print("hook_file:", neth, ftype, fname)
|
print("hook_file:", neth, ftype, fname)
|
||||||
local cli = client_list[neth]
|
local cli = client_list[neth]
|
||||||
@ -80,6 +99,8 @@ function server.hook_file(neth, ftype, fname)
|
|||||||
|
|
||||||
if (ftype == "icemap" or ftype == "map") and (fname == "*MAP") then
|
if (ftype == "icemap" or ftype == "map") and (fname == "*MAP") then
|
||||||
return map_loaded
|
return map_loaded
|
||||||
|
elseif (ftype == "json") and (fname == "*MODCFG") then
|
||||||
|
return mod_conf_file
|
||||||
elseif (ftype == "tga") and (fname == "*MAPIMG") then
|
elseif (ftype == "tga") and (fname == "*MAPIMG") then
|
||||||
if map_fname then
|
if map_fname then
|
||||||
return map_fname..".tga"
|
return map_fname..".tga"
|
||||||
@ -236,18 +257,6 @@ function server.hook_tick(sec_current, sec_delta)
|
|||||||
return 0.005
|
return 0.005
|
||||||
end
|
end
|
||||||
|
|
||||||
-- parse arguments
|
|
||||||
|
|
||||||
local loose, server_toggles, server_settings = parse_commandline_options({...})
|
|
||||||
local server_config_filename = server_settings['server'] or "svsave/pub/server.json"
|
|
||||||
server_config = common.json_load(server_config_filename)
|
|
||||||
-- TODO: Check that server_config ~= nil
|
|
||||||
if server_settings.svseed then
|
|
||||||
math.randomseed(0+server_settings.svseed)
|
|
||||||
elseif common.time ~= nil then
|
|
||||||
math.randomseed(common.time())
|
|
||||||
end
|
|
||||||
|
|
||||||
permissions = {}
|
permissions = {}
|
||||||
|
|
||||||
if server_config.permissions ~= nil then
|
if server_config.permissions ~= nil then
|
||||||
@ -333,12 +342,8 @@ if server_config.permissions ~= nil then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- load map
|
-- load map
|
||||||
map_fname = loose[1]
|
if server_settings.gen then
|
||||||
--[[map_fname = map_fname or MAP_DEFAULT
|
map_loaded = loadfile(server_settings.gen)(loose, server_toggles, server_settings)
|
||||||
map_loaded = common.map_load(map_fname, "auto")
|
|
||||||
]]
|
|
||||||
if map_fname == "flat" then
|
|
||||||
map_loaded = loadfile("pkg/base/gen_flat.lua")(loose, server_toggles, server_settings)
|
|
||||||
elseif map_fname then
|
elseif map_fname then
|
||||||
map_loaded = common.map_load(map_fname, "auto")
|
map_loaded = common.map_load(map_fname, "auto")
|
||||||
else
|
else
|
||||||
@ -358,4 +363,7 @@ do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print("pkg/base/main_server.lua: Loading mods...")
|
||||||
|
load_mod_list(getfenv(), mod_data.mods, {"load", "load_server"}, server_config, mod_data)
|
||||||
print("pkg/base/main_server.lua loaded.")
|
print("pkg/base/main_server.lua loaded.")
|
||||||
|
|
||||||
|
@ -1854,22 +1854,13 @@ function new_player(settings)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function this.typing_text.on_return(options)
|
function this.typing_text.on_return(options)
|
||||||
|
|
||||||
if this.typing_text.text ~= "" then
|
if this.typing_text.text ~= "" then
|
||||||
if string.sub(this.typing_text.text,1,1) == "~" then
|
if this.typing_type.text == "Chat: " then
|
||||||
local a,b
|
net_send(nil, common.net_pack("Bz", PKT_CHAT_SEND, this.typing_text.text))
|
||||||
a,b = pcall(function () loadstring(string.sub(this.typing_text.text,2))() end) --nasty, but handy
|
elseif this.typing_type.text == "Team: " then
|
||||||
if not a then
|
net_send(nil, common.net_pack("Bz", PKT_CHAT_SEND_TEAM, this.typing_text.text))
|
||||||
print("quickcall err:", b)
|
elseif this.typing_type.text == "Squad: " then
|
||||||
end
|
net_send(nil, common.net_pack("Bz", PKT_CHAT_SEND_SQUAD, this.typing_text.text))
|
||||||
else
|
|
||||||
if this.typing_type.text == "Chat: " then
|
|
||||||
net_send(nil, common.net_pack("Bz", PKT_CHAT_SEND, this.typing_text.text))
|
|
||||||
elseif this.typing_type.text == "Team: " then
|
|
||||||
net_send(nil, common.net_pack("Bz", PKT_CHAT_SEND_TEAM, this.typing_text.text))
|
|
||||||
elseif this.typing_type.text == "Squad: " then
|
|
||||||
net_send(nil, common.net_pack("Bz", PKT_CHAT_SEND_SQUAD, this.typing_text.text))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1946,7 +1937,8 @@ function new_player(settings)
|
|||||||
"#",
|
"#",
|
||||||
"Score",
|
"Score",
|
||||||
"K",
|
"K",
|
||||||
"D"})
|
"D",
|
||||||
|
"?"})
|
||||||
for row=1, #v do
|
for row=1, #v do
|
||||||
local squad = ""
|
local squad = ""
|
||||||
local plr = v[row]
|
local plr = v[row]
|
||||||
@ -1972,7 +1964,9 @@ function new_player(settings)
|
|||||||
for row_idx,row in pairs(strtable) do
|
for row_idx,row in pairs(strtable) do
|
||||||
if row[7] ~= nil then
|
if row[7] ~= nil then
|
||||||
local concat = {msg="", color=0xAAAAAAFF}
|
local concat = {msg="", color=0xAAAAAAFF}
|
||||||
if row[7] == this then -- highlight the client's name
|
if row_idx == 1 then -- this is the header
|
||||||
|
concat.color = 0xFF888888
|
||||||
|
elseif row[7] == this then -- highlight the client's name
|
||||||
concat.color = 0xFFFFFFFF
|
concat.color = 0xFFFFFFFF
|
||||||
elseif this.squad == row[7].squad and this.team == row[7].team and this.squad ~= "" and this.squad ~= nil then
|
elseif this.squad == row[7].squad and this.team == row[7].team and this.squad ~= "" and this.squad ~= nil then
|
||||||
if row[7].alive then
|
if row[7].alive then
|
||||||
|
@ -29,8 +29,8 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- network throttling
|
-- network throttling
|
||||||
NET_FLUSH_C2S = 0.05
|
NET_FLUSH_C2S = 0.02
|
||||||
NET_FLUSH_S2C = 0.1
|
NET_FLUSH_S2C = 0.02
|
||||||
NET_MAX_LAG = 15.0
|
NET_MAX_LAG = 15.0
|
||||||
|
|
||||||
-- base dir stuff
|
-- base dir stuff
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
VERSION_ENGINE = {
|
VERSION_ENGINE = {
|
||||||
cmp={0,0,0,0,53},
|
cmp={0,1,0,0,0},
|
||||||
num=53,
|
num=4194304,
|
||||||
str="0.0-53",
|
str="0.1",
|
||||||
}
|
}
|
||||||
|
|
||||||
VERSION_BUGS = {
|
VERSION_BUGS = {
|
||||||
@ -82,5 +82,8 @@ VERSION_BUGS = {
|
|||||||
{intro=51, fix=53, msg="Local mode (-s) broken and causes a crash"},
|
{intro=51, fix=53, msg="Local mode (-s) broken and causes a crash"},
|
||||||
{intro=nil, fix=53, msg="Timing accuracy somewhat bad (uses a float instead of a double, mostly an issue for sec_current)"},
|
{intro=nil, fix=53, msg="Timing accuracy somewhat bad (uses a float instead of a double, mostly an issue for sec_current)"},
|
||||||
{intro=nil, fix=53, msg="There are some weird network stability issues"},
|
{intro=nil, fix=53, msg="There are some weird network stability issues"},
|
||||||
|
{intro=nil, fix=4194304+0, msg="Binary files don't have a type name"},
|
||||||
|
{intro=nil, fix=4194304+0, msg="JSON files cannot be remotely sent to clients"},
|
||||||
|
{intro=nil, fix=nil, msg="Occasional crash in sackit_module_free on common.mus_free - this is probably a sackit bug."},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
57
pkg/iceball/hack_console/main.lua
Normal file
57
pkg/iceball/hack_console/main.lua
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
--[[
|
||||||
|
This file is part of Ice Lua Components.
|
||||||
|
|
||||||
|
Ice Lua Components is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Ice Lua Components is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
]]
|
||||||
|
|
||||||
|
-- don't run this on a normal server.
|
||||||
|
-- it's useful for testing stuff, but it's a very serious loophole.
|
||||||
|
|
||||||
|
local super = new_player
|
||||||
|
function new_player(...)
|
||||||
|
local this = super(...)
|
||||||
|
|
||||||
|
local s_create_hud = this.create_hud
|
||||||
|
local function f_create_hud(...)
|
||||||
|
local ret = s_create_hud(...)
|
||||||
|
|
||||||
|
local s_chat_on_return = this.typing_text.on_return
|
||||||
|
function this.typing_text.on_return(...)
|
||||||
|
if this.typing_text.text ~= "" and string.sub(this.typing_text.text,1,1) == "~" then
|
||||||
|
local a,b
|
||||||
|
a,b = pcall(function () loadstring(string.sub(this.typing_text.text,2))() end) --nasty, but handy
|
||||||
|
if not a then
|
||||||
|
print("quickcall err:", b)
|
||||||
|
end
|
||||||
|
this.typing_text.text = ""
|
||||||
|
end
|
||||||
|
|
||||||
|
return s_chat_on_return(...)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.create_hud(...)
|
||||||
|
local ret = s_create_hud(...)
|
||||||
|
f_create_hud(...)
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
|
||||||
|
if this.scene then
|
||||||
|
f_create_hud(...)
|
||||||
|
end
|
||||||
|
|
||||||
|
return this
|
||||||
|
end
|
||||||
|
|
||||||
|
|
4
pkg/iceball/hack_console/mod.json
Normal file
4
pkg/iceball/hack_console/mod.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"load_client": ["main.lua"]
|
||||||
|
}
|
||||||
|
|
@ -8,6 +8,14 @@ tutorial to here.
|
|||||||
|
|
||||||
Use your up/down arrow keys to
|
Use your up/down arrow keys to
|
||||||
scroll through the text.
|
scroll through the text.
|
||||||
|
|
||||||
|
Please read this whole document
|
||||||
|
carefully, as it contains
|
||||||
|
important information, and we
|
||||||
|
don't want to have to tell people
|
||||||
|
the same things all over again
|
||||||
|
which could be avoided if they
|
||||||
|
had read this tutorial.
|
||||||
$-
|
$-
|
||||||
|
|
||||||
$cFFFFFF55What is Iceball?
|
$cFFFFFF55What is Iceball?
|
||||||
@ -42,6 +50,12 @@ download the source code from:
|
|||||||
$cFF55FF55https://
|
$cFF55FF55https://
|
||||||
$cFF55FF55 github.com/iamgreaser/iceball/
|
$cFF55FF55 github.com/iamgreaser/iceball/
|
||||||
|
|
||||||
|
$cFFFF5555If you are running a serious
|
||||||
|
$cFFFF5555server, you SHOULD be getting
|
||||||
|
$cFFFF5555your code from the github
|
||||||
|
$cFFFF5555repository, as it contains fixes
|
||||||
|
$cFFFF5555and whatnot.
|
||||||
|
|
||||||
$-
|
$-
|
||||||
$cFFFFFF55How do I run Iceball?
|
$cFFFFFF55How do I run Iceball?
|
||||||
|
|
||||||
@ -80,6 +94,9 @@ $cFFFF0000COMMUNICATE
|
|||||||
$cFFFF0000COMMUNICATE
|
$cFFFF0000COMMUNICATE
|
||||||
This cannot be stressed enough.
|
This cannot be stressed enough.
|
||||||
This is a team game.
|
This is a team game.
|
||||||
|
If you cannot speak the language
|
||||||
|
of the server, find another
|
||||||
|
server.
|
||||||
|
|
||||||
Controls:
|
Controls:
|
||||||
$pWASD = movement
|
$pWASD = movement
|
||||||
@ -105,6 +122,9 @@ $pSpade = dig 3 high
|
|||||||
$pBlock = pick block colour
|
$pBlock = pick block colour
|
||||||
$pGun = scope
|
$pGun = scope
|
||||||
|
|
||||||
|
TIP: you move slightly faster
|
||||||
|
with a spade in your hand.
|
||||||
|
|
||||||
$-
|
$-
|
||||||
$cFFFFFF55Further documentation
|
$cFFFFFF55Further documentation
|
||||||
|
|
||||||
@ -123,6 +143,9 @@ This is also useful, though not
|
|||||||
everything is available:
|
everything is available:
|
||||||
$cFF55FF55 http://lua.org/manual/5.1/
|
$cFF55FF55 http://lua.org/manual/5.1/
|
||||||
|
|
||||||
|
Modding API core reference:
|
||||||
|
$cFFFF5555 docs/modding_scripts.txt
|
||||||
|
|
||||||
File format specifications:
|
File format specifications:
|
||||||
$cFFFF5555 docs/format_icemap.txt
|
$cFFFF5555 docs/format_icemap.txt
|
||||||
$cFFFF5555 docs/format_pmf.txt
|
$cFFFF5555 docs/format_pmf.txt
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
--[[
|
|
||||||
This file is part of Ice Lua Components.
|
|
||||||
|
|
||||||
Ice Lua Components is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Ice Lua Components is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
]]
|
|
||||||
|
|
||||||
-- Example mod. NOT RELIABLE.
|
|
||||||
|
|
||||||
loadfile("pkg/base/client_start.lua")(...)
|
|
||||||
dofile("pkg/base/plug_snow.lua")
|
|
@ -1,20 +0,0 @@
|
|||||||
--[[
|
|
||||||
This file is part of Ice Lua Components.
|
|
||||||
|
|
||||||
Ice Lua Components is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Ice Lua Components is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
]]
|
|
||||||
|
|
||||||
-- Example mod. NOT RELIABLE.
|
|
||||||
|
|
||||||
loadfile("pkg/base/main_client.lua")(...)
|
|
@ -1,22 +0,0 @@
|
|||||||
--[[
|
|
||||||
This file is part of Ice Lua Components.
|
|
||||||
|
|
||||||
Ice Lua Components is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Ice Lua Components is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
]]
|
|
||||||
|
|
||||||
-- Example mod. NOT RELIABLE.
|
|
||||||
|
|
||||||
print("[server] Testing the snow plugin!")
|
|
||||||
loadfile("pkg/base/main_server.lua")(...)
|
|
||||||
dofile("pkg/base/plug_snow.lua")
|
|
4
pkg/iceball/snowtest/mod.json
Normal file
4
pkg/iceball/snowtest/mod.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"load": ["plug_snow.lua"]
|
||||||
|
}
|
||||||
|
|
@ -288,3 +288,5 @@ if client then
|
|||||||
client.hook_tick = snow_tick
|
client.hook_tick = snow_tick
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print("Snow plugin loaded.")
|
||||||
|
|
14
pmfedit.bat
14
pmfedit.bat
@ -1,12 +1,2 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo I am a noob at computers who does not know how to use the command line.
|
iceball-gl -s 0 pkg/iceball/pmfedit
|
||||||
echo.
|
|
||||||
echo However, because I am an absolute pro at making models, GreaseMonkey has
|
|
||||||
echo been kind to me and given me this .bat file, so I can make models.
|
|
||||||
echo.
|
|
||||||
echo I will copy and paste to and from clsave/editor.pmf, because I am not THAT
|
|
||||||
echo much of a noob.
|
|
||||||
echo.
|
|
||||||
echo I WILL ALSO READ DOCS/READ_THIS_FIRST.TXT IN FUTURE.
|
|
||||||
echo.
|
|
||||||
iceball -s 0 pkg/iceball/pmfedit
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
iceball -s 0 pkg/iceball/radtest
|
|
148
run-gl.bat
148
run-gl.bat
@ -1,74 +1,74 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
|
||||||
:Menu
|
:Menu
|
||||||
ECHO ============== Iceball ==============
|
ECHO ============== Iceball ==============
|
||||||
ECHO -------------------------------------
|
ECHO -------------------------------------
|
||||||
ECHO 1. Single-player
|
ECHO 1. Single-player
|
||||||
ECHO 2. Dev server
|
ECHO 2. Dev server
|
||||||
ECHO 3. Lighting test
|
ECHO 3. Lighting test
|
||||||
ECHO 4. Snow weather test
|
ECHO 4. Snow weather test
|
||||||
ECHO 5. Map editor
|
ECHO 5. Map editor
|
||||||
ECHO 6. PMF editor
|
ECHO 6. PMF editor
|
||||||
ECHO -------------------------------------
|
ECHO -------------------------------------
|
||||||
ECHO 0. Exit
|
ECHO 0. Exit
|
||||||
ECHO -------------------------------------
|
ECHO -------------------------------------
|
||||||
ECHO.
|
ECHO.
|
||||||
|
|
||||||
SET INPUT=
|
SET INPUT=
|
||||||
SET /P INPUT=Please select a number:
|
SET /P INPUT=Please select a number:
|
||||||
|
|
||||||
cls
|
cls
|
||||||
IF /I '%INPUT%'=='1' GOTO SinglePlayer
|
IF /I '%INPUT%'=='1' GOTO SinglePlayer
|
||||||
IF /I '%INPUT%'=='2' GOTO DevServer
|
IF /I '%INPUT%'=='2' GOTO DevServer
|
||||||
IF /I '%INPUT%'=='3' GOTO LightingTest
|
IF /I '%INPUT%'=='3' GOTO LightingTest
|
||||||
IF /I '%INPUT%'=='4' GOTO SnowTest
|
IF /I '%INPUT%'=='4' GOTO SnowTest
|
||||||
IF /I '%INPUT%'=='5' GOTO MapEditor
|
IF /I '%INPUT%'=='5' GOTO MapEditor
|
||||||
IF /I '%INPUT%'=='6' GOTO PMFEditor
|
IF /I '%INPUT%'=='6' GOTO PMFEditor
|
||||||
IF /I '%INPUT%'=='0' EXIT
|
IF /I '%INPUT%'=='0' EXIT
|
||||||
|
|
||||||
ECHO Invalid option
|
ECHO Invalid option
|
||||||
pause
|
pause
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:SinglePlayer
|
:SinglePlayer
|
||||||
ECHO Starting local server...
|
ECHO Starting local server...
|
||||||
iceball-gl.exe -s 0 pkg/base pkg/maps/mesa.vxl
|
iceball-gl.exe -s 0 pkg/base pkg/maps/mesa.vxl
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:DevServer
|
:DevServer
|
||||||
ECHO Connecting to dev server...
|
ECHO Connecting to dev server...
|
||||||
iceball-gl.exe -c iceballga.me 20737
|
iceball-gl.exe -c iceballga.me 20737
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:LightingTest
|
:LightingTest
|
||||||
ECHO Starting lighting test...
|
ECHO Starting lighting test...
|
||||||
iceball-gl.exe -s 0 pkg/iceball/radtest
|
iceball-gl.exe -s 0 pkg/iceball/radtest
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:SnowTest
|
:SnowTest
|
||||||
ECHO Starting snow weather test...
|
ECHO Starting snow weather test...
|
||||||
iceball-gl.exe -s 0 pkg/iceball/snowtest
|
iceball-gl.exe -s 0 pkg/iceball/snowtest
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:MapEditor
|
:MapEditor
|
||||||
ECHO Starting map editor...
|
ECHO Starting map editor...
|
||||||
iceball-gl.exe -s 0 pkg/iceball/mapedit
|
iceball-gl.exe -s 0 pkg/iceball/mapedit
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:PMFEditor
|
:PMFEditor
|
||||||
ECHO Starting PMF editor...
|
ECHO Starting PMF editor...
|
||||||
iceball-gl.exe -s 0 pkg/iceball/pmfedit
|
iceball-gl.exe -s 0 pkg/iceball/pmfedit
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
148
run.bat
148
run.bat
@ -1,74 +1,74 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
|
||||||
:Menu
|
:Menu
|
||||||
ECHO ============== Iceball ==============
|
ECHO ============== Iceball ==============
|
||||||
ECHO -------------------------------------
|
ECHO -------------------------------------
|
||||||
ECHO 1. Single-player
|
ECHO 1. Single-player
|
||||||
ECHO 2. Dev server
|
ECHO 2. Dev server
|
||||||
ECHO 3. Lighting test
|
ECHO 3. Lighting test
|
||||||
ECHO 4. Snow weather test
|
ECHO 4. Snow weather test
|
||||||
ECHO 5. Map editor
|
ECHO 5. Map editor
|
||||||
ECHO 6. PMF editor
|
ECHO 6. PMF editor
|
||||||
ECHO -------------------------------------
|
ECHO -------------------------------------
|
||||||
ECHO 0. Exit
|
ECHO 0. Exit
|
||||||
ECHO -------------------------------------
|
ECHO -------------------------------------
|
||||||
ECHO.
|
ECHO.
|
||||||
|
|
||||||
SET INPUT=
|
SET INPUT=
|
||||||
SET /P INPUT=Please select a number:
|
SET /P INPUT=Please select a number:
|
||||||
|
|
||||||
cls
|
cls
|
||||||
IF /I '%INPUT%'=='1' GOTO SinglePlayer
|
IF /I '%INPUT%'=='1' GOTO SinglePlayer
|
||||||
IF /I '%INPUT%'=='2' GOTO DevServer
|
IF /I '%INPUT%'=='2' GOTO DevServer
|
||||||
IF /I '%INPUT%'=='3' GOTO LightingTest
|
IF /I '%INPUT%'=='3' GOTO LightingTest
|
||||||
IF /I '%INPUT%'=='4' GOTO SnowTest
|
IF /I '%INPUT%'=='4' GOTO SnowTest
|
||||||
IF /I '%INPUT%'=='5' GOTO MapEditor
|
IF /I '%INPUT%'=='5' GOTO MapEditor
|
||||||
IF /I '%INPUT%'=='6' GOTO PMFEditor
|
IF /I '%INPUT%'=='6' GOTO PMFEditor
|
||||||
IF /I '%INPUT%'=='0' EXIT
|
IF /I '%INPUT%'=='0' EXIT
|
||||||
|
|
||||||
ECHO Invalid option
|
ECHO Invalid option
|
||||||
pause
|
pause
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:SinglePlayer
|
:SinglePlayer
|
||||||
ECHO Starting local server...
|
ECHO Starting local server...
|
||||||
iceball.exe -s 0 pkg/base pkg/maps/mesa.vxl
|
iceball.exe -s 0 pkg/base pkg/maps/mesa.vxl
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:DevServer
|
:DevServer
|
||||||
ECHO Connecting to dev server...
|
ECHO Connecting to dev server...
|
||||||
iceball.exe -c play.iceballga.me 20737
|
iceball.exe -c play.iceballga.me 20737
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:LightingTest
|
:LightingTest
|
||||||
ECHO Starting lighting test...
|
ECHO Starting lighting test...
|
||||||
iceball.exe -s 0 pkg/iceball/radtest
|
iceball.exe -s 0 pkg/iceball/radtest
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:SnowTest
|
:SnowTest
|
||||||
ECHO Starting snow weather test...
|
ECHO Starting snow weather test...
|
||||||
iceball.exe -s 0 pkg/iceball/snowtest
|
iceball.exe -s 0 pkg/iceball/snowtest
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:MapEditor
|
:MapEditor
|
||||||
ECHO Starting map editor...
|
ECHO Starting map editor...
|
||||||
iceball.exe -s 0 pkg/iceball/mapedit
|
iceball.exe -s 0 pkg/iceball/mapedit
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
|
||||||
:PMFEditor
|
:PMFEditor
|
||||||
ECHO Starting PMF editor...
|
ECHO Starting PMF editor...
|
||||||
iceball.exe -s 0 pkg/iceball/pmfedit
|
iceball.exe -s 0 pkg/iceball/pmfedit
|
||||||
ECHO.
|
ECHO.
|
||||||
cls
|
cls
|
||||||
GOTO Menu
|
GOTO Menu
|
||||||
|
@ -1 +0,0 @@
|
|||||||
iceball -s 0 pkg/iceball/snowtest
|
|
@ -196,6 +196,11 @@ int icelua_fn_common_fetch_poll(lua_State *L)
|
|||||||
switch(to_client_local.cfetch_udtype)
|
switch(to_client_local.cfetch_udtype)
|
||||||
{
|
{
|
||||||
case UD_JSON:
|
case UD_JSON:
|
||||||
|
to_client_local.cfetch_ubuf[to_client_local.cfetch_ulen] = 0;
|
||||||
|
ret = (json_parse(L, to_client_local.cfetch_ubuf)
|
||||||
|
? 0
|
||||||
|
: 1);
|
||||||
|
break;
|
||||||
case UD_LUA:
|
case UD_LUA:
|
||||||
ret = (luaL_loadbuffer (L,
|
ret = (luaL_loadbuffer (L,
|
||||||
to_client_local.cfetch_ubuf,
|
to_client_local.cfetch_ubuf,
|
||||||
|
@ -498,6 +498,8 @@ const char *net_aux_gettype_str(int ftype)
|
|||||||
return "it";
|
return "it";
|
||||||
case UD_JSON:
|
case UD_JSON:
|
||||||
return "json";
|
return "json";
|
||||||
|
case UD_BIN:
|
||||||
|
return "bin";
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -816,7 +818,7 @@ int net_eat_s2c_packet(client_t *cli, client_t *other, int neth, int len, const
|
|||||||
//printf("clen=%i ulen=%i\n", clen, ulen);
|
//printf("clen=%i ulen=%i\n", clen, ulen);
|
||||||
cli->cfetch_clen = clen;
|
cli->cfetch_clen = clen;
|
||||||
cli->cfetch_ulen = ulen;
|
cli->cfetch_ulen = ulen;
|
||||||
cli->cfetch_cbuf = (char*)malloc(clen);
|
cli->cfetch_cbuf = (char*)malloc(clen+1);
|
||||||
cli->cfetch_ubuf = NULL;
|
cli->cfetch_ubuf = NULL;
|
||||||
cli->cfetch_cpos = 0;
|
cli->cfetch_cpos = 0;
|
||||||
// TODO: check if NULL
|
// TODO: check if NULL
|
||||||
@ -827,7 +829,7 @@ int net_eat_s2c_packet(client_t *cli, client_t *other, int neth, int len, const
|
|||||||
// 0x32:
|
// 0x32:
|
||||||
// file transfer end
|
// file transfer end
|
||||||
//printf("transfer END\n");
|
//printf("transfer END\n");
|
||||||
cli->cfetch_ubuf = (char*)malloc(cli->cfetch_ulen);
|
cli->cfetch_ubuf = (char*)malloc(cli->cfetch_ulen+1);
|
||||||
// TODO: check if NULL
|
// TODO: check if NULL
|
||||||
|
|
||||||
uLongf dlen = cli->cfetch_ulen;
|
uLongf dlen = cli->cfetch_ulen;
|
||||||
|
6
svsave/pub/mods.json
Normal file
6
svsave/pub/mods.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"mods" : [
|
||||||
|
"pkg/iceball/hack_console/"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "Iceball Server",
|
"name": "Iceball Server",
|
||||||
"motd": "Welcome to Iceball",
|
"motd": "Welcome to Iceball",
|
||||||
|
"mod_config": "svsave/pub/mods.json",
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"default" : {
|
"default" : {
|
||||||
"permissions" : [
|
"permissions" : [
|
||||||
"me",
|
"me",
|
||||||
"kill",
|
"kill",
|
||||||
"squad",
|
"squad",
|
||||||
"logout"
|
"logout"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"griefer" : {
|
"griefer" : {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user