Commit graph

78 commits

Author SHA1 Message Date
turleypol
4dd34a9442
using fmt instead of ostringstream (#873)
* using fmt instead of ostringstream

misc cleanup

* missing external libs for clang tidy check

* added test for cprops ignore while stacking
door descriptor

* use contains instead of count, removed disabled ancient code

* pack/packonto simplification/speedup

instead of using ostream and convert to string, use format and directly
a string
2026-04-06 16:21:50 +02:00
turleypol
24c8c8b92f
Tidy modernize for loops (#862)
* trigger loop convert

* Automated clang-tidy change: modernize-loop-convert

* fixed refactor

* Automated clang-tidy change: modernize-loop-convert

* compile

* first look through

* fixes and start to use a few ranges

* revert autogenerated file

* compilation fix

* second pass

* renamed loop variable

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-31 09:14:02 +01:00
turleypol
bce1154d7a
ClangTidy readability-else-after-return (#857)
* trigger tidy

* Automated clang-tidy change: readability-else-after-return

* compile test

* rerun

* Automated clang-tidy change: readability-else-after-return

* trigger..

* Automated clang-tidy change: readability-else-after-return

* manually removed a few

* Automated clang-tidy change: readability-else-after-return

* removed duplicate code

* fix remaining warnings

* fixed scope

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-18 09:35:52 +01:00
turleypol
21577d8e5b
Clang Tidy concat namespaces (#855)
* tidy

* Automated clang-tidy change: modernize-concat-nested-namespaces

* compile test

* fix namespace

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-17 10:30:21 +01:00
turleypol
22b01b3b81
added multi prop/itemdesc items_decay (#735)
* added multi prop/itemdesc items_decay
added region cfg entry NoDecay
misc cleanup eg chr->equip sets position instead of calling side

* docs

* added future pos refactoring comment

* changed region NoDecay to ItemsDecay so it matches the other props
2024-11-14 06:58:18 +01:00
turleypol
0e675c516a
use new formatter for ERROR_PRINT, added ERROR_PRINTLN (#595)
* use new formatter for ERROR_PRINT, added ERROR_PRINTLN

* remove old log define

* fix comments
2024-01-12 06:51:44 +01:00
turleypol
ec91d7cc3c
Codecleanup from #581 (#583)
* is_visible_to_me checks now also in_visual_range
added obj::distance_to
fixed warnings

* no magic numbers for snprintf
2023-12-26 17:47:40 +01:00
turleypol
d873551c25
removed pol_distance/inrange* functions (#556)
* removed pol_distance/inrange* functions
replaced lastxyz with Pos4d

* replaced WorldIterator::InVisualRange with InMaxVisualRange returning
all objects in maximum update range. Adapted each caller, they now have
to check in_visual_range
Multis should now be send to clients with its footprint in mind.
added testscript for boat moving in/out of range

* removed non pos InRange/InBox functions
gamestate.update_range doesnt need to be a Vector, renamed

* corrected send_action_to_inrange

* replaced clip methods with general numeric type clamp function

* added Range2d constructor with radius

* splitted update_range. chr has now a los_size (how far can it see) and
an object has a visible_size (0 for objects 1/2 footprint for multis)

* use in_range instead of pol_distance

* corrected order of checks

* fixed warnings

* fixed visual size of multis
testclient added wornitems pkt support
added tests for los

* corechanges
2023-12-25 22:02:52 +01:00
turleypol
f99ab2dbaf
switched internals of realms, changed packetdefs (#432)
* switched internals of realms, changed packetdefs

* restructured ListenPoint a bit

* moved actual listenpt code to private method

* simplified listenptr loop and the same for guilds to fix ancient fixme

* added todo for future us
2021-10-26 10:52:13 +02:00
turleypol
f211e16658
wrappers for realm/uworld methods accepting Posclasses. (#428)
* wrappers for realm/uworld methods accepting Posclasses.

* switched memoryorder of realm zone

* fixed nullptr check

* renamed Realm::getzone to getzone_grid

* moved getzone to Realm

* testclient: xfixed multiple full pkts
2021-09-18 19:15:54 +02:00
turleypol
7ee1b64e19
replaced baseclass x,y,z,realm members with Pos4d. (#420)
* replaced baseclass x,y,z,realm members with Pos4d.
Adapted the code, no changes except making the compiler happy

* review changes

* Fixed gotten_item

* fixed copy&waste
2021-09-10 20:17:25 +02:00
turleypol
cccf84dfc8
Fewer compile warnings (#413)
* added escriptgrammar as external lib where it belongs. Silenced warnings.

* bscript compiler warning fixes

* special include file to get rid of gcc warnings about antlr4

* misc windows warnings

* time specifc warnings

* buildfix + apple warnings

* never trust apple

* windows debug build warnings

* some windows clang warnings

* last warning fix
2021-08-28 22:26:15 +02:00
Fernando Rozenblit
eb4eb8b225
Refactor Client to use private inheritance from ThreadedClient (#346)
In summary:
* Make functions in clientthread.cpp depend on ThreadedClient.
* Wrap session, packet logging and cryptengine
* Other small changes to make ThreadedClient private
2021-03-07 14:46:24 +01:00
Kevin Eady
5bbc53ab6c
Add exit_code to uo::Shutdown() (#176)
* Add exit_code to uo::Shutdown()

Co-authored-by: Eric Swanson <eric.the.unicorn@gmail.com>
2020-08-03 20:30:27 +02:00
turleypol
c2a12fb8f5 textcommands should now again be able to start with eg "con" ... 2019-12-18 20:33:44 +01:00
turleypol
ebe884c2fe Merge remote-tracking branch 'origin/master' into utf8
* origin/master: (70 commits)
  Fix to items randomly loading with AOS props due to incorrect initalization of props on load of server.
  Rectify core not clearing mobiles from client during shadow realm shift.
  SendQuestArrow() fix for HSA clients (#91)
  Hotfix/start skill script (#90)
  Noninvasive dynaprops (#89)
  Update objref.xml
  Some network error conditions were missing...
  Final adjustments to core-changes
  Added Turley's missing core-changes :P
  Improved connection handling:  - Linux isn't limited to 1024 connections anymore  - Windows may have some slight performance boost
  removed senseless gitignore files
  use generator unspecific clean cmd in build_tools.sh always generate compile_commands.json force color diagnostic (to work with ninja)
  Curl building uses now the same compiler as pol
  fixed target_link_directories system header declaration
  check if container is orphan when adding items as content. for now it crashes the shard to have the backtrace. (would crash anyway later)
  add corechanges for doc changes
  new build target "clang_format" runs clang-format on current modified or new files in pol-core dir.
  Formatting
  Fix xml indentation
  fix indentation
  ...

Conflicts:
	pol-core/bscript/execmodl.cpp
	pol-core/doc/core-changes.txt
	pol-core/pol/getmsg.cpp
	pol-core/pol/module/unimod.cpp
2019-08-16 19:02:53 +02:00
Kevin Eady
c002cdd5c3 Remove osmodule includes 2019-03-15 00:58:55 +01:00
Kevin Eady
44f2ebbe90 Refactor to make os_module private in UOExecutor 2019-03-11 21:37:51 +01:00
turleypol
7f8b5055b2 no need to strip tilde chars from speech
added small early out test for textcmds
simplified _unicode params
2019-01-16 21:24:41 +01:00
turleypol
04066c309d moved unicode sanitize functions to clib as a preparation to sanitize
only once
renamed mklower/mkupper to make it clear that it should only be used
for pure ascii texts
compiler triggers only once a warning about invalid unicode file
2019-01-12 11:46:30 +01:00
turleypol
d0b74d6da6 added first docs, cleanup of first todos 2019-01-03 18:58:13 +01:00
turleypol
cc27bb611f removed last usage of convertUCtoArray 2019-01-03 11:00:46 +01:00
turleypol
ee92a503bf updated speech code 2019-01-02 23:35:38 +01:00
turleypol
9cfb4ec5a5 moved pkt headers into network folder 2018-12-30 21:35:54 +01:00
turleypol
25dae4fc21 fixed namespaces of moved files 2018-12-22 00:32:47 +01:00
turleypol
e1b14dcd00 moved polfile/uofile files into plib to cleanup atleast a bit the
compile dependencies
2018-12-21 20:27:05 +01:00
turleypol
0d4cca785d cleanup of compilerspecifics, ancient compilers arent supported.
ran tidy to use bools instead of ints
2018-11-03 13:14:53 +01:00
turleypol
27910e0452 fixed linelength 2018-10-28 13:34:20 +01:00
turleypol
ff80e453a5 removed senseless textcmds flag1 and flag2 2018-10-28 10:40:26 +01:00
turleypol
4f40aa7997 removed Clib::decint and used Clib::tostring, changed Clib::hexint to
template function for all integers
2018-10-28 09:31:58 +01:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +02:00
Gabriele Tozzi
b72f725e02 Whitespace fixes 2018-04-03 04:13:03 +02:00
turleypol
3afc41241b
CMake on windows (#48)
CMake can now also be used for windows
2018-02-24 22:34:55 +01:00
turleypol
dbb25bdb62
Include and buildsystem cleanup (#45)
Include cleanup
Reworked buildsystem (Linux only)
Removed dynamic libs, Linux now again uses static linking (like windows)
2018-01-29 21:55:48 +01:00
turleypol
798eda5b63 Cleanup of header includes. 2018-01-01 21:52:14 +01:00
turley
c855a27815 Added new baseclass for uobject
contains only minimum data and can be created with arbritary data.
This reduces memory overhead for each los-check.
Plus minor cleanup
2016-12-12 22:21:59 +01:00
turley
a983d25e4e removed bool members and replaced them with flags.
Further decrease memory foodprint.
2016-12-07 23:34:16 +01:00
frozenblit
079aeeae29 More code reorganization for scriptscheduler
Runlist is now private. This will help when finally fixing
some
scheduler bugs. Still have to encapsulate pidlist...
2016-11-06 22:55:37 +01:00
frozenblit
a89f2f0c94 Starting to refactor the script scheduler
End goal: a Scheduler class that is well encapsulated, helper functions
will be moved to a separate file. For now, ScriptEngineInternalManager
is the ugly name for the Scheduler.
2016-10-26 02:28:06 +02:00
turley
189cad3479 Formating everything
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!
2016-02-19 19:26:35 +01:00
Gabriele Tozzi
ff64e3b2b4 Minor: forcing SpinLock to be used only via SpinLockGuard 2016-02-03 06:08:26 +01:00
Gabriele Tozzi
d1ac902926 Documentation: reformatted headers for DoxyGen 2016-01-28 14:52:40 +01:00
frozenblit
b3b9bb1fb6 Removing dependence on useless includes.
Preparing to reorganize the uofile code by removing useless includes
from the rest ;)
2015-12-04 00:50:14 +01:00
turley
0d9d13bdb9 moved unicode from clib to pol 2015-09-19 10:55:48 +02:00
turley
dfd65e30cd Moved plib realm to pol 2015-09-18 19:11:46 +02:00
Thomas Volkert
1dd2200c6b Renamed endian.h to clib_endian.h to avoid redefinition problems in
system files and the general hiding of the endian.h from the system
2015-08-31 20:01:31 +02:00
turley
b77a13073c corrected several data races 2015-03-14 11:45:14 +01:00
turley
b191039ffd protected pktlog identifier by spinlock, fixes racecondition 2015-02-14 12:56:19 +01:00
turley
64d8fdb310 Moved npc files into mobiles dir, changed the namespace accordingly
removed some old code
2015-01-16 19:44:07 +01:00
turley
e8b46466fa Simplified WorldIterator more
completely removed wrldsize header
simplified more headers
changed zone_convert* parameter from non-const reference to pointer, to make the caller clear that it will change.
2015-01-03 10:15:31 +01:00