Commit graph

31 commits

Author SHA1 Message Date
ChillerDragon 0b6bb8287a Use enum for teams (Closed #8306) 2024-05-05 11:38:29 +08:00
heinrich5991 17402cc43f Rename all variables for strict camel-casing of abbreviations
This is the strict version, ID → Id, UI → Ui, except DDNet which stays
DDNet.

This would fix #7750.

Done using a naive rename script (for bash, use `shopt -s globstar`):

```fish
sed -i \
	-e 's/\([a-z]_\?\)ID/\1Id/g' \
	-e 's/\([^ ]\)\<UI\>/\1Ui/g' \
	-e 's/UI()/Ui()/g' \
	-e 's/\<CUI\>/CUi/g' \
	-e 's/\([\ta-z.(&]\|[,=|] \)ID\>/\1Id/g' \
	-e 's/\<ID\>\([^ ").]\)/Id\1/g' \
	-e 's/\<ID\([0-9]\)/Id\1/g' \
	-e 's/\<ID\>\( [<=>:+*/-]\)/Id\1/g' \
	-e 's/int ID/int Id/g' \
	-e 's/\([a-z]_\?\)GPU/\1Gpu/g' \
	-e 's/\([a-z]_\?\)IP/\1Ip/g' \
	-e 's/\([a-z]_\?\)CID/\1Cid/g' \
	-e 's/\([a-z]_\?\)MySQL/\1Mysql/g' \
	-e 's/MySql/Mysql/g' \
	-e 's/\([a-xz]_\?\)SQL/\1Sql/g' \
	-e 's/DPMode/DpMode/g' \
	-e 's/TTWGraphics/TTwGraphics/g' \
	\
	-e 's/Ipointer/IPointer/g' \
	-e 's/\.vendorId/.vendorID/g' \
	-e 's/\.windowId/.windowID/g' \
	-e 's/SDL_GetWindowFromId/SDL_GetWindowFromID/g' \
	-e 's/SDL_AudioDeviceId/SDL_AudioDeviceID/g' \
	-e 's/SDL_JoystickId/SDL_JoystickID/g' \
	-e 's/SDL_JoystickInstanceId/SDL_JoystickInstanceID/g' \
	-e 's/AVCodecId/AVCodecID/g' \
	src/**/*.cpp src/**/*.h {datasrc,scripts}/**/*.py
git checkout -- src/engine/external
```

I like this option because it presents clear rules.

Still needs fixups because of the naive replacement, I'd do this if we
want this merged.
2024-03-05 15:44:09 +01:00
heinrich5991 d3123a479b Refactor code around inherited net objects, add it to 0.7 code 2024-01-06 22:46:57 +01:00
Alexander Akulich 2ad5c020e0 Add a simpler IServer::SnapNewItem() API based on some more generated data 2023-02-10 23:12:24 +03:00
Dennis Felsing 06a971bcd1 Fix rest of pylint manually 2022-07-27 09:37:25 +02:00
Dennis Felsing 9f8e97fbeb Run flynt -a 2022-07-27 09:37:24 +02:00
Robert Müller ba1608529e Move message copy inside SendPackMsgTranslate
Fix clang warning: Address of stack memory associated with local variable 'aBuf' is still referred to by the stack variable 'tmp' upon returning to the caller.  This will be a dangling reference [clang-analyzer-core.StackAddressEscape]

Mark the input parameters as const pointers and mark the protocol message `Pack` methods as const.
2022-07-11 19:02:16 +02:00
c0d3d3v 59436b5e6d
Add default values to extended Net Objects 2022-06-27 01:11:19 +02:00
c0d3d3v df52df9d4a
move DDNetCharacterDisplayInfo to DDNetCharacter
- add default value option to NetworkValues
- rename m_FreezeTick to m_FreezeStart
2022-06-27 01:10:25 +02:00
trml 940205b3cc Simplify switch state using NetArray 2022-06-02 00:46:17 +02:00
Redix 5efa50ca28 Validate variables of the snap-item base class 2022-02-19 20:08:05 +01:00
def 13a8dfa307 Add pylint
and fix occurences
2020-12-09 10:40:28 +01:00
Magnus Auvinen 6a6a5f00c9 more typesafty in the graphics. introduced the IGraphics::CTextureHandle
Edited by @ChillerDragon to fit in ddnet
(cherry picked from commit cb95e8dfe8)
2019-11-22 18:08:37 +01:00
heinrich5991 ca03ab6337 Address Learath2's comments 2019-06-14 00:28:59 +02:00
heinrich5991 9761e9606a Make most user input teehistoric
Exclude private stuff like chat messages and votes.
2017-09-20 02:23:28 +02:00
heinrich5991 5ae37e6c72 Add protocol extension with UUIDs
This system can easily be extended by independent authors without
collisions, something the old system with plain increasing integers did
not allow.

Do this by utilizing the previously unused message code `NETMSG_NULL`
which has a value of 0.

This works for engine and game messages, snapshot items and events.
2017-05-25 00:52:43 +02:00
laxa c9244d6386 Better and cleaner fix thanks to @heinrich5991 2015-12-09 21:33:06 +01:00
laxa c177a90f35 Fix some VS2015 compiler warnings 2015-12-05 16:52:12 +01:00
def 3ea1bab617 Fix: Allow any tick (fixes #35) 2014-09-12 12:13:46 +02:00
def 3439fefbd3 Fix clamping in network objects to prevent many crashes 2014-09-11 20:08:06 +02:00
def c60c3e14e9 Allow spaces at start of chat messages 2014-01-08 18:21:07 +01:00
Choupom deff0ce7c4 fixed netevent struct names 2011-06-02 17:40:08 +02:00
oy 06115dd49d added "Whitespace and line Endings cleanup" by GreYFoX 2011-04-13 20:37:12 +02:00
Sworddragon 4ff61fcdaa Made compiling process Python 3 compatible 2011-01-06 12:27:50 +01:00
oy 7503c64237 made unpacking of net strings more strict - prevents possible malformed output 2010-08-12 15:22:07 +02:00
Magnus Auvinen 72c06a2589 copied refactor to trunk 2010-05-29 07:25:38 +00:00
Magnus Auvinen f4d60ffff8 some small python changes 2008-10-19 16:50:57 +00:00
Magnus Auvinen 67aa042dcb compile fixes for windows 2008-09-01 17:30:20 +00:00
Magnus Auvinen b322643f17 missed some files 2008-08-27 15:51:09 +00:00
Magnus Auvinen f6c67c29cd large commit with loads of clean up. more is comming 2008-06-12 10:51:48 +00:00
Magnus Auvinen ac18c6a3bd more stuff :) 2008-04-27 05:59:38 +00:00