polserver/pol-core/pol/extobj.h
Kevin Eady e5209a51ff
Add support for boat piloting via mouse movement (#558)
* Initial work on boat piloting changes
- Changed: Boat script is now registered as the boat's control script
- Added: Boat piloting via mouse movement
- Added: boatRef.pilot member
- Added: boatRef.pilot([charRef]) method

* add first test

* Fix boat control script attach on scripted create

* move boat move packet warnings to suspicious acts

* set pilot now errors when mutli has no process

* Add test, testclient support for boat move packet

* Touchup pilot members and methods
- Change `pilot` method to `setpilot`. This standarizes it a bit with
the same naming convention of `npc.setmaster`.
- Fix return values in `pilot` member, returning `0` if no pilot.

* Refactor to put functionality inside UBoat

* Address Discord comments
- Remove SuspecisionActs for no boat process.
- Add `relative_direction` to boat move sysevent.

* destroy boatmount on chr death; more error checks

* Fix compilation after master merge

* Fix relative_direction calculation

* wip tests

* Fix boat tests

* Address review comments
- Initialize UBoat::mountpiece

* Add HSA check to boat.setpilot

* Reject movement if boat mountpiece equipped

* docs; test cleanup

* add test for blocked movement

* Address Discord review comments
- Add suspicious acts notice for client movement while piloting
- Return error on attempting to script move a char that is piloting a boat

* Fix compiler warning
2024-01-06 18:01:31 +07:00

43 lines
789 B
C++

/** @file
*
* @par History
* - 2011/11/10 Tomi: Added file
* - 2011/12/13 Tomi: Added rope, wheel, hull, sails, tiller, rudder, storage and weaponslot
* objtypes for new boat support
*/
#ifndef EXTOBJ_H
#define EXTOBJ_H
namespace Pol
{
namespace Core
{
struct ExternalObject
{
unsigned int tillerman;
unsigned int port_plank;
unsigned int starboard_plank;
unsigned int hold;
unsigned int rope;
unsigned int wheel;
unsigned int hull;
unsigned int tiller;
unsigned int rudder;
unsigned int sails;
unsigned int storage;
unsigned int weaponslot;
unsigned int boatmount;
unsigned int wrestling;
unsigned int mount;
unsigned int shield;
unsigned int secure_trade_container;
unsigned int wornitems_container;
};
void read_extobj();
}
}
#endif