Commit graph

22 commits

Author SHA1 Message Date
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
76d9c5e9d6
not yet active: handle update range of client. (#440)
* not yet active: handle update range of client.

* allow down to 5 as client view range

* try to secure testclient against racecondition
2021-10-28 23:08:38 +02:00
Kevin Eady
12d6186d10
Script option enhancements (#118)
* Fix SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES

* Add SCRIPTOPT_SURVIVE_ATTACHED_DISCONNECT

* wip beginning work on templatization

* Use PolModule in pol-specific modules

* wip, creating PolModule with getXYZParam

* wip 1, moving getXYZ to UOExecutor

* compilable with PolObjectImp / PolApplicObj

* add type guard

* wip, change signatures

change signatures of script_method, script_method_id, and
custom_script_method

* compilable (windows)

* linux fixes

* namespace fixes

* remove uoexhelp

* formatting

* compilable

- move can_access_offline_mobiles back to uoexec
- add guildscrobj and partyscrobj sources
- move EGuildRefObjImp and EPartyRefObjImp
- wip, implement asUOExec
- formatting uoexec.cpp,.h

* finish uoexec() helper

* some cleanup
2020-02-08 09:21:35 +01:00
turleypol
98db5aa846 CloseCustomHouse hook gets called when client disconnects 2019-12-28 13:55:25 +01: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
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +02: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
Fernando Rozenblit
78a69c48ac Interactive functions will now test if the script can be blocked
Affected functions:

- Module UO:

Target()
TargetCoordinates()
TargetMultiPlacement()
SelectMenuItem()
SendDialogGump()
SendGumpMenu()
SendTextEntryGump()
SendInstaResDialog()
SelectColor()
SendPopupMenu()
RequestInput()

- Unicode:

RequestInputUC()
2017-07-30 22:31:58 +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
d1ac902926 Documentation: reformatted headers for DoxyGen 2016-01-28 14:52:40 +01:00
Gabriele Tozzi
24eee9ecf4 Merge branch 'master' of https://github.com/polserver/polserver into cmake
Conflicts solved, still need to test and review it before merging into master.
2015-11-27 06:26:46 +01:00
Gabriele Tozzi
1ab8fd77e4 Added: support for pop-up/context menus
misc/popupmenu.ecl handles the request, SendPopUpMenu()send the menu
2015-09-27 01:10:40 +02:00
turley
0d9d13bdb9 moved unicode from clib to pol 2015-09-19 10:55:48 +02:00
Gabriele Tozzi
06a1c1176d Added support for scripts to use custom Gump ids
- Process ids (pid) no longer start from 1 but from 0x01000000.
  This should have no practical effect, but avoids collisions.
- Allow specifying an arbitrary Gump id in SendDialogGump()
  Custom gump ids must be in the range 1-0xFFFFFF. If no gumpid
  is given, the old behavior of using the pid will still be used
  (so that this does not break backward compatibility).
  It is now possible to organize the gumpids in a constants file
  and have the same gump to always be sent with the same id. This
  way the client will recognize it and, if the player moved it
  last time, it will reposition it where the player liked it:
  this should be a nice interface improvement.
  It is now possible to implement the Virtues gump, since it needs
  a pre-defined gumpid of 0x01CD to work.
- CloseGump() now accepts a gumpid instead of a pid. For scripts not
  using custom gump ids, its behavior is the same as before.
- Fixed handling of very small gump menu selection packets (only
  15 bytes long)
2015-09-05 11:42:25 +02: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
frozenblit
c4cb100279 Some more stl_inc.h cleanups 2014-11-01 19:16:13 +01:00
turley
e4e45f687d memoryusage of clients and accounts 2014-06-14 07:58:33 +00:00
turley
fb873de803 decoupled headers to optimize a bit the build time 2014-05-03 09:06:19 +00:00
turley
99d7dc3037 namespaces...finally :)
Hard part is finished every file is touched. Namespaces are currently rough named by directory name.
Maybe we could split it more
2013-12-21 09:10:46 +00:00
turley
70612d9d6d some sync fixes between current & workingdesign 2011-05-21 11:48:52 +00:00
muaddib_pol
6a73041445 + Network Code organized some. Baby steps, baby steps 2009-09-07 20:37:38 +00:00
Renamed from pol-core/pol/cgdata.cpp (Browse further)