Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
vasyahuyasa committed Aug 18, 2010
0 parents commit a8823b5
Show file tree
Hide file tree
Showing 82 changed files with 60,248 additions and 0 deletions.
104 changes: 104 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
CXXFLAGS= -O3 -fomit-frame-pointer
override CXXFLAGS+= -Wall -fsigned-char

PLATFORM= $(shell uname -s)
PLATFORM_PREFIX= native

INCLUDES= -Ishared -Iengine -Ifpsgame -Ienet/include

STRIP=
ifeq (,$(findstring -g,$(CXXFLAGS)))
ifeq (,$(findstring -pg,$(CXXFLAGS)))
STRIP=strip
endif
endif

MV=mv

ifneq (,$(findstring MINGW,$(PLATFORM)))
WINDRES= windres

ifneq (,$(findstring MINGW,$(PLATFORM)))
SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -Iinclude
SERVER_LIBS= -Llib -lzdll -lenet -lws2_32 -lwinmm
else
SERVER_INCLUDES= -DSTANDALONE $(INCLUDES)
SERVER_LIBS= -Lenet/.libs -lenet -lz
endif
SERVER_OBJS= \
shared/crypto-standalone.o \
shared/stream-standalone.o \
shared/tools-standalone.o \
engine/command-standalone.o \
engine/server-standalone.o \
fpsgame/server-standalone.o

ifeq ($(PLATFORM),SunOS)
CLIENT_LIBS+= -lsocket -lnsl -lX11
SERVER_LIBS+= -lsocket -lnsl
endif

default: all

all: client server

enet/Makefile:
cd enet; ./configure --enable-shared=no --enable-static=yes

libenet: enet/Makefile
$(MAKE) -C enet/ all

clean-enet: enet/Makefile
$(MAKE) -C enet/ clean

clean:
-$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_OBJS) $(MASTER_OBJS) sauer_client sauer_server sauer_master

%.h.gch: %.h
$(CXX) $(CXXFLAGS) -o $@.tmp $(subst .h.gch,.h,$@)
$(MV) $@.tmp $@

%-standalone.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $(subst -standalone.o,.cpp,$@)

$(CLIENT_OBJS): CXXFLAGS += $(CLIENT_INCLUDES)
$(filter shared/%,$(CLIENT_OBJS)): $(filter shared/%,$(CLIENT_PCH))
$(filter engine/%,$(CLIENT_OBJS)): $(filter engine/%,$(CLIENT_PCH))
$(filter fpsgame/%,$(CLIENT_OBJS)): $(filter fpsgame/%,$(CLIENT_PCH))

$(SERVER_OBJS): CXXFLAGS += $(SERVER_INCLUDES)
$(filter-out $(SERVER_OBJS),$(MASTER_OBJS)): CXXFLAGS += $(SERVER_INCLUDES)

ifneq (,$(findstring MINGW,$(PLATFORM)))
vcpp/%.o:
$(CXX) $(CXXFLAGS) -c -o $@ $(subst .o,.c,$@)

client: $(CLIENT_OBJS)
$(WINDRES) -I vcpp -i vcpp/mingw.rc -J rc -o vcpp/mingw.res -O coff
$(CXX) $(CXXFLAGS) -o ../bin/sauerbraten.exe vcpp/mingw.res $(CLIENT_OBJS) $(CLIENT_LIBS)

server: $(SERVER_OBJS)
$(CXX) $(CXXFLAGS) -o ../bin/sauer_server.exe $(SERVER_OBJS) $(SERVER_LIBS)

master: $(MASTER_OBJS)
$(CXX) $(CXXFLAGS) -o ../bin/sauer_master.exe $(MASTER_OBJS) $(SERVER_LIBS)

install: all
else
client: libenet $(CLIENT_OBJS)
$(CXX) $(CXXFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS)

server: libenet $(SERVER_OBJS)
$(CXX) $(CXXFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS)

master: libenet $(MASTER_OBJS)
$(CXX) $(CXXFLAGS) -o sauer_master $(MASTER_OBJS) $(SERVER_LIBS)

install: all
cp sauer_client ../bin_unix/$(PLATFORM_PREFIX)_client
cp sauer_server ../bin_unix/$(PLATFORM_PREFIX)_server
ifneq (,$(STRIP))
$(STRIP) ../bin_unix/$(PLATFORM_PREFIX)_client
$(STRIP) ../bin_unix/$(PLATFORM_PREFIX)_server
endif
endif
74 changes: 74 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[UTF-8]
General:
geoip
баны
статистика по игроку в конце игры (фраги, смерти, аккуратность. украденые флаги, возвращенные флаги)
irc-бот
persist

Server events:
onconnect [cn]
ondisconnect [cn]
onmapstart
onimission
onteamkill [cn]
onteamswitch [cn]
ontext [cn] [msg]
onsayteam [cn] [msg]
onswitchname [cn]
onswitchmodel [cn]
onswitchteam [cn]
onmapvote [cn] [map]
onmastermode [cn] [mode]
onclearbans [cn]
onkick [cn] [victim]
onspectator [cn] [1|0] if 0 - unspec, if 1 became spec
onsetteam [cn]
onrecorddemo [cn]
onstopdemo [cn]
oncleardemos [cn]
onlistdemos [cn]
ongetdemo [cn]
onsetmaster [cn] [pass]
onaddbot [cn] [skill]
ondelbot [cn]
onbotlimit [cn] [limit]
onbotbalance [cn] [balance]
onauth [cn] [name]
onpausegame [cn] [pause] if pause>0 game paused

#coopedit
ongetmap [cn]
onnewmap [cn]

Cube script:
getmap (curent_map_name)
getmode (curent_game_mode)
getip [cn] (client_ip)
getcountry [ip] (ip_country)
getfrags [cn] (client_frags)
getdeaths [cn] (client_deaths)
getteamkills [cn] (client_teamkills)
getaccuracy [cn] (client_acuracy)
getflags [cn] (client_scored_flags)
getretflags [cn] (client_returned_flags)
ismaster [cn] (1|0)
isspectator [cn] (1|0)
version (sv_ver build_date)

IRC бот:
возможность кика/бана
перекидывание игрока в другую команду
spect/unspec
изменение режима игры и карты
общение
предупреждение

#commands:
persist [0|1] (is_persist)
specall [0|1]
mute [cn] [0|1]
ban <cn> <time> reason
restart
stat (cn)

2 changes: 2 additions & 0 deletions done
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. �������� ��������� ������� �� server.cpp � ����� fpsgame.h
2. �������� checksleep(int millis) � fpsgame/server.cpp
86 changes: 86 additions & 0 deletions enet/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
ENet 1.3.0 (June 5, 2010):

* enet_host_create() now requires the channel limit to be specified as
a parameter
* enet_host_connect() now accepts a data parameter which is supplied
to the receiving receiving host in the event data field for a connect event
* added an adaptive order-2 PPM range coder as a built-in compressor option
which can be set with enet_host_compress_with_range_coder()
* added support for packet compression configurable with a callback
* improved session number handling to not rely on the packet checksum
field, saving 4 bytes per packet unless the checksum option is used
* removed the dependence on the rand callback for session number handling

Caveats: This version is not protocol compatible with the 1.2 series or
earlier. The enet_host_connect and enet_host_create API functions require
supplying additional parameters.

ENet 1.2.2 (June 5, 2010):

* checksum functionality is now enabled by setting a checksum callback
inside ENetHost instead of being a configure script option
* added totalSentData, totalSentPackets, totalReceivedData, and
totalReceivedPackets counters inside ENetHost for getting usage
statistics
* added enet_host_channel_limit() for limiting the maximum number of
channels allowed by connected peers
* now uses dispatch queues for event dispatch rather than potentially
unscalable array walking
* added no_memory callback that is called when a malloc attempt fails,
such that if no_memory returns rather than aborts (the default behavior),
then the error is propagated to the return value of the API calls
* now uses packed attribute for protocol structures on platforms with
strange alignment rules
* improved autoconf build system contributed by Nathan Brink allowing
for easier building as a shared library

Caveats: If you were using the compile-time option that enabled checksums,
make sure to set the checksum callback inside ENetHost to enet_crc32 to
regain the old behavior. The ENetCallbacks structure has added new fields,
so make sure to clear the structure to zero before use if
using enet_initialize_with_callbacks().

ENet 1.2.1 (November 12, 2009):

* fixed bug that could cause disconnect events to be dropped
* added thin wrapper around select() for portable usage
* added ENET_SOCKOPT_REUSEADDR socket option
* factored enet_socket_bind()/enet_socket_listen() out of enet_socket_create()
* added contributed Code::Blocks build file

ENet 1.2 (February 12, 2008):

* fixed bug in VERIFY_CONNECT acknowledgement that could cause connect
attempts to occasionally timeout
* fixed acknowledgements to check both the outgoing and sent queues
when removing acknowledged packets
* fixed accidental bit rot in the MSVC project file
* revised sequence number overflow handling to address some possible
disconnect bugs
* added enet_host_check_events() for getting only local queued events
* factored out socket option setting into enet_socket_set_option() so
that socket options are now set separately from enet_socket_create()

Caveats: While this release is superficially protocol compatible with 1.1,
differences in the sequence number overflow handling can potentially cause
random disconnects.

ENet 1.1 (June 6, 2007):

* optional CRC32 just in case someone needs a stronger checksum than UDP
provides (--enable-crc32 configure option)
* the size of packet headers are half the size they used to be (so less
overhead when sending small packets)
* enet_peer_disconnect_later() that waits till all queued outgoing
packets get sent before issuing an actual disconnect
* freeCallback field in individual packets for notification of when a
packet is about to be freed
* ENET_PACKET_FLAG_NO_ALLOCATE for supplying pre-allocated data to a
packet (can be used in concert with freeCallback to support some custom
allocation schemes that the normal memory allocation callbacks would
normally not allow)
* enet_address_get_host_ip() for printing address numbers
* promoted the enet_socket_*() functions to be part of the API now
* a few stability/crash fixes


Loading

0 comments on commit a8823b5

Please sign in to comment.